You are on page 1of 70

Security Level: Internal

Data Communication Theory

Wireless Case & Training Department

www.huawei.com

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential


Chapter 1 Data Communication in Wireless
System

Chapter 2 TCP/IP Basic

Chapter 3 Routing Basic

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 2


Chapter 2 TCP/IP Basic
Internet Basic

TCP/IP Protocol Basic

Physical Layer

Data Link Layer

Network Layer

Transport Layer

Application Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 3


Internet Basic
 LAN and WAN
 According to the size of the cover range, data communication network can be
classified as LAN or WAN.

LAN

WAN
LAN

LAN

LAN

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 4


Internet Basic
 LAN
 Concept: A network of connected computers, printers, modems or other devices,
covering within several square kilometers.
 Feature: Short distance, low delay, high transmission rate, high reliability.
 Targets:
Applied in limited area;
Enable to visit high bandwidth medium simultaneously;
Private right of network control by part management;
Full-time part service;
Connect nearby devices.
 Common LAN device:

HUB Lanswitch Router ATM Exchanger

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 5


Internet Basic
 WAN
 Concept: A network which provided data communication service in large area,
mainly is used for connecting LANs.
 Feature: large covering range.
 Targets:
Applied in large area;
Visiting through low speed serial links;
Full-time or part-time service;
Connecting physically departed, faraway distributed, or even global devices.
 Common WAN devices:

Modem/CSU/DSU Router WAN Exchanger Access Server

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 6


Internet Basic
 Common topological view:

LAN

Bus Star Tree

WAN

Ring Mesh

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 7


Chapter 2 TCP/IP Basic
Internet Basic

TCP/IP Protocol Basic

Physical Layer

Data Link Layer

Network Layer

Transport Layer

Application Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 8


TCP/IP Protocol Basic
 TCP/IP Protocol Basic
 Why layer structure is needed?
Network communication is a
complicated system. Because a
Application Layer single layer is hard to bear all the
communication, module and layer
Transport Layer structure is invented to meet this
requirement.
Network Layer  Benefits of layer structure
 Communication between two ends
Data Link Layer based on the same protocol
 Modularized and focused
Physical Layer functions
 Realizable multiple technology
 Communication between networks
of different structure
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 9
TCP/IP Protocol Basic
 TCP/IP Protocol
Provide user interface, support different application protocol.
Application Layer Support network virtual terminal, file transfer, mail service, etc.
Application layer transmits the original data.
Transfer the whole data from original point to destination point.
Performs port addressing, segments reforming, connection
Transport Layer control, flow control and error control. Transport layer transmits
segments.
Transfer the segment from original point to destination point.
Network Layer Performs logical addressing, route selecting. Network layer
transmits Packets.
Performs physical medium accessing, physical addressing,
Data Link Layer flow control, error control and access control. Data link layer
transmits Frames.
Define physical interface feature, transmission medium type,
Physical Layer data rate, transmission modes, etc. Physical layer transmits
bits.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 10


TCP/IP Protocol Basic
 Peer to Peer Communication

Host A Host B

Data
Application Layer Application Layer
Segment
Transport Layer Transport Layer
Packet
Network Layer Network Layer
Frame
Data Link Layer Data Link Layer
Bit
Physical Layer Physical Layer

 Communication between peer layers is based on the same protocol.


 Physical layer communicates directly with each other. Other layers
communicates with its peer layer based on physical layer.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 11


TCP/IP Protocol Basic
 Process of packet encapsulation and decapsulation in TCP/IP
protocol I want to
say hello to I receive it!
B.

Host A Host B

Application Layer Hello Hello Application Layer


Transport Transport
Transport Layer layer headHello layer headHello Transport Layer
Network Transport Network Transport
Network Layer layer headlayer headHello layer headlayer headHello Network Layer
Frame Network Transport Frame Frame Network Transport Frame
Data Link Layer Hello
head Layer headLayer head tail Hello
head Layer headLayer head tail Data Link Layer

Physical Layer 0010010111001 Physical Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 12


Chapter 2 TCP/IP Basic
Internet Basic

TCP/IP Protocol Basic

Physical Layer

Data Link Layer

Network Layer

Transport Layer

Application Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 13


Physical Layer
 Physical Layer
 Physical layer defines the mechanical, electrical, functional features of
