Huawei Network Model
Huawei Network Model
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their
respective holders.
Notice
The purchased products, services and features are stipulated by the contract made between
Huawei and the customer. All or part of the products, services and features described in this
document may not be within the purchase scope or the usage scope. Unless otherwise
specified in the contract, all statements, information, and recommendations in this
document are provided "AS IS" without warranties, guarantees or representations of any
kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been
made in the preparation of this document to ensure accuracy of the contents, but all
statements, information, and recommendations in this document do not constitute a
warranty of any kind, express or implied.
Website: https://e.huawei.com/
Huawei Certification System
Huawei Certification follows the "platform + ecosystem" development strategy,
which is a new collaborative architecture of ICT infrastructure based on "Cloud-
Pipe-Terminal". Huawei has set up a complete certification system consisting of
three categories: ICT infrastructure certification, platform and service
certification, and ICT vertical certification. It is the only certification system that
covers all ICT technical fields in the industry. Huawei offers three levels of
certification: Huawei Certified ICT Associate (HCIA), Huawei Certified ICT
Professional (HCIP), and Huawei Certified ICT Expert (HCIE). Huawei
Certification covers all ICT fields and adapts to the industry trend of ICT
convergence. With its leading talent development system and certification
standards, it is committed to fostering new ICT talent in the digital era, and
building a sound ICT talent ecosystem.
Huawei Certified ICT Associate-Datacom (HCIA-Datacom) is designed for
Huawei's frontline engineers and anyone who want to understand Huawei's
datacom products and technologies. The HCIA-Datacom certification covers
routing and switching principles, basic WLAN principles, network security
basics, network management and O&M basics, SDN and programmability and
automation basics.
The Huawei certification system introduces the industry, fosters innovation,
and imparts cutting-edge datacom knowledge.
Contents
1 Network Reference Model..............................................................1
1.1 Foreword................................................................................................................................ 1
1.2 Objectives.............................................................................................................................. 1
1.3 Applications and Data............................................................................................................ 1
1.3.1 Origin of the Story – Applications........................................................................................ 1
1.3.2 Application Implementation – Data.....................................................................................2
1.4 Network Reference Model and Standard Protocols.................................................................2
1.4.1 OSI Reference Model........................................................................................................... 2
1.4.2 TCP/IP Reference Model...................................................................................................... 3
1.4.3 Common TCP/IP Protocols................................................................................................... 4
1.4.4 Common Protocol Standardization Organizations...............................................................5
1.4.5 Application Layer................................................................................................................ 5
1.4.6 Transport Layer................................................................................................................... 7
1.4.7 TCP and UDP....................................................................................................................... 7
1.4.8 TCP Connection Setup - Three-Way Handshake..................................................................9
1.4.9 TCP Sequence Number and Acknowledgment Number.....................................................10
1.4.10 TCP Window Sliding Mechanism......................................................................................10
1.4.11 TCP Shutdown - Four-Way Handshake.............................................................................11
1.4.12 Network Layer................................................................................................................ 12
1.4.13 Working Process of a Network Layer Protocol.................................................................13
1.4.14 Data Link Layer.............................................................................................................. 14
1.4.15 Ethernet and Source MAC Addresses..............................................................................14
1.4.16 ARP................................................................................................................................. 15
1.4.17 Physical Layer................................................................................................................. 19
1.4.18 Common Transmission Media......................................................................................... 19
1.5 Data Communication Process..............................................................................................21
1.5.1 Data Encapsulation on the Sender....................................................................................21
1.5.2 Data Transmission on the Intermediate Network..............................................................22
1.5.3 Data Decapsulation on the Receiver.................................................................................23
1.6 Summary............................................................................................................................. 24
1.7 Quiz..................................................................................................................................... 23
Network Reference Model Page 1
1.1 Foreword
In the digital era, various information is presented as data in our life. What is
data? How is data transmitted?
In this course, we will use the network reference model to understand the "life"
of data.
1.2 Objectives
On completion of this course, you will be able to:
Understand the data definition and transmission process.
Understand the concepts and advantages of the network reference
model.
Understand common standard protocols.
Understand the data encapsulation and decapsulation processes.
A computer can identify only digital data consisting of 0s and 1s. It is incapable
of reading other types of information, so the information needs to be translated
into data by certain rules.
However, people do not have the capability of reading electronic data. Therefore,
data needs to be converted into information that can be understood by people.
A network engineer needs to pay more attention to the end-to-end data
transmission process.
Physical layer: transmits bit flows between devices and defines physical
specifications such as electrical levels, speeds, and cable pins.
Data link layer: encapsulates bits into octets and octets into frames, uses
MAC addresses to access media, and implements error checking.
Network layer: defines logical addresses for routers to determine paths and
transmits data from source networks to destination networks.
Transport layer: implements connection-oriented and non-connection-
oriented data transmission, as well as error checking before retransmission.
Session layer: establishes, manages, and terminates sessions between
entities at the presentation layer. Communication at this layer is
implemented through service requests and responses transmitted between
applications on different devices.
Presentation layer: provides data encoding and conversion so that data sent
by the application layer of one system can be identified by the application
layer of another system.
Application layer: provides network services for applications and the OSI
layer closest to end users.
Network Reference Model Page 4
The TCP/IP model is similar to the OSI model in structure and adopts a
hierarchical architecture. Adjacent TCP/IP layers are closely related.
The standard TCP/IP model combines the data link layer and physical layer in the
OSI model into the network access layer. This division mode is contrary to the
actual protocol formulation. Therefore, the equivalent TCP/IP model that
integrates the TCP/IP standard model and the OSI model is proposed. Contents in
the following slides are based on the equivalent TCP/IP model.
The OSI protocol stack is complex, and the TCP and IP protocols are widely used
in the industry. Therefore, the TCP/IP reference model becomes the mainstream
reference model of the Internet.
6
Application Layer
Common TCP/IP Protocols
1.
7 Application Layer
The File Transfer Protocol (FTP) transfers files from one host to another to
implement file download and upload. This protocol adopts the client/server (C/S)
structure.
2.
8 FTP
3.
9 Telnet
10 HTTP
11 Transport Layer
TCP header:
12 Header Formats
Source Port: identifies the application that sends the segment. This field is 16
bits long.
Destination Port: identifies the application that receives the segment. This
field is 16 bits long.
Sequence Number: Every byte of data sent over a TCP connection has a
sequence number. The value of the Sequence Number field equals the
sequence number of the first byte in a sent segment. This field is 32 bits
long.
Acknowledgment Number: indicates the sequence number of the next
segment's first byte that the receiver is expecting to receive. The value of
this field is 1 plus the sequence number of the last byte in the previous
segment that is successfully received. This field is valid only when the ACK
flag is set. This field is 32 bits long.
Header Length: indicates the length of the TCP header. The unit is 32 bits (4
bytes). If there is no option content, the value of this field is 5, indicating that
the header contains 20 bytes.
Reserved: This field is reserved and must be set to 0. This field is 6 bits long.
Control Bits: control bits, includes FIN, ACK, and SYN flags, indicating TCP
data segments in different states.
Window: used for TCP flow control. The value is the maximum number of
bytes that are allowed by the receiver. The maximum window size is 65535
bytes. This field is 16 bits long.
Checksum: a mandatory field. It is calculated and stored by the sender and
verified by the receiver. During checksum computation, the TCP header and
TCP data are included, and a 12-byte pseudo header is added before the TCP
segment. This field is 16 bits long.
Network Reference Model Page 10
Urgent: indicates the urgent pointer. The urgent pointer is valid only when
the URG flag is set. The Urgent field indicates that the sender transmits data
in emergency mode. The urgent pointer indicates the number of urgent data
bytes in a segment (urgent data is placed at the beginning of the segment).
This field is 16 bits long.
Options: This field is optional. This field is 0 to 40 bytes long.
UDP header:
Source Port: identifies the application that sends the segment. This field is 16
bits long.
Destination Port: identifies the application that receives the segment. This
field is 16 bits long.
Length: specifies the total length of the UDP header and data. The possible
minimum length is 8 bytes because the UDP header already occupies 8
bytes. Due to the existence of this field, the total length of a UDP segment
does not exceed 65535 bytes (including an 8-byte header and 65527-byte
data).
Checksum: checksum of the UDP header and UDP data. This field is 16 bits
long.
2. Port Numbers
13 Port Numbers
Generally, the source port used by a client is randomly allocated, and the
destination port is specified by the application of a server.
The system generally selects a source port number that is greater than 1023 and
is not being used.
The destination port number is the listening port of the application (service)
enabled on the server. For example, the default port number for HTTP is 80.
Network Reference Model Page 11
Assume that PC1 needs to send segments of data to PC2. The transmission
process is as follows:
PC1 numbers each byte to be sent by TCP. Assume that the number of the
first byte is a+1. Then, the number of the second byte is a+2, the number of
the third byte is a+3, and so on.
PC1 uses the number of the first byte of each segment of data as the
sequence number and sends out the TCP segment.
After receiving the TCP segment from PC1, PC2 needs to acknowledge the
segment and request the next segment of data. How is the next segment of
data determined? Sequence number (a+1) + Payload length = Sequence
number of the first byte of the next segment (a+1+12)
After receiving the TCP segment sent by PC2, PC1 finds that the
acknowledgment number is a+1+12, indicating that the segments from a+1
to a+12 have been received and the sequence number of the upcoming
segment to be sent should be a+1+12.
To improve the sending efficiency, multiple segments of data can be sent at a
time by the sender and then acknowledged at a time by the receiver.
1: During the TCP three-way handshake, both ends notify each other of the
maximum number of bytes (buffer size) that can be received by the local end
through the Window field.
2: After the TCP connection is set up, the sender sends data of the specified
number of bytes based on the window size declared by the receiver.
3: After receiving the data, the receiver stores the data in the buffer and waits for
the upper-layer application to obtain the buffered data. After the data is obtained
by the upper-layer application, the corresponding buffer space is released.
4: The receiver notifies the current acceptable data size (window) according to its
buffer size.
5: The sender sends a certain amount of data based on the current window size
of the receiver.
TCP supports data transmission in full-duplex mode, which means that data can
be transmitted in both directions at the same time. Before data is transmitted,
TCP sets up a connection in both directions through three-way handshake.
Therefore, after data transmission is complete, the connection must be closed in
both directions. This is shown in the figure.
1: PC1 sends a TCP segment with FIN being set. The segment does not carry
data.
2: After receiving the TCP segment from PC1, PC2 replies with a TCP segment
with ACK being set.
3: PC2 checks whether data needs to be sent. If so, PC2 sends the data, and then
a TCP segment with FIN being set to close the connection. Otherwise, PC2
directly sends a TCP segment with FIN being set.
4: After receiving the TCP segment with FIN being set, PC1 replies with an ACK
segment. The TCP connection is then torn down in both directions.
18 Network Layer
Internet Protocol Version 4 (IPv4) is the most widely used network layer protocol.
19
Working Process of a Network Layer Protocol
decimal numbers, each ranging from 0 to 255, separated by dots, such as,
192.168.1.1.
Encapsulation and forwarding of IP data packets:
When receiving data from an upper layer (such as the transport layer), the
network layer encapsulates an IP packet header and adds the source and
destination IP addresses to the header.
Each intermediate network device (such as a router) maintains a routing table
that guides IP packet forwarding like a map. After receiving a packet, the
intermediate network device reads the destination address of the packet,
searches the local routing table for a matching entry, and forwards the IP packet
according to the instruction of the matching entry.
When the IP packet reaches the destination host, the destination host determines
whether to accept the packet based on the destination IP address and then
processes the packet accordingly.
When the IP protocol is running, routing protocols such as OSPF, IS-IS, and
BGP are required to help routers build routing tables, and ICMP is required to
help control networks and diagnose network status.
21 Ethernet Definition
Ethernet is a broadcast multiple access protocol that works at the data link layer
protocol.
The network interfaces of PCs comply with the Ethernet standard.
Generally, a broadcast domain corresponds to an IP network segment.
22.1.1 ARP
ARP: Address Resolution Protocol
Discovers the MAC address associated with a given IP address.
23 ARP
The Address Resolution Protocol (ARP) is a TCP/IP protocol that discovers the data
link layer address associated with a given IP address.
ARP is an indispensable protocol in IPv4. It provides the following functions:
Discovers the MAC address associated with a given IP address.
Maintains and caches the mapping between IP addresses and MAC addresses
through ARP entries.
Detects duplicate IP addresses on a network segment.
ARP Implementation Principles (1)
Network Reference Model Page 19
Generally, a network device has an ARP cache. The ARP cache stores the
mapping between IP addresses and MAC addresses.
Before sending a datagram, a device searches its ARP table. If a matching ARP
entry is found, the device encapsulates the corresponding MAC address in the
frame and sends out the frame. If a matching ARP entry is not found, the device
sends an ARP request to discover the MAC address.
The learned mapping between the IP address and MAC address is stored in the
ARP table for a period. Within the validity period (180s by default), the device
can directly search this table for the destination MAC address for data
encapsulation, without performing ARP-based query. After the validity period
expires, the ARP entry is automatically deleted.
If the destination device is located on another network, the source device
searches the ARP table for the gateway MAC address of the destination address
and sends the datagram to the gateway. Then, the gateway forwards the
datagram to the destination device.
ARP Implementation Principles (2)
In this example, the ARP table of Host 1 does not contain the MAC address of
Host 2. Therefore, Host 1 sends an ARP request message to discover the
destination MAC address.
Network Reference Model Page 20
The ARP request message is encapsulated in an Ethernet frame. The source MAC
address in the frame header is the MAC address of Host 1 at the transmit end.
Because Host 1 does not know the MAC address of Host 2, the destination MAC
address is the broadcast address FF-FF-FF-FF-FF-FF.
The ARP request message contains the source MAC address, source IP address,
destination MAC address, and destination IP address. The destination MAC
address is all 0s. The ARP request message is broadcast to all hosts on the
network, including gateways.
ARP Implementation Principles (3)
After receiving the ARP request message, each host checks whether it is the
destination of the message based on the carried destination IP address. If not,
the host does not respond to the ARP request message. If so, the host adds the
sender's MAC and IP addresses carried in the ARP request message to the ARP
table, and then replies with an ARP reply message.
ARP Implementation Principles (4)
Network Reference Model Page 21
After receiving the ARP reply message, Host 1 checks whether it is the
destination of the message based on the carried destination IP address. If so,
Host 1 records the carried sender's MAC and IP addresses in its ARP table.
29 Physical Layer
Optical fiber transmission can be classified into the following types based on
functional components:
Fibers: optical transmission media, which are glass fibers, used to restrict optical
transmission channels.
Optical modules: convert electrical signals into optical signals to generate optical
signals.
Data transmission through serial cables:
Network Reference Model Page 24
Serial cables are widely used on wide area networks (WANs). The types of
interfaces connected to serial cables vary according to WAN line types. The
interfaces include synchronous/synchronous serial interfaces, ATM interfaces,
POS interfaces, and CE1/PRI interfaces.
Data transmission between terminal and wireless routers through wireless
signals:
Assume that you are using a web browser to access Huawei's official website.
After you enter the website address and press Enter, the following events occur
on your computer:
1. The browser (application program) invokes HTTP (application layer protocol)
to encapsulate the application layer data. (The DATA in the figure should also
include the HTTP header, which is not shown here.)
2. HTTP uses TCP to ensure reliable data transmission and transmits
encapsulated data to the TCP module.
3. The TCP module adds the corresponding TCP header information (such as the
source and destination port numbers) to the data transmitted from the
application layer. At the transport layer, the PDU is called a segment.
4. On an IPv4 network, the TCP module sends the encapsulated segment to the
IPv4 module at the network layer. (On an IPv6 network, the segment is sent
to the IPv6 module for processing.)
5. After receiving the segment from the TCP module, the IPv4 module
encapsulates the IPv4 header. At this layer, the PDU is called a packet.
6. Ethernet is used as the data link layer protocol. Therefore, after the IPv4
module completes encapsulation, it sends the packet to the Ethernet module
(such as the Ethernet NIC) at the data link layer for processing.
Network Reference Model Page 26
7. After receiving the packet from the IPv4 module, the Ethernet module adds
the corresponding Ethernet header and FCS frame trailer to the packet. At
this layer, the PDU is called a frame.
8. After the Ethernet module completes encapsulation, it sends the data to the
physical layer.
9. Based on the physical media, the physical layer converts digital signals into
electrical signals, optical signals, or electromagnetic (wireless) signals.
10. The converted signals start to be transmitted on the network.
35 In most cases:
Data Transmission on the Intermediate Network
After being transmitted over the intermediate network, the data finally reaches
the destination server. Based on the information in different protocol headers,
the data is decapsulated layer by layer, processed, transmitted, and finally sent
to the application on the web server for processing.
36.1 Quiz
1. (Single) Which of the following organizations is not a common protocol
standardization organization? ( )
A. IETF(Internet Engineering Task Force)
B. IEEE(Institute of Electrical and Electronics Engineers)
C. ISO(International Organization for Standardization)
D. IEC(International Electrotechnical Commission)
2. (Single) Which of the following transport-layer protocols is HTTP based on? (
)
A. TCP 80
B. TCP 23
C. TCP 25
D. UDP 69
3. (Multiple) Which of the following protocols are transport-layer protocols? ( )
A. TCP
B. FTP
C. UDP
D. HTTP
Network Reference Model Page 28
36.2 Summary
Both the OSI reference model and the TCP/IP reference model adopt the layered
design concept.
Clear division of functions and boundaries between layers facilitates the
development, design, and troubleshooting of each component.
The functions of each layer can be defined to impel industry standardization.
Interfaces can be provided to enable communication between hardware and
software on various networks, improving compatibility.
Data generation and transmission require collaboration between modules.
Meanwhile, each module must fulfill its own responsibilities.