02 Network Reference Model
02 Network Reference Model
Model
Foreword
• In the digital era, various information is presented as data in our life. What is data?
• In this course, we will use the network reference model to understand the "life" of
data.
Page 1 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Objectives
▪ Understand the data definition and transmission process.
Page 2 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1 A p p l i c a t io ns and
Data
2 N e t w o r k R e f e r e nc e M o d e l a n d S t a n d a r d P r o t oc
ols
3 D a t a C o m m u n ic a t i on P r o c e s
s
Page 3 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Origin of the Story - Applications
Applications are used to meet various requirements of people, such as web page access, online gaming,
and online video playback.
Information is generated along with applications. Texts, pictures, and videos are all information
presentation modes.
Application
Information
Page 4 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Application Implementation - Data
Data generation In the computer field, data is the carrier of all kinds of information.
Does an application
Data need to complete the
Network entire process from
data generation to
data transmission?
Page 5 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1 A p p l i c a t io ns and
Data
2 N e t w o r k R e f e r e nc e M o d e l a n d S t a n d a r d P r o t oc
ols
3 D a t a C o m m u n ic a t i on P r o c e s
s
Page 6 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
OSI Reference Model
7. Application Layer Provides interfaces for applications.
6. Presentation Translates data formats to ensure that the application-layer data of one system can be
Layer identified by the application layer of another system.
5. Session Layer Establishes, manages, and terminates sessions between communicating parties.
3. Network Layer Defines logical addresses and transfers data from sources to destinations.
Encapsulates packets into frames, transmits frames in P2P or P2MP mode, and
2. Data Link Layer
implements error checking.
Transmits bitstreams over transmission media and defines electrical and physical
1. Physical Layer specifications.
Page 7 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
TCP/IP Reference 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.
Application Layer
Application Layer Presentation Layer Application Layer
Session Layer
Page 8 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Common TCP/IP Protocols
The TCP/IP protocol stack defines a series of standard protocols.
Page 9 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Common Protocol Standardization Organizations
IE Internet Engineering Task Force
T
IETF is a voluntary organization responsible for developing and promoting Internet protocols (especially
protocols that constitute the TCP/IP protocol suite), and releasing new or replacing old protocol standards
through RFCs.
IEE Institute of Electrical and Electronics Engineers
E
IEEE has formulated about 3 0 % of standards in the electronics, electrical, and computer
science fields worldwide. Those standards include well-known IEEE802.3 (Ethernet) and
IEEE802.11 (Wi-Fi).
ISO International Organization for Standardization
ISO is an international organization that plays an important role in the formulation of
computer network standards, such as the OSI model defined in ISO/IEC 7498-1.
Page 11 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Application Layer
The application layer provides interfaces for application software so that applications can use network
services. The application layer protocol designates transport layer protocols and ports.
PDUs transmitted at the network layer are called data.
Application • HTTP 80 (TCP)
Layer Hypertext transfer protocol, which provides web browsing
(Data) services.
• Telnet 23 (TCP)
Transport Layer Remote login protocol, which provides remote management
services.
• FTP 20 and 21 (TCP)
Network Layer File transfer protocol, which provides Internet file resource
sharing services.
Data Link Layer • SMTP 25 (TCP)
Simple mail transfer protocol, which provides Internet email
services.
Physical Layer • TFTP 69 (UDP)
Simple file transfer protocol, which provides simple file
transfer services.
Page 12 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Common Application Layer Protocols - FTP
FTP 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.
FTP client: provides commands for local users to FTP server: a device that runs the FTP service.
operate files on a remote server. A user can It provides the access and operation functions
for remote clients, allowing users to access the
install an FTP client program on a PC and set up
FTP server through the FTP client program
a connection with an FTP server to operate files
and access files on the server.
on the server.
Page 13 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Common Application Layer Protocols - Telnet
Telnet A standard protocol that provides remote login services on a network.
It provides users with the ability to operate remote devices through local PCs.
Telnet server
Page 14 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Common Application Layer Protocols - HTTP
HTT HyperText Transfer Protocol
P
HTTP is one of the most widely used network protocols on the Internet. HTTP was originally designed to
provide a method for publishing and receiving HTML pages.
Network
HTTP client HTTP server
Visits www.huawei.com.
Page 15 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Transport Layer
A transport layer protocol receives data from an application layer protocol, encapsulates the data with
the corresponding transport layer protocol header, and helps establish an end-to-end (port-to-port)
connection.
PDUs transmitted at the transport layer are called segments.
Application
Layer
Transport layer protocols:
Transport
Layer TCP: a connection-oriented reliable
(Segment) protocol defined by IETF in RFC 793.
Network UDP: a simple connectionless
Layer
protocol defined by IETF in RFC 768.
Data Link
Layer
Physical
Layer
Page 16 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
TCP and UDP - Header Formats
Source port (16) Destination port (16)
Sequence number (32)
Acknowledgement number (32) TCP header
Header Reserved Control Window (16) 20 bytes
length (4) (6) bits (6)
Page 17 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
TCP and UDP - Port Numbers
Web browser HTTP server
TCP port 1024 TCP port 1231 TCP port 80 TCP port 23
House number: 1.1.1.1 (IP address) House number: 2.2.2.2 (IP address)
Network
HTTP client HTTP server
Source IP address: Source port number:
1.1.1.1 1024 HTTP
Destinat Destination port
ion IP number: Payload
address: 80
IP header
2.2.2.2 TCP header
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.
Page 19 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
TCP Connection Setup - Three-Way Handshake
Before sending data, a TCP-based application needs to establish a connection through three-way
handshake.
PC 1 PC 2
1.1.1.1:1024 2.2.2.2:23
Page 20 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
TCP Sequence Number and Acknowledgment Number
TCP uses the Sequence Number and Acknowledgment Number fields to implement reliable and ordered
data transmission.
PC 1 PC 2
1.1.1.1:1024 2.2.2.2:23
1 A TCP connection is
2 established.
3 4
5 6 IP header TCP header
……
Source = 1.1.1.1 Seq=a+1 Payload
Destination = 2.2.2.2 Length = 12 bytes
Ack=b+1
Source = 2.2.2.2
Seq=b+1 Payload
Destination =
Ack=a+1+12 Length =0 bytes
1.1.1.1
Question: Why does
Data to be sent Source = 1.1.1.1
Seq=a+13 Payload the value of the
Destination = Length = 66 bytes
2.2.2.2 Ack=b+1 Acknowledgment
Source = 2.2.2.2 Number field in the
Seq=b+1 Payload
Destination =
Ack=a+12+66 Length = 0 bytes segment sent by PC1
1.1.1.1
not increase?
Page 21 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
TCP Window Sliding Mechanism
TCP uses the sliding window mechanism to control the data transmission rate.
PC 1 PC 2
Page 22 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
TCP Shutdown - Four-Way Handshake
After data transmission is complete, TCP needs to use the four-way handshake mechanism to disconnect the TCP
connection and release system resources.
PC 1 PC 2
1.1.1.1:1024 A TCP connection is 2.2.2.2:23
established.
TCP segment
exchange
Page 23 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Network Layer
The transport layer is responsible for establishing connections between processes on hosts, and the
network layer is responsible for transmitting data from one host to another.
PDUs transmitted at the network layer are called packets.
Application
Layer
Transport Layer
Page 24 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Working Process of a Network Layer Protocol
Packet Encapsulation Packet Forwarding Based on Network Layer Addresses
Letter: data sent by an upper layer (for example,
Router1
the transport layer)
G0/0/0
PC1 G0/0/1
PC2
The PC encapsulates the IP header (envelope).
The key information is about source and
destination IP addresses.
Network A
Routing table of Router 1 • The network layer header of a packet sent by a source
device carries the network layer addresses of the source
Outbound and destination devices.
Network
Interface • Each network device (such as a router) that has the
routing function maintains a routing table (like a map of
Network A G0/0/1 the network device).
• After receiving a packet, the network device reads the
Envelope: IP packet header … … network layer destination address of the packet, searches
Sender: source IP address the routing table for the matching entry of the destination
… … address, and forwards the packet according to the
Receiver: destination IP address instruction of the matching entry.
Page 25 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Data Link Layer
The data link layer is located between the network layer and the physical layer and provides services for protocols
such as IP and IPv6 at the network layer. PDUs transmitted at the data link layer are called frames.
Ethernet is the most common data link layer protocol.
Application
Layer
Transport Layer
Network Layer
The data link layer is located between the network layer and the physical layer.
Data Link • The data link layer provides intra-segment communication for the
Layer network layer.
(Frame) • The functions of the data link layer include framing, physical addressing,
and error control.
Physical Layer • Common data link layer protocols include Ethernet, PPPoE, and PPP.
Page 26 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Ethernet and Source MAC Addresses
Ethernet Definition Ethernet Source MAC Addresses
Network A
Host C • A media access control (MAC) address uniquely identifies a NIC on a
network. Each NIC requires and has a unique M AC address.
Host D • MAC addresses are used to locate specific physical devices in an IP
network segment.
• Ethernet is a broadcast multiple access protocol that works at the • A device that works at the data link layer, such as an Ethernet switch,
data link layer protocol. maintains a M AC address table to guide data frame forwarding.
• The network interfaces of PCs comply with the Ethernet standard.
• Generally, a broadcast domain corresponds to an IP network
segment.
Page 27 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
AR
A P
Address Resolution Protocol
R
Discovers the MAC address associated with a given IP address.
ARP request
Destination IP address: 192.168.1.2
Destination MAC address: ?
Host A Host B
192.168.1 192.168.1.2/24
.1/24 ARP reply 48-A4-72-1C-8F-4F
3C-52-82- Source IP address: 192.168.1.2
49-7E-9D Source MAC address: 48-A4-72-1C-8F-4F
Page 28 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ARP Implementation Principles (1)
Host 1 checks Host 1 Host 2
cached ARP entries.
GE 0/0/1 GE 0/0/2
Host 1 sends an ARP
request.
IP 1 : 192.168.1.1/24 IP 2 : 192.168.1.2/24
Host 2 adds an ARP MAC 1 : 3C-52-82-49-7E- MAC 2 : 48-A4-72-1C-8F-
entry. 9D 4F
Page 29 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ARP Implementation Principles (2)
Host 1 checks cached Host 1 Host 2
ARP entries.
3 GE 0/0/1 GE 0/0/2
Host 1 sends an ARP
request.
IP 1 : 192.168.1.1/24 IP 2 : 192.168.1.2/24
Host 2 adds an ARP MAC 1 : 3C-52-82-49-7E- MAC 2 : 48-A4-72-1C-8F-
entry. 9D 4F
Step 2 :
• Host 1 sends an ARP request to
Host 2 sends an ARP
2 Eth_II ARP Request FCS discover the MAC address of Host 2.
reply.
• The destination MAC address in the
Host 1 adds an ARP ARP request is 0 because the
entry.
Destination MAC destination MAC address is unknown.
Operation type: ARP request
address:
MAC address of the sender: MAC 1
FF-FF-FF-FF-FF-FF IP address of the sender: IP 1 Step 3 :
Source MAC address: Destination MAC address: • The ARP request message is a broadcast
MAC 1 00-00-00-00-00-00 data frame. After receiving the ARP
Destination IP address: IP 2 request message, the switch floods it.
Page 30 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ARP Implementation Principles (3)
Host 1 checks cached Host 1 Host 2
ARP entries.
GE 0/0/1 GE 0/0/2
Host 1 sends an ARP
request.
IP 1 : 192.168.1.1/24 IP 2 : 192.168.1.2/24
Host 2 adds an ARP MAC 1 : 3C-52-82-49-7E- MAC 2 : 48-A4-72-1C-8F-
entry. 9D 4F
4
Step 4:
Host 2 sends an ARP
reply. • After receiving the ARP request message, each Host 2>arp -a
host checks whether it is the destination of the Internet Address Physical Address Type
message based on the carried destination IP
Host 1 adds an ARP
address.
192.168.1.1 3C-52-82-49-7E-9D Dynamic
entry.
• Host 2 finds that it is the destination of the
message and then records the mapping between
the sender's M A C and IP addresses in its ARP table.
Page 31 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ARP Implementation Principles (4)
Host 1 checks Host 1 Host 2
cached ARP entries.
GE 0/0/1 GE 0/0/2
6
Host 1 sends an ARP
request.
IP 1 : 192.168.1.1/24 IP 2 : 192.168.1.2/24
Host 2 adds an ARP MAC 1 : 3C-52-82-49-7E- MAC 2 : 48-A4-72-1C-8F-
entry. 9D 4F
5
Host 2 sends an ARP Step 5:
reply. • Host 2 sends an ARP reply to Host 1. Eth_II ARP Reply FCS
• In this step, Host 2 has discovered the MAC address
Host 1 adds an ARP
entry.
of Host 1, so the ARP reply is a unicast data frame.
Destination MAC address: Operation type: ARP
MAC-1
reply Sender's MAC address: MAC 2
Source MAC address: Sender's IP address: IP 2
Step 6: MAC 2
Receiver's MAC address: MAC 1
• After receiving the unicast data frame, the switch Receiver's IP address: IP 1
forwards the frame.
Page 32 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
ARP Implementation Principles (5)
Host 1 checks Host 1 Host 2
cached ARP entries.
GE 0/0/1 GE 0/0/2
Host 1 sends an ARP
request.
IP 1 : 192.168.1.1/24 IP 2 : 192.168.1.2/24
Host 2 adds an ARP MAC 1 : 3C-52-82-49-7E- MAC 2 : 48-A4-72-1C-8F-
entry. 9D 4F
7 Step 7:
Host 2 sends an ARP
reply. Host 1>arp -a
• After receiving the ARP reply message, Host 1
Internet Address Physical Address Type checks whether it is the destination of the
Host 1 adds an ARP 192.168.1.2 48-A4-72-1C-8F-4F message based on the carried destination IP
entry. Dynamic address.
• If so, Host 1 records the carried sender's MAC
and IP addresses in its ARP table.
Page 33 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Physical Layer
After data arrives at the physical layer, the physical layer converts a digital signal into an optical signal, an electrical
signal, or an electromagnetic wave signal based on the physical media.
PDUs transmitted at the physical layer are called bitstreams.
Application
Layer
Transport Layer
Network Layer
Page 34 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Common Transmission Media
Data transmission through twisted pairs Data transmission through optical fibers
1 2
4 3
Page 35 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1 A p p l i c a t io ns and
Data
2 N e t w o r k R e f e r e nc e M o d e l a n d S t a n d a r d P r o t oc
ols
3 D a t a C o m m u n ic a t i on P r o c e s
s
Page 36 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Data Encapsulation on the Sender
Application
DATA Layer Data
www.huawei.com
Network Packet
IP Header Payload
Layer
Page 37 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Data Transmission on the Intermediate Network
Encapsulated data is transmitted on the network.
Data
Data
Application Application
Layer Layer
Transport Layer Transport Layer
Network Layer Network Layer
Network Layer
Data Link Layer Data Link Layer
Data Link Layer
Physical Layer Data Link Layer Physical Layer
Physical Layer
Physical Layer
Page 39 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Data Decapsulation on the Receiver
Application Data
DATA
Layer
Web server
Page 40 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
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.
Page 41 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Quiz
What are the benefits of the layered model?
• Clear division of functions and boundaries between layers facilitates the development,
Page 42 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Quiz
What are the common protocols at the application layer, transport layer,
network layer, and data link layer?
• Application layer: HTTP, FTP, Telnet, and so on
Page 43 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
谢谢
www.huawei.com