connecting, maintaining and disconnecting physical channels. Physical layer
mainly defines standards of voltage, interface, cables, transmission distance,
transmission type, transmission speed, etc.

 Common physical layer interface:


10M Ethernet port
100M Ethernet port
1000M Ethernet port

 Common physical layer device:


HUB

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 14


Physical Layer
10M Ethernet Port 100M Ethernet Port 1000M Ethernet Port

 10Base-T  100Base-TX  1000Base-T


Use twisted pair as Use ultra category 5 Use ultra category 5
transmission medium. twisted pair as twisted pair as
 10Base5 transmission medium with transmission medium with
Use thick coaxial cable as longest distance of 100m. longest distance of 100m.
transmission medium.  100BaseFX  1000Base-F
 10Base2 Use single-mode or Use multimode fiber as
Use thin coaxial cable as multimode fiber as transmission medium with
transmission medium. transmission medium. longest distance of 500m.
Single-mode fiber has a  1000Base-SX
longest distance of 10km. Use multimode fiber as
Multimode fiber has a transmission medium with
longest distance of 2000m. longest distance of 2km.
 Fast Ethernet  1000Base-LX
Defined by IEEE 802.3u. Use single-mode fiber as
transmission medium.
 1000Base-ZX
Use single-mode fiber as
transmission medium,
ultra long haul.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 15


Physical Layer
 Twisted Pair
 Category of twisted pair:
Category 3 twisted pair
Twisted pair is sorted as unshielded twisted pair and shielded
Category 4 twisted pair
twisted pair.
Category 5 twisted pair
Both of the two types of the twisted pair have 8 wires.
Ultra category 5 twisted pair
Type of twisted pair is defined by the twisted pair density.
Category 6 twisted pair
 Wire sequence of Straight Through Cable Cross Over Cable
Side 1 Side 1 Side 1 Side 2
category 5 twisted pair:
12345678 Side 1 Side 2
12345678
1=white/orange1=white/orange 1=white/orange1=white/green
2=orange 2=orange 2=orange 2=green
3=white/green 3=white/green 3=white/green 3=white/orange
4=blue 4=blue 4=blue 4=blue
5=white/blue 5=white/blue 5=white/blue 5=white/blue
6=green 6=green 6=green 6=orange
7=white/brown7=white/brown 7=white/brown7=white/brown
8=brown 8=brown
12345678 8=brown 8=brown 12345678
Side 2 Side 2

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 16


Traditional Ethernet Device-----HUB

 Application  Application

Presentation Presentation

 Session  Session

Transport Transport

 Network
HUB
  Network

 Data Link  Data Link

 Physical Physical
 Physical  Physical

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 17


All HUBs are Half-duplex

Working Principle of HUB

 1  2  3  4  5

IN
 OU
  OU OU
 OU

T T T T

 HUB only changes the physical topology of Ethernet

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 18


Collision Domain

 HUB is only taken as a relay connected to device in a LAN.


 All devices form a collision domain.

 LAN

 LAN  LAN
 Hub

 LAN  LAN

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 19


Chapter 2 TCP/IP Basic
Internet Basic

TCP/IP Protocol Basic

Physical Layer

Data Link Layer

Network Layer

Transport Layer

Application Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 20


Data Link Layer
 Data Link Layer
 Data link layer is the second layer of TCP/IP protocol. Based on physical layer,
data link layer provides service for network layer.
 Data link layer provides reliable data transmission for physical layer.
 Data link layer protocols in LAN: Ethernet, token ring, etc.
 Data link layer protocols in WAN: PPP、HDLC、Frame Relay, etc.

 Common data link layer device – Exchanger, LAN Switch:

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 21


Data Link Layer
 Data link layer standard in LAN
IEEE 802 defines a series of standards in LAN:
IEEE802.3: Ethernet
IEEE802.4: Token bus
IEEE802.5: Token ring
IEEE802.11: Wireless LAN
IEEE802 standards includes physical layer and data link layer.

 Data link layer standard in WAN


HDLC (High-level Data Link Control)
PPP (Point to Point Protocol)
X.25
Frame Relay

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 22


Data Link Layer
 MAC Address
 Every terminal or router device, such as PC, router, has its own NIC (Network
Interface Card). Every NIC has its own MAC address, which identify an unique
device in network .
 MAC address is 48 bits, but it is usually represented by 12 hex number.
 MAC is a global unique address, which is managed and assigned by IEEE. A MAC
