Octet

Where do ICMP, OSPF, BGP, DHCP, STP and TLS fit in the models?

Show the answer

Say this first

Place each protocol by what carries it, then mention what it serves. ICMP rides in IP (protocol 1) and is part of layer 3. OSPF rides in IP as protocol 89, a layer 3 control protocol. BGP runs over TCP port 179, so it is an application by encapsulation that controls layer 3 routing. DHCP uses UDP 67 and 68. STP BPDUs are layer 2 frames. TLS sits above TCP and below HTTP.

Go deeper

Reference table

ProtocolCarried inServes
ARPEthernet, EtherType 0x0806IP to MAC resolution
STP BPDU802.3 frame with LLC to 01:80:C2:00:00:00Layer 2 loop prevention
LLDPEthernet, EtherType 0x88CC to 01:80:C2:00:00:0ENeighbor discovery
MPLSLabel stack between layer 2 and IP, EtherType 0x8847Label switching ("layer 2.5")
ICMPIP protocol 1Error reporting and diagnostics
EIGRPIP protocol 88Routing
OSPFIP protocol 89Routing
GREIP protocol 47Tunneling
ESP and AHIP protocols 50 and 51IPsec
VRRPIP protocol 112Gateway redundancy
BGPTCP 179Routing between and within autonomous systems
DHCPUDP 67 server, 68 clientHost configuration
DNSUDP 53, TCP 53 for large answers and zone transfersName resolution
TLSOver TCP (QUIC folds TLS 1.3 into its own handshake over UDP)Encryption and authentication

The point behind the question

The interviewer is checking whether you understand encapsulation. BGP is the classic trap: it is a routing protocol, yet it rides on TCP and needs IP reachability to the neighbor before it can even start.

Traps

  • Saying BGP is "layer 3" without mentioning TCP 179. The encapsulation is the point.
How did you do?Book 1.3 ArchitectureBook 3.3 Internet (IP)