OSI and TCP/IP Models

Key Takeaways

  • The OSI model has seven layers (Physical through Application); the TCP/IP model commonly maps to four layers (Network Access, Internet, Transport, Application) or five when Network Access is split into Physical and Data Link.
  • Each layer adds a header during encapsulation and removes it during de-encapsulation; the unit of data at each layer is a PDU (bits, frame, packet, segment/datagram, data).
  • Routers make forwarding decisions with Layer 3 IP addresses; Layer 2 switches forward using MAC addresses within a broadcast domain.
  • Huawei campus designs map user access, aggregation, and core roles onto these models so you can predict where VLANs, routing, ACLs, and services are applied.
  • HCIA-Datacom expects you to map protocols (Ethernet, IP, TCP/UDP, HTTP/DNS) to the correct layer and describe how encapsulation works end to end.
Last updated: July 2026

OSI and TCP/IP Models

Quick Answer: HCIA-Datacom expects you to know the OSI seven layers, how they map to the TCP/IP four- or five-layer stack, what PDU each layer uses, and how encapsulation/de-encapsulation moves user data across a Huawei campus path (PC → access switch → aggregation/core → router → remote network).

Network models give every engineer a shared language for troubleshooting and design. When a user on a Huawei S series access switch cannot reach a server in another VLAN, you should immediately ask: Is the failure at Layer 2 (MAC learning, VLAN, trunk) or Layer 3 (gateway, route, ACL)? The OSI and TCP/IP models answer that question by separating functions into layers. Huawei’s HCIA-Datacom outline treats these models as the foundation for every later topic—Ethernet switching, IP routing, OSPF, ACL, WLAN, and automation all sit on top of this framework.

Why Models Matter on the Exam and in Production

Without a layered model, every problem looks like “the network is down.” With the model, you isolate:

  • Physical: cabling, optical power, interface up/down on VRP
  • Data Link: MAC table, VLAN membership, STP blocking, Eth-Trunk
  • Network: IP addressing, ARP, routing table, OSPF neighbor state
  • Transport: TCP handshake, port filters, session resets
  • Application: DNS, HTTP, DHCP options, user credentials

On Huawei devices, display interface brief, display mac-address, display ip routing-table, and display acl all each target different layers. Knowing which tool maps to which layer is a classic exam skill and a daily operations habit.

The OSI Seven-Layer Model

The Open Systems Interconnection (OSI) model defines seven layers from the wire up to the user application:

LayerNamePrimary functionExample technologies
7ApplicationUser-facing services and APIsHTTP, HTTPS, FTP, DNS, DHCP, SSH
6PresentationData format, encryption, compressionTLS/SSL, JPEG, ASCII/UTF-8
5SessionDialog control and session setup/teardownRPC, NetBIOS session concepts
4TransportEnd-to-end reliability, ports, flow controlTCP, UDP
3NetworkLogical addressing and path selectionIPv4, IPv6, ICMP, OSPF, static routes
2Data LinkFraming, MAC addressing, local deliveryEthernet, PPP, WLAN MAC
1PhysicalBits on the mediumCopper, fiber, electrical/optical signaling

Layer roles you must memorize

Layer 1 – Physical. Moves raw bits. Cable type (Cat5e/Cat6, single-mode/multi-mode fiber), speed (1G/10G), and duplex live here. A down optical link or a wrong SFP is a Layer 1 fault—no MAC table or route will fix it.

Layer 2 – Data Link. Packages bits into frames, uses MAC addresses, and provides local-network delivery and error detection (FCS/CRC). Ethernet switches operate primarily here. VLANs are a Layer 2 segmentation tool; Huawei Hybrid/Access/Trunk link types control how VLAN tags appear on frames.

Layer 3 – Network. Uses IP addresses and builds end-to-end paths across multiple Layer 2 domains. Routers and Layer 3 switches (with VLANIF interfaces on Huawei) make forwarding decisions from the routing table (RIB) and FIB.

Layer 4 – Transport. Multiplexes applications with port numbers. TCP provides connection-oriented, reliable, ordered delivery with flow/congestion control. UDP is connectionless and lightweight—ideal for DNS queries, DHCP, and real-time media where latency beats retransmission.

Layers 5–7 – Session, Presentation, Application. These upper layers organize dialogs, encode data, and expose services to users. On HCIA-Datacom, you rarely configure “Session” as a discrete feature, but you must know that application problems (wrong DNS name, expired certificate, blocked TCP 443) are not fixed by changing OSPF costs.

Memory aid for OSI (bottom-up)

Please Do Not Throw Sausage Pizza Away — Physical, Data Link, Network, Transport, Session, Presentation, Application.

The TCP/IP Model (Four and Five Layers)

Real Internet and enterprise stacks follow the TCP/IP (DoD) model more closely than pure OSI. Huawei materials and most vendor exams accept both the four-layer and five-layer presentations:

TCP/IP (4-layer)TCP/IP (5-layer)Rough OSI mapping
ApplicationApplicationOSI 5–7
TransportTransportOSI 4
InternetInternet (Network)OSI 3
Network AccessData Link + PhysicalOSI 1–2
Physical (when split)OSI 1

Application layer (TCP/IP) consolidates OSI Session, Presentation, and Application. HTTP, DNS, DHCP, FTP, and SNMP all live here from a TCP/IP viewpoint.

Transport layer is still TCP and UDP with source/destination ports.