address consist of two parts: vendor code and serial number. Former 24 bits
represent vendor code. The rest of the 24 bits is assigned by vendor. Huawei’s
vendor code is 0x00E0FC.
 If all the 48 bits are 1, it means this MAC is a broadcast address (FFFFFFFFFFFF).
 00E0.
If the eighth bits is 1, it means thisFCCC.
MAC 3F53
is a multicast address.

00000000 11100000 11111100 11001100 00111111 01010011

Vendor Code Assigned by vendor

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 23


Data Link Layer
 Theory of Ethernet MAC Layer
 In the same network, addressing among devices is based on MAC.

I want to
A Exchange I receive it. B
say Hello r And Hi A!
to B PORT2
PORT1

Frame
DA: MAC-B SA: MAC-A Hello
Tail

Frame
DA: MAC-A SA: MAC-B Hi
Tail

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 24


Layer 2 Work Mode

( BRIDGE/ LAN Switch/ L2) work model

 Application  Application

Presentation Presentation

 Session  Session

Transport  Layer 2 switch Transport

 Network  Network

 Data Link Data Link



Data Link  Data Link

 Physical  Physical  Physical  Physical

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 25


Source MAC Learning
Network Segment1
 Network Segment2

 A C
POR

 POR

T1 T2

LAN switch  D
B
 Typical Application
 MAC Address  Port
Notice:
MAC A 1
CAM (content addressable MAC B 1
memory )can not be established MAC C 2
by learning under multicast, but MAC D 2
set up by IGMP Snooping .
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 26
Forwarding Based on the Destination MAC

MAC Address
 Port

 MACA 1

 MACB 1

MACC
 2

MACD MACA ......

MACD
 2

Port 1

MACD MACA
 ......

Port 2

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 27


The Principle of Layer 2 Switch

Learning

Flooding

Filtering

Forwarding

Aging

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 28


Full-duplex

 The guarantee of full-duplex

 The effect on Ethernet of full-duplex

 Device that supports full-duplex

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 29


Auto-negotiation

Half-Duplex Full-Duplex

10M
√ √
100M
√ √
1000M
× √
10G
× √

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 30


Negotiation Rule

 Transmit rate
mode  mode
Transmit rate

 100M  Full-duplex  100M  Full-duplex

 10M Half-duplex
  10M Half-duplex

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 31


Broadcast Domain

 Layer 2 switch improves network performance


by allowing devices in the same collision
domain to exchange traffic without being
forwarded to the other collision domain. But it
can not limit broadcast packet flooding in a LAN.
Broadcast
 LAN
domain
collision
domain
 LAN  LAN
 SWITCH
collision domain collision domain

 LAN  LAN

collision domain
collision domain

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 32


Broadcast Storm

……

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 33



Divide Broadcast Domain by Router

Broadcast domain Broadcast domain

……

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 34


Divide Broadcast Domain by VLAN

Broadcast domain3
Broadcast domain1 VLAN 30
VLAN 10
Broadcast domain2
VLAN 20

Marketing Department Financial Department

Engineering Department

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 35


Chapter 1 Ethernet Concept

Chapter 2 Emergence of Hub and Layer 2 switch

Chapter 3 Emergence of VLAN and L3 Switch

Chapter 4 Emergence of GE/10GE Ethernet

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 36



Port Based VLAN

LAN Switch

VLAN Table
Port 1 Port 10
Port 2 Port 7 Port VLAN
Port 1 VLAN5
Port 2 VLAN10
Port 3 VLAN5
Port 4 VLAN10

Host A Host B Host C Host D

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 37



MAC Based VLAN

LAN Switch

VLAN Table
Port 1 Port 10
Port 2 Port 7
MAC VLAN

MAC A VLAN5

MAC B VLAN10

MAC C VLAN5

MAC D VLAN10

Host A Host B Host C Host D


MAC A MAC B MAC C MAC D

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved  Page 38


Subnet Based VLAN

LAN Switch

Port 1 Port 10 VLAN Table


Port 2 Port 7 IP VLAN
IP VLAN5
1.1.1.0/24
IP VLAN10
1.1.2.0/24
…… ……
Host A Host B Host C Host D
1.1.1.5 1.1.2.88 1.1.1.8 1.1.2.99

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved  Page 39


Format of 802.1Q Frame

DA SA Type Data CRC

Standard Ethernet Frame

DA SA tag Type Data CRC

TCI

TPID Priority CFI VLAN ID

Ethernet Frame with IEEE802.IQ Flag

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 40



Link Type

Trunk-Link

SWA SWB

Access-Link

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 41



Frame Changes in Network Communication

VLAN 2 VLAN 3
Ethernet frame with tag

Ethernet frame
without tag
Ethernet frame with tag

VLAN 3 VLAN 2

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 42



Trunk and VLAN

VLAN 4
VLAN 5

VLAN 2 VLAN 4 VLAN 3 VLAN 2 VLAN 4 VLAN 5 VLAN 5 VLAN 2

Trunk Link
Broadcast

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 43



Chapter 2 TCP/IP Basic
Internet Basic

TCP/IP Protocol Basic

Physical Layer

Data Link Layer

Network Layer

Transport Layer

Application Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 44


Network Layer
 Network Layer
 Network layer is the third layer in TCP/IP protocol, which provide point to point
communication.
 Common network layer devices: Router, Layer 3 Exchanger, etc.

Application Layer

Transport Layer
ICMP
Network Layer IP
ARP/RARP
Data Link Layer

Physical Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 45


Network Layer
 IP (Internet Protocol)
 IP is the main protocol in network layer, it is a unreliable connectionless protocol -
Best effort.
 IP provides a global packet format, it eliminates the difference of data link layer
and make network connection possible.
 IP packet structure:
bit 0 4 8 16 19 24 31

VersionHead length Service type Total length


Fixed length
of 20 bytes Identification Flag Segment offset

Life-span Protocol Checksum

Source IP address

Destination IP address

Optional bytes with flexible length Fill


Flexible
Length Data

...

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 46


Network Layer
 A port of a host or router in Internet is identified by IP address.
 Each port of a host or router in Internet is unique.
 In IPV4 protocol, IP address is 32bits to identify a host. Usually IP address is
represented by decimal number:

 IP binary format: 11000000 10101000 00001010 00000001

 IP decimal format: 192 . 168 . 10 . 1


 Private IP in IPV4:

10.0.0.0 ~10.255.255.255
172.16.0.0 ~172.31.255.255
192.168.0.0 ~192.168.255.255

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 47


Network Layer
 Classification of IP Address:

A 1.0.0.0 ~126.255.255.255
0 Network 7bit Host 24bit

B 128.0.0.0 ~191.255.255.255
10 Network Host 16bit
14bit

C 192.0.0.0 ~223.255.255.255
110 Network Host 8bit The appearance
21bit
of mask weaken
D 224.0.0.0 ~239.255.255.255
the classification
11 1 0 Multicast address
of IP address

E 240.0.0.0 ~255.255.255.255
1 1 11 0 Reserved

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 48


Network Layer
 Special IP Address:

Network Part Host Part Type Use

Any All “0” Network IP Indicates a network segment

Any All “1” Broadcast IP All the nodes in a given network


Broadcast IP of a given network

127 Any Loopback address Testing inter-process communication

All “0” All the networks Identify the destination IP of a default


route

All “1” Broadcast IP All the nodes in a network segment


Broadcast IP of a network segment

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 49


Network Layer
 Subnet mask
 What is subnet mask?
Subnet mask defines the network and host part of an IP address.
Subnet mask has the same format as IP address. Both network part and subnet
part of the subnet mask is represented by 1, host part is represented by 0. By
default, if no subnet is defined, subnet mask of class A IP address is 255.0.0.0;
Subnet mask of class B is 255.255.0.0; Subnet mask of class C is 255.255.255.0.
By using subnet mask, a network can be divided in to several subnet.
 Subnet mask consist of continuous 1 and 0.
Example:
Binary format: 11111111 11111111 11111111 00000000
Decimal format: 255.255.255.0
 Length of subnet mask is the number of 1 in a subnet mask. In the former
example, subnet mask length is 24.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 50


Network Layer
 Subnet Address
 What is subnet address?
Subnet address identifies a subnet.
In one network segment, all the host has the same subnet mask and subnet
address.
 Subnet address calculation:
Example: Host IP is 192.168.1.17, subnet mask is 255.255.255.240, then the
calculation of
192is: .
subnet address 168 . 1 . 7
IP address
11000000 10101000 00000001 00000111
(AND)
255 . 255 . 255 . 240
Subnet
mask 11111111 11111111 11111111 11110000