Internet layer is IPv4/IPv6, ICMP, and routing protocols’ data-plane interaction (the control plane still runs “over” IP).

Network Access covers Ethernet framing, MAC addressing, and the physical medium—exactly what access switches and WLAN APs handle in a Huawei campus fabric.

For HCIA-Datacom, if a question says “TCP/IP four layers,” map Network Access = OSI 1+2. If it shows five layers, Physical and Data Link are listed separately. Do not invent a sixth TCP/IP layer.

PDUs: What Each Layer Calls Its Data

A Protocol Data Unit (PDU) is the unit of data at a given layer:

LayerPDU nameKey identifiers
ApplicationData / MessageApplication semantics
TransportSegment (TCP) / Datagram (UDP)Port numbers, sequence (TCP)
NetworkPacketSource/destination IP
Data LinkFrameSource/destination MAC, optional 802.1Q tag
PhysicalBitsElectrical/optical symbols

Exam traps often mix “packet” and “frame.” Remember: switches forward frames; routers forward packets. When a Huawei Layer 3 switch routes between VLANIFs, it receives a frame, strips the Layer 2 header, makes a Layer 3 decision, and rewrites a new frame toward the next hop.

Encapsulation and De-encapsulation

Encapsulation is the process of wrapping upper-layer data with lower-layer headers (and sometimes trailers) as data leaves a host:

  1. Application creates data (for example, an HTTP GET).
  2. Transport adds a TCP or UDP header → segment/datagram.
  3. Internet adds an IP header → packet.
  4. Data Link adds Ethernet header + FCS trailer → frame.
  5. Physical converts the frame to bits on the wire or fiber.

De-encapsulation is the reverse on the receiving host: strip headers layer by layer until the application data is recovered.

Intermediate devices only look as deep as their role requires:

  • Hub (historical): regenerates bits (Layer 1)—no addressing intelligence.
  • Layer 2 switch: inspects MAC header, optionally 802.1Q tag; does not rewrite IP.
  • Router / L3 switch: inspects IP header for destination lookup; decrements TTL; rebuilds Layer 2 encapsulation for the outbound interface.

Same data, different headers along a campus path

Consider PC-A in VLAN 10 (access switch ASW1) sending to a server in another building behind core router CR1:

  1. PC-A encapsulates Application → TCP → IP → Ethernet (dest MAC = default gateway).
  2. ASW1 switches the frame within VLAN 10 toward the gateway VLANIF or uplink trunk.
  3. The Layer 3 device de-encapsulates to IP, finds a route, encapsulates a new Ethernet frame toward the next-hop MAC, and forwards.
  4. The server de-encapsulates fully and processes HTTP.

At every hop, the IP packet (source/destination IP) stays the same end to end (unless NAT is applied). The Ethernet frame changes at every Layer 3 hop because MAC addresses are local to each broadcast domain.

Protocol-to-Layer Mapping (High-Yield)

Protocol / technologyLayer (exam view)Notes for Huawei campus
Ethernet / 802.3Data Link + PhysicalAccess/aggregation switching
802.1Q VLAN tagData LinkTrunks between switches
ARPBetween L2 and L3 (maps IP→MAC)Required before first IP hop
IPv4 / IPv6Network / InternetVLANIF, routing, OSPF
ICMPNetworkPing, traceroute diagnostics
TCP / UDPTransportACL matches often use L3+L4
HTTP, DNS, DHCP, SSHApplication (TCP/IP)Services users notice first
OSPFNetwork (control plane over IP)Advertises routes, not user data

Relating Models to Huawei Enterprise Roles

In a typical three-tier Huawei campus (access, aggregation, core):

  • Access switches emphasize Layer 2: MAC learning, VLAN assignment, port security, PoE for APs/phones.
  • Aggregation may pure-switch or perform inter-VLAN routing with VLANIF + SVF/stacking designs.
  • Core / border routers emphasize Layer 3: OSPF areas, default routes to WAN, ACLs, NAT toward the Internet.

When you later study iMaster NCE and SDN, remember that controllers still orchestrate the same layered data plane—they do not replace Ethernet or IP; they program how those layers behave at scale.

Common Exam Pitfalls

  • Confusing OSI Application with TCP/IP Application (TCP/IP Application includes Session + Presentation functions).
  • Claiming routers operate only at Layer 3 and therefore “ignore” Layer 2—routers still need correct Layer 2 encapsulation on each interface.
  • Saying TCP is Layer 3 or IP is Layer 4.
  • Forgetting that TTL is in the IP header (Layer 3), not the Ethernet header.
  • Mixing PDU names: never call a Layer 2 unit a “packet” on the exam if the question is testing terminology.

Master this section before VLAN, STP, and OSPF. Every later HCIA-Datacom topic assumes you can place a symptom and a command at the correct layer.

Test Your Knowledge

In the five-layer TCP/IP model used in many HCIA-Datacom references, which pair of layers corresponds to the OSI Physical and Data Link layers?

A
B
C
D
Test Your Knowledge

A Huawei Layer 3 switch receives a frame on VLANIF 10, looks up the destination IP in the routing table, and sends the packet out VLANIF 20. What happens to the Ethernet MAC addresses?

A
B
C
D
Test Your Knowledge

Which PDU name correctly pairs with the Transport layer when TCP is used?

A
B
C
D
Test Your Knowledge

During encapsulation on a sending PC, in which order are headers typically applied from the application down to the wire?

A
B
C
D