Network address 11000000 10101000 00000001 00000000


(binary)
Network
192.168.1.0/28
address

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 51


Network Layer
 Calculation of number of hosts in the subnet

Subnet mask: Example:


IP address: 192.168.1.100/28
/28=255.255.255.240
Network part Host part
11111111 11111111
00000000 00000000
Binary format of this subnet mask:
11111111. 11111111. 11111111.
n
11110000
Number of the hosts in this subnet:
n Host number: 24
Host number: 2
n
Host available: 2 - 2 Host available: 24 -2

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 52


Network Layer
 Subnetting
 Why need subnetting
It is impossible to use broadcasting technology in MAN and WAN, so routing
must be applied;
The ruleless and fastness of MAC address make routing in WAN very hard;
IP address is flexible and programmable;
Subnetting can increase the utilization of the IP address, and decrease the
difficulty of routing.
 Subnetting method
IP address is sorted as subnet address and host address, these two addresses
are identified by mask.
Based on this method, global network could be divided into flexible and
programmable subnets, these subnets communicate with others by routing. Also,
the smaller network is, the better for network management.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 53


Network Layer
 How to subnetting?
Eg: If a 10.160.2.0/24 network is provided and at least 7 subnets, each subnet has at
least 25 hosts, then how to do subnetting?
n
Number of hosts in a subnet is 2 -2, in case of 25 host is needed in this subnet,
then n≥5.
Then, the length of mask is 32-5=27 bits, which means 255.255.255.224.
Because at least 7 subnets is needed, mask of each subnet is 27.
Subnets are: 10.160.2.0 ~ 10.160.2.31 Subnet address: 10.160.2.0/27
10.160.2.32 ~10.160.2.63 Subnet address: 10.160.2.32/27
10.160.2.64 ~10.160.2.95 Subnet address: 10.160.2.64/27
10.160.2.96 ~10.160.2.127 Subnet address: 10.160.2.96/27
10.160.2.128 ~10.160.2.159 Subnet address: 10.160.2.128/27
10.160.2.160 ~10.160.2.191 Subnet address: 10.160.2.160/27
10.160.2.192 ~10.160.2.223 Subnet address: 10.160.2.192/27
10.160.2.224 ~10.160.2.255 Subnet address: 10.160.2.224/27

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 54


Network Layer
 Practice:
If network 204.159.80.192/26 is provided, and at 6 subnets are need, each
subnet has at least 5 hosts. How to subnetting?

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 55


Network Layer
 ARP (Address Resolution Protocol)
 ARP allows a host to find the MAC address of a target host on the same physical
network, given only the target’s IP address.
 Every device keeps a ARP list, which records the mapping relation between IP
address and MAC address.
Who knows MAC MAC address of the
address of the host with IP
host with IP 10.0.0.2 is 00-E0-
10.0.0.2? FC-00-00-12
A B

IP:10.0.0.1/24 IP:10.0.0.2/24
MAC:00-E0-FC-00-00-11 ARP Request MAC:00-E0-FC-00-00-12

ARP list of host A ARP list of host B


10.0.0.2 ? 10.0.0.1 ?
00E0FC000012 00E0FC000011
ARP Reply
… … … …

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 56


Network Layer
 RARP (Reverse Address Resolution Protocol)
 RARP allows a host to find the IP address of a target host, given only the traget’s
MAC address. RARP is usually applied in hosts without disks.
 If RARP is applied, there must be RARP Server to support it, for not all device
support RARP.

Your IP address
What is my IP
Host without disks RARP Server is 10.0.0.1
address?

MAC:00-E0-FC-00-00-11 RARP Request? MAC:00-E0-FC-00-00-12

RARP Reply

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 57


Network Layer
 ICMP (Internet Control Message Protocol)
 ICMP allows routers to send error or control messages to other routers or hosts.
 PING program is based on ICMP.
 ICMP packet encapsulation:

MAC Header IP Header ICMP Data MAC Tail

A B
Is B reachable? I’m here.

IP:10.0.0.1/24 ICMP Echo Request


IP:10.0.0.2/24

ICMP Echo Reply

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 58


Chapter 2 TCP/IP Basic
Internet Basic

TCP/IP Protocol Basic

Physical Layer

Data Link Layer

Network Layer

Transport Layer

Application Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 59


Transport Layer
 Transport Layer
 Transport layer is fourth layer of TCP/IP protocol, allows procedure to procedure
communication and performs flow control and error control.
 UDP (User Data Protocol) provides an unreliable connectionless delivery service.
 TCP (Transmission Control Protocol) provides an reliable connection delivery
service. Because control messages is delivered during connection setup,
maintain and disconnection, transfer efficiency is not as good as UDP.

Application Layer

Transport Layer TCP/ UDP

Network Layer

Data Link Layer

Physical Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 60


Transport Layer
 Transport Layer Segment Format
0 8 16 24 31
Source port (16 bits) Destination port (16 bits)
UDP Lengths (16 bits) UDP Checksum (16 bits)
Data
UDP Segment Format

0 8 16 24 31
Source port (16 bits) Destination port (16 bits)
Sequence number (32 bits)
Acknowledgement number (32 bits)
URG
ACK

SYN
PSH
RST

FIN
Header LengthReserved(6 bits) Window size (16 bits)

TCP checksum (16 bits) Urgent pointer (16 bits)

Options
Data

TCP Segment Format

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 61


Transport Layer
 Port Number of Transport Layer
Port number identifies upper level application program.
Port number range: 0 ~65535. 0~1023 is public number (Well-know port),
1024~65535 is private number.

HTTP FTP Telnet SMTP DNS TFTP SNMP

53
80 20/21 23 25 69 161

TCP UDP

IP Packet

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 62


Transport Layer
 Communication between procedures: Use port number to identify the source and
destination procedure.

Host A Host B

FTP Client FTP Server


Application Layer Application Layer
2987 21
Transport Layer Transport Layer

Network Layer Network Layer

Data Link Layer Data Link Layer

Physical Layer Physical Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 63


Chapter 2 TCP/IP Basic
Internet Basic

TCP/IP Protocol Basic

Physical Layer

Data Link Layer

Network Layer

Transport Layer

Application Layer

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 64


Application Layer
 Application Layer
 Application provide interface between user and program.
 Application program are usually server and client.
 Common application program:
HTTP, FTP, TFTP, Telnet, DNS, etc.
Program such as web page, games, mailbox are all application program.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 65


Chapter 1 Data Communication in Wireless
System

Chapter 2 TCP/IP Basic

Chapter 3 Routing Basic

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 66


Routing Basic
 Definition: Route information when device sending or forwarding IP
packets.
 Static routing
Low overhead; Simple configuration; Manual maintenance; Suitable for small,
slow changing internets.
 Dynamic routing
Large overhead; Complicated configuration; No need manual maintenance;
Suitable for rapid growth or rapid changing internets.
 Route format
Route format: Destination address Subnet mask Next hop
Example:
Default Route: 0.0.0.0 0.0.0.0 10.0.10.1
Host Route: 10.0.20.8 255.255.255.255 10.0.10.1
Subnet Route: 10.0.20.0 255.255.255.0 10.0.10.1

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 67


Static Routing Configuration
Host 1: 10.0.10.8 Host 2 :
192.168.1.
10.0.20.8
4
10.0.10. 192.168.1. 10.0.20.
1 3 1

Net 1 Net 2
10.0.10.0/24 Router A Router B 10.0.20.0/24

Destination IP 10.0.20.0 Destination IP 10.0.10.0

Mask 255.255.255.0 Mask 255.255.255.0

Next Hop 10.0.10.1 Next Hop 10.0.20.1

Host 1: Route add 10.0.20.0 255.255.255.0 10.0.10.1

Host 2: Route add 10.0.10.0 255.255.255.0 10.0.20.1

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 68


Route Forwarding
Host 1 : 10.0.10.8 192.168.1. Host 2 : 10.0.20.8
MAC 1 4 MAC 2
MAC B1
10.0.10.1
MAC A1 192.168.1. 10.0.20.1
3 Mac B2
MAC A2
Net 1 Net 2
10.0.10.0/24 Router A Router B 10.0.20.0/24

TCP TCP TCP


MAC IP Data MAC IP Data MAC IP Data
UDP UDP UDP

Destination IP 10.0.20.8 Destination IP 10.0.20.8 Destination IP 10.0.20.8

Source IP 10.0.10.8 Source IP 10.0.10.8 Source IP 10.0.10.8

Destination Mac A1 Destination Mac B1 Destination Mac 2

Source Mac 1 Source Mac A2 Source Mac B2

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 69


Thank You
www.huawei.com

You might also like