Hcnahcda Huawei Certified Network Associate Trainingpdf PDF
Hcnahcda Huawei Certified Network Associate Trainingpdf PDF
Hcnahcda Huawei Certified Network Associate Trainingpdf PDF
With any Huawei Career Certification, you have the privilege on http://learning.huawei.com/en to enjoy:
1、Comprehensive E-Learning Courses e n
m/
Content:All Huawei Career Certification E-Learning courses
c o
i .
Methods to get the E-learning privilege : submit Huawei Account and email being used for Huawei Account
registration to Learning@huawei.com . w e
u a
2、 Training Material Download
. h
Content: Huawei product training material and Huawei career certification
n g training material
Method:Logon http://learning.huawei.com/en and enter HuaWei n iTraining/Classroom Training ,then you can
ar
: /
t p all ICT technical domains like R&S, UC&C, Security,
Content:The Huawei career certification training covering
Storage and so on, which are conducted by Huawei ht professional instructors
Method:The plan and participate method please
s: refer to LVC Open Courses Schedule
e
e n
/
HCDA-HNTD .c o m
ei
w
h ua
Huawei Networking Technology and .Device
n g
ni
a r
l e
: //
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo Huawei Technologies Co.,Ltd
Copyright © Huawei Technologies Co., Ltd. 2012. All rights reserved.
l e
The information in this document is subject to change
//
without notice. Every effort has been made in the preparation
:
p
of this document to ensure accuracy of the contents, but all
htt
statements, information, and recommendations in this
document do not constitute the warranty of any kind, express
or implied. s :
c e
u r
s o
Re Huawei Certification
n g
i
HCDA-HNTD Huawei Networking Technology and
n
a r
Le
Device
r e Edition 1.6
Mo
Huawei Certification System
e n
(GYKJ UT INGXGIZKXOYZOIY UL /): ZKINTURUMOKY GTJ I[YZUSKXYȑTKKJY GZ
m/
JOLLKXKTZ RK\KRY .[G]KO IKXZOLOIGZOUT VXU\OJKY I[YZUSKXY ]OZN
c o
.
IKXZOLOIGZOUTY_YZKSULLU[XRK\KRY
.)*' .[G]KO )KXZOLOIGZOUT *GZGIUS 'YYUIOGZK OY VXOSGX_ LUX /6 i
w e
TKZ]UXQSGOTZKTGTIKKTMOTKKXYGTJGT_UZNKXY]NU]GTZZURKGXTZNK/6
u a
. h
TKZ]UXQQTU]RKJMK.)*'IKXZOLOIGZOUTIU\KXYZNK:)6/6HGYOIYXU[ZOTM
Y]OZINOTM GTJ UZNKX IUSSUT LU[TJGZOUTGR QTU]RKJMK UL /6 TKZ]UXQY
ZUMKZNKX ]OZN .[G]KO IUSS[TOIGZOUTY VXUJ[IZY \KXYGZORK
n g XU[ZOTM
VRGZLUXS<86INGXGIZKXOYZOIYGTJHGYOISGOTZKTGTIK
n i
a r
.)*6.[G]KO)KXZOLOIGZOUT*GZGIUS6XULKYYOUTGR+TZKXVXOYKOYGOSKJGZ
KTZKXVXOYKIRGYY TKZ]UXQ SGOTZKTGTIK KTMOTKKXY
l e TKZ]UXQ JKYOMT
/ /
KTMOTKKXYGTJGT_UZNKXY]NU]GTZZUOTJKVZNMXGYVXU[ZOTMY]OZINOTM
p :
TKZ]UXQGJP[YZSKTZGTJUVZOSO`GZOUTZKINTURUMOKY.)*6+TZKXVXOYKOY
t t
IUTYOYZUL/+94/SVRKSKTZOTM+TZKXVXOYK9]OZIN4KZ]UXQY/+84
/SVRKSKTZOTM+TZKXVXOYK 8U[ZOTM h 4KZ]UXQY GTJ /+46 /SVXU\OTM
:
+TZKXVXOYK 4KZ]UXQVKXLUXSGTIK ]NOIN OTIR[JKY GJ\GTIKJ /6\
s
e
XU[ZOTM GTJ Y]OZINOTMZKINTURUM_VXOTIOVRK/6ZKINTURUM_ULTKZ]UXQ
c
r
YKI[XOZ_NOMNG\GORGHOROZ_GTJ7UYGY]KRRGYZNKOSVRKSKTZGZOUTOT
.[G]KOVXUJ[IZY u
s o /TZKXTKZ]UXQ +^VKXZ OY JKYOMTKJ ZU KTJ[K
R
KTMOTKKXY ]OZNeG \GXOKZ_ UL /6 TKZ]UXQ ZKINTURUM_ GTJ VXULOIOKTI_ OT
.)/+ .[G]KO )KXZOLOKJ
a
relationship relationship
r n i
ICT Career Certification
n g
Routing & Switching WLAN Wireless Transmission Security UC&C VC Cloud Storage ICT Convergence
Design
Re
HCNA(HCDA)
so
u r ce
s
HCNA- HCNA- HCNA- HCNA- HCNA- HCNA- HCNA- HCNA- HCNA- HCNA-
:
WLAN LTE Transmission Security UC CC VC Cloud Storage Design
Associate
h tt
p :
HCNP-R&S
H HCNP-Carrier HCNP- HCNP- HCNP- HCNP- HCNP- HCNP- HCNP- HCNP- HCNP- HCNP-
//
(HCDP) (HCDP-Carrier) WLAN LTE Transmission Security UC CC VC Cloud Storage Design
l e
Professional
ar
n i
Expert
ua
w e i
HCAr
.
Architect
c o m / e n
,UXK]UXJ
5[ZROTK
:NOY HUUQ OY GHU[Z ZNK .[G]KO IKXZOLOKJ *GZGIUS 'YYUIOGZK IKXZOLOIGZOUT:NK
YZ[JKTZY]NU]GTZZUVXKVGXKLUXZNK.)*'K^GSUX]GTZZURKGXTZNKZKINTURUM_
e n
GHU[Z:)6/6VXUZUIURYZGIQYXU[ZKXY]OZIN='4+ZNKXTKZGTJNU]ZUIUTLOM[XK[YK
m/
UTZNK<86
c o
i .
)UTZKTZ
w e
h ua
.
:NK M[OJK IUTZGOTY G ZUZGR UL YO^ SUJ[RKY YZGXZOTM LXUS ZNK HGYOI QTU]RKJMK UL
ng
JGZGIUSS[TOIGZOUTY!ZNKM[OJKOTZXUJ[IKYZNKLOKRJYULXU[ZOTMY]OZINOTM='4
i
n
LOXK]GRR GTJ UZNKX HGYOIQTU]RKJMK GY ]KRR GYIUTLOM[XGZOUT GTJ OSVRKSKTZGZOUT
[YOTMZNK<86VRGZLUXS
e ar
l
//
3UJ[RKY_YZKSGZOIGRR_OTZXUJ[IKYZNK/6TKZ]UXQOTLXGYZX[IZ[XK:)6/6LU[XRG_KX
p :
SUJKR ZU NKRV ZNK XKGJKX ZU KYZGHROYN ZNK HGYOI LXGSK]UXQ UL ZNK JGZG
tt
IUSS[TOIGZOUTYTKZ]UXQ/TNOMNROMNZOTML[TIZOUTYGTJXURKYULZNKTKZ]UXQRG_KX
h
ZXGTYVUXZ RG_KX GTJ GVVROIGZOUT RG_KX ZNOY SUJ[RK NKRVY XKGJKXY ZU SGYZKX ZNK
s :
L[TIZOUTYGTJXURKYULIUSS[TOIGZOUTTKZ]UXQYOTG\GXOKZ_ULVXUJ[IZY
r ce
3UJ[RK JKYIXOHKY ZNK HGYOIY GTJ UVKXGZOUT UL ZNK .[G]KO MKTKXOI XU[ZOTM
u
so
VRGZLUXS<86GTJ VXUMXKYYO\KGVVXUGINZUZNK HGYOIY ULXU[ZOTMVXUZUIURY YZGZOI
Re
XU[ZOTMGTJJ_TGSOIXU[ZOTMVXUZUIURY:NOYSUJ[RKNKRVYXKGJKXY[TJKXYZGTJZNK
VXOTIOVRKY GTJ ZNK HGYOI VXUIKYY UL JGZG IUSS[TOIGZOUT H_ NOMNROMNZOTM 8/6 GTJ
n g
596,Z]U/-6XU[ZOTMVXUZUIURY
n i
a r3UJ[RK OTZXUJ[IKY ZNK VUV[RGX +ZNKXTKZ ZKINTURUM_ NU] +ZNKXTKZ KW[OVSKTZ
Le
]UXQYGY]KRRGYZKINTURUMOKY[YKJSUYZR_OTZNK2'4ROQK<2'49:6<886ZUNKRV
XKGJKXYOSVXU\KGHOROZOKYLUXVRGTTOTM2'4
r e
Mo 3UJ[RKHXOKLR_JKYIXOHKYZNKHGYOIVXOTIOVRKYUL='4ZKINTURUMOKYY[INGY.*2)
666,XGSK8KRG_IUTLOM[XGZOUTGTJOSVRKSKTZGZOUTUTZNK<86ZUNKRVXKGJKXYZU
SGYZKX='4ZKINTURUMOKYGTJOSVRKSKTZLRK^OHR_
3UJ[RK HXOKLR_ JKYIXOHKY ZNK Z_VKY UL LOXK]GRR ZKINTURUMOKY GTJ JK\KRUVSKTZ
VKXLUXSGTIK GTJ ZNK HGYOI L[TIZOUTY UL .[G]KO ;9- YKXOKY LOXK]GRRY GTJ
Page1
OSVRKSKTZGZOUTYUTZNK<86ZUNKRVXKGJKXYZU[TJKXYZGTJGTJRG_U[ZZNKTKZ]UXQ
YKI[XOZ_VUROI_
c o
IUSS[TOIGZOUT ZU XU[ZOTM Y]OZINOTM ='4 TKZ]UXQ YKI[XOZ_ ZKINTURUMOKY GTJ
i .
.[G]KO VXUJ[IZY 8KGJKXY IGT GRYU XKGJ YKRKIZO\KR_ GIIUXJOTM ZU ZNKOX U]T
w e
ua
IOXI[SYZGTIKY
. h
ng
8KGJKXYȑ 1TU]RKJMK(GIQMXU[TJ
n i
ar
:NOYIU[XYKOYGHGYOIIU[XYKUL.[G]KOIKXZOLOIGZOUTZNKXKGJKXYNU[RJNG\KGHGYOI
QTU]RKJMKULZNKTKZ]UXQHGIQMXU[TJ
l e
: //
p
h tt
s :
r ce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page2
Icons Used in This Book
e n
m/
c o
IPv6 Router SOHO Router Voice Router Low-end Router High-end Router
i .
w e
h ua
.
ng
Core Router Hub Socket switch Core Switch
Convergence Switch
n i
e ar
l Wireless Bridge
//
Edge Switch Cascade Switch AP AP Amplifier
p :
Wireless Network Card Access Server h tt
Audio Gateway Firewall Internet Telephony
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
_
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
ni
a r
Le
r e
Mo
Table of Contents
Module 1 Network Fundamentals .................................................................................Page 1
TCPIP Basis...........................................................................................................................Page 43 e n
m/
IP Addressing and Routing ...........................................................................................Page 86
c o
Protocols of Transprot Layer.........................................................................................Page 127 i .
w e
Introduction to Common Application........................................................................Page 148
h ua
.
Module 2 Routing ................................................................................................................Page 163
i ng
VRP Basis and Operation ...............................................................................................Page 165
n
ar
Routing Protocol Basis.....................................................................................................Page 202
e
l
//
Static Route .........................................................................................................................Page 230
p :
Dynamic Routing Protocol Basis...................................................................................Page 248
h tt
Distance-vector Routing Protocol ...............................................................................Page 260
s :
RIP Routing Protocol.........................................................................................................Page 283
c e
r
RIP Troubleshooting..........................................................................................................Page 311
u
s o
OSPF Routing Protocol Basis..........................................................................................Page 342
Re
Module 3 Switching ..............................................................................................................Page 375
n g
i
Ethernet Overview .............................................................................................................Page 377
n
a r
Principle of Ethernet Device ...........................................................................................Page 395
r e
Mo VLAN Technology Principle and Configuration.........................................................Page 449
Page1
Module 4 WAN ........................................................................................................................Page 545
l e
: //
p
h tt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page2
e n
m/
c o
i .
w e
hua
.
ng
Module 1 rni
e a
/l
Network Fundamentals
/
p :
t t
h
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page3
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page4
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page5
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page6
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Data refers to information in any format. The format used to
h tt
encode any information must follow agreed or standard rules
before successful communication between a sender and
receiver is possible.
s :
c
For example, a picture ecan be broken down into a number of
dots referred to as r
u pixels, each pixel can then be represented by
a number whichocan then be encoded ready for transmission.
The format e s to encode the image data by the sender must
used
R by the receiver to enable them to decode and
be understood
n gthe picture.
rebuild
n i types of data that can be encoded for transmission
Common
arinclude text, numbers, pictures, audio, and video. many
Le standard ways of encoding the different types of data exist.
Page7
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A simple data communication system consists of a message, a
tt
sender, a receiver, a (transfer) medium, and a protocol.
h
Message:
s :
e
A message contains information that needs to be communicated.
c
u r
This could be text, numbers, a picture, sound, or video which will
be encoded and transmitted as one or more messages.
s o
Sender:
e
The senderRis a device or system that transmits the message, this
n g a PC, a workstation, a server, or a mobile phone.
could be
n i
Receiver:
arThe receiver is a device or system that receives the message,
Le this could be a PC, a workstation, a server, a mobile phone, or a
r e television.
Mo Medium:
The medium is a physical or logical connection between the
sender and the receiver which is capable of carrying the message.
Typical types of medium are twisted pair cable, coaxial cable,
optical fiber and radio wave.
Protocol:
Page8
The protocol is the set of rules that controls the way in which data
exchanged. The protocol does not necessarily define what the
original data is or how it is encoded, just how it should be
exchanged by two communicating devices. Protocol rules define
such things as the speed at which data is transferred and the size
of the data unit that is sent. It will also define when a
communication session starts and ends. These rules can be
e n
likened to the rules which define the way we talk to each other or
m/
read and write, without such rules even if we use the same
c o
language we cannot communicate.
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page9
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
There are three different ways in which two devices can
communicate in data networking:
h tt
Simplex communication:
s :
e
Simplex communication is in one direction. One device can only
c
r
send messages, the other one can only receive messages.
u is a device which only sends data and a
o
For example a keyboard
s that can only receive data both use simplex
R e
monitor a device
communication.
n g communication:
Half-duplex
n i communication is two way but only one device can be
Half-duplex
arsending at any time, the other must be receiving. Both devices
Le are capable of sending and receiving but communication can only
Page11
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A network is any group of people, things or places that are
h tt
interconnected in some way. Networks exist everywhere in our
life, we have road, rail, telephone and postal networks which we
use on a daily basis.
s :
c e of two or more computers and
A computer network consists
peripheral which arerinterconnected by communication lines.The
o u can easily exchange and share
esresources .
computers in a network
information and
R
g for exchanging information and sharing resources.
Computer networks were developed to meet increasing
n
i
requirements
Innearly computer networks , each computer was an independent
ardevice, there was little or no communication between systems.
Le As computer and communication technologies evolved,
r e communication between different systems was made possible.
Mo Standard protocols understood by different systems made
sharing resources and data possible and improved resource
utilisation.
Page12
e n
m/
c o
i .
w e
h ua
.
i ng
n
ar
e
/l
In recent years, the computer network is/developing rapidly. The
computer communications network and p : the Internet have become
t t
the basic part of the society. The computer network is applied to
h
many fields of industry and commerce, including e-bank, e-
s : to management,and
commerce, modernized enterprise information
work. u r
s o exists everywhere in the world" is not an
The saying "network
exaggeratede
R statement.
n
network
gwas a host-based low-speed serial connection providing
The computer network came into being in 1960s. At that time, the
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page14
e n
m/
c o
i .
w e
h ua
.
i ng
n
ear
/ l
The topology defines the organization of/devices in a network. A
p : as the bus topology and
star topology. t t
LAN can adopt various topologies, such
h
:
In the bus topology, all devices are connected to a linear network
media, which is called thesbus. When a node transmits data in a
network adopting the c e topology, the data reaches all nodes.
bus
Each node checksuthe r data. If the data is not sent to this node,
s
the node discardso the data. If the data is sent to this node,the
node acceptsethe data and transfers the data to the upper layer
R
protocol. A typical bus topology has simple layout of lines. Such
g short network media, and thus, the expense on
layoutnuses
n i is low. However, this topology makes it difficult to diagnose
cables
arand isolate faults. Once a fault occurs, the entire network will be
Le affected. In addition, each device in the LAN sends data to all the
other devices, which consumes large amount of bandwidth. It will
r e lower network performance.
Mo In the star topology, devices are connected to a central control
point. A device communicates with another device through the
point-to-point connection between it and the hub or switch. The
start topology is easy to design and install, because network
media connect the hub or switch and workstations. The star
topology is easy to maintain, because the network can be easily
Page15
modified and network faults can be easily be located. The star
topology is extensively used in LAN construction. Of course the
star topology has its weakness. Once the central control device
becomes faulty, the single point failure may be occur. In addition,
a Network media can connect only one device, so large amount
of network media are needed and the LAN installation cost
increases.
e n
These topologies are logical structures and are not necessarily
m/
related to the physical structure of devices. For example, logical
c o
bus and ring topologies usually adopt the physical star structure.
i .
A WAN usually adopts the star, tree, fullmeshed, or half-meshed
w e
ua
topology.
. h
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page16
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The Internet is a large network formed by networks and devices.
h tt
Based on the covered geographic scope, networks are classified
into LAN, WAN, and Metropolitan Area Network (MAN) whose
s :
size is between the LAN and WAN.
Local Area Network c e
(LAN)
A LAN is formed byu rconnected communication devices in a small
s o a room, a building, or an industry garden. A
area. A LAN covers
e kilometers. It is a combination of computers,
LAN coversRseveral
gmedia within several kilometers.
printers, modems, and other devices interconnected through
n
i Area Network (WAN)
various
n
arA WAN covers a larger geographic scope, such as a state or a
Wide
Page17
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
A LAN is formed by interconnected communication devices in a
p
tt
small area, such as a room, a building, and a campus. In general,
a LAN covers several kilometers. The LAN is featured by short
h
distance, low delay, high data transmission speed, and high
reliability.
s :
c e
Common LANs are Ethernet and Asynchronous Transfer Mode
(ATM). They are different in topology, transmission speed, and
u r
data format.Ethernet is the most widely used LAN.
s o
The following network devices are used in LAN construction:
Re
Cables: A LAN is extended by cables. Various cables are used in
LANs, for example, the fiber, twisted pair, and coaxial cable.
n g
Network Interface Card (NIC): An NIC is inserted in the main
n i
board slot of a computer. It transforms the data to the format that
a r other network devices can identify and transmits the data through
the network media.
Le Hub: A hub is a shared device that provides many network
Page19
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A WAN covers a larger geographic scope, such as a state or a
htt
continent. The China Packet Network (CHINAPAC), China Data
Digital Network (CHINADDN),China Education and Research
network (CERnet), CHINANET, and abuilding China Next
s :
Generation Internet (CNGI) are all WANs.
c e
A WAN connects LANs that are far from each other. It consists of
r
the end system(users on two ends) and the communication
u
s o
system (the link between two ends).
The communication system is the key of the WAN and it falls into
Re
the following types:
n g
Integrated Service Digital Network (ISDN): a dial-up connection
mode. The ISDN BRI provides 2B+D data channels. Each B
n i
channel provides the speed of 64 kbit/s and the highest speed
a r can be 128 kbit/s. The ISDN PRI has two standards:
Page21
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The WAN operates in a scope larger than that of the LAN. In the
htt
WAN, the network access is implemented through various serial
connections. Generally, enterprise networks are connected to the
s :
local ISP through the WAN lines. The WAN provides fulltime and
e
part-time connections. In the WAN, serial interfaces can work at
c
different speeds.
u r
s o
The following devices are used in the WAN:
Page22
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
ARPAnet solves the problem of network robustness. That is, once
htt
a device fault or link fault occurs, data transmission must be
ensured between any two nodes if the two nodes are physically
s :
connected. For the high ability of self-healing,ARPAnet meets the
e
requirement in wars. It comes of the Defence Advanced
c
r
Research Projects Agency (DARPA).
u
s o
In 1985, the National Science Foundation (NSF) established the
Re
NSFnet. NSF established a WAN consisting of regional networks
and connected these regional networks to the super computer
n g
center. In June 1990, the NFSnet took the place of the ARPAnet
n i
and became the backbone network of the Internet. Owing to the
a rNSFnet, the Internet is open to the public, while it was only used
re
The second leap of the Internet was attributed to the
commercialization in early of the 1990s. As soon as commercial
Mo organizations entered the world of Internet, they found the great
potential of Internet in communications, information searching,
and customer service. Then numerous enterprises in the world
swarmed into the Internet, which resulted in a new leap of the
Internet.
In 1995, NSFnet came to an end and it was replaced by a new
Internet backbone network operated by multiple private companies.
Page23
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Currently, the Internet is not a simple hierarchy, instead, it is
htt
formed by many WANs and LANs connected by connecting
devices and exchange devices. End users are connected to the
Internet through the service provided by Internet service
s :
providers (ISPs). ISPs are classified into international service
e
providers, national service providers, regional ISPs, and local
c
ISPs.
u r
s o
International service provider
An international service provider connects networks of different
countries. Re
g
National service provider (NSP)
n
n i
A national service provider operates on backbone networks that
are built and maintained by professional companies. These
a r backbone networks are connected by complicated switching
Le devices (usually operated by the third party) so that end users
can be connected to the backbone network. The switching
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page25
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page26
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A network protocol is a set of formats and conventions stipulated
htt
and observed by communication parties so that devices in
different computer networks can communicate. A network
:
protocol is the standardized description of a series of rules and
s
e
conventions. It defines how network devices exchange
c
u r
information.Network protocols are basis of the computer network.
Only the devices that comply with related network protocols (laws
s o
for interconnected devices in the network) can communicate with
Re
each other. Any device that does not comply with the network
g
protocol cannot communicate with other devices.
n
i
What is a protocol? Take the telegraph for example. Before
n
a rsending a telegraph,the two parties must define the transmission
Le
format of the telegraph, for example,what signal indicates the
start, what signal indicates the end, how to handle errors,and how
Page27
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A standard is a set of rules and processes that are widely used or
htt
defined by the government. A standard describes stipulations in a
protocol and sets the simplest performance set for guaranteeing
:
network communications. IEEE 802.X is the dominant LAN
s
standard.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page28
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Many international standardization organizations made great
htt
contributions to development of the computer network. They unify
network standards so that devices of different vendors can
s :
communicate with each other. Till now, the following
e
standardization organizations have made contributions to
c
r
development of the computer network.
u
s o
International Organization for Standardization (ISO)
Page29
area network (WLAN).
American National Standards Institute (ANSI)
ANSI is an organization formed by companies, governments, and
other members voluntarily. The ANSI defines the standard for the
fiber distribution data interface.
Electronic Industries Association/Telecomm Industries
e n
Association (EIA/TIA) They define the standards for network
m/
cables, for example, RS232, CAT5, HSSI,and V.24. They also
define the standard for cabling, for example, EIA/TIA 568B. c o
i .
International Telecomm Union (ITU)
w e
ua
They define the standard for the telecom network working as the
WAN, for example, X.25 and Frame Relay.
. h
Internet Engineering Task Force (IETF)
i ng
n
Founded at the end of 1985, the IETF is responsible for
e ar
researching and establishing technical specifications related to
the Internet. Now IETF has become the most authoritative
l
//
research institute in the global Internet field.
p :
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page30
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
p
IETF produces two types of files: Internet drafts and RFCs.
t fall into the following types:
RFCs, which are used as standards, t
h solutions Accepted
:all users and cannot be changed
Proposals, namely, the recommended
s
standards that are used by
c e of introduction IETF standards are
called RFCs, which u rare a series of files published by IETF.
Optimal practices, a kind
n g
formal files. There are about 5000 RFC files. The first one is RFC
i Software, which was published on April 7th, 1969.
1 Host
n
arMany Internet-related protocols, such as IP, OSPF, BGP,
Le and MPLS, are defined by RFCs.
r e
Mo
Page31
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page32
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A typical IP network is comprised of a backbone network,
htt
Metropolitan Area Network (MAN) and Access Network. The
backbone network commonly interconnects networks from
s :
different countries and cities. Metropolitan Area Networks are
e
located between the backbone network and the access network,
c
r
and it is commonly comprised of a backbone layer, convergence
u
o
layer and access layer. Access networks are used for terminal
s
Re
user access, it is usually in the layer2 access network, which is
under the service access point. Users can access the internet via
g
xDSL, Ethernet and so on.
n
Theitarget network structure of IP MAN is divided into:
r nMAN Service access point (BRAS and service router) and the
a IP
Le upper layer routers that compose the layer3 network.
Page33
On the service plane, the structure can be divided into a public
access network plane and the major account access network
plane.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page34
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The Metropolitan Area Network (MAN) is located between the
s :
The MAN provides the following services:
c e
u r
Internet access There are two access modes: dialup access
mode and private line access mode.
s o
Re
In the dialup access mode, subscribers have different service
attributes. In the private line access mode, subscribers in the
g
same group have the same service attributes. The Asymmetric
n
i
Digital Subscriber Line (ADSL) and Local Area Network (LAN)
n
a rtechnologies are widely used as Internet access services. Both
Le
technologies support dialup access and private line access
modes.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page36
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The common Internet access modes are ADSL, Ethernet, and
htt
leased line. Household users usually choose the ADSL access
mode, residential users prefer the Ethernet access mode, and
s :
enterprise users select the leased line access mode. Normally,
e
the access network uses Layer 2 devices, such as digital
c
r
subscriber line access multiplexers (DSLAM) and Ethernet
u
o
switches, to provide the access service for users. The access
s
Re
network does not perform any control on users and it simply sets
up Layer 2 connections to transparently transmit user information
g
to upper-layer devices. The access network refers to all devices
n
i
at the access layer.
n
a r
The access layer uses the broadband remote access server
re
The convergence layer generally uses aggregation routers or
Layer 3 switches. The convergence layer aggregates traffic from
Mo the BRAS into the MAN devices and forwards this traffic through
routing functions.
The following shows the Internet access process:
A user sends an Internet access request. Layer 2 devices in the
access network establish a Layer 2 connection and transparently
transmit the request to the BRAS.
Page37
The BRAS performs user identity authentication and
authorization, and allocates IP addresses to the user.
The BRAS routes the user packets to devices at the convergence
layer. The devices at the convergence layer forward the packets
through routing functions, to allow the user to have access to the
Internet.
e n
m/
c o
i .
w e
hua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page38
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
VPN services are classified into L3VPN services, L2VPN services
htt
and VPDN services. Here, we talk about the most common
L3VPN services. L3VPN has multiple types, such as Internet
s :
Protocol Security VPN (IPSec VPN), Ground Radar Equipment
e
VPN (GRE VPN) and Border Gateway Protocol/Multiple protocol
c
r
Label Switching VPN (BGP/MPLS VPN).
u
s o
The BGP/MPLS VPN model has three parts: customer edge
Re
(CE), provider edge (PE) and provider (P).
g
CE: It is an edge device on the user network. A CE provides
n
n i
interfaces that are directly connected to the service provider (SP)
network. It can be a router, switch or a host.
r
a PE: It is an edge router provided by the SP. A PE device is
Le directly connected to the CE. On the MPLS network, all VPN
Page39
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Generally, the performance of the backbone network can be
tt
evaluated using the following indicators:
h
High reliability Devices on the backbone network must be stable,
s :
which is critical to the stable operation of the entire network.
c e
Therefore, network architects should properly design the network
u r
architecture and develop reliable network backup policies to
s o
ensure strong network self-healing capabilities.
Rescalability
Flexibility and
To meetgfuture network services, the network must be seamlessly
i n and upgraded while minimally affecting the network
expanded
r n
architecture and devices.
a Flat networking The number of network layers and hops should
Le be minimized to facilitate network management.
r e Proper planning of quality of service (QoS) In, the IP network also
Mo supports voice over IP (VoIP), video and key customer services.
These services have high requirements on service in addition to
carrying Internet access service quality. Therefore, support for
QoS is network to the telecommunications network. To achieve
support for QoS, QoS should be properly planned.
Operability and manageability Centralized monitoring,
Page40
rights-based management, and unified allocation of bandwidth
resources are supported, which make the entire network
controllable. one of the necessary conditions for the transition of the IP.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page41
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
Hierarchical plane structure p
tcommonly applied in the early-
h
The hierarchical plane structure ist
stage backbone network. Currently, most carriers in China use
s : into three layers, core backbone
this structure, which is divided
layer, core convergence c elayer and core access layer. The core
u r by area. Areas are connected in full-
backbone layer is divided
s o mode to improve network robustness. The
mesh or partial-mesh
R e
core convergence layer adopts dual homing networking. Devices
at this layer are dual-uplinked to an area or two areas at the core
n
backbone.g
n i
Hierarchical spatial plane structure
r
a In the hierarchical spatial plane structure, the network is divided
Le in layers and planes. Different planes carry different services.
Mo each other. When one plane fails, the other plane acts as a
backup plane. When designing the network, architects usually
design the plane as one that can carry all services. As a network
requires carrying multiple services, the hierarchical plane network
model stands out with its features of a clear structure, large
backup capacity and high security.
Page42
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page43
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page44
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page45
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page46
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Since the 1960s, computer networks have undergone a dramatic
htt
development. To take the leading position and have a larger share
in the communication market, manufacturers competed in
:
advertising their own network structures and standards which
s
e
included IBM’s SNA, Novell’s IPX/SPX., Apple’s Apple Talk, DEC’s
c
r
DECnet and TCP/IP, which remains the most widely used today.
u
s o
These companies pushed software and hardware that use their
protocols to the market enthusiastically. All these efforts promoted
Re
the fast development of network technology and the prosperity of
g
the market of network devices. However, the network became more
n
i
and more complicated due to lack of compatibility between the
n
r
various protocols.
aTo improve network compatibility, the International Organization for
Le Standardization (ISO) developed the Open System Interconnection
r e Reference Model (OSI RM) which soon became the model of
Page47
1. Each layer of the model has its own responsibilities which
should help it stand out as an independent layer.
2. To avoid function overlapping, there should be enough layers.
The OSI reference model has the following advantages:
1. It simplifies network related operations.
2. It provides compatibility and standard interfaces for systems e n
designed by different institutions. m/
3. It enables all manufactures to be able to produce compatible c o
network devices, which facilitates the standardization of networks. i .
w e
ua
4. It lays the complex concept of communications down into
simpler and smaller problems, which facilitates our
understanding and operations. . h
n g
5. It separates the whole network into areas, which guarantees
i in
changes in one area will not affect other areas andnnetworks
a r
each area can be updated quickly and independently.
l e
/ /
p :
t t
h
s :
c e
u r
s o
Re
n g
n i
ar
Le
r e
Mo
Page48
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
The OSI reference model has seven layers. From bottom to top,
they are physical layer, data link layer, network layer, transport layer,
h
session layer, presentation layer and application layer.
s :
c e
The bottom three layers are usually called lower layer or the media
layer, which is responsible for transmitting data in the network.
u r
Networking devices often work at lower layers and network
s o
interconnection is achieved by the cooperation of software and
Re
hardware. Layer 5 to layer 7 form the upper layer or the host layer.
The upper layer guarantees data is transmitted correctly, which is
n g
achieved by software.
n i
a r
Le
r e
Mo
HC Series Page49
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The functions of each layer of the OSI Reference Model are listed
as follows:
htt
s :
Physical layer: providing a standardized interface to physical
transmission media including voltage, wire speed and pin-out of
cables. c e
u r
s o
Data link layer: combines bits into bytes and bytes into frames.
Provides access to media using MAC address and error detection.
Reproviding logical addresses for routers to decide
Network layer:
g selection)
path.(path
n
n i layer: providing reliable or unreliable data transfer
Transport
Page51
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
Each layer of the TCP/IP model corresponds to different protocols.
The TCP/IP protocol stack is a set of communication protocols. Its
h
name, the TCP/IP protocol suite, is named after two of its most
s :
important protocols: the Transmission Control Protocol (TCP) and
c e
the Internet Protocol (IP). The TCP/IP protocol stack ensures the
u r
communication between network devices. It is a set of rules that
o
define how information is delivered in the network.
s
Re
n g
n i
a r
Le
r e
Mo
Page52
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
Each layer of the TCP/IP model uses Protocol Data Unit (PDU) to
exchange information and enable communication between network
h
services. During encapsulation, each succeeding layer encapsulates
s :
the PDU that it receives from the layer above. At each stage of the
c e
process, a PDU has a different name to reflect its new appearance.
u r
For example, the transport layer adds TCP header to the PDU from
s o
the upper layer to generate the layer 4 PDU, which is called a
Re
segment. Segments are then delivered to the network layer. They
become packets after the network layer adds the IP header into
n g
those PDUs. The packets are transmitted to the data link layer,
n i
where they are added data link layer headers to become frames.
a rFinally, those frames are encoded into bit stream to be transmitted
Le through network medium. This process in which data are delivered
following the protocol suite from the top to the bottom and are added
r e with headers and tails is called encapsulation.
Mo
Page53
After encapsulation, data is sent to the receiving device after
transmission. The receiving device will decode the data to extract
the original service data unit and decides how to pass the data to
an appropriate application program along the protocol stack. This
reverse process is called de-encapsulation. The corresponding
layers, or peers, of different devices communicates through
encapsulation and de-encapsulation.
e n
As the figure above shows, Host A is communicating with Host B.
m/
Host A delivers data transformed from an upper layer protocol to
c o
the transport layer. The transport layer encapsulates the data
within the segment and send it to the network layer, which adds a i .
header. Then the segment is encapsulated within an IP packet, w e
which adds another header, called the IP header. Next, the IP
h ua
.
packet is sent to data link layer where it is encapsulated within a
i ng
frame header and trailer. The physical layer then transforms the
frame into bit stream and sends it to Host B through the physical
n
ar
cable.
l e
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page54
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
When Host B receives the bit stream, it sends it to its data link layer.
htt
The data link layer removes the frame header and trailer, then
passes the packet to the upper layer - network layer. Then the
s :
network layer removes the IP header from the packet and passes
c e
segment to the transport layer. In the similar way, the transport
r
layer extracts the original data and delivers it to the top layer, the
u
o
application layer.
s
Re
The process of encapsulation or de-capsulation is done layer by
layer. Each layer of the TCP/IP has to deal with data both from its
n g
upper and lower layers by adding or deleting packet headers.
n i
a r
Le
r e
Mo
Page55
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
p
The main functions of the physical layer are:
tsignaling types.
h t
•It specifies the media, interface and
s :
•It specify the electrical, mechanical, procedural, and functional
c
requirements for activating,e maintaining, and deactivating a physical
link between end o ur
systems.
•It specify thee
s
transmissionRdistance and pin-out.
features such as voltage, wire speed, maximum
Page56
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Physical layer mediums include coaxial cable, twisted pair, fiber and
htt
wireless radio. Coaxial cable is an electrical cable consisting of a
round conducting wire. The coaxial cable can be grouped into thick
s :
coaxial cable and thin coaxial cable according to their diameters.
c e
The thick coaxial cable is more suitable for large LANs since its
r
transmission distance is longer and it is more reliable. The thick
u
o
coaxial cable does not need to be cut but you must install transceiver
s
Re
for networks using thick coaxial cable. The thin coaxial cable is easy
to install and is much cheaper, but you need to cut the thin coaxial
n g
cable and put basic network connectors (BNC) on its two sides and
i
then inserts the two sides into T-shape connectors when installing
n
a rthe cable. So when there are many connectors, the safety is
Le
influenced.
r e
Mo
Page57
Twisted pair is the most widely used cable, which is twisted by a
pair of insulated copper wires whose diameters are about 1mm.
Twisted pair has two types: Shielded Twisted Pair (STP) and
Unshielded Twisted Pair (UTP) . STP cabling includes metal
shielding over each individual pair of copper wires, so it is very
capable of keeping electromagnetic interferences and wireless
radio interference at bay. STP is easy to install but its price is
comparatively high. UTP is easy to install and its price is cheaper, e n
however, its capability of anti-interference is not as powerful as m/
that of STP and its transmission distance is not that long.
c o
Fiber consists of fiberglass and the shielding layer and it will not i .
be interfered by electromagnetic signals. The transmission speed w e
ua
of fiber is fast and the transmission distance is long, but fiber is
h
.
very expensive. Optical fiber connectors are connectors for the
ng
light, which are very smooth and should not have any cuts.
i
Fiber connectors are not installed easily.
Wireless radio makes communications without a
n
r links.
physical
Wireless radio refers to electromagnetic waves
l e with frequencies
/ / in the space
within the radio frequency that are transmitted
p
including the air and vacuum. We should : put all the aspects into
consideration such as the distance,
t t price,etc.bandwidth requirement,
cables that the network devices h support when we make a
choice of physical medium.
s : working at the physical layer,
Repeaters and hubs are
c e of networks, they are not used so much
devices
rnot discuss them here.
but with the development
u
o
as in the past. We’ll
s
Re
n g
n i
ar
Le
r e
Mo
Page58
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Data link layer is the first logical layer of the physical layer. It
htt
encodes physical address for terminals and help network devices
decide whether to pass data to upper layers along the protocol stack.
It also points out which protocol the data should be delivered to with
s :
some of its fields and at the same time, it provides functions like
e
sequencing and traffic control.
c
r
The data link layer has two sub-layers: Logical Link Control sub-layer
u
o
(LLC) and Media Access Control sub-layer (MAC) .
s
Re
LLC lies between the network layer and the MAC sub-layer. This
sub-layer is responsible for identifying protocols and encapsulating
n g
data for transmission. The LLC sub-layer performs most functions of
the data link layer and some functions of the network layer such as
i
sending and receiving frames. When it sends a frame,it adds the
n
a raddress and CRC to the original data. When it receives a frame, it
takes apart the frame and performs address identification and CRC.
Le It also provides flow control, frame sequence check, and error
recovery. Besides these, it can perform some of the network
r e functions including datagram, virtual links and multiplexing.
Page59
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Data link layer protocols specify the frame encapsulation at the
802.2LLC. htt
data link layer. A common data link layer protocol for LANs is IEEE
s :
Common data link layer protocols for WANs include High-level
e
Data Link Control (HDLC) , Point-to-Point Protocol (PPP) and
c
Frame Relay (FR).
u r
o
HDLC is a bit-oriented synchronous data link layer protocol
s
Re
developed by the ISO. HDLC specifies data encapsulation for
synchronous serial links with frame characters and CRC.
g
PPP is defined by Request For Comment (RFC) 1661. PPP
n
i
consists of the Link Control Protocol (LCP) , the Network Control
n
a rProtocol (NCP) and other PPP extended protocol stacks. PPP is
commonly used to act as a data link layer protocol for connection
Le over synchronous and asynchronous circuits and it supports
multiple network layer protocols. PPP is the default data link layer
r e protocol for data encapsulation of the serial ports of VRP routers.
Mo FR is a protocol conforming with the industrial standards and it is
an example of packet-switched technology. PPP uses error
verification mechanism, which speeds up data transmission.
Ethernet switches are common network devices work at the data
link layer.
Page60
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As every person is given a name for identification, each network
htt
device is labeled with a physical address, namely, the MAC address.
The MAC address of a network device is unique globally. A MAC
s :
address consists of 48 binary digits and is often printed in
c e
hexadecimal digits for human use. The first six hexadecimal bits are
r
assigned to producers by IEEE and the last six bits are decided by
u
o
producers themselves. For example, the first six hexadecimal bits of
s
Re Card (NIC) has a fixed MAC address. Most NIC
the MAC address of Huawei’s products is 0x00e0fc.
Network Interface
n
producersg burn the MAC address of their products into the ROM.
When
n i an NIC is initialized, the MAC address in the ROM is read into
ather RAM. When you insert a new NIC into a computer, the physical
Le address
NIC.
of the computer is replaced by the physical address of the
r e
Mo However if you insert two NICs into your computer, then your
computer may have two MAC addresses, so a network device may
have multiple MAC addresses.
Page61
e n
m/
c o
i .
w e
h ua
.
i ng
n
ar
e
l
/ forwarded between
The data link layer ensures that datagram/are
devices on the same network, while the p :network layer is responsible
for forwarding packets from sourcet tto destination across networks.
h can be generalized as follows:
The functions of the network layer
: transmission across networks.
•Provide logical addressessfor
c e from one network to another.
r network device that works at the network
•Routing: to forward packets
u
o mainly for forwarding packets among
The router is a common
s
e above figure,Host A and Host B reside on different
layer. Routers functions
networks. InRthe
networksgor links. When the router that resides on the same network
i
as HostnA receives frames from Host A, the router passes those
r n to the network layer after it ensures that the frames should be
frames
Lea to itself by analyzing the frame header. Then the network layer
sent
checks where those frames should go according to the destination
Mo frames to the next hop. The process repeats until the frames are sent
to Host B.
Page62
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Common network layer protocols include the Internet Protocol (IP) ,
htt
the Internet Control Message Protocol (ICMP) , the Address
Resolution Protocol (ARP) and the Reverse Address Resolution
Protocol (RARP) .
s :
IP is the most important c e among the network layer protocols and
one
u
its functions represent rthe main functions of the network layer. The
o providing logical address, routing and
sde-encapsulating
functions of IP include
encapsulatingeor
R packets. ICMP, ARP and RARP
facilitate IP to achieve the network layer functions.
n ga management protocol and it provides information for IP.
ICMPn iinformation is carried by IP packets.
ICMP is
a r
Le ARP maps an IP address to a hardware address, which is the
standard method for finding a host's hardware address when only its
Page63
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
t here refers to the IP
t
The network layer address we mentioned
h address instead of a hardware
address. The IP address is a logical
s
address. The hardware address: such as the MAC address, is
burned on the NIC and iteis for the communication between devices
that are on the samer c However, the IP address is used for
link.
o u devices on different networks.
communication between
An IP addresseiss4-byte long and is made up of the network address
and the hostRaddress. It is often presented in dotted decimal notation,
n g 10.8.2.48.
for example,
n
More iinformation about the IP address will be introduced in later
a r
chapters.
Le
r e
Mo
Page64
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The transport layer provides transparent transfer of data between
htt
hosts. It shields the complexity of communications for the upper
applications and is usually responsible for end-to-end connection.
s :
The main functions of the transport layer involve:
c e from the application layer and
• Encapsulate data received
u r from the network layer.
decapsulate data received
s
• Create end-to-endo connections to transmit data streams.
• Send dataR
e
segments from one host to another, perform error
recovery,gflow control, and ensure complete data transfer.
i nof the transport layer protocols ensure data are transmitted
n which means data are not lost or changed during
• Some
r
eatransmission and the order of data packets remains the same when
correctly
Page65
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Transport layer protocols mainly include the Transmission Control
tt
Protocol (TCP) and the User Datagram Protocol (UDP) .
h
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page66
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Although TCP and UDP are both protocols of the transport layer,
htt
their contributions to the application layer differ greatly.
TCP provides connection-oriented and reliable transmission.
s :
Connection-oriented transmission means that applications which use
TCP as their transport layer protocol need to create a TCP
c e
connection before they exchange data.
u r
TCP provides reliable transmission services for the upper layer
o
through its mechanisms of error detection, verification and
s
Re
reassembly. However, creating the TCP connection and performing
these mechanisms may bring a lot of extra efforts and increase the
cost.
n g
UDP does not guarantee reliability or ordering in the way that TCP
n i
does. It provides a simpler service that does not guarantee the
Le
duplicated, or go missing without notice. UDP focuses on
applications that require more on transmission efficiency such as
Page67
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The main functions of the application layer are:
t
•Provide user interfaces and deal t
h with specific applications.
s :
•Provide data encryption, de-encryption, compression and
decompression.
e
cof data presentation.
•Specify the standards
u r
s o
R e
n g
n i
a r
Le
r e
Mo
Page68
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The application layer has many protocols and the following protocols
tt
may help you use and manage a TCP/IP network.
h
s :
•File Transfer Protocol (FTP) is used to transfer data from one
computer to another over the Internet, or through a network. It is
c e
often used for interactive user sessions.
u r
s o
•Hypertext Transfer Protocol (HTTP) is a communication protocol
used to transfer or convey information on the World Wide Web.
•TELNET isR
e
used to transmit data that carries the Telnet control
n g
information. It provides standards for interacting with terminal
n i or terminal
devices processing. Telnet supports end-to-end
Le •Simple
3 (POP3) are for sending and receiving emails.
r e •DNS (Domain Name Server) translates a domain name to an IP
Mo address and allows decentralized management on domain resources.
•Trivial File Transfer Protocol (TFTP ) is a very simple file transfer
protocol. TFTP is designed for high throughput file transfer for
ordinary purposes.
Page69
•Routing Information Protocol (RIP) is the protocol for routers to
change routing information through an IP network.
•Simple Network Management Protocol (SNMP) collects network
management information and makes that information exchanged
between the network management control console and network
devices including routers, bridges and servers.
•Remote Authentication Dial In User Service (Radius) performs
e n
user authorization, authentication and accounting.
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page70
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page71
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
To illustrate the encapsulation process, imagine there is network
h tt
whose transport layer uses TCP, the network layer applies IP and
the data link layer takes Ethernet standards. The above figure
s :
shows the encapsulation of a TCP/IP packet on that network.
c e
The original data is encapsulated and delivered to the transport
u r layer adds a TCP header to the data
layer. And then the transport
encapsulates e soIPtoheader
and passes it down the network layer. The network layer
Le pointed out in the above figure. Now, we’ll take a close look into the
whole process from the top to the bottom.
re
Mo
Page72
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
The above is a TCP data segment encapsulated in an IP packet. The
TCP segment consists of the TCP header and the TCP data. The
h
maximum length of a TCP header is 60 bytes. If there is not the
s :
Option field, normally, the header is 20-bytes long.
e is shown as in the above figure. We
The structure of a TCPcheader
r some of it. For more details, please refer to
are going to explainujust
the transport layeroprotocols.
e s the source port number. TCP allocates
•Source Port:R Indicates
g Port: Indicates the destination port number.
source port numbers for every application.
n
i
•Destination
n
a r
•Sequence Number: Indicates the sequence number which labels
re
•Port number is used to distinguish applications,80 means HTTP
Mo
application,23 for telnet,20 and 21 for ftp,53 for DNS.
•Ack Num: Indicates the acknowledgement sequence number. Ack
Num includes the next sequence number that the sender expects.
The value of this field is the sequence number that the sender of the
acknowledgement expects next.
•Option: Indicates the optional fields.
Page73
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The network layer adds the IP header to TCP datagram which it
h tt
receives from the transport layer. Usually, the IP header has a fixed
length of 20 bytes which does not include the IP options. The IP
s :
header consists of the following fields:
•Version: indicates the c e of the IP protocol. At present, the
version
u
version is 4. The version r is 6 for the next generation IP protocol.
•IP header length s ois the number of 32-bit words forming the header
R e Since it is a 4-bit field, its maximum length is 60
including options.
bytes.
n gbits. It consists of a 3-bit COS (Class of Service) field, a 4-
•TOS:
bit n
i 8
a r TOS field and a 1-bit final bit. The 4 bits of the TOS field indicates
Page74
nowadays many applications allow IP datagram that are more
than 8192 bytes to go through the links especially for
applications that support NFS.
•Identification: identifies every datagram the host sends. The
value increases with the number of datagram the host sends.
•Time to Live (TTL) : indicates the number of routers a packet
can travel through. The value decreases one every time the e n
packet passes a router. When the value turns to 0, the packet m/
will be discarded.
c o
•Protocol: indicates the next level protocol used in the data i .
w
portion of the internet datagram. It is similar to the port number. e
IP protocols use protocol number to mark upper layer protocols.
h ua
The protocol number of TCP is 6 and the protocol number of
.
UDP is 17.
i ng
n
•Header checksum: calculates the checksum of the IP header to
see if the header is complete.
e ar
l
•The source IP address field and the destination IP address filed
//
point out the IP addresses of the source and the destination.
:
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page75
e n
m/
c o
i .
w e
h ua
.
i ng
n
ear
l
: //
p
The physical layer has limitations on the length of frame it sends
htt
every time. Whenever the network layer receives an IP
datagram, it needs to decide which interface the
:
datagram should choose and check the MTU of that
s
e
interface. IP uses a technique called fragmentation to
c
When a datagramois
r
solve the problem of heterogeneous MTUs.
ulonger than the MTU of the network over which
it mustsbe sent, it is divided into smaller fragments which
e
areRsent separately.
re
the IP layer at the destination.
Mo
Datagram can be fragmented for more than one time. The IP
header provides enough information for fragmentation and
reassembly.
Page76
•Flags: 3 bits
Multiple control bits:
0bit: reserved, must be 0.
1bit: (DF) 0 = can be fragmented, 1 = cannot be
fragmented.
2bit: (MF) 0 = final fragmentation, 1 = more
e n
fragmentation.
m/
The values of DF and MF cannot be 1 at the same time.
c o
012 i .
+---+---+---+ w e
||D|M|
h ua
.
ng
|0|F|F|
+---+---+---+
n i
a r within the
•Fragment offset: indicates the position of the fragment
l e is fragmented,
original datagram. When an IP datagram
each fragment becomes a packet
/ / with ofitsanyownotherIP
:
header and will be routed independently
p
datagrams.
t t
h
s :
c e
u r
s o
Re
n g
n i
ar
Le
r e
Mo
Page77
e n
m/
c o
i .
w e
h ua
.
ing
n
e ar
l
://
p
The Ethernet header is made up of three fields:
tof the destination.
•DMAC: indicates the MAC address t
h of the source.
:
•SMAC: indicates the MAC address
s
e vary with its values.
•LENGTH/TYPE: its meanings
c
When the value r
uis bigger than 1500, it indicates the frame
type, for exampleothe upper layer protocol type. The common
s
protocol typeseare:
R
g ARP request/response message
0X0800 IP packets
n
i
0X0806
n
ar 0X8035 RARP request/response message
Le When the value is smaller than 1500, it indicates the length of
data frame.
re
Mo
•DATA/PAD: the original data. Ethernet standards specify that the
minimum data length should be 46 bytes. If the data is less than
46 bytes, add the Pad field to fill it.
•FCS: the frame check field.
Page78
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page79
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
The above is an example of an HTTP packet that is captured, which
htt
may facilitate your understanding towards packet encapsulation. The
bottom displays the actual data and the top is information analyzed
by the software.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page80
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
This page illustrates data encapsulation at the data link layer. The
earlier. htt
encapsulation format used here is Ethernet, which is mentioned
s :
The figure above shows DMAC at the top and then comes SMAC
c e
and the type field is listed at the bottom.
u r
o
DMAC is 00d0: f838: 43cf
s
Re is 0x0800, which indicates that it is an IP packet.
SMAC is 0011: 5b66: 6666
Type field value
n g
n i
ar
Le
r e
Mo
Page81
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
This page illustrates data encapsulation at the network layer. An IP
htt
packet is made up of two parts, the IP header and the IP data. As
described previously, the IP header consists of many fields. In the
:
above example, the value of the version field is 4, which indicates
s
e
the packet is an IPv4 packet. The packet header is 20-byte long.
c
r
The protocol field is 0x06, which tells us that the packet to be
u
s o
encapsulated is a TCP packet. The IP address of the source is
192.168.0.123 and the IP address of the destination is
Re
202.109.72.70.
n g
n i
a r
Le
r e
Mo
Page82
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
This page illustrates data encapsulation at the transport layer. The
htt
transport layer here uses TCP protocols. The source port number is
a random number 3514 and the destination port number is 80,
s :
which is the number assigned for the HTTP protocol. So the
c e
datagram is from the source to visit the HTTP service of the
destination host.
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page83
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
p
1. What are the layers of the OSI reference model?
t
The OSI reference model consiststof seven layers, namely, the
h
layer, the session layer and s : application layer.
physical layer, the data link layer, the network layer, the transport
the
c eof each layer in the TCP/IP protocol stack?
rstack has five layers: the physical layer, the
2. What are the functions
u
The TCP/IP protocol
s onetwork layer, the transport layer and the
Re The physical layer specifies the mechanical,
data link layer, the
application layer.
electricalgand electronic standards for transmission. The data link
n controls on the physical layer, detects errors and
layeriprovides
r n traffic control (optional). The network layer checks the
performs
Leanetwork topology to decide the best route for data transmission. The
basic function of the transport layer is to segment the data it
Page84
3. What is the process of packet encapsulation and de-
encapsulation?
De-encapsulation is the reverse process of encapsulation.
Encapsulation means to add headers to the original data layer by
layer from the top of the protocol stack to
the bottom; while de-encapsulation is to strip off those headers
from the lower layers to the upper layers. e n
m/
4. What are the differences between the MAC address and the
c o
IP address?
i .
MAC address is a 48-byte physical address printed on the
w e
ua
hardware of a device. The MAC address can’t be changed. The
IP address is a 32-byte address works at the network layer and
.
IP addresses can be changed. IP addresses are grouped intoh
ng
public addresses and private addresses. Public addresses are
i
n
unique globally, while private addresses can be used repetitively
in different LAN segments.
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page85
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page86
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In TCP/IP protocols, each layer has its own communication method,
htt
Data Link Layer use MAC Addresses, the Network Layer use IP
Addresses. After understanding the functions of these layers, this
s :
course mainly introduces IP Addressing used at the Network Layer,
c e
as well as packet forwarding between Network Layer devices,
r
which is the basis for routing.
u
s o
This chapter introduces the layer 3 –Network Layer in TCP/IP
Re
protocols. The main function of the Network Layer is achieved
through using the IP protocol, which includes IP Addressing and IP
n
Routing.g
n i
a r
Le
r e
Mo
Page87
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page88
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page89
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As the slide shows, this procedure is called encapsulation, in which
htt
data is transferred along the TCP/IP protocol stack, from the upper
layer downward, meanwhile, corresponding header and trailer are
s :
added. After the data encapsulation and transmission in the
c e
network, the receiving equipment will delete the information added,
r
and decide how to deliver the data to proper application along the
u
o
TCP/IP protocol stack, according to the information in the header.
s
Re
Among different layers of TCP/IP model, information is exchanged
to ensure the communication between network equipment. The
n g
PDU is used for exchanging information. The PDU is different for
i
different layers, and with different names. For instance, in the
n
a rtransport layer, the PDU with TCP layer is called a segment; after
Le
the segment is transmitted to network layer, and added with an IP
header, the PDU is called a packet. The PDU with layer 2 header is
Page90
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The network layer receives data from the transport layer, and adds
htt
source address and destination address into the data. As learned in
previous chapters, the data link layer has the physical address
:
(MAC address), which is globally unique. When there is data to be
s
c e
sent, the source network equipment queries the MAC address of
the other end equipment, and sends it out.
u r
s o
However, the MAC addresses are existent in a flat address space,
without clear address classification. Thus, it is only suitable for the
Re
communication within the same network segment. Besides, the
MAC address is fixed in the hardware, with poor flexibility. Hence,
n g
for communication between different networks, usually it is based
n i
on IP address based on software, to provide better flexibility.
a r
Le
r e
Mo
Page91
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
IP address is composed of 32 bits, which are divided into four
octets, or four bytes.
htt
:
The IP address could be represented in the following methods:
s
e
Dotted decimal format:10.110.128.111
c
r
Binary format:00001010.01101110.10000000.01101111
u
s o
Hexadecimal format:0a.7e.80.7f
n
addressesg is composed of two parts, network and host.
and seldom in hexadecimal format. The hierarchical scheme for IP
n i
r
The hierarchical scheme of IP addresses is similar to that of
atelephone
Le code
numbering, which is also globally unique. For example,
the telephone number 010-8288248: the 010 represents the city
htt
segment uniquely or identifies the aggregation of multiple network
segments. The devices in the same network segment use the
same network ID. An IP address also contains a host ID, which
s :
identifies a device in the network segment uniquely. How to
e
distinguish the network ID and the host ID? The Internet designer
c
u r
classifies the IP addresses into five classes according to the size
of the network, namely, class A, class B, class C, class D, and
class E.
s o
Re
The network ID of the IP address of class A is the first octet, and
the first digit of the first octet is 0. Therefore, the number of valid
g
bits for network address in class A address is 8–1=7. The first
n
n i
octet of class A address ranges from 1 to 126 (0 and 127 are
reserved). For example, 10.1.1.1 and 126.2.4.78 are class A
a raddresses. The host
Le ID of the class A address is the last three octets, namely, the last
24 bits. The IP address of class A ranges from 1.0.0.0 to
r e 126.255.255.255. Each class A network can have 224 IP
Page93
The host ID of the class B address is the last two octets, namely,
the last 16 bits. The class B address ranges from 128.0.0.0 to
191.255.255.255. Each class B network can have 216 IP
addresses. The network ID of the class C address is the first
three octets. The first two digits of the first octet are 11, and the
third digit is 0. Therefore, the number of valid digits of class C
network address is 24–3=21. The first digit of the class C
address ranges from 192 to 223. For example, 192.1.1.1 and e n
220.2.4.78 are class C addresses. The host ID of the class C m/
address is the last octet. The class C address range from
c o
192.0.0.0 to 223.255.255.255. Each class C network can have
i .
28=256 IP addresses. The first three digits of the first octet of
w e
class D address is 111, and the fourth digit is 0. Therefore, the
h
first octet of the class D address ranges from 224 to 239. The ua
.
ng
class D address is used as the multicast address. The first octet
i
of class E address ranges from 240 to 255. It is reserved for
n
ar
research. The IP address usually used are of class A, class B
and class C. The IP addresses are allocated by the International
l e
Network Information Center (InterNIC) according to the scale of
//
the company. Basically, the class A addresses are allocated to
:
p
governments, the class B addresses are allocated to medium-
htt
sized companies, and class C addresses are allocated to small-
sized companies. With the fast development of the Internet and
:
also the waste of IP addresses, the IP address is becoming
s
insufficient.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page94
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
An IP address uniquely identifies a device in the network. However,
htt
some IP addresses cannot be used to identify devices, because
they are used for some special purposes.
s :
The IP address with all 0s host ID is called network address. The
network address identifies a network segment. For example, class
c e
A address 1.0.0.0 and private addresses 10.0.0.0 and 192.168.1.0
r
are network addresses.
u
o
The IP address with all 1s for the host ID is called a broadcast
s
Re
address. A broadcast address identifies all the hosts in a network.
For example, 10.255.255.255 and 192.168.1.255 are broadcast
n g
addresses. If the router sends the packet to the broadcast address,
all the nodes on the network segment can receive the packet. The
i
IP address with the network ID being 127 is the loopback address,
n
a rfor example, 127.0.0.1, which is used for loopback test usually.
The IP address of all 0s refers to all the hosts. On the Huawei
Le Quidway routers, IP address 0.0.0.0 specifies the default route. IP
address 255.255.255.255 is also a broadcast address, but it
r e stands for all hosts and is used to send packets to all the nodes on
Page95
The number of IP addresses that could be allocated can be
calculated. For example, in class B network segment 172.16.0.0,
an IP address has a 16-bit host ID. There are 2 to the power of
16 IP addresses on the network segment, in which 172.16.0.0 is
the network address and 172.16.255.255 is the broadcast
address, so up to 216- 2 IP addresses can be allocated to hosts.
In class C network segment 192.168.1.0, an IP address has an
8-bit host ID. There are 28=256 IP addresses on the network
segment, in which 192.168.1.0 is the network address and e n
192.168.1.255 is the broadcast address, so up to 254 IP
m/
addresses can be allocated to hosts. Therefore, the number of IP
addresses that can be allocated to hosts is calculated as follows: c o
Suppose the IP address in the network segment has an n-bit
i .
host ID, and then, the number of IP addresses that can be
w e
ua
allocated to hosts is 2n-2. A network-layer device (like router)
uses the network address to indicate the hosts on the network
. h
segment. Thus, the number of entries in the routing table of the
ng
router is greatly reduced.
n i
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page96
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
When planning IP addresses, usually private IP addresses are used
htt
within the same company. Private IP addresses, reserved by
InterNIC, can be freely used by companies. The private IP
s :
addresses cannot be used to access the Internet. The reason is
c e
that the private IP addresses cannot have corresponding routes on
r
the public network and the IP addresses may conflict.
u
s o
When the user with private IP address needs access to the Internet,
Re
the private IP address must be translated to the public address that
can be identified by the public network through Network Address
n g
Translation (NAT) technique. InterNIC reserves the following
ni
network segments as the private IP addresses:
a r
class A: 10.0.0.0-10.255.255.255;
Le class B: 172.16.0.0-172.31.255.255;
r e class C: 192.168.0.0-192.168.255.255.
Mo By using the private IP addresses, the enterprises reduce the cost
on buying public addresses and the IP addresses are saved.
Page97
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Subnet masks are used to distinguish the network and host bits. In
htt
a subnet mask, the “1” bits represent the network, and “0” for host.
The subnet mask of class A network in dotted decimal format by
s :
default is 255.0.0.0, the subnet mask of class B network is
c e
255.255.0.0, and the subnet mask of class C network is
255.255.255.0.
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page98
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
192.168.1.100 is a standard class C address. The subnet mask is
192.168.1.0. htt
255.255.255.0. Hence the network address of this IP address is
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page99
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
IP address is a collection of 32 binary digits or bits. Every 8 bits
htt
corresponds to a decimal number. The decimal counting system
is based on the power of 10: 101,102 , etc. And binary counting
s :
system is based on the power of 2: 21,22 , etc. In a byte, from
c e
the right to the left bit, the values corresponding as such, 2 0,21,
r
22 …27. As the slide shows, for this byte, from left to right, the
u
o
decimal number represented are: 27=128,26=64,25=32,24=16,
s
Re
23=8,22=4,21=2,20=1. The sum of them is 255. Thus, the
byte (8 bits) with all “1” represents 255 in decimal.
n g
n i
a r
Le
r e
Mo
Page100
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As this slide shows, for “11101001”, calculate bit by bit as a decimal
tt
number, then convert the binary to the decimal value.
h
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page101
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
An IP address is a collection of 32 binary digits. It is represented
tt
by 4 bytes, each byte is composed of 8 binary digits.
h
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page102
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
IP networks without a subnet can be treated as a single network
htt
externally without it being necessary to know what it looks like
internally. For example, all the routes to address 172.16.X.X is
s :
considered as originating from the same direction, without
c e
consideration of third and fourth byte. This reduces the number of
r
routes in the routing table. However in this way, different subnets
u
o
cannot be distinguished. Thus, all the hosts in the network may
s
Re
receive broadcasts for the network, which reduces the network
performance, and not convenient for network management.
n g
For example, a class B network can contain 65000 hosts. If the
n i
user applied for the class B address only needs 100 IP address, it
a ris a huge waste since the addresses left cannot be used by others.
Page103
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
From the view of address allocation, a subnet is the extension of a
htt
network address. The network administration can decide the size of
the subnet according to the need of development of organization.
s :
Using Subnet Masks, the network devices can determine from the
c e
IP address which bits represent the network and which bit represent
r
the hosts. In using subnets, the network addresses are used more
u
o
efficiently. Externally, it is still a single network, however internally, it
s
Re
is divided into several different subnets. As the slide shows, the
network 172.16.0.0 is divided to two network segments:
n g
172.16.4.0 and 172.16.8.0.
n i
If a financial department of some company uses the subnet
a r172.16.4.0; and the engineering department uses subnet
Le 172.16.8.0. Thus, the routing could be implemented according to
Page104
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After learning the conversion between binary and decimal, it is easy
htt
to understand the corresponding relationship for that of IP address
and subnet masks. In this slide, the number of bits of a subnet
s :
mask is 8+8+8+4=28, which indicates the number of consecutive “1”
c e
in the network mask is 28, i.e., the network address bits is of a 28-
r
bit length. The subnet can be represented in another method: as
u
o
“/28”, indicating that the first 28 bits represent the network ID.
s
Re
n g
n i
a r
Le
r e
Mo
Page105
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
As shown in the slide, the IP address and subnet mask are already
htt
known. The network address is obtained from the AND operation
between the IP address and the subnet mask. The AND operation
s :
is 1&1=1, 1&0=0, and 0&0=0. Therefore, the calculation of the AND
c e
operation for the example in this slide is as follows:
u r
11000000, 10101000, 00000001, 00000111&11111111, 11111111,
s o
11111111, 11110000 =11000000, 10101000, 00000001, 00000000
n g
n i
a r
Le
r e
Mo
Page106
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The number of hosts is calculated through the subnet mask. First, it
htt
is necessary to identify how many 0s there are in the subnet mask.
As shown in the above figure, if there are N-bit 0s, then, the number
s :
of hosts is 2n. The number of IP addresses that can be allocated to
c e
the host is 2n -2 (minus the network address which is all 0s and the
r
broadcast address which is all 1s).
u
s o
Re
n g
n i
a r
Le
r e
Mo
Page107
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
This example shows the calculation of host quantity.
tis 255.0.0.0, namely, 24-bit
h
The subnet mask of class A addresst
: mask of class C address is
host ID. The subnet mask of class B address is 255.255.0.0,
namely, 16-bit host ID. Thessubnet
e host ID.
255.255.255.0, namely,c8-bit
u r C address. The standard subnet mask has
o in this case, the first 4 bits of it are also used
This example is a class
an 8-bit host ID,sand
Remask. The maximum number of hosts is 2 .
as the subnet 8-4
n g
n i
a r
Le
r e
Mo
Page108
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In this example, the network address is of class C: 201.222.5.0.
htt
Suppose 20 subnets are needed, and 5 hosts in every subnet. it is
necessary to divide the last byte for subnet and host. The bits of the
s :
subnet decide the number of subnets. In this example, because it is
c e
a class C address, there are 8 bits for subnet and hosts. And since
r
24<20<25 , there are 5 bits for subnets, and the maximum subnets
u
o
which could be provided are 32(25). And the 3 bits left are for host,
s
Re
and 23=8, deducting the network address and broadcast address in
this network, which is 8-2=6. It is can meet the network
n g
requirements.
And i
r n each network segment is as follows:
e a201.222.5.0~201.222.5.7
L 201.222.5.8~201.222.5.15
r e 201.222.5.16~201.222.5.23
Mo ………
201.222.5.232~201.222.5.239
201.222.5.240~201.222.5.247
201.222.5.248~201.222.5.255
Page109
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
For the network of class B, if there are 8 bits for subnet, then 256
s :
Subnet bits subnet mask subnet number host number in each
subnet
c e
1
u r
255.255.128.0 2 32766
2
s o
255.255.192.0 4 16382
3
Re
255.255.224.0 8 8190
4
n g 255.255.240.0 16 4094
5
n i 255.255.248.0 32 2046
a r6 255.255.252.0 64 1022
Le 7
8
255.255.254.0
255.255.255.0
128
256
510
254
r e
Mo 9
10
255.255.255.128
255.255.255.192
512
1024
126
62
11 255.255.255.224 2048 30
12 255.255.255.240 4096 14
13 255.255.255.248 8192 6
14 255.255.255.252 16384 2
Page110
e n
m/
c o
i .
w e
h ua
.
i ng
n
ear
l
: //
p
For the network of class C, if there are 5 bits for subnet, then 32
subnet. htt
subnets could be provided, and 6 hosts could be included in each
Subnet bits s :
Subnet mask Host number Subnet number
c e
u r
1
s o
255.255.255.128 126 2
2 Re255.255.255.192 62 4
n g
i3
rn
255.255.255.224 30 8
e a
L 4 255.255.255.240 14 16
r e
Mo 5 255.255.255.248 6 32
6 255.255.255.252 2 64
Page111
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A network can be divided into multiple subnets, and each subnet
htt
uses a unique ID. But the number of hosts in every subnets may be
different. If the length of subnet mask is fixed and the number of IP
s :
addresses in the subnets is the same, lots of IP addresses are
c e
wasted. In this case, the variable length subnet mask (VLSM)
r
technique can be used. If the subnet has lots of nodes, the subnet
u
o
mask could be shorter. The IP address with shorter subnet mask
s
Re
represents less networks/subnets, but more IP addresses can be
allocated to hosts. If the subnet has a few nodes, the subnet mask
n g
could be longer. The IP address with longer subnet mask
i
represents more logical networks/subnets, but less IP addresses
n
a rcan be allocated to hosts. Such addressing scheme can save lots
Le
of IP addresses, which can be used in other subnets. As shown in
the above figure, a company deploys the IP addresses subnet
Mo bought five routers. One router, which works as the gateway of the
intranet, is connected to the local ISP. The other four routers are
connected to four branch offices. Each office has 20 PCs, so each
office needs 20 host addresses.
Page112
As shown in the above figure, 8 subnets are required. 4 offices
need 21 IP addresses (including a router interface). The 4
network segments connected with the gateway need 2 IP
addresses. The IP address number of every network segment is
different, so the VLSM could be used. The four network
segments for the office adopt the subnet mask 255.255.255.224,
3 bits for subnet, and 5 bits for hosts. This means at most 25-
2=30 hosts could be included. The four network segments
e n
connecting office router and gateway, are support 6 bits for
m/
subnet, and 2 bits for hosts, therefore at most 2 hosts could be
c o
included.
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page113
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Classless Inter-Domain Routing (CIDR), defined by RFC 1817,does
htt
not adhere to the IP address classification. It can aggregate multiple
routes into one, so to minimize the size of the routing table and
s :
improve the scalability of the router. As shown in the above figure,
c e
some class C networks are allocated to the ISP, 198.168.0.0-
r
198.168.255.0. The ISP allocates the class C networks to the user
u
o
groups. At present, three class C networks have been allocated to
s
Re
user groups. If the CIDR technique is not used, the routing table of
the ISP’s router has three routes connected to the downlink network
n g
segments, and the routes will advertise them to the routers on the
i
Internet. By the CIDR technique, the three routes 198.168.1.0,
n
a r198.168.2.0, and 198.168.3.0 can be aggregated into one route
Le
198.168.0.0/16. Thus, the ISP’s router advertises only route
198.168.0.0/16 to the Internet, and the number of entries in the
Page114
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page115
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Address Resolution Protocol (ARP) is a broadcast protocol, through
htt
which the host can dynamically find the corresponding MAC
address of an IP address. Every host has an ARP cache, with the
s :
mapping table between IP address and physical address, which are
c e
currently known by the host. When host A wants to send an IP
r
packet to host B in the same LAN, it will first look up the ARP cache
u
o
to find whether there is IP address of host B in the table. If so, the
s
Re
corresponding physical address could be found, and to send the
data packet according to the physical address.
n g
Sometimes, the corresponding IP address of host B cannot be
n i
found. It is possibly because host B just joined the network, or host
a rA has just powered and on whose ARP cache is empty. In this case,
htt
networks segment can communicate. Usually, when a router R
receives an ARP Request, it will check whether the requested
s :
destination address is its own: if so, the ARP Reply will be sent; if
c e
not, the request packet is discarded.
u r
However, if the router R enables the Proxy ARP function, when
s o
router R receives an ARP Request, and finds the destination
Re
address is not its own, router R will not discard the packet
immediately. Instead, router R looks up the routing table, if there is
n g
a route to this destination, it will send its own MAC address to the
n i
request party, and the request party will send the packet with this
a rdestination to router R, and router R will forward it further.
Le
r e
Mo
Page117
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Gratuitous ARP: The host sends ARP Request to find the
htt
corresponding MAC address of its own IP address. If in the network,
there is no another host with the same IP address, the host will not
s :
receive any reply. However, if the host receives reply, it indicates that
c e
another host in the network is configured with the same IP address.
r
Hence, in the terminal log of host, an error information will be
u
o
created, indicating that a duplicate IP address is configured.
s
Re
Functions of Gratuitous ARP:
g
1. Through sending Gratuitous ARP packets, it could be confirmed
n
ni
whether there is IP address conflict in the network. If the Request
party receives a Gratuitous ARP reply, it indicates that there is an
a r
equipment with a duplicate IP address.
Le2. Updating the old hardware address information. If the host
r e sending Gratuitous ARP just changes its hardware address, such as
Page118
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Sometimes, RARP ( Reverse Address Resolution Protocol) is
htt
needed when dealing with diskless workstations. This equipment
knows its own MAC address, and needs to obtain IP address. In
s :
order to make RARP work properly, in the LAN, at least one host
c e
has to be the RARP Server. In this example, the diskless
r
workstation needs its own IP address. It broadcasts the RARP
u
o
Request in the network. The RARP Server receives this broadcast
s
Re
request, and sends the reply. Thus, the diskless workstation will
obtain the IP address. Similarly with ARP Request, RARP Request
n g
are sent using broadcasts, ARP Reply and RARP Reply are usually
i
forwarded as unicast packets
n
a r
Le
r e
Mo
Page119
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page120
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The main function of a router is to interconnect different networks.
tt
The data must also be capable of being forwarded to the Internet.
h
s :
Data forwarding: A router should have the ability to forward data
packets according to the destination address of data packets.
c e
r
Routing: In order to forward data packets, the router should have
u
routing table. s o
the ability to establish, update and forward data packets based on
Page121
Interconnecting heterogeneous networks: Presently, at least
two kinds of network protocols could be implemented in the
router to interconnect heterogeneous networks. For example,
routers that support ATM and FR interfaces can be considered
as belonging to a router that can interconnect heterogeneous
networks.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page122
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The slide shows the working process of a router:
htt
At the physical layer, the packet is received by one of the router
interfaces, and is sent to the upper layer which is data link layer.
s :
The Data Link Layer will de-encapsulate the frames, and send to
e
the Network Layer based on the protocol field of the packets. The
c
r
network layer will firstly check whether the packet is intended for
u
the local host.
s o
Re
If so, the network layer encapsulation is de-encapsulated, and the
packet is sent to upper layer. If not, the router will check the
n g
routing table according to the destination address of the packet. If
a route item could be found, the packet is sent to data link layer
n i
of the corresponding port, after the encapsulation of data link
a rlayer, the packet is sent. If no route could be found, the packet
Page123
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The ability to forward data packets is due to the routing table. Every
htt
router maintains a routing table, in which every route indicates the
corresponding physical port of the router through which the
s :
destination subnet or host could be reached. In the routing table,
c e
the following key items are included:
u r
Destination: It is used to identify the destination address or
s o
network of the IP packet.
R
Mask: Togethere with the destination address, it is used to identify
g After implementing “logical AND” to the destination
the network segment address in which the destination host or router
n
n i and network mask, the network segment address could be
is located.
address
a r in which the destination host or router is located.
obtained
Le Interface: Indicates to the current router, through which interface
Page124
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
1. What is IP address classification?p
htt
IP addresses are divided into Classes A, B, C, D and E. Among
them, Class D is multicast address; Class E is reserved address.
s :
In Class A, B, and C, each has its own private address space.
c e
2. What is the function of ARP/RARP?
u r
ARP stands for Address Resolution Protocol, which is used to
s o
analyze the corresponding MAC address for an IP address; RARP
Re
stands for Reverse Address Resolution Protocol, which is used to
analyze the corresponding IP address for a MAC address.
n g
3. What is the principle function of a router?
n i
At the physical layer, the packet is generally received by one of the
a rrouter interfaces, and is sent to the upper layer, namely the data
Mo intended for the local host. If so, the network layer encapsulation is
decapsulated, and the packet is sent to the upper layers. If not, the
router will check the routing table according to the destination
address of the packet. If a route item could be found, the packet
is sent to data link layer and the corresponding interface, after the
encapsulation of data link layer, the packet is forwarded. If no route
could be found, the packet will be discarded, and relative error
Page125
information would be sent to the packet’s source.
e n
m/
c o
i .
w e
hua
.
ing
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page126
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page127
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page128
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page129
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page130
e n
m/
c o
i .
w e
h ua
.
i ng
n
ar
e
l
/service for applications.
/
p: the following aspects:
TCP provides reliable, connection-oriented
The reliability of TCP is guaranteedt
htTCP, before any end of the link
through
Connection-oriented transport: In
s :
begins to transfer data, the connection between two parties of the
link must be established.e
r c the maximum length of the data packet
u end of the link. After the connection is
MMS: In TCP, it indicates
o
e
established, the stwo parties of the connection should advise its own
could be sent to another
Mo
Header and data checksum: TCP will maintain the checksum of
header and data, which is the end-to-end check. Its purpose is to
detect the variation of the data during the transmission procedure. If
there is some error in the segment checksum, this segment will be
discarded by TCP receiver and the acknowledgement will not be
replied. Hence, the TCP retransmission mechanism will be started.
Page131
Flow control: Both ends of the TCP connection have a buffer with
fixed space. Only the amount of data less than the size of
receiver’s buffer could be sent by the sender. This mechanism
prevents such a situation happening in which the buffer is
overloaded because of the speed difference of two hosts.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page132
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
TCP uses IP as the network layer protocol, and TCP segment is
encapsulated into the IP packet.
h
:
TCP segment is made up of two parts, TCP Header and TCP Data.
s
e
If there is no option field, the length is 20 bytes.
c
r
TCP header includes the fields showed in the slide. There are some
u
o
explanations of some fields:
s
Re
16-bit source port number: TCP will allocate a source port number
for the source application.
n g
16-bit destination port number: The port number of destination
n i
application.
a rSource and Destination Port: Every TCP segment includes the
Le source and destination port number, used to find the sending and
Page133
Acknowledgment Number is a 32-bit field that identifies the
sequence number the source next expects to receive from the
destination. The Acknowledgement Number is the last data
sequence number plus one.
4-bit header length: It indicates the header is of 32 bits.
Window Size is a 16-bit field used for flow control. It indicates the
number of bytes are expected to receive. Because this field is of
e n
16 bits, the maximum window size is 65535 bytes.
m/
Checksum is 16 bits, covering both the header and the
c o
encapsulated data, allowing error detection.
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page134
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
TCP provides full-duplex transmission protocol which is reliable
h tt
and connection-oriented. The reliability of TCP is guaranteed by
some methods. One of them is to establish the connection before
sending any data.
s :
The TCP connection is c eestablished through three-way handshakes
procedure:
u r
1. Request end s o(or Client) sends a SYN field, indicating the
client’s R e
expectation to connect to the port of server, with Initial
g replied SYN with sequence number “b”. At the same
Sequence Number (ISN) “a”.
n
n i the acknowledgement number is set to be “a+1” to
2. The Server
Page135
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As it is mentioned before, TCP is a full-duplex transport layer
htt
protocol. Full-duplex indicates the two ends of the connection could
transmit or receive data at the same time. Thus, the two parties
s :
should terminate the connection individually. The TCP connection is
c e
established through three-way handshakes procedure, while the
r
TCP connection is terminated through four-way handshake
u
procedure:
s o
Re
1. Request end (or Client) sends a FIN field, indicating the client’s
expectation to terminate the connection, with initial sequence
n g
number “a”.
ni
2. The Server set the acknowledgement number to be “a+1” to
a r
acknowledge the FIN packet of the Client.
Le 3. The Server replied sends FIN field with sequence number “b”,
r e acknowledgement number “a+1.
Page136
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Multiplexing indicates that the same transport layer connection is
htt
used by multiple applications to transmit data. The data is divided to
different segments by the transport layer according to different
:
applications. And based on FIFO rule, the segments are to be sent.
s
e
These segments could be with the same or different destinations.
c
r
Supposing two servers www.huawei.com and ftp.huawei.com are
u
o
sending data packets to destination host at the same time. The
s
Re
following is the end-to-end communication procedure of transport
layer. When the www and ftp applications are called, the server will
n g
allocate a port number for every application. (Note:This port number
i
is different from the physical port of network equipment. It is a
n
a rvirtual interface between the application and transport layer
Le
protocol). The segments are then created.
r e
Mo
Page137
In the transport layer, a session connection should be
established between the server and the host. (Note: It is a virtual
connection instead of a physical one.) In order to begin the data
transmission, the two applications of the server and terminal host
will inform their own operation systems, to initialize the
connection. After the virtual end-to-end connection is established,
the data transmission could begin.
e n
During the transmission procedure, the server and the host
m/
continue to communicate using their protocol software, to check
c o
whether the data has been correctly received.
i .
e
After the terminal equipment receives the data flow, it will sort the
w
data so that the transport layer could send the data flow to the
host correctly. h ua
.
terminate the virtual link. i ng
After the data transmission finished, the two party negotiate to
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page138
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
MSS (Maximum Segment Size) indicates the maximum size of the
htt
segment could be sent to the other end of the connection. When a
connection is established, their two ends should advertise its own
s :
MSS. The default value of MSS is 536 bytes, so the allowable length
c e
of IP packet is 576 bytes(536 +20 byte IP header +20byte TCP
header).
u r
s o
Through the negotiation of MSS, the network resources could be
Re
used more efficiently and the network performance could be
improved.
n g
n i
a r
Le
r e
Mo
Page139
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The reliability of TCP is guaranteed by the acknowledgement
h tt
mechanism to ensure the correct data transmission from the source
equipment to the destination. The working mechanism of
s :
acknowledgement mechanism is as followings:
c e receives the data packets sent by
When the destination equipment
u
the source equipment, r it will reply an acknowledgement to the
sender; and if theosender receives the acknowledgement, it will
e sdata packets. However, if the sender does not
R
continue to send
receive the acknowledgement,
g the sender when theafter
startednby
a period of time, ( a timer will be
data is sent) the sender will decrease
n i
the transmission speed, and retransmit the packets in question.
a r the slide shows, a virtual end-to-end link is established between
As
Le the source and destination equipment, and data packets are sent.
re
The source equipment sends 3 data packets (1,2,3) to the
Mo
destination at one time. After the destination equipment receives the
data packets, it will acknowledge them by the sequence number of
fourth data packet which is 4.
Page140
When the source equipment receives the data packets, it will
continue to send another three data packets (4, 5, 6). As the
example shows, because the destination equipment has not
received the fourth data packet correctly, the destination
equipment still uses acknowledgement number 4 as the reply.
Hence, the fourth data packet will be retransmitted by the source
equipment. After the destination equipment receives the fourth
data packet, and acknowledge it by the acknowledgement e n
number 7, the next three data packets could be sent m/
continuously.
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page141
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
TCP Sliding Window technology is able to control the data flow
htt
between two hosts by dynamically changing window size. Every
TCP/IP host supports full-duplex data transmission, so there are 2
s :
Sliding Windows in TCP: one is used for receiving, the other is used
c e
for sending. what’s more, TCP uses positive acknowledgement
r
technology whose acknowledgement number refers to next
u
expected bytes.
s o
Re
As shown above, it is an example of single direction sending, which
introduces how Sliding Window achieves flow control.
n g
n i
The server sends to client 4 1024-byte segments, and the window
size of sender is 4096 bytes. Receiver will acknowledge by using
a rACK4097, and modify window size to 2048 bytes. This means client
Le (receiver) only has 2048-byte buffer space. Therefore, sender
r e changes its sending speed and sends 2048-byte segment which the
Page143
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
UDP provides connectionless service for applications, so there is
htt
no need to establish connection before communication take place
between source and destination like TCP. Besides, because UDP
s :
is a connectionless transport protocol, it is not necessary to
c e
maintain connection state, sending or receiving state. So the
r
server is capable of simultaneously sending the same message to
u
multiple clients.
s o
Re
UDP is suitable for those applications who requires "best-effort"
transmission and reliability is provided by application layer, such
n g
as Radius protocol which is commonly used in authentication and
n i
accounting and RIP protocol are all based on UDP.
a r
Le
r e
Mo
Page144
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
UDP, like TCP, also uses IP as network layer protocol. UDP
htt
segment is encapsulated in a IP packet. Since UDP doesn’t provide
reliable transmission like TCP, its segment format is relatively
simple.
s :
The UDP header is made c eup of the following field:
u r applying source port number for source
application. s o
16-bit source port number:
Mo
Page145
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As shown above, the picture compare TCP protocol with UDP
h tt
protocol. It is able to get a conclusion through comparison that
TCP is suitable for high-reliability service; while UDP is suitable
s :
for speed-sensitive services.
c e
As UDP supports a connectionless service, it requires that the
u r error detection and retransmission
upper layer of providing
mechanism.
s o
Re
n g
n i
ar
Le
r e
Mo
Page146
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
p
1.How does TCP establish and terminate a connection?
tby means of the three-way
Connections are established in TCP
h t
two ends which establish the s :connection will send their own
handshake procedure. TCP connections are full-duplex, both of the
c
terminate request and wait e for the acknowledgement, for which in all
u r terminating a connection.
there are four steps when
2.How does TCP s oprovide reliability?
TCP providesRetransmission reliability by sequence number and ACK
mechanism.
n g By using sequence number, the two ends will both
n imechanism
clearly know the sending and receiving information of data segment.
r
ACK is able to guarantee transmission reliability, which
Leawill ensure data flow arrives at destination correctly from the source.
3.What is the purpose of TCP Sliding Window technology?
r e TCP Sliding Window technology adjusts data transmission between
Mo two hosts by dynamically modifying window size. Sliding Window
mechanism provides reliable flow control method for data
transmission between end-to-end devices.
Page147
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page148
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page149
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page150
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The ping command is a common way to check the IP connectivity of
htt
the network and the connection to the host. The ping command
uses a series of Internet Control Message Protocol (ICMP)
s :
messages to check whether the destination is reachable, the
c e
communication delay, and the packet loss ratio. Ping is a process in
r
which the device sends a request and waits for response. The
u
o
device that run the ping command sends an Echo message to the
s
Re
destination, and then waits for a response. If the Echo message
reaches the destination and an Echo Reply message is returned to
n g
the source within the specified period, the device can ping through
i
the peer. If the source does not receive the Echo Reply message,
n
r
the “Request timed out” message is displayed. In this example, the
a
LePing 1.1.1.1
following command is typed on the PC:
r e
Mo To test the connectivity, send the Echo message to address 1.1.1.1.
Besides basic commands, the ping command provides various
optional parameters, for example –a and –i. -a source-ip-address:
sets the source IP address that sends the ICMP ECHOREQUEST
message. -i interface-type interface-number: sets the interface that
sends the ICMP ECHOREQUEST message. In this example, the
ping 1.1.1.1 –a 1.1.1.2 command can also be used.
Page151
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
ICMP is an important part of the network layer. IP does not provide
h tt
reliability, so the device cannot obtain the network fault information.
By using ICMP, the device can obtain the information about the
network faults.
s :
c e of error, control, and packet query.
ICMP can send the information
The ICMP packets are
u r encapsulated in IP packets. The value of the
protocol field is 1.oSome upper layer applications may use the ICMP
e s ping and Tracert.
R
protocol, for example,
n g
n i
a r
Le
r e
Mo
Page152
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The ICMP packet uses the basic IP header, namely 20 bytes. The
h tt
ICMP packet is encapsulated in the IP packet. The first 64 bits of
the datagram refer to the ICMP packet. Therefore, an ICMP packet
s :
consists of an IP packet and the first 64 bits of the datagram.
The ICMP packet consistsc e of the Type, Code, Checksum, and
u r of the messages vary with the message
unused fields. The formats
types. The detailsoare omitted here.
e sthe type of the ICMP message.
R
Type: indicates
Code: ingthe same ICMP message type, the messages express
i n contents by using the codes.
different
r nexample: The Destination Unreachable message of which the
eaType value is 3 contains the following four types of messages:
For
L
re
0 = net unreachable
Mo
1 = host unreachable
2 = protocol unreachable
3 = port unreachable
Checksum: contains 16 bits. This field is not in use and the value is
0.
Page153
e n
m/
c o
i .
w e
h ua
.
i ng
n
ear
l
://
p
ICMP provides the various message types. The following are
commonly used:
0 Echo Reply htt
3 Destination Unreachable s :
c e
4 Source Quench
u r
5 Redirect
s o
8 Echo
Re
g
11 Time Exceeded
n
i
12 Parameter Problem
13nTimestamp
a r
Le 14 Timestamp Reply
re
Some messages are used together. For example, the Echo Reply
Mo
message is the response to the Echo message. The messages of
the same type contain different information. The following
describes the message types and formats.
Page154
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Tracert is used to check the path from the source node to the
htt
destination node. It deducts 1 from the TTL value of the packet
every time the packet traverses a router. When the TTL value
:
becomes 0, the router reports TTL timeout.
s
c e
Tracert sends a packet of which the TTL value is 1, so the first hop
r
returns an ICMP error message to notify that the packet cannot be
u
o
forwarded because the TTL times out. Then, Tracert sends a packet
s
Re
of which the TTL is 2, and the second hop returns the same
message. Tracert continuously sends such packets until one packet
n g
can be sent to the destination. The packet uses an invalid port
i
number (33434 by default), so the destination host returns an ICMP
n
a runreachable message to notify that the Tracert operation completes.
Le
Tracert records the source address that sends the ICMP error
message. Thus it can provide the IP addresses of the gateways
Page155
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
Ping and Tracert are taken as an example here. The two methods
can test whether RTA and interface 3.3.3.3 of RTC can
communicate. h
s :
c e
As shown in the displayed information, the ping command can
directly display whether the RTC is reachable, while Tracert can
u r
display the forwarding path in details. The packet reaches 10.1.1.2,
s o
and then to 10.2.2.2, and finally reaches 3.3.3.3. In addition, the
Re
tracert command can locate the fault. In this example, if the
displayed information is as follows, it indicates that the packet can
n g
be sent to next hop 10.1.1.2, but cannot be forwarded by the router,
ni
therefore the fault occurs between this router and the destination.
a r
[RTA]tracert 3.3.3.3
Le traceroute to 3.3.3.3(3.3.3.3) 30 hops max,40 bytes packet
r e 1 10.1.1.2 31 ms 31 ms 32 ms
Mo 2***
Page156
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
Telnet is used for the remote service. The user can log in to the
remote server through Telnet. The transport protocol used by Telnet
h
is TCP and the port number is 23. The telnet command is as
follows:
s :
telnet 192.168.1.22 23c e
u r
o
192.168.1.22: IP address of the router server.
s
Re
23: port number. The default value is 23. The value can be null. If
the port number is not 23, the user must enter the port number. For
n g
the detailed operation related to telnet based access to a device,
i
refer to the basic configuration of VRP.
n
a r
Le
r e
Mo
Page157
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
FTP is an Internet standard for file transfer. It adopts two TCP links
to transfer a file. One is control link and the other is the data link.
:
FTP adopts different TCP ports according to the port mode, Port or
s
c e
Passive. In the past, the default client mode is Port. In recent years,
the Passive mode is widely used because the Port mode is not
u r
secure (easy to be attacked.) In Port mode, FTP adopts two default
s o
port numbers 20 and 21. Port 20 is used to transfer data, and port
Re
21 is used to transfer commands.
g
The VRP routers can act as the FTP client or the FTP server. In this
n
i
example, the PC functions as the FTP client to log in to the FTP
n
a rserver through the FTP protocol. The PC run the FTP program. The
Le
system displays the login dialog box to request the user to enter
user name and password, then the user can log in.
r e
Mo
Page158
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
If the VRP router needs to download a file from the remote server, it
can act as the FTP client to access files from the FTP server. Enter
h
“FTP IP address of the remote server” in the VRP system view. The
s :
user is prompted to enter the user name and password. Then, the
c e
prompt is changed into [FTP]. It indicates that the user logs in
successfully.
u r
s o
Get and Put are two operations performed on files. Get means
Re
downloading files from the server, while Put means uploading files
to the server. In this example, the Get vrp.cc vrp1 command
n g
means that the client downloads the vrp.cc file and saves the file
n i
as vrp1.
a r
Le
r e
Mo
Page159
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
The Trivial File Transfer Protocol (TFTP) is used when the user
needs to transfer file between server and client and complex
h
interaction is not required. TFTP uses UDP and the port number is
s :
69. The VRP router can act as only the TFTP client to download files
from the TFTP server.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page160
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
p
1. What are the functions of Ping and Tracert?
tnetwork. Ping can provide the
h t
They can test the connectivity of the
source IP address and source s : port. Tracert can obtain the forwarding
options to satisfy test requirements, for example, specifying the
n g
is encapsulated in the IP packet. The ICMP packet consists of the
Type,iCode, Checksum, and unused fields. The formats vary with
thenmessage types.
a rWhat is the difference between FTP and TFTP?
Le 3.
re
FTP is based on TCP, while TFTP is based on UDP. TFTP is a
simple file transfer protocol. It is applicable to the read-only memory.
Mo FTP is designed for file transfer with high throughput. FTP can
control the user name and password, while TFTP cannot. The router
can support FTP Client and FTP Server, while TFTP supports only
the Client.
Page161
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ng
Module 2 rni
e a
/l
Routing
/
p :
t t
h
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page165
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page166
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page167
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page168
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
VRP is the network operation system used by Huawei based
htt
routing & switching products. VRP can be used as general
software platform of all Huawei‟s network devices to provide
s :
TCP/IP routing services. Currently version 5.9 is used for many
products.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page169
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
VRP adopts componentized architecture,VRP is made up of
tt
five planes: GCP, SCP DFP SMP and SSP.
h
For example, GCP is General Control Plane, it supports internet
s :
protocols such as IPv4 and IPv6. The protocols and functions
c e
that GCP supports include SOCKET, TCP/IP, route management,
u r
routing protocols and so on VRP just needs to add or delete
s o
corresponding planes to fit different switch or router functionality.
Re
n g
n i
a r
Le
r e
Mo
Page170
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page171
e n
m/
c o
i .
w e
hua
.
ing
n
e ar
l
: //
p
At present, Huawei‟s routers and switches support three
tt
configuration modes, two of which are listed as follows:
h
•Local configuration through the Console port.
s :
e
•Local or remote configuration through Telnet .
c
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page172
e n
m/
c o
i .
w e
h ua
.
i ng
n
ear
l
: //
p
You can build a configuration environment only through the
tt
Console port for the two following occasions:
h
(1)The router is powered on for the first time. There is only
default configuration . s :
c e
r
(2) You can directly connect the device.
The procedures ofuconfiguring a router through the Console port
are as follows:s
o
ProcedureR
e
1: Connect the console cable.
n g the RJ45 connector to the Console port of the router.
(1) Connect
n iConnect the 9-pin or 25-pin RS232 connector to the serial
arport (COM) of the computer.
(2)
Le
r e
Mo
Page173
e n
m/
c o
i .
w e
h ua
.
ing
n
ear
l
: //
p
tt
Procedure 2: Create the super terminal
h
(1)Run the terminal emulation program, for example, Super
:
Terminal of WIN XP, on the PC.
s
c e
(2)Click Start > Program > Communication > Super
Terminal
u r
s o
(3)Input any characters as the name after New Connection
Re
appears and choose a COM connection and click OK, then a
page as above appears. The port settings should be configured
n g
in accordance with the image, then click OK.
n i
a r
Le
r e
Mo
Page174
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
If it is not the first time for the router to be powered on and you
htt
cannot directly connect to the router console port, it may be
possible depending on the current device configuration settings,
s :
to use TELNET to enter the device. There are two methods you
e
may use to configure the router, either from a PC through the
c
r
local network to directly Telnet to the router from a PC using a
u
o
console connection to a router (e.g. router1), and then Telnet
s
Re
from this router to another router. The device running the VRP
system operation can serve as a TELNET client.
n g
n i
a r
Le
r e
Mo
Page175
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
For the PC to use Telnet to reach the Telnet server requires two
conditions to be met.
h tt
1.Client and server must be able to communicate
s :
e
2.The server is configured to allow clients to use the Telnet
c
r
service establish a session.
u the configuration is represents the router
o
In the example given,
s is acting as the Telnet server. The initial step
R e
configuration that
requires configuration of the router Ethernet interface, to make
n g
sure the client and the server (router) can communicate. The
n i step
second involves configuration of the VTY interface including
Le
r e
Mo
Page176
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page177
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After accessing the router, the user will be given the prompt in
htt
„user view‟. It is from here that the user can switch to the system
view by entering the System-view command. It is then possible
s :
to enter views of other services by running corresponding
e
commands in the system view. Commands that can be run in
c
r
different views can be seen listed in the graphic.
u
s o
Re
n g
n i
a r
Le
r e
Mo
Page178
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
When accessing the device for the first time, all users will start
htt
off in the „user view‟, from where users can switch to the „system
view‟ using the System-view command. The system view can be
s :
switched back to the user-view after entering the quit command.
e
It is possible to return to the user view from any view by entering
c
r
the return command or using the composite key command
u
<Ctrl+Z>.
s o
For example
Re
g
#Enter the system view from the user view.
n
i
<Huawei>system-view
n
a rEnter system view, return user view with Ctrl+Z
Le
#Enter the interface view from the system view.
[Huawei]interface Serial 0/0/0
r e [Huawei-Serial0/0/0]
Mo #Return to the system view from the interface view.
[Huawei-Serial0/0/0]quit
[Huawei]
#Return to the user view from the system view.
[Huawei]return
<Huawei>
Page179
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In this example, through using the “?” command, it is possible to
htt
obtain a brief of all the commands at a given level. All levels will
support the use of this command to display possible completions.
s :
Another use of this command will allow for completion based on
e
matches to a partial entry. If only the first letter of a command
c
r
can be recalled, the ? command can be inserted as shown in the
u
o
example above, in order to obtain all the commands with the
s
Re
same matching parameters, in this case, the same first letter.
n g
n i
a r
Le
r e
Mo
Page180
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The command line interface automatically stores commands
htt
input by users which so that users can recall used commands at
any time and repetitively. By default,
s :
the command line interface can keep records of up to 10
commands for a user.c e
u r
display history-command:
s o
Reor <Ctrl+P>:
To display the commands that a user has input.
Up-arrow key
n
Displaygthe earlier record if there is one; otherwise the alarm
n i off.
goes
ardown-arrow key or <Ctrl+N>:
Le Display the next record if there is one; otherwise, the command
r e is cleared up and the alarm goes off.
Mo When you use the command record function, please note the
following:
(1) The format of command records kept by VRP complies with
the format of commands input by users. If the format of
commands input by users is not intact,
then the format of commands kept by VRP is not intact either.
Page181
(2) If a command is run by a user for many times, VRP only
keeps the first running of this command as record. If a command
is run in different formats several times, it is treated as different
commands. For example, if you run the display ip routing-table
command several times, VRP will keep it as only one record. If
you run disp ip routing and display ip routing-table, VRP will
keep them as two records.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page182
e n
m/
c o
i .
w e
hua
.
ing
n
e ar
l
: //
p
Do as following to change the name of a router:
<Huawei>system-view
htt
:
Enter system view, return user view with Ctrl+Z.
s
[Huawei]
c e
u r
[Huawei]sysname Router1
[Router1] s o
Re
n g
n i
a r
Le
r e
Mo
Page183
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Some services require that there be synchronization of time with
htt
other devices, often as a security measure and therefore the
system time should be set correctly.
s :
VRP supports the setting of the time zone and daylight savings
time features. c e
#Set the time. u r
s o
e
<Huawei>clock datetime 10:19:30 2006/12/12
<Huawei> R
n g
<Huawei>display clock
n i
r2006-12-12
a Tuesday
10:19:50
Page184
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
You can display the VRP version information by running the
display version command.
<Hauwei>display version htt
:
Huawei Versatile Routing Platform Software
s
e
VRP (R) software, Version 5.90 (AR2200 V200R001C01SPC300)
c
r
Copyright (C) 2011 HUAWEI TECH CO., LTD
u
……
s o
Re
The version is 5.90 (AR2200 V200R001C01SPC300)。
You can view the information about terminal users by running the
n g
display users command.
n i
<Huawei>display users
Le + 0 CON 0 00:00:00
r e Username : Unspecified
You can view the configurations in the current view by running
Mo the display this command. For example, you can view the
configurations of the interface after you enter the interface view:
[Hauwei]interface Ethernet 0
[Hauwei-Ethernet0]display this
#
Page185
interface Ethernet0
ip address 13.13.13.2 255.255.255.252
isis enable 1
#
return
You can obtain the diagnostic information by running the display
diagnostic-information command.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page186
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
VRP manages software and configuration files through the file
h tt
system. The file system is used for managing the files and
directories in the storage device, which includes creating the
s :
system file, changing names of files and directories, creating,
e
deleting, modifying files and directories and display files. The two
c
r
main functions of the file system are storage device management
u
o
and files management. The storage device is the hardware
s
Re
device that keeps information. At present, flash memory, hard
disks and CF cards can be used by routers as storage devices.
g
Different products use different devices to store information. File
n
i
system is a mechanism for information storage and management.
n
a rFile directories are mechanisms for organizing files and they are
Le
the logical vessels for keeping files.
Delete a file.
re <Huawei> delete flash:/test/test.txt
Mo Delete flash:/test/test.txt?[Y/N]
<Huawei>
Restore the file that was deleted.
<Huawei> undelete sample.bak
Undelete flash:/test/sample.bak ?[Y/N]:y
Page187
% Undeleted file flash:/test/sample.bak
Delete files in the recycle bin.
<Huawei> reset recycle-bin
Display a file.
<Huawei> more test.txt
AppWizard has created this test application for you. This file e n
contains a summary of what you will find in each of the files that m/
make up your test application.
c o
Test.dsp i .
Copy a file. w e
<Huawei> copy hda1:/sample.txt flash:/
h ua
.
ng
Copy hda1:/sample.txt to flash:/sample.txt ?[Y/N]:Y
100% complete.
n i
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page188
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
: //
Create a directory p
<Huawei> mkdir dd
htt
:
Info: Create directory sd1:/dd......Done
s
Delete a directory
c e
u
<Huawei> rmdir test r
s o
Rmdir test?[Y/N]:y
%Removing Redirectory sd1:/test ...Done!
Displaygthe current directory
i n pwd
n
<Huawei>
r
a flash:/test
Le
r e
Mo
Page189
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
Format storage device p
<Huawei> format flash:
htt
:
All data(include configuration and system startup file) on flash:
s
e
will be lost , proceed with format? (y/n)[n]:Y
c
r
%Format flash: completed.
u
o
Fix storage device whose file system is abnormal
s
R e flash:
<Huawei> fixdisk
Fixdiskgflash: will take long time if needed.
i n flash: completed.
Fixdisk
r n
a Be careful with the format command. It deletes all the files in the
Le storage device once you run it.
r e
Mo
Page190
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
When the router is powered on, it reads the configuration file
htt
from the default storage path to initialize itself. The configuration
in the configuration file is called the initial configuration. If there
s :
are no configuration files in the default storage path, the router
e
will initialize itself with the default parameters. The configuration
c
r
used when the router is running is called the current
u
configuration.
s o
Re
Users can change the current configurations of the router
through the command line interface. To make the current
n g
configuration to be the initial configuration for the router when the
n i
router is powered on next time, you need to save the current
a rconfiguration in the default storage path with the save command.
Le You can view the saved configuration of the router by running the
display saved configuration command.
r e You can view the current configuration of the router by running
Mo the display current-configuration command.
You can save the current configuration by running the save
command. The detailed procedure is as follows:
<Huawei>save
Page191
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please
wait.....
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
e n
You can erase the configuration file in the storage device by m/
running the reset saved-configuration command. The detailed
c o
procedure is as follows:
i .
<Huawei>reset saved-configuration
w e
This will delete the configuration in the flash memory.
h ua
The device configurations will be erased to reconfigure. .
Are you sure? (y/n)[n]:y
i ng
n
e ar
Clear the configuration in the device successfully.
You can run the compare configuration command to make
l
: //
comparisons between the current configuration and the
configuration in the configuration file stored. The following shows
p
tt
that the message displayed indicates that the current
h
configuration is not the same as the stored configuration.
<Huawei>compare configuration
s :
e
Warning:The current configuration is NOT the same as the saved
c
configuration!
u r
o
====== Current configuration line 31 ======
s
ospf 1
Re
……
n g
n i
====== Saved configuration line 31 ======
a r
……
Le
r e
Mo
Page192
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
VRP can backup its software and configuration files through FTP,
htt
TFTP. Here we will introduce the basic operations for routers or
switches to obtain version files through the two modes, which is
s :
the general knowledge about version update. For details about
e
version update methods and procedures, please refer to the
c
r
update guidelines we provide for a product or a specific version
u
of a product.
s o
Re
FTP, TFTP are all file transport protocols for transporting files
between users and devices.
n g
n i
File Transfer Protocol (FTP) is based on TCP and takes the
mode of Server/Client. VRP can act both as the FTP server and
a rthe FTP client. When it acts as the FTP server, users can log in
Le to the router to visit files on the router by running the FTP client
r e program. When VRP acts as the FTP client, users can run FTP
commands to connect with the remote FTP server and then visit
Mo files on the remote host after they built connections with the
router through the terminal emulation program or Telnet.
Trivial File Transfer Protocol (TFTP), different from FTP, does not
require any authentication mechanisms, which is fit for an
environment that does not involve much interaction between
clients and servers.
Page193
TFTP is based on UDP and takes the mode of Server/Client.
TFTP transfer is initiated by the client. When there are files to
download, the client sends requests to the TFTP server for
reading the files and receives packets from the server and at last,
it sends confirmation to the server.
When there are files to upload, the client sends requests
to the TFTP server for writing the files and sends packets to the
server and at last, it sends confirmation to the server. TFTP files
e n
have two modes, one is the binary mode that is used for program
m/
files and the other is the ASCII mode that is for text files.
c o
VRP can only act as the TFTP client and can transfer files only in
i .
the binary mode.
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page194
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As the above figure illustrates, the PC and Router A are
htt
connected through serial ports and Router A and the FTP server
are connected to the LAN. Router A obtains version files from the
FTP server as the FTP client. Set the username and password to
s :
huawei and huawei respectively on the FTP server. Log in to
e
Router A from the PC by the super terminal and make the
c
r
following operations to obtain version files.
u
o
#Log in to the FTP server from Router A.
s
Re
<RouterA> ftp 172.16.104.110
Trying 172.16.104.110 ...
g
Connected to 172.16.104.110.
n
i
User(172.16.104.110:(none)):huawei
n
a r331 Give me your password, please
Le Password:
230 Logged in successfully
r e #Obtain the version file vrp.cc from the FTP server by running
Mo the get command.
[RouterA] get vrp.cc
150 "D:\system\vrp.cc" file ready to send (5805100 bytes) in
IMAGE / Binary mode
226 Transfer finished successfully.
FTP: 5805100 byte(s) received in 19.898 second(s)
291.74Kbyte(s)/sec.
Page195
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
As the above figure illustrates, the PC and Router A are
htt
connected through serial ports and Router A and the FTP client
are connected to LAN. Router A is configured as the FTP server
:
to obtain version files from the FTP client. Run the following
s
e
commands to configure Router A as the FTP server.
c
r
#Enable the FTP server on the router.
u
o
[RouterA]ftp server enable
s
Re
#Enter the AAA view and configure the authentication and
authorization of the FTP server. Only users that pass the
g
authentication and are authorized successfully can enjoy the
n
n i
services offered by the FTP server.
a r [RouterA]aaa
htt
10.111.16.160 runs the TFTP software to act as the TFTP server
and Router A obtains version software from the TFTP server.
s :
Run the following command on Router A to obtain version
software.
c e
r
#Run the tftp command to obtain the vrp.cc file and save it under
u
cfcard:/.
s o
Re
<RouterA> tftp 10.111.16.160 get vrp.cc cfcard:/vrp.cc
Run the dir command to check if the version file is obtained and
n g
save in the defined directory.
n i
<RouterA> dir
a rDirectory of cfcard:/
Le 0 -rw- 86211956 Jun 08 2006 15:20:14 v300r001b02ssp02.cc
Page197
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page198
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Simple Network Management Protocol (SNMP) is a widely used
htt
network management protocol. SNMP is a protocol that works at
the application layer and the transport layer protocol is UDP. It
s :
takes up the 161 and 162 ports.
SNMP consists of NMS c e and Agent. NMS stands for Network
u
Management Station r which sends requests to Agent. Agent is a
process or tasko that resides on the device that is managed.
Agent makes e sanalysis and obtains information after it receives
R NMS and then it generates responding packets to
requests from
sendn g to NMS. SNMP is the application protocol that defines
back
howito deliver management information between NMS and Agent.
r n defines two operations, namely GET and SET. The GET
a SNMP
Le operation is for obtaining management information from the
Page199
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
[RouterA]snmp-agent //Enable the SNMP Agent service
t v3 //Configure the SNMP
h t
[RouterAsnmp-agent sys-info version
version information.
s :
e
[RouterA]snmp-agent community
c community.
read public //Configure the
r
name of the SNMP read
u community write private //Configure the
o
[RouterA]snmp-agent
s write community.
Note: The R
e
name of the SNMP
configurations of Agent should agree with that on the
NMS. g
i n
r n
[RouterA]snmp-agent trap enable //Enable the router to send
a Trap.
Le [RouterA]snmp-agent target-host udp-domain 10.111.16.160
Page200
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
1. How is a console connection established?
h
Connect the PC serial port with the Console port of the router by
:
the normal line and run the terminal emulation software such as
s
e
the windows terminal emulation software. Configure the
c
2. What are the o
r
parameters correctly and then log into the router to configure.
u command levels and command views?
VRP
e
The VRP command
s levels include the visit level, the monitor
R level and the manage level. The command views
level, the config
n
involve gthe user view, the system
n i the interface view, and the routing protocol view, and so on.
view,
ar3. How to create a Telnet user?
Le Enter the vty user view and configure the authentication mode
re and the password for authentication and configure user
Mo permissions.
4. What protocols can be used to upgrade VRP file?
FTP, TFTP .
Page201
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page202
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Routing protocol basics is a basic course with great significance
htt
for understanding the different routing protocols. Based on
previous sections, this section focuses on how the packet is
s :
forwarded between routers and the structure of the routing table.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page203
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page204
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A router provides mechanisms for interconnecting networks of
htt
different structures which makes the transfer of packets among
networks a reality. Routes are decisions made regarding the path
s :
over which the forwarding of packets will occur for a given
e
destination. In the internet, routes are decided by routers. A
c
r
router chooses an appropriate route according to the destination
u
o
address in the header of the packet and sends the packet to the
s
Re
next router. The last router on the route is responsible for
delivering the packet to the destination host. The whole process
g
is very similar to a relay race. Each router focuses only on finding
n
i
an optimal route and forward packets to the next station along
n
a rthat route. In this way, packets are delivered from one router to
Le
the next until they reach their destinations. However, packets do
not always travel along the best route if some routing policies
htt
routing. As the above figure shows: RTA connects with network
10.3.1.0 on the left and RTC connects with network 10.4.1.0 on
s :
the right. Here is a datagram to be sent from network 10.3.1.0 to
e
network 10.4.1.0. The process of IP routing is as follows:
c
u r
The packet is sent to E1 port of RTA that directly connects
s o
with network 10.1.1.0.After receiving the packet, RTA looks up
Re
the routing table and finds that the next hop to the destination is
10.1.2.2 and the egress is E0. Then the packet is sent out from
n g
E0 to 10.1.2.2.
n i
When the packet reaches E0 port of network 10.1.2.2, RTB
r
a looks up its routing table to find the route to the destination of the
Le packet. The routing table tells that the next hop to the destination
r e is 10.2.1.2 and the egress is E1. Then the packet is sent out
from E1 to head for its next hop, network 10.2.1.2.
Mo When the packet reaches E0 port of network 10.2.1.2, RTC
looks up its routing table and finds that the destination of the
packet is in its own segment and the next hop for the packet is
10.4.1.1 and the egress is E1. Then the packet is sent out from
E1 to its destination.
Page206
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The analysis of the process of IP routing shows us that data
htt
forwarding is totally dependent on the information in the routing
table. To function effectively and efficiently, a router should:
s :
1. Check the destination of a packet: Does the router have
c e
information about the destination of the packet?
u r
2. Find the source of the information: Where is the information
s o
about the route to the destination from? Is it defined by the
Re
administrator statically? Or is it obtained from other routers?
g
3. Search for possible routes to the destination: What are the
n
i
possible routes to the destination?
r4.nSelect the best route: which is the best route to the destination?
a Should the router use the loading balance mechanism to send
Le the packet by multiple routes?
r e 5. Verify and maintain routing information: Is a route valid? Is it
Mo the latest?
Routers have to verify and maintain routing information to ensure
that the information is correct.
Page207
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Routers check the destination of the packets they receive and if
htt
the destination of the packets is not the interface of local routers,
they will look up their routing tables to find out to which port the
packets should be forwarded.
s :
e
1. If the destination network connects with the router directly, the
c
r
router knows to which port the packet should be forwarded.
u
o
2. If the destination network does not directly connects with the
s
Re
router, the router should find out of the possible routes to send
the packet and then select one of them to forward the packet.
n g
Routes in the routing table can be sorted to three categories
according to their sources:
n i
1. Routes found by data-link layer protocols (interface routes or
a r direct routes)
Le 2. Static routes manually configured by network administrators.
Mo
Page208
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The protocol field in the routing table indicates the source of the
htt
routes. Routes come from three sources. The first source is
those routes discovered by the data-link layer. When data-link
s :
layer protocols are up, routes of this sort are generated and their
e
protocol field value in the routing table is shown as “direct”.
c
r
Routes discovered by the data-link layer do not need
u
o
maintenance, which reduces the workload. However, data-link
s
Re
layer can only find routes to segments directly connected with its
interfaces and can not discover routes that cross segments.
g
Routes that cross segments can only be discovered by other
n
i
methods.
n
a r
Le
r e
Mo
Page209
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
The second source is the statically configured routes. Static
htt
routes are configured by administrators manually and they can
also help to build connectivity between networks. Static routes
s :
however cannot make adjustments automatically when networks
c e
fail. They must be managed by administrators.
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page210
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The last group of routes are discovered by dynamic routing
htt
protocols. Configuring routes statically for a network with a
complicated topology is a demanding task and may result in
s :
errors easily. So it is better to use dynamic routing protocols to
e
find and change routes, which does not need manual
c
r
maintenance. However, the cost of dynamic routing protocols is.
u
o
As the figure above shows, routes whose Proto field values are
s
Re
RIP and OSPF are routes discovered by RIP dynamic routing
protocol or OSPF routing protocol. Details about dynamic routing
g
protocols will be given later.
n
n i
a r
Le
r e
Mo
Page211
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As we mentioned just now, routes come from three sources.
routes. htt
Here, we make a comparison between static routes and dynamic
s :
1. Static routes must be defined by administrators. When the
c e
network topology changes, administrators have to change the
u r
configurations of static routes
s o
manually. Static routes are more suitable for simple and small
Re
networks. If the network is complicated, administrators may
g
struggle to support the complexity and work needed to manage
n
i
numerous static routes.
2.nRouting protocols collect network information for dynamic
r
a routes. When the network topology changes, routers update their
Le information automatically without the help of administrators.
r e
Mo
Page212
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Routing protocol is a language that works for the communication
htt
between routers. With the routing protocol, routers can share
information about routes and network status. Only routers that
s :
use the same language can communicate with each other.
e
Routers that do not speak the same language may obtain
c
r
information from each other with other approaches, but it will not
u
o
be discussed here. Routing protocols set down a set of rules for
s
Remaintain their routing tables and offer the
the communication between routers.
And routers
n g through routing protocols.
best routes
n i
ar
Le
r e
Mo
Page213
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
An AS is a set of networks under unified management. According
tt
to their working area, routing protocols can be divided into:
h
1. Interior Gateway Protocol (IGP): a protocol for exchanging
s :
routing information between gateways within an autonomous
c e
network. The protocols we introduce here like RIP and OSPF are
u r
IGP protocols. Other IGP protocols that are not mentioned here
s o
include ISIS, IGRP and EIGRP.
2. Exterior R e Protocol (EGP): a protocol for exchanging
Gateway
gGateway Protocol (BGP) is a kind of EGP.
routing information between two autonomous systems. The
n
i
Border
n
ar
Le
r e
Mo
Page214
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
According to the algorithms used, routing protocols can be
tt
divided into the following categories:
h
Distance-Vector routing protocol: RIP and BGP. BGP is also
s :
called the Path -Vector Protocol.
ce
r
Link-State Protocol: OSPF and IS-IS.
u the algorithms used by the Distance-
o
The differences between
Vector routings
e protocols and the Link-State protocols lie in the
R calculate routes. Distance-Vector routing
way they find and
n g
protocols concern is to the number of the hops to the destination,
n ibandwidth
while Link-State protocols care more about the network topology
a r
and resources used to reach a given destination.
Le
r e
Mo
Page215
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Routing protocols can be divided into unicast routing protocols
htt
and multicast routing protocols according to their applications.
Unicast is one of the data transmission modes. In this mode, the
s :
destination of a datagram is unique, which can be a host or a
c e
device. Multicast is another data transmission mode. In this
r
mode, the destination address is a multicast address, which
u
o
means a group of hosts or devices can receive a datagram at the
s
Re
same time. Here, we only focus on unicast routing protocols. For
details about multicast routing protocols, see references for
g
multicast modules.
n
n i
a r
Le
r e
Mo
Page216
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Routing tables play a key role in packet forwarding. Each router
htt
holds a routing table and every entry in the routing table tells a
packet should be sent through which physical port of a router to
s :
reach a subnet or a host before the packet arrives at the next
c e
hop router or its destination.
u r
A routing table contains the following items:
s o
Destination: indicates the destination or the destination network
Re
of an IP packet.
g
Mask: We have already learned the structure and functions of
n
i
mask in our TCP/IP course. Similarly, network masks are
n
a rimportant information in a routing table. If we let an IP address
Le
and a network mask go through a logical AND operation, we can
get information about the network segment. As the example here,
Mo After they go through the logical AND, we may know that the
segment is 8.0.0.0/8 which is a Class A address.
Another function of network masks is that when there are
multiple route entries to the same destination in a routing table,
the router can choose the route with the longest mask.
Page217
Interface: indicates which interface an IP packet should be
forwarded from. Nexthop: indicates the IP address of the next
interface that an IP packet will go through.
Other fields in the routing table will be discussed later.
e n
m/
c o
i .
w e
hua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page218
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Routes to the same destination may come from different sources.
h tt
So the next hop of those routes may be the same or different. In
this case, how routers make their choice about those routes?
s :
Route preference is here for this problem.
c
In the figure above, there e are two routes to the segment 10.0.0.0:
u r
R0 and R1. R0 is discovered by RIP protocol and R1 is
s
discovered by OSPFo protocol. By default, OSPF has a higher
R e
route preference level than that of RIP . So routers use the route
discovered by OSPF on this occasion and add it to the global
n
routing gtable for packet forwarding.
n i
ar
Le
r e
Mo
Page219
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The default route preference on VRP platform is shown in the
htt
above table. Preference 0 is for direct routes and 255 is for
untrustworthy routes. Except direct routes, the preference of all
s :
dynamic routing protocols can be configured manually according
c e
to the requirements of our customers. And you should note that
r
usually a preference is for all routes of the protocol with that
u
o
preference. For example, routes discovered by IS-IS have the
s
Re
same preference 15. The static route is an exception because
each static route may have its own preference.
n g
n i
a r
Le
r e
Mo
Page220
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The route metric reflects the cost of a route to its destination.
htt
Route metrics are often decided by factors including the delay,
bandwidth, line occupation rate, line reliability, hops and the
s :
maximum transmission unit. Different dynamic routing protocols
e
choose different factors to calculate a route cost. For example,
c
r
RIP uses hops to calculate the route metric. Route metrics make
u
o
sense only for routes discovered by the same routing protocol. It
s
Re
is meaningless to compare route metrics calculated by different
protocols and there is no formula to make conversions between
g
route metrics come from different routing protocols. The route
n
i
metric of the static route is 0.
n
a r
Router A learns routes to Router D from Router B and Router E
Le with the same protocol. As the figure above illustrates, the route
metric of the route that Router A gets from Router B is 9. While
r e the route metric of the route that Router A gets from Router E is
Mo 12. Obviously, the route that Router A gets from Router B is
better than the route Router A learns from Router E. So Router A
adds the first route to its routing table. Router B is the next hop
for that route.
Page221
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
If there are multiple routes to the same destination and their
h tt
route metrics and route preference are the same, all these routes
will be added to the routing table. IP packets are sent on these
s :
routes alternatively, which helps to realize the load balancing.
c e that support load balancing are RIP,
At present, routing protocols
u
OSPF, BGP and IS-IS. r The static route also supports load
balancing.
s o
Re
n g
n i
ar
Le
r e
Mo
Page222
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In the routing table above, there are three routes to the network
htt
10.1.1.1/32. The three routes have the same preference and the
preference is the highest preference. So all the three routes are
s :
added to the routing table to balance the load.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page223
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Data packets are forwarded according to the IP addresses of
htt
their destinations. When a packet reaches a router, the router
first gets to know the IP address of the destination of the packet
s :
and then looks up its routing table to make the logical AND
e
operation for the IP address and the mask in the table. If the
c
r
result of the logical AND operation agrees with the destination IP
u
o
address of the entry in the table, it means the entry is the route
s
Re
to the destination of the IP packet; Otherwise, it is not. When all
the entries that meet the requirement are found, the router will
g
choose the one with the longest mask among them.
n
n i
a r
Le
r e
Mo
Page224
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Imagine that a packet whose destination IP address is 9.1.2.1
h tt
reaches the router. The router looks up its routing table and finds
three matching routes there. They are:
s :
0.0.0.0/0 whose matching length is 0 bit.
c e
r
9.0.0.0/8 whose matching length is 8 bits.
9.1.0.0/16 whose u
o matching length is 16 bits.
shas the longest mask length. So the router will
e
The last route
choose thisRone to forward the packet through serial 0/0.
n g
n i
ar
Le
r e
Mo
Page225
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Routing loop is a network problem in which packets are sent
htt
from one router and return back to the router after travelling in
the network for a while. When the routing loop problem occurs,
s :
packets travel around several routers until they are discarded
c e
when TTL is 0, which wastes the network resource quite a lot.
r
Steps should taken to keep routing loops at bay.
u
s o
As the figure above shows, RTA has a packet heading for
Re
network N. The packet is forwarded to RTC and the value of TTL
is decremented by one. When RTC receives the packet, it
n g
forwards it to RTB which leads to a routing loop occurrence, at
n i
which point the TTL value again decrements by one. RTC
a r receives the packet and forwards it to RTA and then RTA sends
Le the packet again to RTC. This process continues until the packet
is discarded once the TTL value is reduced to 0. The routing loop
r e is very harmful to the network and care should taken to avoid it’s
Mo occurrence.
The possible causes for a routing loop may be:
1. A temporary loop occurs when the network converges.
2. Algorithm defect.
Page226
3. Information that can prevent routing loops is lost when
routes are imported to different routing domains.
4. Configuration mistakes.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page227
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
1. What are the sources of routes, and what are their
characteristics?
htt
Routes come from three sources: direct routes discovered by the
s :
Data-Link layer; manually configured static routes; routes
e
discovered by dynamic routing protocols. Routes found by the
c
u r
Data-Link layer do not need maintenance and they are
discovered automatically when protocols at Data-Link layer are
s o
up. The disadvantage of this source is that it can only find routes
Re
to the directly connected segments and routes to other segments
cannot be discovered. Manually configured static routes need
n g
maintenance and they cannot be modified automatically when
n i
the network topology changes. Dynamic routing protocols can
Le
interference but the cost of these protocols is huge and the
configuration process is rather complicated.
Mo Dynamic routing protocols can be grouped into the IGP and EGP
protocols according to their working areas and Distance-Vector
and Link-State protocols according to their algorithms and
unicast routing protocols and multicast routing protocols
according to their applications.
Page228
3. What are the values that can be found in a routing table?
The routing table includes factors like destination, mask, protocol,
preference, metric, nexthop and interface. The equal cost multi-
path refers to routes that head for the same destination with the
same metric. When these routes have the same preference, they
are all added to the routing table and IP packets are sent on
them alternatively.
e n
4. What does equal cost multi-path mean?
m/
Equal cost multi-path refers to two or more routes to a single
destination from a single source, that are capable of supporting c o
load balancing due to the fact that both routes support a metric i .
that is considered equal to the routing protocol being used.
w e
Should the protocol be RIP, the number of hops to a given
destination should be equal. Alternatively if the protocol
h ua
.
happened to be OSPF, the distance between the source and the
ng
destination over the two routes must reflect an equal cost, based
i
n
on the link type e.g Serial/Ethernet and supported bandwidth of
ar
the such links in accordance with OSPF cost values.
e
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page229
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page230
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page231
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page232
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A static route is a special route that is configured by a network
htt
administrator manually. The disadvantage of static routes is that
they cannot adapt to the change in a network automatically, so
s :
network changes require manual reconfiguration. Static routes
c e
are fit for networks with comparatively simple structures. It is not
r
advisable to configure and maintain static routes for a network
u
o
with a complex structure.
s
Re
n g
n i
a r
Le
r e
Mo
Page233
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The command for configuring the static route is:
htt
[Huawei]ip route-static <ip_address> [ <mask> | <masklen> ]
<interface_name> | <gateway_address> [ preference
s :
<preference_value> ] [ reject | blackhole ]
c e
The meaning of the parameters in the command are as follows:
u r
(1)<ip_address>[<mask>|<masklen>]:the IP address and
o
mask of the Destination
s
Re
The IP address should take the form of dotted decimal notation;
the mask can be in the form of a dotted decimal or be
g
represented by the mask length (the number of the bits set as “1”
n
n i
in the mask).
(2) <interface_name>|<gateway_address>: the name of the
a r sending interface or the address of the next hop
Le When configuring static routes, you can define an interface name
or the address of the next hop. To define the interface name or
r e the next hop address should be decided by the real situation.
Mo Actually, for every route entry, there must be a next hop address.
When sending the packets, the routers looks up the routing table
for a route that matches with the address of the destination of the
packet. Only when the next hop address is specified, the data-
link layer can find the corresponding data-link address to forward
the packet.
Page234
(3) <preference_value>: preference value
A flexible management technique on routes can be realized by
configuring the preference value differently. If you assign multiple
routes to the same destination with the same preference value,
load balancing can be achieved; otherwise, route backup is
made. You can input preference values more than once in a
command but only the last one is valid.
e n
(4) Others
m/
The attributes “reject” and “blackhole” refer to an inaccessible
c o
route and a blackhole route respectively. If one static route is
labeled with the “reject” attribute, all the packets sent to the i .
destination of the route will be discarded and an ICMP packet will
w e
ua
be sent to notify the source that the destination is unreachable.
When a static route is assigned the attribute “blackhole”, any
. h
packet heading for the destination of the static route will be
notify the source.
i ng
abandoned and in this case, no ICMP packet will be sent to
n
ar
In the example above, the two routers to the loopback segment
of RTA on RTB. The command for configuring the route can be in
e
one of the three forms below:are connected by serial ports and
l
//
we can configure a static route destined
:
[RTB] ip route-static 10.1.1.1 255.255.255.255 1.1.1.1
p
tt
[RTB] ip route-static 10.1.1.1 32 1.1.1.1
h
[RTB] ip route-static 10.1.1.1 32 Serial 0
number. s :
In the first form, the mask is represented by a dotted decimal
c e
In the second form, the mask is shown by its length.
u r
In the last form, gateway address is taken place by the interface
name.
s o
Re
n g
n i
a r
Le
r e
Mo
Page235
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
You can query the routing table by running display ip routing-
htt
table command after the static route is configured. The static
route is displayed in the routing table as highlighted in red here.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page236
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Load balancing: Packets are sent through several links
h tt
alternately when there are multiple paths to the destination of
those packets with the same cost. Static routes support load
balancing.
s :
e three routes are configured to the
As shown in the figurecabove,
u r 10.1.1.1/32, on RTB. The three static
same destination, network
routes have the o
and there areesno
same preference value with the default value 60
routes heading for this network with higher
R
preference value than these three routes. In this case, these
g are equal routes which can share the load, and
threenroutes
n i will be sent through the three routes alternately.
packets
ar
Le
r e
Mo
Page237
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Looking up the routing table, you can see there are three routes
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page238
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Route backup: Multiple routes heading for the same destination
h tt
are configured, amongst which there is one with a higher
preference value that acts as the main route. Other equal cost
s :
routes with lower preference values become backup routes.
c e two static routes are configured,
As the above figure shows,
u r 10.1.1.1/32 on RTB. One of the routes
destined for the network
so value with
has the preference
static route iseconfigured
of the default value 60 while the other
a less preferred preference value
of 100. R
n g
n i
ar
Le
r e
Mo
Page239
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
By looking up the routing table, you may find that there is only
htt
one route heading for the network 10.1.1.1/32 which acts as the
main route. The route with the preference value of 100 has not
s :
been added to the routing table. It will be added to the routing
c e
table only after the route with the preference value of 60
becomes invalid.
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page240
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After running the display ip routing-table protocol static
h tt
command, you can see the route whose preference value is 60 is
active, which means it is the main route to forward packets to the
network 10.1.1.1/32.
s :
c e value is 100 is inactive and acts as
The route whose preference
the backup route. It r
u will not be added to the routing table or used
o until the route with a preference of 60 is
es
for forwarding packets
no longer available, or the preference of this route is changed to
R
a value lower than the currently preferred route.
g
Note:nThe routing table here is a global routing table.
n idisplay ip routing-table can only list the active routes
arat present.
Le display ip routing-table protocol static can list all the
r e static routes, including the active routes and the inactive
Mo routes.
Page241
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A look up of the routing table after disabling a port for the active
htt
route with the shutdown command will result in the backup
route becoming the active route, and being added to the routing
s :
table to forward packets in place of the lost route.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page242
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The default route is one kind of special route. Usually, default
htt
routes are configured by administrators manually but they can
also be generated by routing protocols such as OSPF and IS-IS.
s :
When a router receives a packet whose destination is not listed
e
in the routing table, the router will forward the packet to the next
c
u r
hop defined by the default route. You can run the display ip
routing-table command to see if a default route is configured.
s o
Re
A packet will be forwarded to the default route if its destination
does not match any destinations of the routes in the routing table.
n g
If there is no default route either, then the packet will be
discarded and an ICMP message notifying the source that the
n i
destination or the network is inaccessible will be sent.
a r
Le
r e
Mo
Page243
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A default route is configured by setting the destination address
htt
and the mask to be 0s (0.0.0.0 0.0.0.0) when you run the ip
route-static command to configure a static route.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page244
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In the routing table, you may see the destination address of the
tt
default route is set to be 0.0.0.0 and the mask length is 0.
h
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page245
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The default route supports both the load balancing and route
htt
backup mechanisms. If multiple default routes are configured
with the same preference value, they will share the load together.
s :
If they have different preference values, the one with the highest
c e
route acts as the main route and others are backup routes.
u r
As the above table shows, the two static routes highlighted in red
s o
share the load for each other after they are configured with the
Re
same preference value of the default value of 60.
n g
n i
a r
Le
r e
Mo
Page246
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
What are the differences between load balancing and route
backup for static routes?
htt
Load balancing: Packets are sent through several links
s :
alternately when there are multiple paths to the destination of
c e
those packets with the same metric.
u r
Route backup: If there are multiple routes heading for the same
s o
destination, one of them which having the highest preference
Re
value will act as the main route, and the others with lower
g
preference value will act as the backup routes. The backup
n
i
routes will be in use only after the main route becomes invalid.
n is a default route?
rWhat
a The default route is a kind of the special route used for last resort
Le forwarding. Usually, default routes are configured by
r e administrators manually but they can also be generated by
Mo routing protocols such as OSPF and IS-IS. A default route is the
route whose network address and mask are both 0s in the
routing table.
Page247
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page248
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page249
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page250
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Routing protocols are like languages that build bridges between
h tt
routers for information exchange. Information like the network
status and its accessibility range is shared among routers with
s :
the help of those routing protocols.
c e are not only responsible for selecting
Dynamic routing protocols
routes, they are alsorcapable of finding another best route to the
u
destination whenothe original one is not available. This feature of
es is especially noteworthy when a network
dynamic routing
R which makes it the advantage of dynamic
topology changes
n
routinggprotocol over static routing protocol.
n
The icommon routing protocols in use at present are RIP, OSPF,
arISIS and BGP. RIP is famous for its simplicity of configuration
Le and deployment and it is designed for exchanging routing
Mo converges slowly.
Developed by IETF, OSPF is a complicated but widely used
protocol. ISIS is a routing protocol based on a simple design with
good extendibility and is extensively applied to large scale SP
networks.
BGP is used for communicating route information between AS’.
Page251
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
At present, the common dynamic routing protocols include RIP,
htt
OSPF, ISIS, BGP routing protocols. RIP routing protocol
configuration is simple, but the convergence rate is slow, and
s :
RIP is commonly used in small and medium-sized networks.
e
OSPF protocol developed by the IETF, the protocol principle of
c
r
OSPF is more complex, and it is widely used; the ISIS design
u
o
idea is simple, and it has good scalability, presenting in large SP
s
e
network configuration.
The BGP isRused to exchange routing information between AS’.
n g
n i
ar
Le
r e
Mo
Page252
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A traditional definition for autonomous system (AS) is a collection
htt
of IP networks and routers under the control of one entity that
presents a common routing policy to the Internet. Now, the
s :
definition of AS has developed into a collection of networks and
c e
routers that are managed by multiple entities and adhere to
r
several routing policies.
u
s o
AS numbers are assigned by the IANA and each AS is allocated
Re
with a unique number to differentiate from another. AS number
ranges from 1 to 65535 and are divided into two ranges. The first
n g
are public AS numbers, which may be used on the Internet and
n i
range from 1 to 64511. AS number in the second range, from
a r64512 to 65534, are known as private numbers, and can only be
r e
Mo
Page253
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Routing protocols can be divided into IGP and EGP according to
their working area.
htt
IGP(Interior gateway protocols)
s :
e
A set of routing protocols that are used within an autonomous
c
u r
system, such as RIP and IS-IS. IGP is mainly used to search and
calculate routes within an autonomous
s o
Re gateway protocols)is used to connect
system.
EGP(Exterior
n g autonomous systems. An EGP, such as BGP, controls
different
n i
communication of route information between
r e
Mo
Page254
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Routing protocols can be divided into Distance-vector protocols
h tt
and Link-state protocols. RIP and BGP are examples of
Distance-vector protocols and OSPF and IS-IS fall in the group
s :
of Link-state protocols. BGP is also called Path-vector protocol.
Distance-vector Routingc e Protocol
u r algorithm to calculate paths. In
They use the Bellman-Ford
Distance-vectors orouting protocols, each router sends complete
R eto their neighboring routers at fixed intervals. It is
routing tables
g network and the vector which indicates the interface
the metric which means the distance between the router and the
n
n
fromi which data is forwarded that routers in a Distance-vector
destination
Page255
Link-state Routing Protocol
They are based on the Dijkstra algorithm which is sometimes
called the Shortest Path First (SPF) algorithm. This algorithm
pays attention to the state of links or interfaces in the network,
including whether they are up or down, their IP addresses and
masks. Routers advertise information about link states they know
to other routers in the area through which each router in the area
e n
builds up a complete link state database for the area. Then every
m/
router draws its own topology map based on the information it
c o
collected in the form of a graph showing which nodes are
i .
connected to which other nodes.
w e
The primary advantage of link-state routing is that it reacts more
quickly, and in a bounded amount of time, to connectivity hu
a
changes. Routers send update information only when the .
n g link
Page256
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In some occasions, route information should be shared among
htt
different routing protocols. For example, route information
obtained from RIP may possibly needs to be imported to OSPF.
s :
The process of exchanging route information between protocols
c e
is called route importation. This process could be a one-way
r
street as we see in the example of import information from RIP to
u
o
OSPF. And it could also be a two-way process as RIP and OSPF
s
e
can learn route information from each other.
The cost ofReach protocol can not be compared and there are no
n
formulagto convert the cost of one protocol to another's. So we
n
musti set the Metric again ( some protocols can use the default
arvalue set by the system) when we import route information from
Le one protocol to another. Improper importation may impose
burdens on routers or lead to loops, so we must be careful with it.
r e
Mo
Page257
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//:
p
What makes a good dynamic routing protocol?
t should be able to find the
h
(1) Correctness: The routing protocolt
optimal route without self-loop correctly.
s :routing protocol can respond to a new
(2) Fast convergence: The
c e
r
network topology quickly.
(3) Low cost: The u
s oitself is minimum.
cost (memory, CPU, network bandwidth) of the
Page258
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
What are the common dynamic routing protocols used?
t
h
They are RIP, OSPF, ISIS and BGP.t
Dynamic routing protocols : can be divided into which domain
classifications?
e s
r
Routing protocols can cbe grouped into two distinct classifications,
o u or inter AS based, better known as
of either intra-AS based
e
Interior Gateways Protocol (IGP) and Exterior Gateway Protocol
(EGP). R
n g
What classifications of dynamic routing protocols are there?
n i OSPF, ISIS fall in the first group and BGP belongs to
RIPv1/v2,
arthe second. According to the algorithm, routing protocols can be
Le categorized into Distance vector routing protocols and Link-state
Page259
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page260
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page261
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page262
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The distance-vector (D-V) routing protocol is based on the
htt
Bellman-ford algorithm. A router using the D-V algorithm sends
the entire routing table to adjacent routers.
s :
The adjacent routers compare the received routing table with
c e
their own routing tables. If the received route is new, it will be
u r
added to the routing tables directly. If the received route had the
s o
same destination as the existing route, the router will compare
Re
the metric of these routes, and will add the one whose metric is
smaller to the routing table. The adjacent routers then broadcast
n g
their routing tables (with the new routes) to their adjacent routers.
n i
The distance-vector routing protocol advertises routing
a rinformation in the format of (Distance, Direction). Distance
Le indicates the metric, and Direction indicates the next hop. The
advantage of the distance-vector routing protocol: The
r e configuration is simple, so less memory is used and shorter CPU
Mo processing time is needed.
Disadvantage: The expandability is poor. For example, the
maximum hop count in RIP cannot exceed 16.
Page263
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
When a router starts (on t0), it generates an entry for each
htt
directly-connected network segment. The router is directly
connected to the network segment, so the hop count is 0 and the
s :
next hop router is represented as "– –" in the entry. The router
e
then broadcasts the routing information to all links.
c
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page264
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
On t1, routers receive and process the first update message. RTA
htt
receives the update message from RTB and finds that RTB has
a route to 10.1.3.0 with 0 hops. This route is not contained in the
s :
routing table of RTA, so RTA adds this route to its routing table
e
and increases the hop count by 1. Thus RTA learns the route to
c
r
10.1.3.0 from the update message sent by RTB. Similarly, RTB
u
o
learns the route to 10.1.1.0 from the update message sent by
s
Re
RTA and learns the route to 10.1.4.0 from the update message
sent by RTC. RTC learns the route to 10.1.2.0 from the update
g
message sent by RTB.
n
n i
a r
Le
r e
Mo
Page265
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
On t2, the update period begins and new update packets are
htt
broadcasted. RTA learns the route to 10.1.4.0 from RTB. RTC
learns the route to 10.1.1.0 from RTB. Through the periodical
s :
update mechanism, each router obtains routes to all network
e
segments. Finally, the network converges.
c
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page266
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The D-V algorithm requires that each router sends it’s routing table to adjacent
h tt
routers. When receiving the route update message, the router compares the
new routing information with the original routing information in its routing table.
s :
The router then modifies the local routing table according to the comparison to
keep pace with the change of network.
c e
The principles of updating the routing table are:
1. Adding new routes.
u r
s o
As shown in the figure, RTB receives the route update message from RTA. If
Re
a route entry of RTA, for example, the route to 10.1.1.0 does not exist in the
routing table of RTB, RTB will adds this entry to its own routing table. In the
n g
routing table of RTB, the destination network of this route is 10.1.1.0; the
i
metric (hop count) is the metric of this entry for RTA plus 1; the next hop
n
a raddress is the IP address of RTA's interface connected to RTB, namely,
10.1.2.1.
Le
r e
Mo
Page267
e n
m/
c o
i .
w e
hua
.
ing
n
e ar
l
//
:
p
2. Changing the next hop address and metric.
tfrom RTA and finds that the
RTB receives the update message
h t
metric to a network in the routing table of RTA is less than the
s : minus 1. For example, to the same
metric in its own routing table
network 10.0.1.0, the c e in routing table of RTB needs 5 hops,
route
u r table of RTA needs 2 hop. 5-1>2, which
while the route in routing
s ometric is less if the packet passes through RTA.
indicates that the
Therefore, RTB
R e changes the route entry in its routing table. The
next hop is changed to the IP address of the interface on RTA.
n g packets will be forwarded to the destination network
Subsequent
n i The route metric is the route metric of RTA plus 1.
by RTA.
ar
Le
r e
Mo
Page268
e n
m/
c o
i .
w e
h ua
.
i ng
n
ear
l
://
p
3. Changing the metric (hop count) only .
t
As shown in the figure, the next t
h hop to network segment for RTB
is RTA. The update message from RTA shows that the metric to
s : has changed. At this time, the
the destination network segment
c ein the routing table of RTB changes to
metric of this route entry
u
the new metric of RTA r plus 1. That is, the original metric 2
s
changes to 4+1=5. o
Re
n g
n i
ar
Le
r e
Mo
Page269
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
4. Deleting unreachable routes. p
t to the destination network is
h t
In RTB's routing table, the next hop
RTA, but routing table of RTA does not contain the route to this
network any more. Then s : deletes this route entry from the
RTB
e entry in the figure as example. In
routing table. Take thec10.0.3.0
u r the next hop is RTA. However, the
the routing table of RTB,
update messageosent by RTA does not contain this entry. It
s cannot reach 10.0.3.0 through RTA, so
indicates thatepackets
RTB needsRto delete this entry from its routing table.
n g
n i
ar
Le
r e
Mo
Page270
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
When a network fault occurs, network convergence may slow
htt
down because the routes in the routing table may be inconsistent
with routes in the actual network topology. In this case, routing
s :
loop may be generated. This figure provides a simple network
e
structure to show how a route loop is generated. Before a fault
c
r
occurs to network 11.4.0.0, all routers have correct and
u
o
consistent routing tables and the network is converged. In this
s
Re
example, route metric is represented by hop count, so the metric
of each link is 1. Router C is directly connected to network
g
11.4.0.0, so the hop count is 0. Router B is connected to network
n
i
11.4.0.0 through Router C, so the hop count is 1. Router A is
n
a rconnected to network 11.4.0.0 through Router B and Router C,
Le
so the hop count is 2. When a fault occurs to network 11.4.0.0,
route loop may be generated. The process is as follows:
Page271
Thus, the routing table of Router C records an incorrect route.
(The next hop is Router B; the destination is 11.4.0.0; the hop
count is increases to 2.)
2. After leaning a wrong route, Router C advertises this route to
Router B. Route B also records a wrong route to 11.4.0.0, of
which the next hop is Router C and the hop count is increases to
3. Router B considers that network 11.4.0.0 is reachable through e n
Router C, and Router C considers that network 11.4.0.0 is m/
reachable through Router B. Thus, a loop is generated.
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page272
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
When a route loop occurs, the count of hops to network 11.4.0.0
htt
keeps increasing, and the network cannot converge. To avoid
this problem, the RIP protocol limits the maximum hop count to
s :
16. In the figure, when the hop count reaches 16, network
e
11.4.0.0 is considered unreachable. The router marks this route
c
r
unreachable in the routing table and does not update the route to
u
o
11.4.0.0 any more. By defining the maximum hop count, the
s
Re
distance-vector routing protocol prevents the route metric from
increasing infinitely when route loop occurs. In addition, incorrect
g
route information is corrected. However, routing loop still exists
n
i
before the hop count reaches the maximum value. That is to say,
n
a rthis solution is only a remedial measure but it cannot avoid route
Le
loops. This solution can only mitigate the damage caused by
route loop. Therefore, designers of routing protocols provide
Page273
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Split horizon is a common solution among distance-vector
htt
routing protocols to avoid routing loops. One cause of routing
loops is due to a router learning the route from its neighbor, and
then advertising this route to the same neighbor who advertised
s :
this route to it. With split horizon, a router does not send the
e
routing information to the neighbor from whom the routing
c
information is sent.
u r
o
As shown in the figure:
s
Re
1.Router C advertises the route to network 11.4.0.0 to Router B.
Router B then advertises this routing information to Router A. At
the same time, Router B also sends this routing information to
n g
Router C. If network 11.4.0.0 works normally, Router C does not
n i
accept the route to 11.4.0.0 advertised by Router B, because
Le
2. If route from Router C to 11.4.0.0 becomes unreachable,
Router C accepts the route to 11.4.0.0 advertised by Router B,
Page274
3. Split horizon solves this problem. Split horizon forbids a router
to return the routing information to the interface from which the
routing information arrived. In the figure, Router B learns the
route to 11.4.0.0 from Router C. Split horizon forbids Router B to
advertise this route to Router C again. This avoids routing loops
to some extent.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page275
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Route poisoning is a supplement to split horizon. Route
htt
poisoning can prevent routing loops to some extent and can
suppress network flapping caused by interface resetting. When a
s :
fault occurs in the network or an interface is reset, route
e
poisoning suppresses the related route and starts a hold-down
c
r
timer. Within the hold-down time, the router does not update the
u
o
routing table. In this way, the routing loop is avoided and network
s
Rethe figure:
flapping is suppressed.
As shown in
g
Whenna fault occurs in network 11.4.0.0, Router C sets the metric
i route to this network to 16 (unreachable) in its routing table,
ofnthe
arand thus this route is suppressed. Router C does not accept the
Le update message of the route to 11.4.0.0 from the adjacent router.
Page276
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Route poisoning can avoid routing loops to some extent and can
htt
suppress network flapping caused by interface resetting. When a
fault occurs in the network or an interface is reset, route
s :
poisoning suppresses the related route and starts a hold-down
e
timer. Within the hold-down time, the router does not update the
c
r
routing table. In this way, the routing loop is avoided and network
u
o
flapping is suppressed.
s
Re
As shown in the figure:
g
1. When a fault occurs in network 11.4.0.0, Router C suppresses
n
n i
the related route entry in the routing table, that is, it sets the
metric of the route to this network to 16 or unreachable. At the
a rsame time, Router C starts a hold-down timer. Within the hold-
Le down time, if Router C receives a route reachable message from
r e the same neighbor (or the same direction), it marks the network
as reachable and stops the hold-down timer.
Mo 2. If Router C receives an update message from other neighbors,
advertising the route with higher weight, Router C updates the
routing table by selecting the new route. At the same time,
Router C stops the hold-down timer.
Page277
3. Within the hold-down time, if Router C receives a route
reachable update message, but the weight of the new route is
lower, Router C will not accept the new route. After the hold-
down timer expires, if Router C receives this update message
again, it will update the routing table.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page278
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As shown in the figure, when network 11.4.0.0 becomes
htt
unreachable, Router C obtains this information first. Generally,
route update messages are sent to adjacent routers periodically.
s :
For example, RIP specifies that a router sends route update
e
messages every 30 seconds. However, if the update message
c
r
sent by Router B reaches Router C before the update period of
u
o
Router C begins, Router C will learns the wrong route to 11.4.0.0.
s
Re
Thus the routing loop generates. If Router C sends the update
message immediately, instead of waiting for the update period,
g
this problem will be avoided. This mechanism is call triggered
n
i
update. Triggered update means that a router sends a triggered
n
a rupdate message to adjacent routers immediately after the routing
Le
information changes. When a router detects that the network
topology changes, it immediately sends the triggered update
thei n g
combined with the hold-down timers. Within the hold-down timers,
router does not update the route to the destination network
r n
which becomes unreachable. Therefore, combining triggered
a updates with the hold-down timers ensures that the triggered
Le update message has enough time to be transmitted in the
Page280
Router B starts the hold-down timer and marks the network as
"may be disconnected." At the same time, Router B sends a
reverse update message to Router C, then sends a triggered
update message to Router A to advertise that network 11.4.0.0 is
unreachable. Router A then suppresses the route to 11.4.0.0 and
sends a reverse update message to Router B.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page281
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
p
What is distance-vector routing protocol?
tis an algorithm based on
h
A distance-vector routing protocolt
distance and vector. The distance-vector routing protocol is also
s : or Ford-Fulkerson algorithm.
called Bellman-ford algorithm
c
Based on this protocol, ea route is advertised in the format of
u
distance (metric, hopr count) and vector (direction, outgoing
interface). Everyorouter periodically sends its routing table to
es routers.
directly connected
R
ng for avoiding routing loops are: split horizon, route
What are the methods used to prevent routing loop?
Theimethods
r n
poisoning, hold-down timers, and triggered updates.
a
Le
r e
Mo
Page282
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page283
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page284
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page285
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The Routing Information Protocol (RIP) is a relatively simple
htt
dynamic routing protocol, but it is widely used. RIP is a routing
protocol based on the distance vector (D-V) algorithm. RIP
exchanges routing information through UDP. Based on RIP, a
s :
router sends update messages every 30 seconds. If a router
e
does not receive the update message from the peer router within
c
u r
180 seconds, the router marks all routes learned from the peer
router as unreachable. If the router still does not receive the
o
update message from the peer router in the subsequent 120
s
Re
seconds, it deletes these routes from the routing table. RIP
represents the distance to the destination network by the hop
n g
count. In RIP, the hop count between a router and the directly
connected network is 0. If the network can be reached through
n i
another router, the hop count increases by 1. The hop count
Page286
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
When RIP is enabled, the initial routing table contains only direct
htt
routes. After RIP is enabled on a router, the router broadcast
Request packets to all directly connected interfaces. When the
s :
adjacent router receives the Request packet from an interface, it
e
broadcast Response packet to the network connected to this
c
r
interface according to its routing table. When the router receives
u
o
the Response packet from the adjacent router, it generates the
s
Re
routing table according to the Response packet. Based on the
characteristics of the D-V algorithm, the devices involved in RIP
g
are classified into active devices and passive devices. The active
n
i
device actively broadcasts route update packets, and the passive
n
a rdevice receives route update packets passively. Generally, a host
Le
is a passive device, and a router is both an active device and a
passive device. That is, a router not only broadcasts route
r e update packets, but also receives the D-V packets from other
Page287
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Based on RIP, a router broadcasts its routing table through the
htt
Response packets every 30 seconds. After receiving the
Response packet from the neighbor, the router calculates the
route metric in the packet through RIP. Then the router compares
s :
the calculated metric with the metric of the route in the routing
e
table and updates the routing table. The route metric is
c
u r
calculated by the following formula: metric = Min (metric + cost,
16). Here, "metric" is the metric in the packet. Cost is the metric
o
from the neighbor to the network where the packet is received.
s
Re
The default value of cost is 1 (one hop). 16 means that the
destination network is unreachable. When the local router
n g
receives a route update packet, it updates the routing table
based on the following principles:
n i
For an existing route entry in the routing table, if the next hop is
a r the adjacent router, the local router updates the entry (keeps the
Le
original metric and only resets the aging timer), regardless of
whether the metric in the route up date packet is larger or smaller.
r e If the next hop is not the adjacent router, the local router updates
the route entry only when the metric in the router update packet
Mo is smaller than the previous metric. For a route entry that does
not exist in the routing table, the router adds it to the routing table
if the metric is less than 16 (unreachable). Each entry in the
routing table has an aging timer. If a route entry is not updated
within 180 seconds, the aging timer times out and the metric of
this route changes to 16 (unreachable).
Page288
After the metric of a route changes to 16 and the route is
advertised through the Response packet for four times (120
seconds), this route will be deleted from the
routing table.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page289
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
RIP has two versions: RIPv1 and RIPv2. RIPv1 does not support
htt
Variable Length Subnet Masks (VLSM). RIPv2 supports VLSM,
route aggregation, and Classless Inter-Domain Routing (CIDR).
s :
In addition, RIPv2 supports plain text authentication and MD5
e
authentication. In RIPv1, packets are transmitted in broadcast
c
r
mode. RIPv2 supports two transmission modes: broadcast and
u
o
multicast. Multicast is adopted by RIPv2 by default. The multicast
s
Re
address for RIPv2 is 224.0.0.9. An advantage of multicast
transmission is that the networks that do not support RIP will not
g
receive the RIP packets. Also with multicast, network segments
n
n i
that run RIPv1 will not receive or process the RIPv2 routes.
a r
Le
r e
Mo
Page290
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
This figure shows the format of the RIPv1 packet. A RIPv1
htt
packet contains a command field, a version field, and multiple
route entries (up to 25 entries). Each route entry consists of the
s :
Address Family Identifier, reachable IP address, and hop count
e
(Metric). If a router needs to send more than 25 route entries, the
c
r
entries must be sent in multiple RIP packets. From this figure,
u
o
you can see that the RIP packet header takes four bytes, and
s
Re
each route entry takes 20 bytes. Therefore, the length of a RIP
packet is 4 + 25 x 20 = 504 bytes. Counting the 8-byte UDP
g
header, the maximum length of the RIP packet (excluding the IP
n
i
header) is 512 bytes.
n
a r
The values and functions of the fields in the RIP packet are as
Le follows:
re
Command: The value can be only 1 or 2. 1 represents the
Request packet; 2 represents the Response packet. A router or
Mo host sends the Request packet to require routing information
from the peer router. The peer router responds by the Response
packet. But in most cases, a router periodically sends Response
packets without waiting for the Request packet.
Version: For RIPv1, the value is 1.
Page291
Address Family Identifier (AFI): For the IP protocol, the value is 2.
IP address: indicates the destination address of the route. The
value can be a network address or the address of a host.
Metric: indicates the hop count. The value ranges from 1 to 16.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page292
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Compared with the RIPv1 packet, the RIPv2 packet has the
following new fields:
htt
Route tag: 16 bits, used to mark the external route or the route
s :
redistributed to RIPv2 protocol.
c e
u r
Subnet mask: 32-bit mask, used to identify the network address
and subnet address in the IP address.
s o
Re
Next hop: 32-bit next-hop IP address.
n g
n i
a r
Le
r e
Mo
Page293
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
All command lines base on VRP 5.9.
t RIP version is 1. Unless
h t
In the VRP series routers, the default
otherwise specified, the RIP version is RIPv2.0 in this course.
The method of changing s : RIP protocol version will be
the
c e RIP configuration includes the
described later. The basic
following:
u r
Enable RIP. so
Re
[Huawei] RIP
Mo not send or receive routes on the interface. RIP does not forward
routes on this interface to other interfaces either. Therefore, you
must specify a network segment after RIP is enabled. The
network-address specifies the address of the network where RIP
is enabled. It can be the network address of the interface. When
this parameter is specified, RIP is enabled on all interfaces in this
network segment.
Page294
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The display rip command is used to display the running status
h tt
and configuration of RIP. Part of the display information is
described in the following. Pay attention to the contents marked
in red.
s :
c e that the RIP process number is 1.
RIP process: 1— indicates
u
Public VPN-Instancer— indicates the public network VPN.
s o — indicates that the RIP version is 2.
Re100 — indicates that the precedence of the RIP
RIP version: RIP-2
Preference:
n gis 100.
protocol
n i number of balanced paths: 8 — indicates that the
Maximum
armaximum number of equal-cost routes is 8.
Le Update time: 30 sec — indicates that the route update interval is
r e 30 seconds.
Mo Age time: 180 sec — indicates that the aging time of the RIP
route is 180 seconds.
Networks: 192.168.1.0 172.16.0.0 — indicates the network
where RIP is enabled.
Page295
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The display rip route command is used to display all active and
tt
inactive routes, and the timer of each route.
h
Destination (Dest) destination IP address
s :
Nexthop
e
next hop of the route
c
Cost r
weight of the route
u
Tag o
flag used to identify the internal route and external
s
route
Re
ng
Sec period in which a route entry keeps in certain status
n i
ar
L e
r e
Mo
Page296
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
All command lines base on VRP 5.3. p
1. Global RIP version htt
You can configure any of the following RIP versions:
s :
version { 1 | 2 }: configure the RIP version globally. This
e
command is supported by vrp5.x only.
c
r
2. Interface RIP version
u
o
rip version { 1| { 2 [ broadcast | multicast ] } }: configures the
s
Re
RIP version on an interface. This command is configured in the
interface view. By default, the RIP
g
version on an interface is RIPv1. RIPv2 supports two packet
n
n i
transmission modes: broadcast and multicast. Multicast is
adopted by default. The multicast address for RIPv2 is 224.0.0.9.
a rAn advantage of using multicast is that the networks not running
Le
RIP will not process the RIP packets. With multicast, network
segments that run RIPv1 will not receive or process the RIPv2
r e routes. If the interface with the RIP version RIPv1, the interface
process only RIPv1 and RIPv2 broadcast packets and does not
Mo process RIPv2 multicast packets. If RIPv2 broadcast mode is
adopted on the interface, the interface receives only RIPv1 and
RIPv2 broadcast packets and does not receive RIPv2 multicast
packets. If RIPv2 multicast mode is adopted on the interface, the
interface receives only RIPv2 multicast packets and does not
receive RIPv1 and RIPv2 broadcast packets.
Page297
Note: If the global RIP version is configured, you need not
configure the RIP version in the interface view vrp5.x
supports this function.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page298
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page299
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
On Router A, the summary command is used to configure route
htt
aggregation. Thus, routes 172.16.1.1/32, 172.16.1.2/32, and
172.16.1.3/32 are aggregated to one route: 172.16.0.0/16. The
aggregated route uses the natural mask. 172 indicates that the
s :
address is a Class-B address, so the mask length of the
aggregated route is 16.
c e
r
RIPv2 supports route aggregation. By default, route aggregation
u
s o
is enabled. That is, when the RIP version is configured to RIPv2,
route aggregation takes effect automatically, unless you use the
Re
undo summary command to disable route aggregation. Route
aggregation in RIP-2 improves the extendibility and efficiency of
g
large scale networks. After route aggregation, the RIP routing
n
n i
table does not contain sub route entries, namely, the route entry
containing a single IP address. In this way, the routing table is
a r condensed, thus the router can process more routes. When the
Le
classful aggregation is enabled, the router aggregates the subnet
addresses to the natural network segment when it advertises
htt
route aggregation to allow routing between subnets. In this case,
routing information of the subnet is advertised. Route
s :
aggregation reduces the routing information in the routing table.
e
By default, route aggregation is enabled in RIPv2. In this
c
r
example, three IP addresses are configured for three loopback
u
o
interfaces on Router A. RIP is enabled on these IP addresses.
s
Re
Route aggregation is disabled by the undo summary command.
These IP addresses are advertised to other routers. Viewing the
g
routing table of Router B, you can find three host routes with
n
i
these IP addresses.
n
a r
Le
r e
Mo
Page301
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Using the rip summary-address ip-address mask command,
htt
you can configure a RIP router to advertise an aggregated local
IP address. This command is supported by VRP5.9.
s :
ip-address: network address to be aggregated
c e
mask: subnet mask
r
u summary-address ip-address mask
o
Using the undo rip
command youscan cancel the configuration. If both auto route
aggregationReand manual route aggregation are enabled, the
manually
n g aggregated routes are integrated into the automatically
n imask length
aggregated routes. Namely, auto route aggregation take effect. If
rthe of aggregated route is smaller than natural mask
a length, use manual route aggregation to perform it and do not
Le use auto route aggregation together.
r e
Mo
Page302
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Each routing protocol has a preference. The preference
htt
influences the routing policy in selecting the route learned
through a certain protocol as the best route. The larger the value,
s :
the lower is the preference. You can set the preference of the
RIP protocol manually.
c e
u r
Set the preference of RIP protocol.
s o
[Huawei-rip] preference value
Restore the Repreference of the RIP protocol to the default value.
n g undo preference
[Huawei-rip]
Byn idefault, the preference of RIP protocol is 100.
ar
Le
r e
Mo
Page303
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
RIP allows RIP to import the routing information of other routing
htt
protocol into the RIP routing table. You can set the default cost of
the imported route. Routes that can be imported to the RIP
s :
routing table are: direct routes, static routes, OSPF routes, BGP
e
routes, and IS-IS routes. Enable RIP to import routes of other
c
routing protocols.
u r
s o
[Huawei-rip] import-route protocol [ allow-ibgp ] [ cost
Re
value ] [ route-policy
g
route-policy-name ]
n
n i
Disable RIP to import routes of other routing protocols by
r default.
a [Huawei-rip] undo import-route protocolBy default, RIP does
Le not import routes of other routing protocols. When protocol is
r e specified as BGP, the allow-ibgp keyword is optional. The
Mo import-route bgp command configures RIP to import only
EBGP routes. The import-route bgp allow-ibgp command
configures RIP to import both EBGP routes and IBGP routes.
This configuration may cause route disorder, so use this
command with caution then takes default-cost as route cost. If
route cost is not set for the imported routes.
Page304
The default-cost value is 0. In this example, the route cost is set
to 10. Therefore, the cost of imported routes is calculated by
route-cost plus 1,so the cost of routes received by RTB is 11.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page305
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Using the rip metricin value command, you can set the metric
tt
increment for the RIP route received on an interface.
h
value: specifies the metric increment for the RIP route received
on an interface. s :
c e
r
The value ranges from 0 to 15. By default, the value is 0.
When receiving a u
o route, the router adds the RIP increment of the
s to the route, and then adds the route to the
e
receiving interface
R
routing table. Thus, the metric in the routing table is changed.
n g
Therefore, when the RIP metric of an interface increases, the
i value of the RIP routes received on the interface also
metric
n
arwhen RTA receiving route 10.1.1.1/32 by rip update message, it
increases.
Page306
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Using the rip metricout value command, you can set the
htt
increment of metric for the RIP route sent from an interface.
value: specify the metric increment for the RIP route sent from
s :
an interface. The value ranges from 1 to 15. By default, the value
is 1.
c e
r
Before a route is advertised, the metric increment is added to this
u
o
route. Therefore, when the RIP metric of an interface increases,
s
Re
the metric value of the RIP routes
sent from the interface also increases. However, the metric in the
g
routing table is not changed. When RTB receives routes
n
n i
172.16.1.X by rip update messages, the metric of 172.16.1.X in
the update is 4, which is set by "rip metricout 4" on RTA's serial
a rinterface. The default metric in of RTB's serial interface is 0, so
Le RTB calculates 4+0=4, 4 being the cost of 172.16.1.X in RTB's
routing table.
r e
Mo
Page307
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
RIPv1 does not support packets authentication. In RIPv2, two
htt
authentication modes are used: plain text authentication and
MD5 authentication. MD5 authentication packets have two
formats. One is described in RFC 2453, and the other is
s :
described in RFC 2082. The router supports both formats and
e
you can select the format as required.
c
r
You can configure the RIP authentication mode by using the
u
s o
following command:
rip authentication-mode { { simple password } | { md5 { rfc2082
Re
key-string key-id
g
| huawei key-string } } }.
n
n i
simple: adopt simple text authentication.
Page308
key-string: specify the password for MD5 authentication. For the
plain text password, the string can contain 1 to 16 characters, for
example, 1234567. For the cipher text password, the string must
contain 24 characters, and the format must be cipher text, for
example, _(TT8F]Y\5SQ=^Q`MAF4<1!!.
key-id: specify the ID of the key used in MD5 authentication. The
value ranges from 1 to 255.
Using the rip authentication-mode command, you can
e n
configure the authentication mode and authentication parameters
for RIPv2. m/
Using the undo rip authentication-mode command, you can c o
disable RIPv2 authentication.
i .
The rip input command is used to allow an interface to receive
w e
ua
RIP packets. The rip output command is used to allow an
interface to send RIP packets. By default, an interface can
receive and send RIP update packets at the same time.
. h
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page309
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
What are the characteristics of the RIP protocol?
t
The Routing Information Protocolt(RIP) is a distance-vector
h
routing protocol. It is an IGP protocol. The RIP protocol is
:
applicable to medium andssmall-sized networks. It has two
c
versions: RIPv1 and RIPv2. e The RIP protocol exchanges routing
information throughr
o u UDP, using port number 520. RIP supports
es
the route loop avoidance
route poisoning, and
mechanisms, such as split horizon,
triggered update.
R
g a classful routing protocol and does not support VLSM
What are the differences between RIPv1 and RIPv2?
n
n iCIDR. RIPv1 sends packets in broadcast mode and does
RIPv1 is
Page310
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page311
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page312
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page313
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page314
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The Routing Information Protocol (RIP) is a relatively simple
s :
RIP exchanges routing information through UDP. Based on RIP,
c e
a router sends update messages every 30 seconds. If a router
u r
does not receive the update message from the peer router within
s o
180 seconds, the router marks all routes learned from the peer
Re
router as unreachable. If the router still does not receive the
update message from the peer router in the subsequent 120
n g
seconds, it deletes these routes from the routing table.
n
RIP irepresents the distance to the destination network by the
r
a hop count. In RIP, the hop count between a router and the
Le directly connected network is 0. If the network is reachable
Page315
RIP is on the upper layer of UDP. Routing information for RIP is
encapsulated in the datagram of UDP. RIP uses port 520 to
exchange routing information. When a router receives the route
update message from the remote router, the router notifies other
routers of the changed route. In this way, routes are
synchronized on all routers in the network.
To improve the routing performance and avoid route loop, RIP
e n
supports split horizon, poisoned reverse, and triggered update. In
m/
addition, RIP can import routes learned through other routing
c o
protocols.
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page316
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
RIP has two versions: RIPv1 and RIPv2. RIPv1 does not support
htt
Variable Length Subnet Masks (VLSM). RIPv2 supports VLSM,
route aggregation, and Classless Inter-Domain Routing (CIDR).
s :
In addition, RIPv2 supports plain text authentication and MD5
e
authentication. In RIPv1, packets are transmitted in broadcast
c
r
mode. RIPv2 supports two transmission modes: broadcast and
u
o
multicast. Multicast is adopted by RIPv2 by default. The multicast
s
Re
address for RIPv2 is 224.0.0.9. An advantage of multicast
transmission is that the networks that do not support RIP will not
g
receive the RIP packets. Also with multicast, network segments
n
i
that run RIPv1 will not receive or process the RIPv2 routes.
n
a r
Le
r e
Mo
Page317
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page318
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
Network description: p
tserial interface. RTA and RTB
RTA is connected to RTB through
h t
are configured with two loopback interfaces each. IP addresses
s
of these interfaces are shown: in the figure.
c e
Fault description:
u r the routes learned through RIP are not
o table.
After the configuration,
s
Re
found in the routing
n g
n i
ar
Le
r e
Mo
Page319
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The flowchart provides the main procedure for troubleshooting.
htt
When a router fails to receive part of or all the routes, follow the
following steps to locate the fault:
s :
1. Check whether RIP is enabled on the incoming interface.
c e
u r
Use the network command to specify the network segment
where RIP is enabled. An interface can receive and send RIP
s o
routes only if the RIP protocol is enabled on this interface. You
Re
can use the display current-configuration configuration rip
g
command to view the information about the RIP-enabled network
n
n i
segment and check whether the incoming interface is included in
this network segment. The specified network segment must be a
a r natural network segment.
Le 2. Check whether the incoming interface works normally.
Page320
3. Check whether the version of the RIP packets sent from the
peer is the same as the RIP version configured on the local
interface. If the version of the received RIP packets is different
from the RIP version configured on the incoming interface, the
RIP routes may not be accepted correctly.
4. Check whether the undo rip input command is configured on
incoming interface. The rip input command is used to allow the
e n
specified interface to receive RIP packets. The undo rip input
m/
command is used to prohibit the specified interface to receive
c o
RIP packets. If the undo rip input is configured on the incoming
i .
interface, RIP packets received on this interface cannot be
w e
ua
processed, so RIP routes cannot be received.
5. Check whether a routing policy is configured to filter RIP
. h
routes.
n g
The filter-policy import command is used to filter the
n i received
RIP routing information. If the ACL is used, use the
a r display
current-configuration
l ewhether the RIP
configuration acl-basic command to check
/ /IP address prefix is
: to check the
routes from the neighbor are filtered. If the
p
t t are filtered by the routing
used, use the display ip ip-prefix command
configured routing policy. If RIP routes
policy, you need to configure the h correct touting policy.
s : metric set by the rip metricin
command makes the c e of the received route exceed 15. The
6. Check whether the additional
metric
rip metricin command u r is used to set the metric increment for the
s o RIP packets. If the metric of the received
route in the received
R
route exceeds e 15, the router considers the route as unreachable
g whether the metric of the received RIP route exceeds
and does not add this route to the routing table.
n
iSimilarly, if the metric of the received route exceeds 15, the
7. Check
n
arrouter considers the route as unreachable and dose not add this
15.
Page321
for example, OSPF or IS-IS. Generally, the priority of OSPF or
IS-IS is higher than the priority of RIP, so the routing
management module selects the routes learned through OSPF
or IS-IS. Using the display ip routing-table protocol rip
verbose command, you can see that these routes are inactive. If
the fault still exists after these steps, contact technical support
engineers of Huawei or visit http://support.huawei.com.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page322
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page323
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page324
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
Networking description: p
tserial interface. RTA and RTB
RTA is connected to RTB through
h t
are configured with two loopback interface each. IP addresses of
these interfaces are shown s :in the figure.
c e
Fault description:
u r the router does not send all or some of
o
After the configuration,
the routes. s
Re
n g
n i
ar
Le
r e
Mo
Page325
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The flowchart provides the main procedure for troubleshooting.
htt
When a router fails to send part of or all routes, follow the
following steps to locate the fault:
s :
1. Check whether RIP is enabled on the outgoing interface.
c e
the interface . u r
Use the network command to enable the network segment of
s o
Re
An interface can receive and send RIP routes only if the RIP
protocol is enabled on this interface. You can use the display
g
current-configuration configuration rip command to view the
n
n i
information about the RIP-enabled network segment and check
Le
segment. The specified network segment must be a natural
network segment.
Page326
3. Check whether the silent-interface command is configured on
the outgoing interface. The silent-interface command is used to
suppress the interface from sending the RIP packet. The display
current-configuration configuration rip command is used to
check whether the interface is suppressed from sending the RIP
packet. Enable the interface if it is disabled.
4. Check whether the undo rip output command is configured
e n
on outgoing interface. The rip output command is used to allow
m/
the specified interface to send RIP packets. The undo rip
c o
output command is used to prohibit the specified interface
i .
to send RIP packets. If the undo rip output is configured on the
w e
outgoing interface, RIP packets cannot be sent from this
interface. h ua
.
5. Checking whether the rip split-horizon command is
i ng
configured on the outgoing interface. Run the display current-
n
ar
configuration command on the outgoing interface to
e
view whether the rip split-horizon command is configured. If the
l
//
command is configured, the split-horizon is enabled on the
:
outgoing interface. By default, the split-horizon is enabled on all
p
tt
outgoing interfaces, and it is used to could the route loop,so
please be careful if you want to cancel split-horizon .
h
:
6. Check whether a routing policy is configured to filter RIP
s
c e
routes. The filter-policy export command is used to filter the
RIP routes. Only the route that passes the filtering policy can be
u r
added to the advertised routing table of RIP.
s o
Re
7. Check the status of the interface when the route contains the
address of the local interface. Run the display interface
g
command to check the status of the interface. If the physical
n
i
state of the interface is Down or Administratively Down, or the
n
a rcurrent status of the protocol on the interface is Down, the IP
address of the interface cannot be added to the advertised
Le routing table of RIP. Therefore, the routing information will not be
Page327
You can configure the peer command in the RIP mode to make
routers send packets with unicast address. If the fault still exists
after these steps, contact technical support engineers of Huawei
or visit http://support.huawei.com.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page328
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page329
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page330
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Fault description: RTA and RTB use different authentication keys,
tt
so they cannot receive routes from each other.
h
Analysis: If a router cannot receive any route from the peer,
check the following: s :
ce
r
1. Whether RIP is enabled on the interfaces connecting the peer.
ubetween the routers is normal.
o
2. Whether the link
srouting protocol is configured properly.
e
3. Whether the
R
n g and the link between the routers is normal, but the
Using related commands, you can see that RIP is enabled on the
interfaces
n i
configuration of RTA is different from that of RTB. Comparing
a r
their configurations, you can see that password authentication is
Le configured for RTA and RTB. Following the preceding sections,
Page331
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After the authentication mode and key are configured correctly,
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page332
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Fault description: The metric of the route exceeds the hop count
tt
limit in RIP, so the router cannot accept route.
h
Analysis: RIP limits the hop count to 15. If the hop count in a
s :
network exceeds 15, RIP is not applicable to this network.
c e
u r
Additional metric is the increment (hop count) added to the
original metric. The rip metricin command is used to set the
s o
increment added to the received route when the route is added
Re
to the routing table. The metric of this route is also changed in
g
the routing table. The rip metricout command is used to set the
n
n i
increment added to a route to be advertised. But the metric of
this route is not changed in the local routing table. For example,
a rafter you configure rip metricin 15 on RTB, the hop count of the
Le route to 172.16.3.0 is 16 when the route is received by RTA. RTA
Page333
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Viewing the routing tables of RTA and RTB, you can find that the
htt
route to 172.16.2.0 is added to the routing table of RTB, while
route to 172.16.3.0 is not added to the routing table of RTA.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page334
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Change the additional metric to 15, and RTA will add the route to
172.16.3.0 to its routing table.
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page335
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Fault description: The subnets are not continuous, and thus the
tt
routing information cannot be added to the routing table.
h
Analysis: Network 162.16.0.0 segment is divided by network
s :
segment. RTA and RTB uses RIPv1, which is a classful routing
c e
protocol. Therefore, the routers send update packets with a
u r
Class-B network segment address 162.16.0.0 but not the
s o
accurate network addresses 162.16.2.0 and 162.16.3.0.
Re
n g
n i
a r
Le
r e
Mo
Page336
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
When RTA receives the update packet for the route to 162.16.0.0,
htt
RTA does not add the route to the routing table, because it has a
directly connected network segment 162.16.2.0.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page337
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
To solve this problem, you can enable RIPv2 on the routers,
htt
because RIPv2 is a classless routing protocol. Use the undo
summary command to enable the CIDR function.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page338
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After you modify the configuration, RTB advertises the route with
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page339
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
What are the steps for troubleshooting received RIP routes?
t
1. Check whether RIP is enabledton the incoming interface.
hinterface works normally.
:
2. Check whether the incoming
s
c e
3. Check whether the version of the received RIP packet is the
r configured on the incoming interface.
same as the RIP version
u
4. Check whether
s o the undo rip input command is configured on
the incomingeinterface.
R
n
receivedg RIP routes.
5. Check whether the routing policy is configured to filter the
i
6.nCheck whether the additional metric set by the rip metricin
arcommand makes the metric of the received route exceed 15.
Le 7. Check whether the metric of the received route exceeds 15.
r e 8. Check whether the routing table contains the same route
Mo learned through another routing protocol.
What are the steps for troubleshooting sent RIP routes?
1. Check whether RIP is enabled on the outgoing interface.
2. Check whether the outgoing interface works normally.
Page340
3. Check whether the silent-interface command is configured on
the outgoing interface.
4. Check whether the undo rip output command is configured
on the outgoing interface.
5. Check whether split horizon is configured on the outgoing
interface.
e n
6. Check whether the routing policy is configured to filter the
m/
routes imported to RIP.
c o
7. Check status of the local interface if the route to be advertised
i .
contains the address of the local interface.
w e
ua
8. Check whether other problems exist.
. h
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page341
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page342
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page343
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page344
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Open Shortest Path First (OSPF) is an IGP protocol based on
htt
the link state algorithm. OSPF is brought forward by the Internet
Engineering Task Force (IETF). OSPF has three versions.
:
OSPFv1 is defined in RFC 1131. This version was in the
s
e
experimental stage and has never been released for public use.
c
u r
OSPFv2 is used for IPv4 and was initially defined in RFC 1247.
RFC2328 is the latest standard document for OSPFv2. OSPFv3
s o
is used for IPv6. Unless otherwise specified, OSPF refers to
Re
OSPFv2 in this course.
g
OSPF is borne by the IP protocol and uses IP protocol number
n
i
89. An OSPF packet consists of the header and the packet body.
n
a rThe format of the OSPF packet is described in the HCDP course
Le
and is not explained here.
r e
Mo
Page345
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
The following features of OSPF enable extensive use of OSPF:
Supports CIDR.
htt
Early routing protocols, such as RIPv1, do not support CIDR.
:
OSPF supports CIDR and allows the advertised routing
s
c e
information to contain the subnet mask so that routing
information is not limited to the classful network.
u r
Supports area division.
s o
OSPF allows dividing an autonomous system (AS) into areas so
Re
that the users can be managed more flexibly.
g
Avoids route loops.
n
n i
The design of OSPF avoids route loops. OSPF allows dividing an
AS into areas. Routers in an area use the SPF algorithm to
a r avoid route loops. Route loop between areas is avoided through
Le
the area connection rule specified by OSPF.
The routes converge very quickly when the network
r e topology is changed.
Page346
Supports equal-cost routes.
OSPF supports equal-cost routes. When multiple routes to the
same destination have the same cost, the traffic is shared by
these routes evenly. Through load balancing, the link bandwidth
is used more efficiently.
Supports authentication of protocol packets.
In a network that requires higher security, OSPF routers can
provide the authentication function. Packets can be exchanged
e n
between OSPF routers only after they pass the authentication.
m/
The authentication improves security of the network.
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page347
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
OSPF is an open standard routing protocol and is extensively
htt
used by various network carriers. OSPF can be applied to both
the enterprise network and the carrier-class IP network. This
s :
slide lists the differences between OSPF, RIPv2 and RIPv1.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page348
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Compared with RIP, OSPF is a more advanced interior gateway
htt
protocol. OSPF and RIP are totally different, although they are
both IGPs. OSPF is based on the link state algorithm, while RIP
s :
is based on the distance-vector algorithm. As described in the
e
course of the RIP protocol, distance-vector protocols select
c
r
routes based on the hop count and do not consider network
u
o
resources such as the link bandwidth. Under this condition, a
s
Re routes according to the link state. OSPF enables
path with high bandwidth may not be selected.
OSPF selects
n g
fast convergence of routes and do not limit the hop count. OSPF
n i advertise the link information, instead of periodically
routers
arsending route update packets. Therefore, OSPF is more
Le applicable to large-scale networks. (A link can be regarded as an
interface on a router. The link state is the description of the
r e interface and the relation between the local router and the
Mo adjacent router.) The calculation process of OSPF will be
described later.
Page349
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Unlike early routing protocols that use the distance-vector
htt
algorithm, OSPF uses the link state algorithm. The following
describes the route calculation process of the link state algorithm.
s :
An OSPF router floods the link state advertisement (LSA) to
c e
notify other routers of the status of the local link, for example,
u r
available interface, reachable neighbor, and the information
s o
about the adjacent network segment. Flooding is a process of
Re
sending and synchronizing the link state between routers.
g
Each router generates a link state database (LSDB) according to
n
n i
the LSAs advertised by other routers and its local LSAs. The
LSDB describes the detailed network topology in the routing area.
a r In the same area, all routers have the same LSDB.
Le Based on the LSDB, each router calculates a shortest path tree
r e with the SPF algorithm. The local router is the root of the tree,
Mo and other nodes in the network are leaves. The shortest path
tree calculated through the SPF algorithm does not have route
loops.
The shortest path tree of each router provides the routing table
listing the routes to other nodes in the network. Thus, each
OSPF router knows the routes to other routers.
Page350
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
OSPF supports five types of packets, which contain the same
h tt
OSPF header. An OSPF router uses the following packets to
discover neighbors and maintain the neighbor relation,
s :
synchronize the LSDB, and exchange routing information:
c e packet used to discover neighbors
Hello packet: It is a common
u r relation. The Hello packet is also used
and maintain the neighbor
so router (DR) and backup designated router
to elect the designated
(BDR) in theebroadcast network and NBMA network.
R
g
DD packet: Routers use DD packets to describe their LSDBs
whennthey synchronize the LSDBs. A DD packet consists of an
n
LSA iand an LSA header. The header uniquely identifies an LSA.
arThe LSA header makes a small part of the packet, and thus the
Le traffic of protocol packets transmitted between routers can be
Page351
LSU packet: This packet is used to send the required LSAs to
the peer router. An LSU packet contains the combination of
multiple LSAs.
LSAck packet: This packet is used to acknowledge the received
LSU packet.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page352
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
To exchange the link status and routing information, two OSPF
tt
routers need to establish the neighbor relation.
h
Neighbor
s :
e
After an OSPF router is started, it sends Hello packets through
c
u r
the OSPF interface to discover neighbors. The OSPF router that
receives the Hello packet checks the parameters in the Hello
s o
packet. If the parameters are consistent on the two routers, the
Re
two routers establish the neighbor relation.
g
Adjacency
n
Notiall neighboring routers can establish the adjacency.
r n
Adjacency establishment depends on the network type. The real
a adjacency is established only if the routers exchange DD packets
Le successfully and can exchange LSAs. To send LSAs, a router
re must discover the neighbor and establish the adjacency with the
Mo neighbor.
In this example, RTA is connected to three routers through
Ethernet. RTA has three neighbors, but you cannot say that RTA
establishes three adjacencies.
Page353
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Not all neighbors can establish the adjacency to exchange link
h tt
status and routing information. Adjacency establishment depends
on the network type, namely, the layer-2 link type of the OSPF
network.
s :
Based on the link-layerc eprotocol, OSPF networks are classified
u r network, broadcast network, NBMA
into the point-to-point
is a network e
so
network, and point-to-multipoint network. A point-to-point network
that directly connects two routers.
R
g In a point-to-point network, neighboring routers can
Link layer protocols for the point-to-point network are PPP, LAPB,
n
n i the adjacency directly. Broadcast network: If the link-
and HDLC.
establish
arlayer protocol is Ethernet or FDDI, the network is considered as
Le a broadcast network by default. The network shown in the right
Page354
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A non-broadcast network can connect more than two routers, but
it does not support broadcast.
htt
In non-broadcast networks, OSPF has two operation modes:
s :
non broadcast multi-access (NBMA) and point-to-multipoint.
c e
NBMA
r
u routers must establish a full connection. An
o
In an NBMA network,
s
In an NBMA
e
ATM network adopting full connection is an NBMA network.
R network, OSPF simulates the operations on
n g networks, however neighbors of each router must be
broadcast
n i manually.
configured
arCommon link layer protocols for the NBMA network are Frame
Le Relay and ATM.
r e
Mo
Page355
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
Point-to-multipoint p
tfull connection needs to
h
A network that cannot establish thet
adopt the point-to-multipoint mode. A Frame Relay network is
s
such a network. In this mode,: the entire non-broadcast network
is regarded as a groupc eof point-to-point networks. A router
u r by using a lower layer protocol, for
discovers its neighbors
s
example, inverse oARP. The point-to-multipoint network type is not
Re OSPF.
a default type in
n g
n i
ar
Le
r e
Mo
Page356
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In broadcast and NBMA networks, if any two routers need to
htt
establish the adjacency, route convergence is very slow. Use of
the designated router (DR) and backup designated router (BDR)
solves this problem.
s :
A broadcast network or c eNBMA network containing at least two
routers has one DRrand a BDR.
o u and BDR:
Functions of the
e s DR
The DR and R reduce adjacencies, thus reduce exchanges of
BDR
n g
link state information and routing information. Use of the DR and
BDR
n i reduces bandwidth consumption and lowers the burden of
Le the link state information and routing information only with the
Page357
To sum up, establishment of the adjacency depends on the
network type. In a point-to-point network, two routers can
establish the adjacency. A point-tomultipoint network can be
regarded as a group of point-to-point networks. An adjacency is
established between each two directly connected routers. In a
broadcast or NBMA network, a DR and a BDR are selected.
Drothers establishes adjacencies only with the DR and the BDR.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page358
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
Autonomous system p
t of routers that use the
h
An autonomous system is a combinationt
same routing policy and are managed by the same technical
management organization. s :In the course of OSPF, an
autonomous system refersc e to a group of routers that exchange
u
routing information by r using the same routing protocol. In this
so onsystem
course, autonomous
IGP protocolebased
is referred to as AS for short. As an
the link state algorithm, OSPF takes
effect only Rwithin the AS.
Arean
g
n iarea is a combination of routers and the networks connected
arto these routers. As shown in the figure, three routers and the
An
r e means that all routers running OSPF belong to the same area.
Mo OSPF requires that all routers in the same area have the same
LSDBs.
Router ID:
To run OSPF, a router must have a router ID. The LSDB records
the topology of the network, including routers in the network.
Page359
Each router must have a unique identifier to identify itself in the
LSDB. A router ID is a 32-bit integer used to uniquely identifies a
router in an AS. Each OSPF router has a router ID. Router ID
uses the format of an IP address. The IP address of Loopback
interface of a router is recommended as the router ID.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page360
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In this example, the topology for OSPF single area configuration
is as follows:
htt
RTA and RTB are located in the network. Each router uses the IP
s :
address of Loopback0 as the router ID. RTA and RTB belong to
c e
Area 0. Here, configuration of interfaces and IP addresses is not
u r
mentioned. For the configuration, refer to related basic courses.
s o
The procedure for basic OSPF configuration is as follows:
Re id router-id command to specify the router ID. If
Run the router
n g
the router ID is not specified, OSPF uses the largest loopback IP
n ilargestasIPtheaddress
address router ID. If no loopback interface is configured,
rthe
a ID.
of physical interfaces is used as the router
Page361
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After the configuration, you can use related commands to check
h tt
the configuration. For example, you can use the display ospf
routing command to display information about the OSPF routing
table.
s :
c e
[RTA] display ospf routing
u
In this example, thisrcommand displays the OSPF routing table
s o shows that the OSPF routing table of RTA
of RTA. The display
R
contains threee route entries and they are all in Area 0. Each route
g and the area the route belongs to. From the display
entry shows network segment, next hop, router that advertises
n
n i
this route,
information, you can see that the OSPF configuration is correct
r
a and RTA and RTB can exchange routing information.
Le
r e
Mo
Page362
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As the network size keeps increasing it increases the number of
htt
devices that are part of the same converged domain and in turn
their routing tables. If all routers in a large-scale network run
OSPF, an increasing amount of storage space becomes
s :
occupied, The reason is that the LSDB becomes very large when
e
a large number of routers are added to the network. A huge
c
u r
LSDB makes calculation of SPF algorithm very complicated and
burdens the CPU. When the network size is enlarged, the
o
probability of topology changes also increases and the network
s
Re
often flaps. Under such a condition, a large amount of OSPF
packets are transmitted in the network, which lowers the
n g
bandwidth utility. To make it worse, each time the network
topology changes, all routers in the network need to recalculate
n i
routes.
Le
logically classify routers into different groups. An area is
identified by the area ID.
Page363
Each router maintains a independent LSDB that records each
area connected to it. Since the link state information is not
advertised to other areas, the size of LSDB is much more smaller.
Area 0 is the backbone area that advertises the inter-area routing
information (not detailed link state information) summarized by
edge routers to non-backbone areas. To avoid routing loop, non-
backbone areas cannot advertise inter-area routing information.
Each edge router, therefore, must have at least one interface in
Area 0. That is, all non-backbone networks must be connected to e n
the backbone area.
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page364
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
OSPF defines the following types of router:
Internal Router (IR)
h tt
:
An IR is the whole interfaces of a router connected to network
s
e
segments in the same area. IRs in the same area maintain the
c
same LSDBs.
r
u (ABR)
o
Area border router
s connected to multiple areas. An ABR
An ABR is a erouter
R LSBD for each area connected to it. ABRs
maintains an
n g inter-area routing information.
exchange
n i router (BR)
Backbone
arA BR is a router that has at least one interface (or virtual
Le connection) in the backbone area. All ABRs and routers that
Page365
The ASBR advertises routing information of other AS’ to all
routers in the same AS. Routers in an AS communicate with
routers in other AS’ through the ASBR. An IR or ABR can act as
the ASBR. An ASBR can be in the backbone area or a non-
backbone area.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page366
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Only one area (Area 1) is configured on RTA, and so network
tt
segments are specified only for Area 1.
h
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page367
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As shown in the figure, the area is divided into Area 0, Area 1,
htt
and Area 2. OSPF requires non-backbone areas to be directly
connected to the backbone network, and so Area 1 and Area 2
s :
are connected to Area 0. On RTA, Area 1 must be configured. On
c e
RTB, Area 0 and Area 1 must be configured. On RTC, Area 0
r
and Area 2 must be configured. On RTD, Area 2 must be
u
o
configured. RTA and RTB exchanges LSAs to generate LSDBs.
s
Re
LSDBs of RTA and RTB are the same. Since RTB also belongs
to Area 0, RTB maintains another LSDB for Area 0. This LSDB is
g
the same as the LSDB on RTC. Similarly, RTD and RTC
n
n i
maintain same LSDBs for Area 2.
a r
The configuration is similar to configuration of a single area, and
Page368
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
This page shows the configuration of RTC. Two areas are
configured on RTC:
htt
Area 0 and Area 2. Their network segments are specified
separately. s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page369
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Only one area (Area 2) is configured on RTD, and so network
tt
segments are specified only for Area 2.
h
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page370
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Using the display ospf routing command, you can verify the
htt
configuration. You can also use the following command to view
information about neighbors of an OSPF router.
display ospf peer s :
c e
r
In the output information:
Area indicates theuarea a neighbor belongs to.
s o
e the interface connected to this neighbor.
Interface indicates
R
g indicates the address of the neighboring interface.
Router Id indicates the router ID of the neighbor.
n
ihas two neighbors: RTA in Area 1 and RTC in Area 0.
Address
n
ar
RTB
Page371
the IP address of the neighboring interface is 10.1.2.2.
Information about the neighbor in Area 2 is similar to the above
information.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page372
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
In this example, you can use the display ip routing-table
htt
protocol ospf command to view the global routing table. The
output information shows that five route entries are learned
through OSPF.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page373
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
p
What is the calculation process of the link state algorithm?
t the local link state
h t
Each router in the network advertises
information to other routers and collects the link state information
s
advertised by other routers.:In this way, each router generates an
c
LSDB that describes the enetwork topology. Based on the LSDB,
u r path tree by using the SPF algorithm.
routers calculate a shortest
s
The shortest patho tree provides routes to all nodes in the network.
e area?
What is anROSPF
An OSPF
n g area is a combination of network segments.
n
Whati is the procedure for basic OSPF configuration?
arEnable the OSPF process. Create OSPF areas. Specify network
Le segments for each area.
r e
Mo
Page374
e n
m/
c o
i .
w e
hua
.
ng
Module 3 rni
e a
/l
Switching
/
p :
t t
h
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page377
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
LAN technology includes Ethernet, token ring and token bus. In
htt
these technologies, Ethernet technology gradually occupy a
dominant position with its efficient and low prices.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page378
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page379
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
The history of Ethernet:
p
t in Palo Alto, California. Dr
t
1973, Ethernet was invented at Xerox
Robert Metcalfe is regardedhas the father of Ethernet. Early
Ethernet standards, the:prototype of today’s Ethernet ran at a
speed of 2.94 Mbps.e
s
r c Corporation, Intel and Xerox promoted
u
1980, Digital Equipment
Ethernet as aostandard, the so called Ethernet DIX80 or
Ethernet e s 1 standard which standardized 10Mbps
version
R
Ethernet.
g
1982,nA second revision of Ethernet, known as Ethernet DIX82 or
n iEthernet version II. The Ethernet II remains the Ethernet
ar standard used in today’s networks.
Le 1995, IEEE issued the standard for Fast Ethernet, namely, the
r e 802.3u standard.
n g
connected with a device called a pigtail which is was inserted by
n i when
cutting a small hole in the coaxial cable. Extreme care had to be
rtaken inserting a pigtail into the coaxial cable due to the
a potential for the central core to short out on contact with the
Le metallic shield, which could cause the failure of an entire
r e segment.
Mo
Page381
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
At the end of 1980s, unshielded twisted pair (UTP) came into
h tt
being and was soon widely used. UTP is cheap and easily made
and with UTP data can be sent and received over different wires,
s :
which makes full duplex easily applied.
c
Twisted pair cable comese in two types: shielded twisted pair
u
(STP) and unshielded r twisted pair (UTP). STP is very effective at
s
protecting cablesofrom external electromagnetic interference.
R e
Twisted cables are categorized by the length of a single twist for
each wire pair, and they come in the following types:
n g twisted-pair cable ——The cable defined by ANSI
n
andiEIA/TIA568. Its transmission frequency is 16MHz and is
Category-3
Page382
Category-5 twisted-pair cable — Mainly for transmitting voice or
data at the rates of up to 100Mbps. It is often used for 100base-T
and 10base-T networks. It one of the most widely used Ethernet
cables, however has generally been superseded by an enhanced
version known as Cat5e. The Cat5e standards are much more
stringent and give a support the use of 4 wire pairs as opposed
to 2 wire pairs used by Cat5, allowing Cat5e to support Gigabit
e n
Ethernet transmissions.
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page383
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Ethernet interfaces on networking devices come into two types:
htt
Medium Dependent Interface (MDI) and Medium Dependent
Interface Crossover (MDI_X). Ethernet interfaces of routers and
s :
interfaces of Network Interface Cards (NIC) are often MDIs. The
e
Interfaces of hubs are considered MDI_X interfaces.
c
u r
Twisted-pair cables can be divided into straight cable and
s o
crossover cable types. Straight cables are used for connecting
Re
MDI and MDI_X type devices; crossover cables are mainly for
connecting MDI and MDI or MDI_X and MDI_X device types. It
n g
should be noted that the pair sequence in a crossover cable
n i
results in a crossover at each end of the cable between pins 1 &
a r 3 and 2 & 6.
Le
r e
Mo
Page384
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page385
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Usually 10 Mbit/s Ethernet is only located at the access layer of
htt
the network. The new generation multimedia products, video and
database products may easily chew up the bandwidth of
10Mbit/s Ethernet.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page386
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Besides coaxial cable and twisted pair cable, the IEEE802.3
htt
cable also use fiber 10BASE-F. 10BASE-F was once used at the
early age of Ethernet and its transmission distance can reach 2
Km.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page387
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
The standard (10Mbps) Ethernet transmission rate is too low to
htt
meet the demands of today’s networks. To meet these higher
demands, IEEE issued the IEEE802.3u standard for fast
s :
Ethernet, supporting data transmission rates of 100Mbps.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page388
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Full-duplex fast Ethernet is capable of sending and receiving
htt
data at 100 Mbps/s rate simultaneously. Data sending and
receiving are independent due to the use of separate wire pairs
s :
for transmitted and received data, which avoids collisions and
e
interference and improves the network efficiency.
c
u r
The standards body EIA/TIA stands for Electronic Industries
s o
Alliance/Telecommunication Industry Association.
Re
n g
n i
a r
Le
r e
Mo
Page389
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Gigabit Ethernet is an extension of the Ethernet defined by
achieved. htt
IEEE802.3, for which transmission speeds of 1Gbps are
s :
There are two standards that have been defined for gigabit
c e
Ethernet, they are IEEE802.3z (for fiber and copper) and
u r
IEEE802.3ab (for twisted-pair).
s o
Re
n g
n i
a r
Le
r e
Mo
Page390
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
IEEE802.3ab specifies the standard for 1000BaseT. 1000BaseT
htt
is a kind of 10G Ethernet technologies using Type5 UTP to
transmit data and its effective transmission distance reaches 100
:
meters as that of 100BASETX does. Users can upgrade their
s
c e
100Mbps Ethernet to 1000Mbps Ethernet smoothly in their
original fast Ethernet system with this technology.
u r
IEEE802.3z sets standards for three kinds of cables:
s o
Re
1000BaseCX is based on a kind of copper shielded twisted-pair
cables with high quality. The transmission distance of this cable
g
is 25 meters and is connected by 9um D type connectors.
n
n i
1000BaseSX is a kind of technology using shortwave laser as
the signal source. The wavelength of the laser is set to be within
a rthe scope of 770-860nm (usually 800nm). It supports only multi-
Le mode fiber and cannot operate on the single mode
r e fiber.
Page391
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
10G Ethernet is the cutting-edge technology in the Ethernet
htt
world. Its transmission speed is 10 times that of a gigabit
Ethernet and its working area is much wider. 10G Ethernet can
s :
be applied not only to the traditional LANs, but also WANs and
e
MANs which were once closed to Ethernet due to its limited
c
r
capabilities. 10G Ethernet can be compatible with DWDM
u
o
seamlessly which stretches Ethernet to a global geographical
s
Re IEEE and 10 Gigabit Ethernet Alliance
scope without being limited by distance.
Two organizations,
n g played an important role in the standardization of 10G
(10GEA),
n i IEEE is in charge of setting standards for 10G Ethernet
Ethernet.
arand it has issued IEEE802.3ae as of June 2006. IEEE802.3ae
Le specifies the standard of 10G Ethernet that runs on fiber, a
standard not so suitable for enterprise LANs that commonly
r e transmit data through copper cabling. To meet the requirements
Mo from the 10G Ethernet that runs on copper cables, IEEE issued
the 802.3ak standard in March 2004 and the IEEE 802.3an
standard for 10G Ethernet over twisted-pair cabling.
Page392
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The standard for 10G Ethernet over fiber is IEEE802.3ae, which
tt
consists of 10G BASE-X, 10GBASE-R and 10GBASE-W.
h
10GBASE-X uses a tightly packed package which involves a
s :
rather simple WDM device, four receivers and four lasers that
c e
work at the wavelength of about 1300nm at an interval of around
u r
25nm. Each sender and receiver pair works at a speed of 3.125
s o
Gbps with a data rate of 2.5 Gbps.
10GBASE-R R eis a form of serial interface based on a 64B/66B
gEthernet. Its data rate is 10.000 Gbps/s which leads to a
coding scheme instead of the 8B/10B scheme applied to the
n
n i rate of 10.3 Gbps.
gigabit
clock
ar10GBASE-W refers to the WAN interface, which is compatible
Le with SONET OC-192. The clock rate and data rate of 10 GBASE-
Page393
e n
m/
c o
i .
w e
h ua
.
ing
n
e ar
l
: //
p
This chapter involves the following contents:
tformed?
h
1. How was the Ethernet standard t
Xerox first presented the :
original Ethernet technology whose
speed was only 3Mbps ins1973. Later, Digital Equipment
e
Corporation, Intel andcXerox jointly proposed the 10Mbps DIX
u r This was then developed into early forms
standard for Ethernet.
s
of the IEEE802.3 ostandard in 1980.
Re types are supported by Ethernet?
2. Which media
Mo
Page394
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page395
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page396
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page397
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page398
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Carrier Sense Multiple Access with Collision Detection
htt
(CSMA/CD) is a set of rules determining how network devices
respond when two devices attempt to use a data channel
s :
simultaneously. The basic working theories of CSMA/CD are as
follows:
c e
u r
(1) If the transmission media is not occupied at that time, a
s o
particular station can transmit, otherwise move on to the next
step.
Re
g
(2) The station waits for a while until the data channel is not
n
i
occupied and then it begins to send data.
n If the station detects a collision which is known as the voltage
r(3)
a level is as twice as usual, it stops transmitting that frame and
Le transmits a jam signal in order let all the participating stations
Mo (4) After a random time interval, the station that collided attempts
to transmit again, which goes back to step 1 again and the
process cycles.
Page399
5
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Limited by the algorithm of CSMA/CD, the length of a frame sent
tt
over Ethernet using 10M half duplex should be at least 64 bytes.
h
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page400
6
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Two network devices appeared during the period when the
htt
Ethernet developed from a shared to a switched network, one is
the Hub, the other is the Repeater.
s :
When the network is extended, signals degrade as they travel
c e
long distances, which may often lead to corrupted data. The
u r
repeater is an electronic device that helps to recover or amplify
signals.
s o
Rerepeater both work at the physical layer.
The hub and
n g
n i
ar
Le
r e
Mo
Page401
7
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The hub is an Ethernet device which works based on the
htt
mechanism of CSMA/CD. The working principles of the hub are
quite simple. The hub forwards the data frame received by one of
s :
its ports to all other ports directly no matter whether the frame is
unicast or broadcast.
c e
u r
We may say that the hub and repeater changes only the physical
s o
topology of the Ethernet, the logical topology of the Ethernet is
Re
still remains a bus topology.
g
The hub does not have a MAC address and only forwards data
n
n i
without filtering.
a r
Le
r e
Mo
Page402
8
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The network connected by hubs or repeaters is considered to be
htt
shared Ethernet, so it is no wonder that this kind of network has
all the weaknesses of a shared Ethernet, weaknesses that
include:
s :
•Collisions c e
u
•Broadcast floodingr
s o
Re
•No Guarantee of Security
n g
n i
a r
Le
r e
Mo
Page403
9
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page404
10
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
The Ethernet switch operates at the data-link layer and has two
basic functions:
htt
Learning MAC addresses;
s :
e
Switching or filtering data.
c
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page405
11
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In the figure above, DMAC indicates the MAC address of the
htt
destination and SMAC is the MAC address of the source. The
meaning of the Length/Type field various with its values. When
s :
its (hexadecimal) value exceeds 1500, it indicates the field is a
c e
type field; when the value is less than or equal to 1500, the field
r
indicates it is a frame length field. The value of the DATA/PAD
u
o
field represents the length of the data filled to make the frame
s
Re
length to be 64 bytes or above. FCS refers to the extra
checksum characters added to a frame for error detection and
g
correction.
n
n i the value of the Length/Type field exceeds 1500, the MAC
When
arsub-layer can submit the frame to a protocol at the upper layer
Le immediately without going through the LLC sub-layer. This
structure is the Ethernet_II structure which is very popular and
r e used by most protocols. In this structure, the data-link layer only
Mo involves the MAC sub-layer and does not implement the LLC
layer.
When the value of the Length/Type is less than or equals to 1500,
it indicates the Ethernet_SNAP structure which is set by the
802.3 committee but is not widely used.
Page406
12
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
An Ethernet frame whose type is 0800 is an Ethernet_II frame,
h tt
as 0x0800 when converted from Hexadecimal to Decimal is
bigger than 1500 and must be an IP datagram, since 0800
s :
represents the IP datagram header.
In a similar way, it is c e to determine that a 0806 frame is
possible
u r
for ARP request/response and a 8035 frame is for RARP
s
request/response.o
R
However, the e question remains how we can identify the ‘type’ of
g only the frame ‘length’ instead of the frame ‘type'?
a the next frame header defined in 802.3 since the 802.3 frame
n
i
indicates
n
ar
Le
r e
Mo
Page407
13
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In an 802.3 frame, there is a three-byte 802.2 LLC and a five-
htt
byte 802.2 SNAP header. The values of Destination Service
Access Point (DSAP) and Source Service Access Point (SSAP)
s :
are both set to 0xAA. The Ctrl field is set to 3 and the 3-byte org
c e
code field that comes after it is set to 0. The following ‘TYPE’
r
field functions the same as that of the Ethernet_II frame.
u
s o
Re
n g
n i
a r
Le
r e
Mo
Page408
14
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A MAC address is a 48 bit address and is often represented by a
htt
12-bit hexadecimal digit. A MAC address is globally unique and
IEEE is responsible for the management and allocation of MAC
s :
addresses. A MAC address is made up of two parts which are
c e
the manufacturer assigned and the sequence number. The first
r
24 bits identify the organization that issued the identifier and is
u
o
managed and allocated by IEEE. The following 24 bits are
s
Re
assigned by that organization in nearly any manner they please,
subject to the constraint of uniqueness.
n g
Special MAC addresses:
i
1.nIf a MAC address whose 48 bits are all 1s, it is a broadcast
r
a address.
Le 2. If a MAC address whose eighth bit is 1, it is a multicast
r e address.
Page409
15
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
Source MAC Learning p
t on its MAC address table
The bridge forwards frames based
h t
which is built using the source MAC addresses of received
frames. A common MACsaddress : table of a layer-2 switch maps
between MAC addresses c e and switch ports.
We should bear inur mind that a switch learns the source address
of data frames o
s it receives, meaning that every port of a switch
R e
listens independently for the source address of data frames they
receive.
n gthe MAC address table is empty, but once a switch
i a frame via port 1, the switch will check the frame’s
Initially,
n
ardestination and search for the MAC address in its cache however
receives
Le no entry will currently exist. The switch as a result will flood the
r e frame out of all ports except the port on which the frame was
Mo received and then use the source address of the frame to build
it’s MAC address table, mapping port 1 to the MAC address of
station A. Similarly, each station will map the port on which the
frame is received to the source MAC address of that frame,
forming a MAC address table for each switch device.
Page410
16
If a port connects to a hub, then the switch port will recognize multiple
MAC addresses for a single interface.
Every port of a switch corresponds to a collision domain.
Note: For multicasting, address entries are not obtained by learning.
They are obtained by IGMP or protocols such as CGMP.
e n
m/
c o
i .
w e
hua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page411
17
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Forwarding Frames Based on the Destination MAC
t to its MAC address table.
h t
The switch forwards frames according
If the destination address of the frame is not in the table, the
s : The switch maintains its MAC
switch will flood the frame.
address table throughc e an automatic learning and aging
mechanism. Framerstructures are not modified in most cases.
o u to the frame structure by putting a TAG in
s
(VLAN makes changes
the frame.) e
R
n g
n i
ar
Le
r e
Mo
Page412
18
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
The switch receives a data frame from the local segment via one
of it’s port interfaces.
htt
The switch builds its MAC address table by learning the source
s :
MAC of the frames and maintains its MAC address table with the
c e
aging mechanism. The switch looks for the destination MAC in its
u r
MAC address table and if the destination MAC is in the table,
s o
then the switch sends the frame to the corresponding port (the
Re
source port is not included); if the switch cannot find the
destination MAC in its table, then it sends the frame to all the
n g
ports except the source port.
n i
a r
Le
r e
Mo
Page413
19
e n
m/
c o
i .
w e
hua
.
i ng
n
e ar
l
: //
p
There are three switching modes: Cut-Through, Store-and-
Forward and
htt
Fragment-free. Their characteristics are as follows:
s :
Cut-Through
c e
r
The switch starts forwarding a frame before the whole frame has
u
o
been received, normally as soon as the destination address is
s
Re
processed.
Low latency
n g forwards frames without detecting errors.
The switch
n i
arThe switch starts forwarding a frame after the whole frame has
Store-and-Forward
Le been received.
r e High latency, and the latency is decided by the frame length. The
Mo switch checks for errors and once it finds an error, the frame is
discarded immediately.
Page414
20
Fragment-free
The switch starts forwarding a frame after the first 64 bits (the
shortest possible length) of the frame has been received. This
mode inherits the advantages of the Cut-Through mode and the
Store-and-Forward mode. With this mode, the switch can start
forwarding without the whole frame having being received which
is the same as it does with the Cut-Through mode; and at the
e n
same time, the switch can check errors as it does with the Store-
m/
and-Forward mode and should it find there are errors in the first
c o
64 bits of the frame, it will drop the frame.
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page415
21
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
L2 switches help to avoid collisions in a shared Ethernet but
resolved? htt
broadcast flooding is still widespread. How can this problem be
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page416
22
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page417
23
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
L3 switches tend to take the form of a switch. Compared with
htt
routers, L3 switches are endowed with all the functions that L2
switches possess, including MAC-address based frame
s :
forwarding, STP and VLAN. However, L3 switches also have the
c e
L3 functions that L2 switches are not given, which enables them
r
to realize the L3 internetworking for VLANs.
u
s o
Most of the lower or middle-end L3 switches realize L3
Re
forwarding through L3 exact match, which means to search the
cache according to the destination IP address of data frames
n g
directly. While, traditional routers use the longest matching
n i
method, that is to search the routing table for the destination IP
a r address and forward data with the longest matching address in
Page418
24
Finally, L3 switches have evolved from L2 switches and they are
always thought to be designed for LANs. So L3 switches do not
support many interface types except the interfaces relevant to
VLANs such as Ethernet interface, ATM VLAN virtual interface,
which avoids problems that have bothered routers with multi-type
interfaces. Since every interface of a L3 switch is an Ethernet
interface, collisions are avoided and the odds of segmentation is
e n
lowered. But for the efficiency of up-link, many L3 switches are
m/
equipped with high-speed POS interfaces.
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page419
25
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
IP Network Rules:
tp
1. Communication with the sametsegment.
h the destination host, it judges
When a host communicates
s :in the same segment with its own IP
with
whether the destination is
c e If they are in the same segment, the
r MAC address of the destination through
address and subnet mask.
host searches foruthe
ARP and fill thes oMAC address in the frame header.
Re across segments.
2. Communications
Page420
26
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
This chapter involves the following contents:
t Ethernet?
1. How to communicate over shared t
h realize multi-point
CSMA/CD is an effective way
s : medium. The station listens to the
to
e so to avoid collisions. The frame sent
communications over a shared
c
by a station can beu rreceived by multiple stations. The station
link before it sends frames,
s
monitors the link owhile it sends frames and it stops sending
frames as R e as it detects a collision and waits for a random
soon
g frame again.
time interval before trying to
n
send
n i the
ar
2. What is the principle operation of a L2 switch
Le The L2 switch works at the data-link layer and has two basic
Page421
27
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page422
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page423
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page424
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page425
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Auto-negotiation was developed to help devices supporting
htt
10Mbps Ethernet be compatible with the 100Mbps Fast Ethernet.
The auto-negotiation technology takes the operational modes of
s :
the local device, and receives the operational modes from the
c e
link partner and determines the highest common shared
r
operational mode that can be supported.
u
s o
Auto-negotiation works on the revised 10Base-T standard and is
Re
achieved depending on the design of physical layer chips. It does
not use any specific datagram or cost any upper layer protocols.
n g
The basic mechanism of auto-negotiation is to encapsulate
n i
negotiation information into a series of revised link conformity
a r test pulses of the 10BASET linking test wave (Fast Link Pulse).
Page426
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
When both the negotiation parties support more than one
htt
operational mode, there should be a precedence order to decide
the final operational model. The table above lists the precedence
s :
of operational modes from high to low defined by IEEE 802.3.
c e
The basic principle is the 100Mbps mode has a higher
r
precedence than the 10Mbps and full duplex is better than half
u
o
duplex. 1000BASE-T4 is listed before 100BASE-TX because
s
Re
100BASE-T4 supports more cable types. Ethernet over fiber
does not support auto-negotiation. You need to configure the
g
operation mode for the two link parties manually, which includes
n
i
the rate, duplex mode and traffic control. If the two parties are
n
a rconfigured differently, they cannot communicate with each other.
Page427
e n
m/
c o
i .
w e
hua
.
ing
n
e ar
l
// :
Configuration Example
tp
t
hfull
To set the duplex mode to full duplex:
:
[Quidway-Ethernet0/1] duplex
s
Restore the duplex mode
c e its default value:
to
u r undo duplex
[Quidway-Ethernet0/1]
s o
Re
n g
n i
ar
Le
r e
Mo
Page428
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
You can configure the speed of Ethernet port with the following
htt
commands. If the port speed is configured to be decided by the
auto-configuration mechanism, the two parties will negotiate to
s :
decide the port speed together. You can also configure the port
e
speed manually by running the speed command.
c
u r
By default, the port speed is in the auto state (decided by auto-
s
negotiation). o
ReExample
Configuration
Set thegport speed of Ethernet to 100Mbps:
i n
n
[Quidway-Ethernet0/1] speed 100
ar
Le
r e
Mo
Page429
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page430
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Network congestion occurs when data are transmitted between
htt
two ports with different speed rates (for example, when a
100Mbps port sends data to a 10Mbps port.) or a link or node is
s :
carrying so much data that its quality of service deteriorates.
c e
Typical effects include queuing delay, packet loss or more
r
retransmissions which wastes network resources dramatically.
u
s o
In real networks, especially for LANs, network congestion seldom
Re
occurs. So no switch manufacturers produce switches with flow
control functions. High-capability switches should support
n g
backpressure in the half duplex mode and flow control in the full
n i
duplex mode defined by IEEE802.3x.
a r
Le
r e
Mo
Page431
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Bridged or half-duplex Ethernet uses a method called
htt
backpressure to manage transmission between stations with
different speeds. For example, when a 100Mbps server sends
s :
data to a 10Mbps client PC through the switch, the switch will try
c e
its best to cache frames until its cache is nearly full, at which
r
time it must ask the server to stop sending more data.
u
s o
To achieve this the switch can generate a collision event with the
Re
server to make the server retreat, or alternatively the switch can
apply a carrier test to keep the server port busy. The two
n g
approaches can both cause the server to stop sending data for a
n i
while which gives time for the switch to process the data in its
a r cache.
Le
r e
Mo
Page432
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In the full duplex environment, the link between the server and
htt
the switch is a collision-free channel and the backpressure
technology cannot be applied to it. So the server continues to
s :
send packets to the switch until the frame cache of the switch
c e
overflows. To solve the problem, IEEE made a compound full
r
duplex flow control standard, namely, IEEE 802.3x.
u
s o
IEEE 802.3x defines the format of a 64-byte MAC control frame
Re
named PAUSE. When congestion occurs at the port, the switch
sends PAUSE to the source to tell it to stop sending information
n g
for a while.
n i
a r
Le
r e
Mo
Page433
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
PAUSE is applied to prevent frames from being dropped when
htt
an instantaneous influx of traffic causes an overflow to the cache.
The PAUSE frame can help the device prevent loss of frames
s :
when the traffic surpasses the cache limit. The device sends a
c e
PAUSE frame to its peer to prevent its cache overflow by
r
requesting the peer device stop sending data after it receives the
u
o
PAUSE frame. In this way, the device wins time to relieve the
s
Re
congestion/buildup in its cache.
n g
n i
a r
Le
r e
Mo
Page434
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
Configuration Example p
tport
h t
Enable the flow control of Ethernet
:
[Quidway-Ethernet0/1]flow-control
s
e of Ethernet port:
Shut down the flow control
c
u r
[Quidway-Ethernet0/1]undo flow-control
Page435
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page436
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page437
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
Advantages of Port Aggregation p
1. Increase bandwidth
htt
:
Port aggregation can bind multiple transmission ports together to
s
e
make one logical link to increase transmission bandwidth and
c
u r
speed. The bandwidth after aggregation is the total sum of the
bandwidth of each aggregated port. With a switch that supports
s o
this function, you can increase the network bandwidth easily
Re
when too much traffic on one port impairs network capability. For
g
example, you can bind two to four 100Mbps ports together to
n
n i
make a 200-400Mbps link to increase the bandwidth and speed.
Port aggregation can be applied to 10Mbps, 100Mbps and
a r 1000Mbps Ethernet.
Le 2. Improve reliability
r e Backbone networks run at a very fast speed and once the link
Mo fails, large amount of data will be lost. The connection of high-
speed server and backbone network should be absolutely
guaranteed. With port aggregation function, you can prevent
such a disaster. For example, if a cable is pulled out by mistake,
the link will not be affected. So for an aggregated port consists of
multiple ports, the failure of one port will not affect the whole
Page438
connection. Data will be loaded on other working connections
automatically. You only need to change the visiting address and
the whole process is completed in no time. This function makes
network to run continuously.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page439
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The parameters of the two peers of aggregation ports must be
s :
Physical parameters include: Number of the aggregation ports,
c e
Speed of the aggregation ports, Duplex mode of the aggregation
ports.
u r
s o
Logical parameters include: Spanning Tree Protocol (STP),
Re
Quality of Service (QoS), VLAN, Port.
g
STP configuration includes: enable/disable the STP function at
n
n i
the port, port link type (point-to-point or not point-to-point), STP
a r preference level, route cost, speed limit for sending packets, loop
Le
protection, root protection and edge port.
QoS configuration includes: flow speed control, preference mark,
re the default preference level of 802.1p, bandwidth guarantee,
Mo congestion prevention, flow redirection and flow statistics.
VLAN configuration includes: VLANs that are allowed to pass the
port and default VLAN ID.
Port configuration includes port link types such as Trunk, Hybrid
and Access.
Page440
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//:
Configuration Procedure:
tp
(1)Configure the IP address of
h tthe interface
Create the layer-3 addresses
s : 10.1.1.1/30 and 10.1.1.2/30 of
VLAN1 on SW1 and
SW2 respectively. rc
e
(2)Configure o
u
attributes of the aggregated ports
es port aggregation, you should make sure that
R
Before configuring
g at the same speed rate instead of the auto-negotiation
all the aggregated ports of Sw1 and Sw2 work in the full duplex
modenand
n i
mode.
ar(3)Configure port aggregation
Le Result Testing:
r e <Sw1>display link-aggregation
Mo Master port: Ethernet0/1
Other sub-ports:
Ethernet0/2
Mode: both
Page441
The configuration commands may be different for some
switches, please refer to product operation manuals for relevant
information.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page442
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page443
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Port mirroring is applied to traffic observation and fault location
htt
by making a copy of service data and sending them to the
monitor device to be analyzed. Port mirroring has two types:
s :
port-based mirroring and flow-based mirroring.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page444
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page445
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Flow-based mirroring is only applied to flows that meets certain
htt
defined classifications, which may include the same destination
address, the same port number and so on. The classifications
can be set as required.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page446
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Case:PC1 connects to interface E0/1 of SW, though this
E0/24. htt
interface you can analyse the data which enters into interface
Configuration: s :
ce
r
1.Configure interface E0/1 of SW as observe-port
[SW]observe-portu
o 1 interface Ethernet 0/1
s E0/24 of SW as mirroring port, and
2.Configure einterface
transferringRdata to observe-port.
n g
[SW-Ethernet0/24] port-mirroring to observe-port 1 inbound
n i
a r
Le
r e
Mo
Page447
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
This chapter involves the following contents:
1. What is auto-negotiation?
h tt
:
Auto-negotiation aims to resolve rate inconsistencies between
s
e
Ethernet devices. This includes negotiation of the port speed and
c
duplex mode.
u r
traffic control?s
o
2. What are the differences between half-duplex and full-duplex
e
Half-duplexRtraffic control uses the backpressure method. When
n
network gcongestion occurs, the switch will apply the carrier
n i mechanism or emulate a collision. In the full-duplex mode,
detect
arnamed802.3x
IEEE defines the format of a 64-byte MAC control frame
Page449
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page450
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page451
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page452
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The traditional Ethernet switch adopts source address learning
htt
mode when it forwards data. It can automatically learn the MAC
address of host connecting to each port to, form the forwarding
s :
table, and then forward Ethernet frames according to the table.
e
The whole forwarding process is completed automatically, all the
c
r
ports can communicate with each other, and maintenance
u
o
personnel can not control the forwarding between any two ports.
s
Re
For example, they can not implement prevention to restrict host
B from reaching host A. The following disadvantages exist in this
g
kind of network:
n
n i Security is bad. All the ports can communicate with
• Network
reach other, which increases the possibility that users will attack
a the network.
L e
re
• Network efficiency is low. Users may receive abundant
unnecessary frames, which is a waste of bandwidth and host
Mo CPU resources, e.g. unnecessary broadcast packets.
• Service expanded capability is bad. The network cannot
implement differentiated services, for example, it can not forward
an Ethernet frame used for network management with higher
priority.
Page453
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
VLAN technology divides users into multiple logical networks
htt
(groups). Communication is allowed within a group, but it is
prohibited among groups. Layer-2 unicast packet, layer-2
s :
multicast packet and layer-2 broadcast packets can only be
e
forwarded within a group. It is easy to add and delete group
c
r
members using VLAN technology.
u
s o
VLAN technology provides a management method to control the
Re
intercommunication among terminals regardless of physical
location in the LAN. In the figure above, PCs in group 1 and
n g
group 2 can not communicate with each other.
n i
a r
Le
r e
Mo
Page454
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In order to control forwarding, the switch will add a VLAN tag to
htt
an Ethernet frame before forwarding it, then use this tag to
manage the frame, which may include discarding the frame,
s :
forwarding the frame, and adding & removing tags. Before
e
forwarding the frame, the switch will check the VLAN tag of the
c
r
packet and decide whether the tag is allowed to be forwarded
u
o
from the port. In the figure above, if the switch adds tag 5 to all
s
Re
the frames sent from A, and then look up the layer-2 forwarding
table, and according to the destination MAC address, forward
g
them to the port connected to B. However this port is configured
n
i
to only allow VLAN 1 to pass, so the frames sent by A will be
n
a rdiscarded.
Page455
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
4-byte VLAN tag is added to the Ethernet frame header directly.
htt
Document IEEE802.1Q describes VLAN tagging.
•TPID:Tag Protocol Identifier,2 bytes,fixed value,0x8100,
s :
new type defined by IEEE, it indicates that it is a frame with
802.1Q tag.
c e
r
•TCI:Tag Control Information,2 bytes.
u
o
• Priority:3 bits, defines the priority of an Ethernet frame. It has
s
Re
8 priority levels, 0-7, is used to provide differentiated forwarding
service.
n g
• CFI:Canonical Format Indicator,1 bit. Used to indicate bit
n i
order of address information in token ring or source route FDDI
Le
high bit.
• VLAN Identifier:VLAN ID,12 bits, from 0 to 4095. Combined
r e with VLAN configuration of port, it can control the forwarding of
Mo an Ethernet frame.
Ethernet frame has two formats: the frame without tag is called
an untagged frame; the frame with tagging is called a tagged
frame.
This course will only discuss the VLAN ID of VLAN tag.
Page456
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
All the Ethernet frames exist in the switch in the form of tagged
htt
frames. Certain ports may receive untagged frames from peer
devices, but the frame from the port of the local switch must be a
s :
tagged frame. If the frame received is tagged, it will be forwarded;
e
if it is untagged, a tag will be added to it. The device can
c
r
implement a VLAN in the following way.
u
s o
• Port based: Network manager configures a PVID for every port
Re
of a switch, known as the Port VLAN ID or port default VLAN. If
an untagged frame is received, the VLAN ID will be the PVID.
n g
n i
• MAC based: Network manger configures the mapping relation
for each MAC address to a VLAN ID, if an untagged frame is
a rreceived, the VLAN ID will be added according to the mapping
Le relationship table.
Page458
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page459
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The tag in Ethernet frames combined with VLAN configuration of
htt
the port can control packet forwarding. A received Ethernet frame
on port A will check whether the destination MAC is attached to
s :
port B. After the introduction of VLAN tagging, two key points will
e
decide whether the frame should be forwarded from port B:
c
u r
• Whether the VLAN ID in the frame is created by switch. There
s o
are two methods to create VLANs: Manual configuration or
Re
automatically created using GVRP.
g
• Whether the destination port will allow the VLAN frames to pass.
n
n i
VLAN lists determine whether to allow frames to pass through a
port and can be created by the administrator or automatically
a r created by GVRP (GARP VLAN Registration Protocol).
Le In the forwarding process, there are two types of tag operation:
Page460
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After introducing VLAN functionality, switch ports may be one of
tt
three types: Access port, Trunk port and Hybrid port.
h
An access port is used to connect host and has features as
follows: s :
c e
u r
• Only permit allowed VLAN IDs to pass through the port, or the
VLAN ID is the same with PVID of the port.
s o
Re
• If the frame received from peer device is untagged, the switch
will add a PVID to the frame automatically.
n g
• The frame sent by an access port is always an untagged frame.
•n i default port type of many types of switch is access,PVID
The
ris 1 by default,VLAN 1 is created by the system and cannot be
a deleted.
L e
r e
Mo
Page461
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
The following command can be used to set ports as access ports
VLAN: htt
and implement the PVID of the access port after creating the
[SWA]vlan 3 s :
c e
r
[SWA-vlan3]port ethernet 0/1
u
[SWA]vlan 5
s o
Re
[SWA-vlan5]port ethernet 0/2
n g
The port mode should be specified as either access or trunk
when making any change to the PVID.
n i
a r
Le
r e
Mo
Page462
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Trunk port: used to connect switches and transmit tagged frames
htt
among switches. It can be set to permit multiple VLAN IDs, even
those VLAN ID’s that may differ from its own.
s :
A trunk port will send tagged frames to other devices, using the
following rule base:c e
u r
If the VLAN ID of the tagged frame does not exist in the VLAN
s o
permitted list, it will be discarded;
ReID of the tagged frame is the same as the
• If the VLAN
n g
PVID ,also exist in the VLAN permitted list, the frame will be
n i however
forwarded after removing the tag. The PVID of each port is
runique, in this case, the frame will be untagged when
a sent by the trunk port.
Le • If the VLAN ID of the tagged frame is different from PVID, the
r e frame will be forwarded to the peer device without modification.
Mo VLAN forwarding will generally query the tagging information of
the VLAN frame for forwarding, and compare the frame to the
VLAN permit list to look for a match. If a VLAN which is
registered by GVRP however, it must also register on the port,
otherwise the VLAN ID will not exist in the VLAN permit list, and
the corresponding VLAN frame cannot be forwarded from the
port.
Page463
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page464
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As an access port, a packet is sent to another device in the form
htt
of an untagged frame, as a trunk port it can send out untagged
frame only in when the trunk VLAN ID is the same as the frame
s :
VLANID. In other cases, it sends frames as tagged. Hybrid
e
VLANs can be used to effectively control the VLAN tagging
c
r
process. For example, a device connected to the switch cannot
u
o
support VLANs, but the ports still can be used to isolated the
s
Recan flexibly control the VLAN tag. In this example, if
devices.
Hybrid ports
n g ID of frame is 3, then forward it according to the
the VLAN
n i mode of trunk port. If it is 4, remove tag 4 and then
forwarding
arforward it.
Le
r e
Mo
Page465
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
If a Hybrid port is only configured to allow untagged VLAN
tt
forwarding, the port will take on the same role as an access port.
h
If a port is configured to support only tagged VLANs, it will have
s :
the same function as a trunk port.
c e
u r
If a switch port is configured with a PVID that is both tagged and
supports untagged VLANS for example VLAN2 on Ethernet0/1, it
s o
is capable of communicating with other hybrid ports that support
Re
the same untagged VLANS, as opposed to ports such as 0/3,
g
which only supports VLAN3. The configuration above thus shows
n
n i
how it is possible to implement isolation between port 0/1 and
port 0/3, but still allow both to communicate with the host
a r connected to port 0/24.
Le
r e
Mo
Page466
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
To configure access and trunk ports on SWA and SWB, it is
htt
necessary to create VLAN 2 on SWB, and allow VLAN 2 to
traverse the two ports of SWB, to allow PC1 and PC2 to
s :
communicate with each other. SWB will not connect to any users,
e
it is a transitional switch; in large-scale networks, there may be
c
r
many transitional switches for which the configuration and
u
o
management is difficult. The manager only cares about the user
s
Re
intercommunication control, for example, after new user joins the
network, the manager should configure the access port which
g
connects the new user and make the port as part of a certain
n
i
VLAN group.
n
a r
If the transition switch can automatically implement
Page467
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The command “gvrp” is used to enable GVRP on a switch. The
htt
command “undo gvrp” can be used to disable it. The GVRP
protocol is disabled by default. In the system view, the command
s :
“GVRP” is used to enable or disable GVRP for all ports, whereas
e
the command “GVRP” will enable or disable GVRP on a
c
r
particular port when used at the interface as shown in the
u
example.
s o
Note:
Re
g
• Before enabling port based GVRP, GVRP must be enabled at
n
n i
the system view first. If GVRP is in disabled status at the system
level, GVRP will also disabled on all ports, and the user will not
a r able to change the status of the port based GVRP.
Le • GVRP should be enabled and disabled on the trunk port. After
Page468
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
1. How many port types does a Huawei switch support?
t three port types, they are
h
Answer: A Huawei switch can supportt
access, trunk and hybrid port types.
s :when sent from a trunk port to peer
2. Must a frame be tagged
c e
devices?
u ra frame is tagged, but if the VLAN ID is the
o of the trunk, the tag will be removed and
Answer: In general,
s
forwarded R
e
same as the PVID
in the form of an untagged frame.
n g
n i
ar
Le
r e
Mo
Page469
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page470
1
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page471
2
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page472
3
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page473
4
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
VLANs create and isolate layer-2 broadcasts domains, therefore
htt
isolating the traffic of different VLANs. This results in users being
unable to sustain communication when associated with different
VLANs.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page474
5
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Flows between different VLANs cannot directly cross VLAN
htt
boundaries, and so the ability to route traffic is needed to allow
the forwarding of packets from one VLAN to another.
s :
Hosts of different VLANS are assigned as entities of different
c e
networks. When a default gateway been configured on a host
u r
local for a given VLAN, any communication destined for hosts
s o
that are not associated with the same VLAN will automatically
Re
forward traffic to the default gateway which shall in turn route
traffic between VLANS.
n g
n i
a r
Le
r e
Mo
Page475
6
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
One of the methods to solve VLAN intercommunication is to
htt
assign a separate physical interface for each VLAN. The traffic
from different VLANs can be forwarded between these physical
s :
interfaces and routed. This method will enable
c e
intercommunication between VLANs, however as the number of
r
VLANs increase, so does the number of router interfaces needed.
u
o
Such solutions would result in higher costs and a poor network
s
Re
design. Some VLANs do not have a need to forward traffic to
other VLANs frequently which leads to further waste, therefore
n g
this method is not generally suited to solving the problem of
n i
VLAN intercommunication.
a r
Le
r e
Mo
Page476
7
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
To resolve the physical interface limitation problem, a method of
htt
trunking is implemented using only a single physical interface on
the router and a single port on the switch. One single Ethernet
s :
interface on the router can support all VLAN gateways and bear
e
all VLAN traffic through the creation of sub-interfaces.
c
u r
As shown above, only a single physical router Ethernet interface
s o
is being used, but is supporting three sub-interfaces as default
Re
gateways for each of the three VLANs. Each frame will contain a
VLAN tag used to identify which VLAN it belongs to. When users
n g
in VLAN100 need to communicate with users in another VLAN,
n i
the user only needs to forward the frame to the default gateway,
a rthe default gateway will modify the VLAN tag of the data frame
r e
Mo
Page477
8
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The third option for VLAN routing is through the use of a layer-3
htt
switch. A layer-3 switch effectively integrates the functionality of a
layer-2 switch and a layer-3 routing, therefore combines the
s :
advantages of advantages of both. The limitation lies mainly in
c e
the cost of such devices due to its extended functionality.
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page478
9
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Huawei supports layer-3 switching through the means of switch
htt
and route processing units, or SRU, and may support multiple
SRU boards for redundancy. All the routable packets are sent by
s :
the forwarding engine to the SRU board for processing. The SRU
e
board also broadcasts and filters packets and executes routing
c
r
policies. The SRU will support VLAN switching, default VLANs as
u
o
well as other more advanced VLAN technologies including Q-in-
s
Re
Q and dynamic VLAN allocation based on MAC addressing. The
example above reflects how a layer-3 switch can be used
g
associate VLAN gateways directly with VLAN interfaces within a
n
i
single device.
n
a r
Le
r e
Mo
Page479
10
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page480
11
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In this example two VLANs are present, VLAN100 and VLAN200.
htt
A host in VLAN100 wishes to forward traffic to a host in
VLAN200. Each VLAN is part of a separate broadcast domain
s :
and therefore as different network. Each host has been assigned
e
a network host address respective to the VLAN it belongs to, and
c
r
the gateway address for the network. The forwarding of traffic
u
o
requires VLAN trunking to support multiple VLANs over a single
s
Re
physical link and sub interface configuration for the layer 3 router.
How is this achieved?
n g
n i
a r
Le
r e
Mo
Page481
12
e n
m/
c o
i .
w e
hua
.
ing
n
e ar
l
://
//create VLAN100 p
[SWA]vlan 100
htt
:
//configure ethernet 0/1 belonging to VLAN100
s
e
[SWA-vlan100]port ethernet 0/1
c
//create VLAN200
u r
s
[SWA]vlan 200 o
e 0/2 belonging to VLAN200
//configureRethernet
n g
[SWA-vlan200]port ethernet 0/2
Page482
13
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Using the control-vid command, you can specify the mappings
htt
between the control VLAN and the Ethernet sub-interface to
differentiate termination sub-interfaces of the same main
s :
interface. Using the undo control-vid command, you can
c e
remove the mappings between the control VLAN and Ethernet
r
sub-interfaces. By default, no mapping between a control VLAN
u
o
and an Ethernet sub-interface is specified. The dot1q-
s
Re
termination indicates that the encapsulation mode of a sub-
interface is dot1q. This mode applies to single-tagged packets
g
(as opposed to dual tagged packets used in Q-in-Q
n
i
configuration).
n
a r
Using the arp broadcast enable command, you can enable the
Page483
14
e n
m/
c o
i .
w e
h ua
.
i ng
n
ear
l
://
p
Connectivity between the hosts of different VLANs can be
htt
verified through means such as the ping command. If the host
192.168.10.10 in VLAN100 can ping host 192.168.20.20 in VLAN
s :
200, it indicates that the configuration is correct.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page484
15
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
On the layer-3 switch (SWA) port 1 and port 2 represent a local
htt
network that has been logically segmented through the
implementation of VLANs. The hosts via port 1 have been
s :
assigned to VLAN 100 and hosts via port 2 to VLAN 200. The
e
hosts of VLAN 100 and VLAN 200 are able to support the
c
r
forwarding of traffic between VLANs 100 & 200 through SWA.
u
o
The example demonstrates how a single host from each VLAN
s
Re
would be configured to support this forwarding of traffic.
n g
n i
a r
Le
r e
Mo
Page485
16
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
When a layer-3 switch needs to communicate with devices at the
htt
network layer, a logical interface can be created, namely, a
VLANIF interface. A VLANIF interface is a network layer interface
s :
and can be configured with an IP address. The layer-3 switch
e
then uses the VLANIF interface to communicate with devices at
c
r
the network layer. The IP address that is assigned to each
u
o
VLANIF is recognised as the gateway address by the respective
s
Re
VLAN hosts. The command “interface vlanif <vlan-id>”
specifies the ID of the VLAN that a VLANIF interface belongs to.
g
The value of the vlan-id is an integer that ranges from 1 to 4094.
n
n i
a r
Le
r e
Mo
Page486
17
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In the same way that is was possible to verify VLAN routing
htt
using a layer-3 router, it is also possible to verify connectivity
between hosts of different VLANs supported by a layer-3 switch.
s :
If host 192.168.10.10 in VLAN100 is able to successfully ping
e
host 192.168.20.20 in VLAN 200, it indicates that the
c
r
configuration is correct.
u
s o
Re
n g
n i
a r
Le
r e
Mo
Page487
18
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
1.What is the purpose of VLAN routing?
t
Answer: The main advantage of t
h VLANs is to isolate broadcast
domains, but it is often the case that traffic must flow between
these broadcast domains.sVLAN : routing is used to resolve this
e
problem by facilitatingccommunication between broadcast
domains.
u r
2.What methods s ocan be used to implement VLAN routing?
Re layer-2 switches are only able to support
Answer: Ordinary
n g
communication within a single VLAN (broadcast) domain. The
flowiof VLAN traffic between broadcast domains is achievable
r n the configuration of VLAN routing on reachable layer-3
through
a device. It is therefore possible to achieve VLAN routing through
Le the following methods. Communication through a router
Page488
19
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page489
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page490
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page491
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page492
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A switch forwards data frames based on the MAC address table.
htt
The MAC address table specifies the mapping between
destination MAC addresses and destination ports.
s :
1: Assume that PCA sends a data frame to PCB. The destination
c e
MAC address of this data frame is set to the MAC address of
u r
PCB, namely, 00-0D-56-BF-88-20.
s o
When SWA receives this frame, it searches the MAC address
Re
table. According to the entries in the MAC address table, SWA
g
forwards the data frame through port E0/3.
n
i
The switch does not make any modification to the data frame
n
a rbefore forwarding it. If the switch receives a broadcast frame or a
Le
frame whose MAC address wasn't included in the MAC address
table, it forwards the frame to all ports.
r e 2: When SWB searches the MAC address table, it will use the
Mo information stored to make forwarding decisions. In the example,
SWB forwards a frame through port E0/6. No modification is
made to the data frame.
3: When PCB receives the frame, it will search through the MAC
address table to find that the destination MAC address is it’s own
MAC address. PCB will then process this data frame and send
the de-encapsulated data to the upper layer protocol.
Page493
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
If a switch receives a broadcast data frame from a port, the
htt
switch forwards the data frame to all other ports. In addition,
does not make any modification to the data frame before
s :
forwarding it. Therefore, if a loop exists in the network, the
c e
broadcast frames are forwarded in the network infinitely, thus
r
causing the broadcast storm.
u
s o
Re
n g
n i
a r
Le
r e
Mo
Page494
e n
m/
c o
i .
w e
h ua
.
i ng
n
ear
l
: //
p
A switch forwards data frames based on the MAC address table,
htt
but the MAC address table is empty when the switch is started.
Therefore, the switch needs to learn the MAC address table.
s :
A switch learns the MAC address table based on the mapping
c e
between the source address of the received data frame and the
receiving port.
u r
s o
1: Assume that PCA sends a data frame to PCB. The destination
Re
address of the frame is the MAC address of PCB, namely, 00-
g
0D-56-BF-88-20. The source address is the MAC address of
n
n i
PCA, namely 00-0D-56-BF-88-10. When SWA receives the data
frame, it checks the source address of the frame and adds
a rmapping between the source address and receiving port to the
Le MAC address table. Thus, the mapping between the destination
r e address and
Page495
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
A switch generates a MAC address entry according to the source
tt
address and receiving port of the received data frame.
h
PCA sends a data frame. Assume that the destination MAC
s :
address of the data frame does not exist in any MAC address
c e
table of the switches in the network. When SWA receives this
u r
data frame, it generates a MAC address entry, in which the MAC
s o
address 00-0D-56-BF-88-10 maps port E0/2.
Because theR eMAC address table of SWA does not contain any
g
entry with this destination MAC address, SWA forwards the data
framento E0/3 and E0/4.
n iMAC address table of SWB also does not contain any entry
arwith this destination MAC address. So, after SWB receives the
The
Page496
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page497
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The main function of STP (Spanning Tree Protocol) is to avoid
tt
switching loops where redundant links are present in the network.
h
As the figure of this slide shows, a ring is composed of SWA,
s :
SWB and SWC, which may cause problems such as broadcast
c e
storms. After the spanning tree protocol is enabled, calculations
u r
cause the network to converge resulting in the interfaces
s o
performing various operational roles including the blocking of one
Re
or more ports in order to remove the possibility of any loop
occurred. In this example, it is assumed that port E0/2 of SWB is
n g
blocked to remove the loop.
n i
a r
Le
r e
Mo
Page498
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After the port E0/2 of SWB is blocked, there is no loop in the
network.
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page499
e n
m/
c o
i .
w e
h ua
.
ing
n
ear
l
: //
p
Another feature of STP is link backup:
tactive path, the blocked
If some problems occur along the
h t
interface could be made active, so as to resume the connectivity
of the network through thes :redundant link. Thus the loop between
c
switches is usually usedefor redundancy. STP remove the logical
loop in the network r
u through blocking of port(s), but the physical
Page500
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
The basic idea of STP is quite simple. If the network could
htt
develop like a tree, the loop will be prevented. Thus, STP defines
some concepts, including Root Bridge, Root Port, Designated
s :
Port, Path Cost, etc. The purpose is to cut out redundant loop
e
through constructing a tree, and implementing link backup and
c
r
path optimization at the same time. The algorithm used to
u
o
construct the tree is the spanning tree algorithm.
s
Re
In order to calculate the spanning tree, relative information and
parameters need to be exchanged between switches. These
n g
information and parameters are encapsulated in the BPDU
i
n following tasks are done through the exchange of BPDU
(Bridge Protocol Data Unit), and transmitted between switches.
a r
The
Le between bridges:
Mo 2. Calculate the shortest path from the current bridge to the root
bridge;
3. For every shared network segment, select the bridge nearest
to the root bridge as the designated bridge, responsible for the
data forwarding of this network segment;
4. For every bridge, select a root port.
5. Select the designated port besides the root port.
Page501
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
To calculate the spanning tree, switches need to exchange
s :
Configuration Bridge Protocol Data Unit (BPDU) and transmitted
between switches. c e
u r
In a broad sense, a BPDU refers to a data unit used to exchange
s o
information between switches. The configuration BPDU is one
Re
type of the BPDU.
g
Calculation of the spanning tree starts from election of the root
n
i
bridge. The root bridge is elected based on the bridge identifier.
rAn
bridge identifier consists of a 2-byte bridge priority and a 6-byte
a MAC
Le address. The bridge priority is configurable. The value
ranges from 0 to 65535 and the default value is 32768.
r e In the network, the switch with the smallest identifier becomes
Mo the root bridge. The system first compares the priority. If the
switches have the same priority, the system compares their MAC
addresses. The switch with the smallest MAC address is elected
first.
In this example, the three switches have the same priority. SWA
has the smallest MAC address, so SWA is elected as the root
bridge.
Page502
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
STP elects a root port for each non-root bridge. Each port of a
htt
switch has a port cost parameter. The port cost refers the cost
for sending the data from this port, namely the cost of the
s :
outgoing port. STP considers that no cost is needed for receiving
e
the data on a port. The port cost depends on the bandwidth of
c
r
the port. The higher the bandwidth is, the smaller the port cost
u
o
will be. On the VRP, the cost of a 100M port with half duplex is
s
Re may exist between a non-root bridge and a root
200, the cost of a 100M port with full duplex is 199.
Multiple paths
n
bridge. gThe cost of a path is the total cost of all outgoing ports on
thisipath.
r nroot port is a local port on the path with the least cost from a
a A
Le non-root bridge to the root bridge. The cost of this path is
r e referred to as the root path cost. If multiple root ports exist, the
system compares the identifiers of the upstream switches.
Mo The port whose upstream switch has the smallest identifier is
elected. If the upstream switches have the same bri dge identifier,
the system compares the identifier of the upstream ports. The
port whose upstream port has the smallest identifier is elected.
The port identifier consists of a 1-byte port priority and a 1-byte
port number.
Page503
The port priority is configurable. The default value is 128.
In this example, we assume that all ports are 100 M ports and
their cost values are all 200.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page504
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
STP elects the designated port for each network segment. The
h tt
designated port forwards the data transmitted between the root
bridge and this network segment. The switch where the
s :
designated port is located is called the designated switch.
c e port and designated bridge for a
When electing the designated
network segment, STP
u r compares the root path cost of the switch
s
on which the porto is connected to this network segment. If the
switches have
R e the same root path cost, STP compares their
bridge identifiers. The port on the switch with the smallest
n g has the highest priority. If their identifiers are also the
identifier
n i STP compares the identifiers of the ports connected to the
same,
arnetwork segment. The port with the smallest identifier has the
Le highest priority.
re
On the root bridge, all ports are the designated ports of the
connected network segments. Therefore, the designated ports of
Mo LANA and LANB are both on SWA.
LAND and LANE are both connected to the port of only one
switch, and the connected ports are designated port for LAND
and LANE respectively.
LANC is connected to the ports of two switches and the two
switches have the same root path cost. Therefore, the identifiers
Page505
of the switches are compared. SWB has a smaller identifier
(because its MAC address is smaller), so the designated port for
LANC is on SWB.
The port that is neither the root port nor the designated port is
called the alternate port. The alternate port does not forward data
and is in Blocking state.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page506
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
STP defines three roles for the STP-enabled port that works
htt
normally on the physical layer and data link layer. The root port
and designated port are in Forwarding state. The port that is not
s :
enabled is called the Disabled port.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page507
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After enabled, a port switches to Listening state and begins to
htt
calculate the spanning tree. After the calculation, if the port is set
to the alternate port, the port state changes to Blocking. If the
s :
port is set to the root port or designated port, the port state
c e
switches from Listening to Learning after a period of forward
r
delay. After another period of forward delay, the port state
u
o
switches from Learning to Forwarding, and the port can forward
s
Re
data frames.
n g
n i
a r
Le
r e
Mo
Page508
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After enabled, a port switches to Listening state and begins to
htt
calculate the spanning tree. After the calculation, if the port is set
to the alternate port, the port state changes
s :
to Blocking. If the port is set to the root port or designated port,
c e
the port state switches from Listening to Learning after a period
u r
of forward delay. After another period of forward delay, the port
s o
state switches from Learning to Forwarding, and the port can
Re
forward data frames.
g
1:The port is elected as the designated port or root port.
n
i
2: The port is elected as the alternate port.
n
r3: The port waits a period of the forward delay. By default, the
a forward delay is 15 seconds.
Le
re
When a port is disabled, it switches to Disabled state. Before
switching from non-Forwarding state to Forwarding sate, a port
Mo needs to wait two times as along as the forward delay . Thus, the
potential risk of temporary loop is avoided.
Page509
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page510
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
This figure shows the physical topology. The priority of SWA is
htt
4096; the priority of SWB is 8192; the priority of SWC is 32678.
Therefore, SWA becomes the root bridge and SWB becomes the
designated switch of LANC.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page511
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
stp { enable | disable } p
t or disable STP on a switch
h
The stp command is used to enable t
or on a port. By default, STP is enabled on the switch.
s :}
e is used to set the STP working mode
stp mode { stp | rstp | mstp
c
The stp mode command
u r the working mode of the switch is MSTP.
o will be described in later courses. This course
on a switch. By default,
s
ReSTP.
RTSP and MSTP
only describe
n g priority
stp priority
n i specifies the priority of a switch. The value ranges from 0
arto 61440, with the step of 4096. That is, 16 priority values are
priority:
Page512
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In the global information, the root bridge identifier is different
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page513
e n
m/
c o
i .
w e
h ua
.
ing
n
ear
l
://
p
The STP port information output indicates that:
The port state is Forwarding.
h tt
The port is the root port.
s :
e
The default port priority is 128.
c
u r
The identifier of the designated port of the network segment
o
connected to this port is 0.4c1f-cc45-aacc, which identifies
s
SWA.
Re
n g
n i
a r
Le
r e
Mo
Page514
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page515
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
When the port role and state changes, temporary loops may be
htt
formed. In this example, SWA is the root bridge initially. Among
all switches, only SWD has an alternate port E0/2 and the port is
s :
in a non-Forwarding state. Assume that the priority of SWC is
c e
changed so that SWC becomes the new root switch. In this case,
r
E0/2 of SWD will become the new root port and switch to a
u
o
Forwarding state. E0/1 of SWD will become the new designated
s
Re
port and switch to a Forwarding state. E0/2 of SWB should
become the new alternate port and switch to a non-forwarding
g
state. If E0/2 of SWD switches from a non-Forwarding state to a
n
n i
Forwarding state before E0/2 of SWB switches from a
Le
formed in the network. To avoid temporary loops, a port (for
example, E0/1 of SWC) must wait enough time before switching
Page516
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
In STP, for a port, the transition from a blocking state to a
htt
forwarding state will take the period at least two times the
Forward Delay, which is not suitable for many applications.
s :
RSTP (Rapid Spanning Tree Protocol) resolves this problem
e
through the following mechanism:
c
u r
1. Allocating two port roles, an Alternate Port and a Backup Port
s o
for root port and designated root, for fast state transition. When
Re
the root port is invalid, the Alternate Port will become the new
root port and switch to a forwarding state without delay; when the
n g
designated port is invalid, the Backup Port will become the new
i
nIn the point to point link only connecting two switch ports,
designated port and switch to a forwarding state without delay.
a r
2.
Le following a one way handshake to the downstream bridge, the
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page518
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
In STP all VLANs in a LAN will generally share the same
htt
spanning tree, therefore load balancing cannot be implemented
between VLANs. It is possible that packets of some VLANs
s :
cannot be forwarded. As this slide shows, both of SWB and SWC
e
connect with users of VLAN10 and VLAN20. The link between
c
r
SWB and SWA and that between SWA and SWC allow VLAN10
u
o
and VLAN20 to pass. Other links only allow VLAN10 to pass. If
s
Re
the port E0/20 is blocked, the VLAN20 users of SWB can only
use the link between SWB and SWC to communicate with SWC.
g
However, this link only allows VLAN10 to pass, thus a failure in
n
i
communication occurs.
n
a r
Le
r e
Mo
Page519
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
In order to solve the second problem, MSTP (Multiple Spanning
htt
Tree Protocol) is put forward. MSTP is a newer protocol defined
by IEEE under 802.1Q-2005 which introduces the concept of
s :
“Instances”. Simply speaking, STP/RSTP is port based, while
e
MSTP based on instances. An instance is a collection of multiple
c
r
VLANs under a single converged spanning tree. Through binding
u
o
multiple VLANs into a single instance, the communication cost
s
Re
and network resources could be saved. In MSTP, the topology
calculation of every instance is independent. Load balancing
g
could be implemented in these instances. In use, multiple VLANs
n
n i
with the same topology could be mapped to the same instance.
a r
Le
r e
Mo
Page520
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
How does STP converge to prevent switching loops in the
network?
htt
STP elects a root bridge, and then elects a root port for each
s :
non-root switch and elects a designated port for each network
c e
segment. The ports that are neither the root port nor the
u r
designated port are set to be in Blocking state.
s o
How does STP resolve the problem of temporary loops?
Re from a non-Forwarding state to a Forwarding
Before switching
state, agport needs to wait twice the forward delay period. This
i n that other switches have enough time to calculate the
ensures
r n tree.
spanning
a
Le
r e
Mo
Page521
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page522
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page523
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page524
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//:
In this example: p
tLAN, which is used as the
There is only one router RTA in the
h t
gateway by all the PCs, therefore there is no redundancy
provided. s :
c enetwork will be unable to reach external
r there is a single point failure within this
If RTA fail, all PCs in the
networks. In otheruwords,
kind of network, s oresulting in a high chance of isolation from
Re
external networks.
n g
n i
ar
Le
r e
Mo
Page525
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
VRRP is designed to provide a virtual router on a LAN.
In this case:
htt
:
There are two routers (RTA and RTB) on this LAN, RTA has
s
e
physical IP address 10.1.1.251/24; RTB has physical IP address
c
u r
10.1.1.252/24. RTA and RTB are configured to be associated
with the same Virtual Router. This Virtual Router has a virtual IP
s o
address 10.1.1.254. All the PCs on this LAN can use the virtual
Re
IP address 10.1.1.254 as the default gateway, regardless of the
g
physical IP addresses of the two routers. VRRP elects one router
n
n i
from the VRRP routers as the Master, and the Master processes
all the packets sent to the virtual IP address. If the Master is fails,
a r VRRP elects a new Master from other VRRP routers.
Le
r e
Mo
Page526
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A Virtual Router is identified by both Virtual Router ID and
htt
associated Virtual IP Address. Multiple Virtual Routers could be
configured on the same interface. A Virtual Router ID (VRID) is
s :
the identifier of a Virtual Router. Configurable item in the range 1-
c e
255 (decimal). The Virtual Router IDs configured on all the VRRP
r
routers of the same virtual group must be the same. A Virtual
u
o
Router can be associated with more than one Virtual IP
s
Re
Addresses. However, the Virtual IP Addresses configured for the
VRRP routers of the same Virtual Router should be the same. If
g
VRRP routers with the same VRIDs but different virtual IP
n
i
addresses; or reversely, with same IP address but different
n
a rVRIDs, in VRRP, they are regarded as different Virtual Routers.
Le
r e
Mo
Page527
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Master: The VRRP router that is assuming the responsibility of
htt
forwarding packets sent to the IP address(es) associated with
the virtual router, and answering ARP requests for these IP
addresses.
s :
Backup: The set of VRRP c e routers available to assume forwarding
u r router if the current Master fails.
responsibility for a virtual
o is based on the value of Priority. For the
The election ofsMaster
R e different Priority values could be assigned to
same interface,
g
different associated virtual routers.
n
n i
ar
Le
r e
Mo
Page528
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
Config Priority: The configured Priority, the default value is 100.
t the protocol is running;
h
Run Priority: The Priority used when t
usually it is the same as Config Priority.
s :of 0-255. The value 255 is reserved
e and the VRRP packet with Priority 0 is
The Priority is in the range
c
r
for the IP address owner,
used to trigger theuimmediate changeover from Backup to Master.
o
espriority of RTA is 100, which is lower than the
In this case: he
priority 200Rof RTB, RTB will be the Master while RTA is the
Backup.
n g
n i
ar
Le
r e
Mo
Page529
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
In this case:
t p
There is a VRRP router that hastthe virtual router's IP address(es)
h
as real interface address(es). Such a router is called the IP
Address Owner. s :
c e
u r
s o
Re
n g
n i
ar
Le
r e
Mo
Page530
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
No matter what the Config Priority is, the Run Priority of IP
htt
address owner is always 255. The IP address owner is always
the Master. Although the configured priority value of RTB is
s :
higher than that of RTA, the RTB is still the Backup, since its Run
c e
Priority is lower than that of RTA. Hence, when it comes to the
r
election of the Master, the contributing factor is the value of Run
u
o
Priority instead of Config Priority.
s
Re
n g
n i
a r
Le
r e
Mo
Page531
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
In this case: p
tRTA and RTB. A single Virtual
h t
There are two routers in this LAN,
Router is to be configured, with VRID 1 and Virtual IP Address
: is to be configured as 200, and
10.1.1.254. The Priority ofsRTB
e to make RTB the Master.
that of RTA as 100, socas
u r
s o
Re
n g
n i
ar
Le
r e
Mo
Page532
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
p
The VRRP is configured under the interface view.
t virtual-address
t
h virtual-ip [ virtual-address ]
vrrp vrid virtual-router-ID virtual-ip
:
undo vrrp vrid virtual-router-ID
s
c e
virtual-router-ID:The identifier of Virtual Router, in the range of
1-255.
u r
s o IP address.
virtual-address:Virtual
By default, ifethe Priority of the virtual router is not designated,
R
g
the default value is 100.
n
n i
ar
Le
r e
Mo
Page533
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The VRID and Virtual IP Address should be the same as is
configured on RTA.
htt
vrrp vrid virtual-router-ID priority priority-value
s :
e
undo vrrp vrid virtual-router-ID priority
c
r
virtual-router-ID:The identifier of Virtual Router, in the range of
u
1-255.
s o
Re
priority-value:The value of Priority, with configured range from 1
to 254.
n g
When configuring the priority, the VRID should be specified.
n i
Different virtual routers can be configured with different priority
a r values.
Le
r e
Mo
Page534
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
In this case: p
htt
There are two routers in the LAN. Two Virtual Routers are to be
configured. One of them is with VRID 1 and Virtual IP Address
s :
10.1.1.100; the other with VRID 2 and Virtual IP Address
e
10.1.1.200. Configuring the Priority of Virtual Router 1 as 200 on
c
u r
RTA while 100 on RTB, so that in Virtual router 1, RTA is the
Master. Configuring the Priority of Virtual Router 2 as 200 on
s o
RTB while 100 on RTA, so that in Virtual router 2, RTB is the
Master.
Re
n g
Hence, RTA is the Master of Virtual Router 1 and the Backup of
Virtual Router 2; RTB is the Master of Virtual Router 2 and the
n i
Backup of Virtual Router 1. In the LAN, PCs can use different
a rVirtual IP addresses as the default gateway, so as to implement
Le traffic sharing.
r e
Mo
Page535
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
On RTA, configuring two Virtual Routers as followings:
t10.1.1.100, Priority as 200;
t
h 10.1.1.200, Priority as 100
Virtual Router 1: Virtual IP address
:
Virtual Router 2: Virtual IP address
s
(default).
c e
u r
s o
Re
n g
n i
ar
Le
r e
Mo
Page536
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
On RTB, configuring two Virtual Routers as followings:
t10.1.1.100, Priority as 100
h t
Virtual Router 1: Virtual IP address
(default);
s :
c e
Virtual Router 2: Virtual IP address 10.1.1.200, Priority as 200.
u r
s o
Re
n g
n i
ar
Le
r e
Mo
Page537
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
p
VRRP can track upstream interfaces. In this case:
t
RTB is the Master Router. If the t
h interface Ethernet 1/0 (WAN
interface) of RTB is down, we hope RTA to be the new Master
immediately. VRP supports s :such function by configuring RTB to
c
enable the Virtual Router e tracking interface Ethernet 1/0. If the
u
interface Ethernet 1/0r is down, the Priority of the Virtual Router
s
would be reduced o by a configured value to be a new value lower
R e
than that of RTA. Hence, RTA will be the new Master Router
automatically. If the interface E1/0 of RTB recovers and works
n g the priority of RTB will come back to the original value,
properly,
andiRTB will be the Master again.
r n
a
Le
r e
Mo
Page538
e n
m/
c o
i .
w e
h ua
.
i ng
n
ear
l
://
p
The configuration of RTA is the same as the configuration of
single Virtual Router.
htt
By default, the Priority is 100.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page539
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
By configuring the Priority as 200, RTB is the Master. Configuring
htt
tracking interface Ethernet 1/0 on RTB. If interface Ethernet 1/0
is down, the Priority is reduced by 150, and the new Priority is 50.
s :
Hence, RTA will be the new Master.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page540
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
This is the VRRP States if the tracked interface is down. On RTB,
htt
although the Configured Priority is 200, the Running Priority is
reduced to 50. Hence, RTA will become the Master.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page541
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
This chapter covers the following points:
1. Why is VRRP needed?
h tt
:
Because the single gateway cannot provide any redundancy, it is
s
e
of very poor availability.
c
2. What is VRRP?
u r
o
The result of running VRRP is to provide a virtual router in the
s
LAN.
Re
g
3. How can a virtual router be identified?
n
n i
It can be identified by the VRID and the Virtual IP address(es)
r associated.
a 4. How is the Master elected?
Le The election of Master is based on the Priority of the Virtual
re Router.
Mo 5. What are the priority values?
The value of Priority is 255 indicating the current router is the
Virtual IP address owner.
The value of Priority is 0 indicating the device stop taking part of
the backup group.
Page542
6. How is a Single Virtual Router configured?
Configuring a Virtual Router, Virtual IP address and the value of
Priority.
7. How are Multiple Virtual Routers configured?
Configuring multiple Virtual Routers. For different Virtual Routers,
different routers are made as the Master through proper
e n
configuration of the value of Priority.
m/
8. How does the tracking of an up-link interface support VRRP
c o
operation?
i .
Through configuring the VRRP router so as to make the priority
w e
ua
value change along with the state of a tracked interface should it
fail.
. h
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page543
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ng
Module 4 rni
e a
WAN /l
: /
tp
ht
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page547
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page548
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page549
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page550
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The HDLC drafted by the ISO is a bit-based communication
htt
protocol. The basic unit transmitted by HDLC is the frame. The
most outstanding feature is that the data may not be the
s :
specified set of character . Any bit flows can be transmitted
transparently.
c e
u r
In the 1970s, IBM put forward the bit-oriented synchronous data
s o
link control (SDLC). Then, ANSI and ISO adopted and developed
Re
the SDLC, and also put forward their own standards: Advanced
Data Communication Control Procedure (ADCCP) of ANSI and
n g
HDLC of ISO.
As
i
na bit-based protocol, the HDLC protocol has the following
r
a features:
Le 1. The protocol is independent of any set of characters .
Page552
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
An HDLC frame consists of the flag field (F), the address field (A),
number field (FCS).
htt
the control field (C), the information field (I), and the sequence
s o
Address field (A)
Re
The address field carries the address information.
g
Control field (C)
n
n i
The control field forms the commands and the responses to
monitor and control the link. The main node or the combination
a rnode of the sender uses the control field to request the slave
Le
node or the combination node to perform the specified operation.
The slave node uses this field to respond to the commands and
Page553
supervisory frame, however, cannot have the information field.
Sequence number field (FCS)
The FCS field contains 16 bits. It is used to verify the entire
frame between the two flag fields.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page554
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The HDLC frame is classified into the information frame (I frame),
frame). h tt
the supervisory frame (S frame), and the unnumbered frame (U
s
Information frame (I frame):
ce
u
Supervisory (Soframe)
r
The I frame transmits the valid information or data.
r e
Mo
Page555
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page556
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The HDLC configuration on the serial link is simple. The user
htt
only needs to configure HDLC in the interface view, and then
configure the IP address. The link-protocol hdlc command
s :
configures the link-layer protocol for the encapsulation on the
interface to be HDLC.
c e
u r
NOTE: The encapsulation modes on the two interfaces of the
s o
communication nodes must be the same. The default
Re
encapsulation protocol on the serial interface of the
g
VRP based routers is PPP. When the VRP-based routers are
n
n i
interconnected with the devices of other vendors, make sure that
the encapsulation modes are the same.
a r
Le
r e
Mo
Page557
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
After configuration is complete, the user can use ping to check
htt
whether the configuration is correct. If the two nodes can send
and receive ping packets, the configuration is deemed successful;
s :
otherwise, check whether the configuration on the corresponding
interfaces is accurate.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page558
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As is shown in the figure above, RouterA and RouterB are
htt
connected through the serial interface. HDLC runs on the
interfaces. Interface S0/0/1 on Router A borrows the IP address
:
of the local loopback interface. The IP address of the loopback
s
e
interface adopts the 32-bit mask. The ip address unnumbered
c
u r
interface LoopBack 0 command configures interface S0/0/1 to
borrow the IP address of interface loopback 0. The ip route-
s o
static 10.1.1.0 24 Serial 0/0/1 command configures the static
Re
route. The egress of the static route to network 10.1.1.0 is
g
Serial0/0/1. For the configuration of the static route, refer to the
n
i
routing module.
n
a r
Le
r e
Mo
Page559
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The display ip interface brief command displays the IP
htt
addresses of the interfaces. In this example, you can see that
Serail0/0/1 and Loopback0 use the same IP address. If the
s :
interface does not borrow the IP address of another interface, a
e
message is displayed to remind you of the IP addresses conflict.
c
r
In this example, however, Serial0/0/1 borrows the IP address of
u
o
Loopback0, so the IP addresses are not in conflict.
s
Re
n g
n i
a r
Le
r e
Mo
Page560
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
We can use PING to test the connectivity between the two
htt
routers. If the test succeeds, it verifies that the router
configuration is correct, otherwise it will be necessary to check
s :
whether the corresponding interface configuration match.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page561
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//:
1. What is HDLC? p
t is a bit-based link-layer
h
High-level Data Link Control, HDLC, t
protocol. The protocols of the HDLC protocol suite run on
synchronous serial links. s:
c e is comprised of which fields?
r of the flag field (F), address field (A),
2. The HDLC frame structure
u
oinformation field (I), and a sequence number
An HDLC frame consists
s
e
control field (C),
field (FCS).R
n g
n i
ar
Le
r e
Mo
Page562
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page563
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page564
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page565
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page566
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
PPP is placed in the data link layer of the TCP/IP stack. It is the
htt
most popular point-to-point link layer protocol. PPP is used to
encapsulate and transmit IP packets on the serial link, ATM link,
and SDH link.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page567
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
PPP consists of three components, namely, data encapsulation
h tt
method, Link Control Protocol (LCP) , and Network Control
Protocol (NCP) . The datagram encapsulation method defines
s :
how to encapsulate multi-protocol packets.
To be adapted to variousc e link types, PPP defines LCP. LCP can
u r (for example, whether a loop is
test the link environment
generated) and o
maximum lengthe s negotiate link parameters (for example, the
of the packet and the type of the authentication
R
protocol) . Compared with other link layer protocols, PPP can
n gauthentication. The two ends of the link can negotiate the
n i
provide
authentication protocol to be used and implement the
r
a authentication. The session can be established only after the
Le authentication succeeds. With this feature, PPP can be used by
Page568
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The encapsulation method of PPP data frame is used for
htt
differentiating the packets of each upper layer protocol. The
encapsulation format of PPP contains only three fields.
s :
Protocol: This field contains two bytes. It identifies the type of
c e
protocol encapsulated in the PPP frame, for example, IP, LCP,
u r
and NCP. The common values are shown in the above figure.
s o
Information: This field contains the data encapsulated in PPP, for
Re
example, LCP data, NCP data, and network-layer packets. The
g
length of this field is variable.
n
i
Padding: This field is used for filling in the information field.
n
a r
The total length of the Padding and Information fields is the
Page569
e n
m/
c o
i .
w e
h ua
.
i ng
n
ar
e
l
/on the link. Additional
PPP frames cannot be transmitted directly : /
t p
encapsulation modes and control mechanisms must be used
depending on the types of the links.
on the serial link must comply with ht HDLC.
The PPP frames transmitted
arcountless
this field is 0x03, which indicates that the data is transmitted in
r e
Mo
Page570
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
The basic configuration of PPP on the serial link is simple.
htt
Configure PPP encapsulation interface view, and then configure
the IP address. The link-protocol ppp command is used to
s :
configure the link layer protocol of the interface as PPP.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page571
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page572
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
This table lists four types of LCP packets used to negotiate link-
layer parameters.
htt
Configure-Request:The first packet during the link-layer
s :
negotiation process, indicating the beginning of link-layer
c e
parameter negotiation of the two ends.
u r
Configure-Ack:After receiving the Configure-Request packet
s o
sent by the peer, if the values of negotiated parameters are
Re
acceptable, this packet is used for acknowledgement.
g
Configure-Nak:After receiving the Configure-Request packet
n
i
sent by the peer, if the values of the negotiated parameters are
n
a rnot acceptable, this packet is used for reply, carrying the locally
Le
acceptable parameters.
Configure-Reject:After receiving the Configure-Request
re packet sent by the peer, if the values of the negotiated
Mo parameters cannot be identified, this packet is used for reply
carrying the parameters not identified.
Page573
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As is shown in the figure above, RTA and RTB are connected
htt
through the serial link and they run PPP. When the physical layer
link is up, RTA and RTB negotiate the link parameters through
s :
LCP. In this example, RTA sends an LCP packet. RTA sends a
e
Configure-Request packet to RTB. The packet contains the link
c
r
layer parameters configured on RTA. After RTB receives the
u
o
Configure-Request packet, it returns a Configure-Ack packet to
s
Re
RTA if RTB can identify the parameters in the packet and the
parameter values are acceptable.
n g
If RTA does not receive the Configure-Ack packet, it will re-sends
n i
the Configure-Request packet every three seconds. If RTA still
a r dose not receive the Configure -Ack packet after it sends 10
Page574
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After RTB receives the Configure-Request packet sent by RTA,
htt
RTB checks the parameters contained in the packet. If RTB can
identify the link layer parameters but finds that some or any of
:
the parameter values cannot be accepted, RTB returns a
s
e
Configure-Nak packet to RTA.
c
u r
This Configure-Nak packet contains only the unacceptable
parameters. The values (or value ranges) of these parameters
s o
are changed into the values that can be accepted by RTB.
Re
After receiving the Configure-Nak packet, RTA modifies the
n g
parameter values locally according to the parameter values in
the packet, and then re-sends a Configure-Request packet.
n i
a rAfter five negotiations, if the values still cannot be accepted, the
parameters are forbidden without further negotiation.
Le
r e
Mo
Page575
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After RTB receives the Configure-Request packet sent by RTA,
htt
RTB checks the parameters contained in the packet. If RTB
cannot identify some or any of the link layer parameters in the
s :
packet, RTB returns a Configure-Reject packet to RTA. The
e
Configure-Reject packet contains only the unidentified
c
parameters.
u r
s o
After receiving the Configure-Reject packet, RTA re-sends a
Re
Configure-Request packet to RTB. This packet does not contain
the unidentified parameters.
n g
n i
a r
Le
r e
Mo
Page576
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
On the VRP platform, MRU is represented by MTU configured on
htt
the interface. The PPP authentication protocols widely used are
PAP and CHAP (will be described in the following chapters). The
s :
two ends of a PPP link can authenticate each other using
e
different authentication protocols. The authenticated party,
c
r
however, must support the authentication protocol used by the
u
o
peer and the authentication information such as user name and
s
Re number to detect abnormal cases such as loop.
password should be configured correctly.
LCP uses magic
n
A magic gnumber is generated randomly. The random mechanism
hasito guarantee that the two ends generate the magic numbers.
r n one end receives the Configure-Request packet, it
a After
Le compares the magic number contained in the packet with the
Page578
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
If the authentication fails or the administrator closes the
tt
connection manually, LCP will stop the connection.
h
LCP stop connections by using the Terminate-Request and
s :
Terminate-Ack packets. The Terminate-Request packet is used
c e
for the peer to request stop the connection. If one end receives a
u r
Terminate-Request packet, LCP must return a Terminate-Ack
s o
packet to confirm the closure of connection.
R
If the senderedoes not receive the Terminate-Ack packet, it will
g still fails to receive the Terminate-Ack packet after it
re-sends the Terminate-Request packet every three seconds. If
n
n i two request packets, it considers the peer failed and will
the sender
sends
arclose the connection.
Le
r e
Mo
Page579
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
After establishing a connection, LCP detects the status of the link
htt
by using the Echo-Request and Echo-Reply packets. After
receiving an Echo-Request packet, it returns an Echo-Reply
:
packet to tell that the link status is normal. On the VRP platform,
s
e
an Echo-Request packet is sent every 10 seconds.
c
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page580
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page581
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
PAP is the Password Authentication Protocol. It is used for
passwords authentication.
h tt
The configuration of PAP contains two steps:
s :
e
1. Enable PAP authentication on the authenticator; create a PPP
c
user.
r
u name and password for PAP authentication
o
2. Configure the user
s party.
e
on the authenticated
local-userRhuawei password simple hello
n g is used for the creation of a local user, of which
This command
n
the iuser name is huawei and the password is hello. Key word
arsimple indicates that the password is plain text in the
Le configuration file. If the key word is cipher, it indicates that the
Page582
ppp pap local-user huawei password simple hello
This command is used for configuring the user name and
password for PAP authentication on the authenticated party.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page583
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The working process of PAP authentication is simple. After LCP
htt
negotiation, the authenticator requests the peer to use PAP
authentication. The peer sends the user name and password in
:
plain text through the Authenticate-Request packet to the
s
e
authenticator. In this example, the user name is huawei and the
c
password is hello.
r
uuser name and password, the authenticator
o
After receiving the
s the information is correct in the local database. If
checks whether
e
R is correct, it returns an Authenticate-Ack packet;
the information
n g
otherwise, it returns an Authenticate-Nak packet, indicating
i of the authentication.
failure
n
ar
Le
r e
Mo
Page584
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
CHAP is the Challenge Handshake Authentication Protocol. It is
n g
in the configuration file.
Page585
ppp chap password simple hello
This command is used for configuring the password for CHAP
authentication to be hello on the peer.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page586
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The CHAP authentication contains three interaction phases. To
htt
match the request packet and response packet, the packet
carries the Identifier field. All the packets in one authentication
:
process use the same identifier.
s
e
After the LCP negotiation, the authenticator sends a Challenge
c
r
packet to the peer. The packet contains the Identifier field and
u
o
the Challenge character string which is generated randomly. This
s
Re
Identifier will be used by the consequent packet of the same
authentication process.
n g
After the peer receives the Challenge packet, it encrypts the
n i
packet. The encryption formula is MD5{ Identifier + password +
a rChallenge }. The character string consisting of Identifier,
Page587
Then, the authenticator encrypts the password. The encryption
calculation is the same as that used by the peer. Then, the
authenticator compares the digest information with that
encapsulated in the Response packet. If they are the same, the
authentication succeeds; otherwise, the authentication fails.
As this shown in the previous process, CHAP sends the
password in cipher text instead of plain text, hence the security is
e n
enhanced greatly.
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page588
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page589
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
PPP defines a group of NCP protocols. Each protocol matches a
htt
network layer protocol. The NCP protocol negotiates the network
layer parameters. For example, IPCP is used for negotiating and
s :
controlling IP parameters, and MPLSCP is used for negotiating
c e
and MPLS parameters. This course discusses only IPCP.
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page590
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
IPCP uses the same negotiation mechanism and packet type as
htt
LCP, but IPCP does not invoke LCP. This is the same as LCP in
terms of working procedure, packet and so on. There are two
s :
types of IP address negotiation methods: static configuration and
dynamic configuration.
c e
u r
As it is shown in the figure, the IP addresses on the two ends are
s o
10.1.1.1/30 and 10.1.1.2/30. The two IP addresses are in
Re
network segment 10.1.1.0/30.
g
The negotiation process for the static configuration of IP
n
i
addresses is as follows:
1.nThe two ends send the Configure-Request packets, which
r
a contain the local IP address.
Le 2. After receiving the Configure-Request packet, the two ends
r e check the IP address contained in the packet. If the IP address is
Mo a valid unicast IP address and it is different from that configured
locally (no confliction), it indicates that the peer can use this IP
address and the local end returns a Configure-Ack packet.
Page591
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As it is shown in the routing table, the IP address of the peer on
htt
the PPP link is a 32-bit host address. The reason is that by
sending information through IPCP, the two ends of the PPP link
s :
can know the IP address of the peer.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page592
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As is shown in the figure above, RTA asks the peer to allocate an
htt
IP address, and RTB uses static IP address 10.1.1.2/30. RTB
enables the function to allocate IP address for the peer,
:
allocating IP address 10.1.1.1 for RTA.
s
e
The process of the dynamic negotiation of dynamic IP address is
c
as follows:
u r
s o
RTA sends a Configure-Request packet to RTB. The packet
Re
contains IP address 0.0.0.0, which indicates a request for an IP
address allocating . After RTB receives the Configure-Request
n g
packet, it considers IP address 0.0.0.0 invalid and returns a
n i
Configure-Nak packet containing IP address 10.1.1.1; After RTA
a rreceives the Configure-Nak packet, it updates the local IP
Page593
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The VRP platform supports IP address negotiation in PPP.
ip address ppp-negotiate
htt
:
This command is used for enabling the function of requesting the
s
e
peer to allocate IP addresses.
c
r
remote address 10.1.1.1
u
o
This command is used for enabling the function of allocating IP
s
Re
addresses to the peer. In this example, IP address 10.1.1.1 is
allocated to the peer.
n g
Note: The IP address obtained through negotiation is a 32-bit
n i
host address. The route of the corresponding network segment
a r will not be generated in the routing table.
Le
r e
Mo
Page594
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
What are the components in PPP? p
t data encapsulation method,
h
PPP has three components, namely,t
LCP and NCP.
s :for negotiating link parameters in
e
Which packets can be used
c
LCP?
u r first packet during the link-layer
o indicating the beginning of link-layer
Configure-Request:The
s
parameterR
e
negotiation process,
negotiation of the two ends.
n g
Configure-Ack:After receiving the Configure-Request packet
n iby the peer, if the values of negotiated parameters are
sent
aracceptable, this packet is used for responsing.
Le Configure-Nak:After receiving the Configure-Request packet
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page596
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page597
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page598
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page599
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page600
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The FR technology is a fast packet switching technology that
htt
transmits and switches data units in a simplified manner when
compared to X.25. The FR adopts a virtual circuit based behavior,
:
transmitting data through logical links, rather than physical links.
s
c e
Multiple logical links can be multiplexed on one physical link. The
bandwidth can therefore be multiplexed and dynamically
u r
allocated. This facilitates the transmission of data for multiple
s o
users and multiple rates. The network resource is fully used. As
Re
shown in the figure above, the virtual circuit is used so that the
network resource is fully utilized. Frame Relay has the features
g
of high throughput and low delay. It is applicable to the service
n
i
that has burst traffic.
n
a rFR simplifies the layer-3 function of X.25, however does not
Le
support retransmission when an error occurs.
r e
Mo
Page601
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Frame Relay is found at the second layer of the OSI model. It is
htt
a simplified way to transmit and switch data units at the data link
layer. FR realizes the functions of the physical layer and the link
s :
layer. The functions such as traffic control and error checking are
c e
realized by the intelligent terminal. Hence the protocol between
r
nodes is simplified. FR can transmit various routing protocols.
u
o
The packets of the routing protocols are encapsulated in the FR
s
Re
data frame, as shown in the figure above.
n g
n i
a r
Le
r e
Mo
Page602
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
FR has the following features:
tp
t
The FR technology is used for transmitting data service. Data is
transmitted as frames. FR is ahfast packet switching technology,
s : FR transmits data over the logical
which is connection-oriented.
e links. Multiple logical links can be
links, rather than physical
c
multiplexed on onerphysical link. Bandwidth can be multiplexed
u
and dynamicallyoallocated.
e
The simplified sX.25 protocol realizes statistics multiplexing, frame
transparentR transmission, and error detection on the data link
layer,ngbut does not support retransmission. The FR protocol
n i the layer-3 function of X.25. It simplifies the processing
simplifies
aron network nodes and improves the information processing
Le efficiency. The 2-layer structure consisting of physical layer and
data link layer is adopted. Only the core subset of the data link
r e layer is kept. The mechanisms like frame numbering, traffic
Mo control, response, and monitor are not required. The cost of
switches is reduced, and the network throughput is improved,
and the delay in communication is reduced. The access rate of
FR users is between 64 Kbit/s and 2 Mbit/s.
A mechanism is provided to manage bandwidth and prevent
congestion. The user can fully use the reserved bandwidth,
Page603
namely, the committed information rate (CIR). The burst data of
the user can occupy the unreserved bandwidth. Thus the
network resource is fully used.
Similar to packet switching, FR adopts the connection-oriented
switching technology. It can provide the SVC and PVC services.
In the current FR network, only the PVC service is used.
Switching unit-The length of the frame is longer than the length e n
of the packet. The maximum length of the frame is at least 1600 m/
bytes. It is used for encapsulating the data of LAN.
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page604
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The above figure shows the FR network model. The model
tt
consists of the DTE and the FR switching fabric.
h
The FR switching fabric consists of a group of DCE. The LANs
s :
on the two ends are interconnected through the FR network. The
c e
data of the LAN is transmitted through the PVC.
u r
The terms related to the FR network are as follows:
s o
Re
Data Terminal Equipment (DTE): refers to the user-side device.
Data Circuit-terminating Equipment (DCE): refers to the
n g equipment on the network, like FR switch. The DTE
switching
andithe DCE are directly connected. The DCE is connected to a
r n on the switch. Multiple connections are set up between
port
a multiple switches. The links between the DTE are established, as
Le shown in the figure above.
r e Data Link Connection Identifier (DLCI): identifies the link
Mo interface. Every link on the FR network uses a DLCI. The FR is a
connection-oriented technology. Before communication starts, a
link must be established between the devices. The link between
the DTE is called virtual circuit. The virtual circuit of the FR is
classified into PVC and SVC. The PVC is widely used in FR.
Page605
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
A Frame Relay (FR) network provides data communication
tt
between user devices (such as routers and hosts).
h
s :
According to different functions, FR devices and interfaces can
be divided into the following three types:
c e
u r
•The user device is called Data Terminal Equipment (DTE). The
interfaces on the DTE are called DTE interfaces.
s o
Re
•The device that provides access for DTE is called Data Circuit-
terminating Equipment (DCE). The interfaces on the DCE
g
devices are called DCE interfaces or Network-to-Network
n
n i
Interfaces (NNIs) interfaces. The interfaces that connect the DTE
Page606
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The FR is a connection-oriented technology. Before
htt
communication starts, a link must be established between the
devices. The link between the DTE is called virtual circuit.
s :
The virtual circuit of FR is classified into PVC and SVC. The PVC
c
is widely used in FR. e
u r
Permanent Virtual Circuit (PVC): refers to the fixed virtual
s o
circuit provided for users. Once the link is established, it will
Re
always be valid; unless the administrator deletes it manually. The
g
PVC transmits frequent and stable data between two ends
n
i
frequently and stably.
n
rSwitched Virtual Circuit (SVC): refers to the virtual circuit
a automatically allocated by protocol. After communication
Le completes, the virtual circuit can be deleted by the local
Mo the SVC.
Page607
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
FR is a statistical multiplexing protocol. One physical link can
h tt
provide multiple virtual links. Each virtual link is identified by the
DLCI. The address field in the FR frame can identify the virtual
s :
link that FR frame belongs to.
The DLCI is applied tocthee local interface and the peer interface
u r to the local interface. It is not used
that is directly connected
globally. That is,oin the FR network, a DLCI on different physical
interfaces maye sidentify multiple virtual links. The user interface
R supports up to 1024 virtual circuits. The value of
on a FR network
n
the DLCIg that can be used by users ranges from 16 to 1007. The
n i circuit is connection-oriented, so different local DLCIs are
virtual
arconnected to different peer devices. The local DLCI can be
Le considered as the “FR address ” of the peer device. The FR
network is public facility. It is often provided by the telecom
r e service provider. Users can also establish a FR network by using
Mo private switches. No matter which method is used, the provider
of the FR network allocates the DLCI to the PVCs that are used
by the users‟ routers. Some DLCI numbers represent special
functions. For example, DLCI 0 and DLCI 1023 are used by only
the LMI protocol.
Address mapping of FR is to associate the protocol address of
Page608
the peer device with the FR address (local DLCI) of the peer
device so that the upper layer protocol can find the peer device
through the protocol address of the peer device. FR is mainly
used to carry the IP protocol. Before the device sends the IP
packet, the DLCI matching the next hop address must be known
. The device can find the DLCI by searching the mapping table.
Address mapping can be configured manually or dynamically
e n
maintained by the protocol.
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page609
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Local Management Interface (LMI): monitors the status of the
htt
PVC. The system supports three kinds of LMI protocol: Q.933
Annex A of ITU-T, T1.617 Annex D of ANSI, and the non-
s :
standard compatible protocol. The nonstandard compatible
c e
protocol is used for interconnecting a device with the devices of
other vendors.
u r
s o
The working method of LMI is : DTE sends ak Status Enquiry
Re
packet at a interval to query the status of the virtual circuit. When
the DCE receives the packet, it sends a Status packet to notify
n g
DTE of the status of all the virtual circuits on the current
n i
interface.
r
a PVC status of the DTE-side devices depends on the DCE-
The
Le side devices. The PVC status of the DCE-side devices depends
Page610
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The FR network can connect the disparate networks. The
htt
network architecture may be full-meshed, partial-meshed, or star.
In terms of cost, the star structure is the best as it limits the
s :
number of PVCs required. A central node is connected to the
c e
distributed nodes by using multiple PVCs on one interface. This
r
architecture is applicable to the company where the
u
o
headquarters needs to be connected to multiple branches. The
s
Re
disadvantage of this architecture is that the disparate nodes can
communicate only through the central node.
n g
In the full-meshed structure, all the nodes are interconnected
n i
through PVCs. Any two nodes can communicate directly without
a rpassing other nodes. The reliability of such a architecture is high.
Le If one PVC fails, the data can be transmitted through another.
The disadvantage of such architecture is that a great number of
r e PVCs are required. If one node is added to the network, many
Mo new PVCs need to be added.
In the partial-meshed structure, some nodes are connected
directly. The default FR network architecture is non-broadcast
multi-access (NBMA). That is to say, although the nodes in the
FR network can communicate with each other, the FR network
does not support broadcasts. If a node receives routing
Page611
information, it recreates the packet and then sends the
duplicated packet carrying the routing information to other nodes.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page612
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Address mapping of FR associates the protocol address of the
htt
peering device with the local DLCI, so that frame relay can
identify the PVC that should be used in order to reach a given
destination.
s :
It should be noted thatc e mapping table is based on a logical
the
u r interface has its own mapping table. The
interface. The logical
s o table is the relationship between the peer
key in the mapping
n g
n i
ar
Le
r e
Mo
Page613
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
The inverse ARP protocol is used for resolving the network
htt
address of a peer over a virtual circuit, with support for both IP
and IPX addressing. If the protocol address of the peer is known,
s :
the inverse ARP protocol can locally generate a mapping
e
relationship between the peer network address and the DLCI
c
r
(MAP). The address mapping therefore need not be configured
u
manually.
s o
Re
The process is as follows:
g
When a new virtual circuit is found (the local interface is already
n
n i
configured with the protocol address), the inverse ARP protocol
sends an Inverse ARP request packet to the peer. The packet
a r contains the local protocol address. When the peer receives the
Le request, it obtains the local protocol address, and generates a
Page614
2. After receiving the inverse ARP request packet, the dynamic
mapping cannot be generated if the receiver discovers that
the peer protocol address is the same as the network address
in the local mapping table.
3. The multiprotocol host responds only to the protocol address
that is the same as the protocol address in the request packet.
4. The multiprotocol host applies addresses for all the protocol e n
addresses on each interface. m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page615
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
As is shown in the figure above, Router A is connected to three
htt
routers, Router B, Router C, and Router D, through interface S0.
If three DLCIs are mapped to three routers over S0, then the
s :
route update information on S0 is not sent out through S0. The
c e
distance vector routing protocol implements split horizon. The
r
router cannot forward the route update information out through
u
o
the interface on which the information was received. As shown,
s
Re
Router B advertizes the routing information to Router A. The split
horizon mechanism results in Router A being unable to forward
n g
to Router C and Router D through interface S0. There are two
n i
ways to resolve this problem, one is to connect multiple
Le
method requires that the router have multiple physical interfaces,
which results in increased cost to support the additional physical
r e node interfaces. Another method is to implement sub-interfaces.
Page616
e n
m/
c o
i .
w e
hua
.
i ng
n
e ar
l
: //
p
The split horizon problem can be solved by configuration of sub-
htt
interfaces. One physical interface can support multiple logical
sub-interfaces. Each sub-interface can be connected to the peer
s :
router through one or many DLCIs over a FR network.
c e are defined on the serial link. The sub-
The logical sub-interfaces
u r to the peer router through one or more
interfaces are connected
s o is configured on the sub-interface, the
DLCIs. After a DLCI
R e
mapping between the addressing of the destination end and the
DLCI should be generated.
As isn
g
onn i A, the DLCI of S0.1 is mapped to Router B, the DLCI
shown in the figure above, the physical serial interface S0
Router
arof S0.2 is mapped to Router C, and the DLCI of S0.3 is mapped
Le to Router D.
Page617
One sub-interface is configured with multiple PVCs. Each PVC is
mapped to the connected remote protocol address. Thus, the
PVC can be connected to the corresponding remote end. The
address mapping must be configured manually or set up through
the inverse ARP protocol.
Before creating the FR sub-interface, the user should configure
the interface to use FR as the link-layer protocol. The default
e n
sub-interface type is p2mp.
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page618
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
Page619
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
RTA and RTB are connected by a serial link. The IP address
htt
planning is as shown in the above figure. The link-layer protocol
is FR. The configuration of FR in this example is similar to the
s :
configuration in the preceding example. The difference is that the
c e
mapping between the interface network address and the FR
r
address is generated by the inverse ARP protocol.
u
s o
The fr inarp [ ip [ dlci-number ] ] command enables the
Re
dynamic address mapping. In VRP, the dynamic address
mapping is enabled on the FR interface by default. So this step is
n g
optional.
n i
a r
Le
r e
Mo
Page620
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
The display fr interface command displays the information
htt
about the FR interfaces, the operation mode of the FR interfaces,
and the physical status and protocol status of the FR interfaces.
s :
The display interface Serial 0 command displays the
c e
information about the interfaces, including the physical status
u r
and protocol status of the interfaces, the IP address, the link-
s o
layer encapsulation mode, and the LMI type.
Re
n g
n i
a r
Le
r e
Mo
Page621
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
RTA and RTB are connected by a serial link. The IP address
is FR. htt
planning is as shown in the above figure. The link-layer protocol
s :
The link-protocol fr command encapsulates the link-layer
c e
protocol into FR. By default, the link-layer protocol is
u r
encapsulated into PPP. When the FR protocol is encapsulated,
s o
the encapsulation format is IETF by default.
Mo
In FR, the two parties of the communication are at the user side
and the network side respectively. The user-side party is called
DTE. The network-side party is called DCE.
In the FR network, the interfaces between the FR switches are
NNI interfaces. The corresponding interfaces adopt the NNI
mode. If the devices are used for FR switching, the interfaces
should work in NNI mode or DCE mode.
Page622
The fr dlci command configures the virtual circuit for the FR
interface. The IP address 10.1.1.1 30 command configures the
IP address for the interface.
The fr map ip command adds a mapping relationship between
the FR address and the DLCI static address. ip-address:
indicates the IP address of the peer.
ip-mask: indicates the subnet mask. The format of the subnet e n
mask is X.X.X.X. X is an integer ranging from 0 to 255. dlci- m/
number: indicates the number of the local virtual circuit. The
c o
value ranges from 16 to 1007.
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page623
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
The display fr map-info command displays the mapping
h
between the protocol address and the FR address.
s :
In this example, RTA displays the information showing that the
c e
address mapped to DLCI 200 is 10.1.1.2, the network address
r
and FR address ofuRTB. The local interface S0 on RTA works in
o
DCE mode. es
R
n g
n i
ar
Le
r e
Mo
Page624
e n
m/
c o
i .
w e
hua
.
i ng
n
e ar
l
://
p
tt
Using ping to check FR configuration and interface‟s
reachability. h
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page625
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
p
In this example, the router functions as the FR switch. The PVC
is configured manually.
htt
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page626
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
Configuration of RTD is similar to those of RTA. It needs to
tt
Configure data link protocol, interface type and IP address.
h
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page627
e n
m/
c o
i .
w e
h ua
.
i ng
n
ear
l
: //
p
Using the display fr map-info command, you can view the FR
address mapping table.
htt
[RTA]dis fr map-info
s :
e
Map Statistics for interface Serial0 (DTE)
c
r
DLCI = 100, IP INARP 10.1.1.2, Serial0
u
o
create time = 2007/06/04 17:34:59, status = ACTIVE
s
R
encapsulation e = ietf, vlink = 20, broadcast
g to verify the PVC is operational from the „active‟
It is possible
state.n
n i 10.1.1.2
ar
<RTA>ping
re
Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=255 time=31 ms
Page628
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
p
1. How many modes does the FR interface have?
tthe user-side is called DTE
Three, DTE, DCE, and NNI. In FR,
h t
interfaces between the FR s :switches are NNI interfaces. The
and the network-side party is called DCE. In the FR network, the
n ithe peer
identified by the DLCIs. The DLCI is applied to the local interface
rand interface that is directly connected to the local
a interface. It is not used globally. That is, in the FR network, a
Le DLCI on different physical interfaces may identify multiple virtual
r e links.
Page629
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ng
Module 5 rni
e a
/l
Network Security
/
p :
t t
h
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
ni
a r
Le
r e
Mo
Page633
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page634
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
ni
a r
Le
r e
Mo
Page635
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page636
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
In a practical sense, a firewall acts as a separator, and also an
analyzer, to supervise any activity between an internal and
h
external network, and assist in assuring the security of the
:
internal network is maintained.
s
r ce
The firewall can be in the form of a series of hardware devices or
supported software within a given device.
u
so
The firewall can be divided into several parts, some parts
Re
implement other function besides the function of a firewall.
Firewall is the accumulation of hardware, software and control
ng
policies, where the control policy can be divided into two kinds:
n i
1. Strict policy— highly secure but may disrupt many services
a rdue to non-reviewed policy restrictions.
Page638
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
Packet filtering firewall: p
tspecial rules predefined to
t
h source IP address, destination
Packet filtering technology utilizes
: port, destination TCP/UDP port
filter packets. The firewall obtains
s
IP address, source TCP/UDP
and protocol number c
e
r the rule to filter the data packet through
information aboveuwith
of data packet, compare partial or overall
s
the firewall. The odefined rule application is done according to the
R e IP packet, the elements mentioned above can be
features of the
throughngthe firewall.
used to define the condition that allows the packet to pass
n i
arThe feature of packet filtering firewall is that it is simple, but lacks
Le flexibility, additionally packet filtering firewall will implement policy
r e detection on every data packet, which affects the performance of
Mo a firewall.
Page639
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
//
:
Proxy firewall:
t p
at
Proxy firewall regards itself as h intermediary node of service
access; for a client node, it:represents a server; for a server, it
e s firewall provides high security, but
represents the client. A proxy
r c hard to develop a corresponding proxy
the cost is also high. It is
o u
service for every application, so a proxy firewall can not support
an abundancesof services, it can only provide proxy service for
Re such as HTTP services, Proxy etc.
some applications
ng
n i
ar
Le
r e
Mo
Page640
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
://
State detection firewall:
tp
State detection technology is an t
h is used communication
advanced
:
filtering technology. State detection to detect protocol
s layer and supervise the protocol
e
information of the application
c application layer. Through detecting
u
the state of TCP/UDP r
state of connection-oriented
based connection, a firewall can
o
sThe firewall
dynamically determine whether the packet can pass through the
R e
firewall or not. will maintain a session item that takes
ng
five-element group (source/destination IP address,
source/destination port number, protocol number) as Key values;
n
for i
the received data packet, the firewall can match the session
r
a item to determine which is legal and which is illegal.
Le As shown in the figure above, for Telnet access, when TCP
Page641
before completion of three-handshake, illegal packet can not
pass through the firewall. After telnet session finishing, the
session item will be deleted immediately, the spurious illegal
telnet packet remains unable to pass through the firewall.
Session identifies a “complete connection”, a complete
connection is composed of five elements (source address,
destination address, source port, destination port, protocol
number). When a three-way handshake of TCP is completed, the
e n
firewall will create a complete session item, the session item can
m/
be used to supervise the state transition of a session.
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
s :
r ce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page642
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
As shown in the figure above, in the security system, firewall is
h
analogous to a door, it can prevent people from entering, but it
can not prevent malicious attacks from people that have
s :
permission to enter the network or are located internally. An
ce
access control system can prevent people with low priority from
r
u
doing work which exceeds their authority, but it can not prevent
so
people with high priority from malicious actions. It also cannot
Re
prevent people with low priority from obtaining high priority
through illegal behavior. Intrusion detection system (IDS) is a
ng
unique device to identify whether the system is safe or not
n i
according to the data and behavior mode, it is the second
a rsecurity door following the firewall. There is a classical
Page643
Penetrate disguised data and identify the actual content. The
advanced IDS can beat back, terminate connection and close
path automatically to regulate illegal behavior.
There are other technologies in security system besides those
mentioned, for example, identity authentication technology, ACL
packet filtering, special user system access, protection to special
source linked servers through reinforced and installed immunity
systems, discovery of system holes and patching through
e n
scanning software; transmission of encrypted data or use of VPN
m/
technology to transmit, so as to guarantee the security (often end
c o
to end). Supervisory system operation through a security
i .
management center, and operational event logging and threat
detection using alarms and threat response processes. w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
r ce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page644
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
Firewall strictly manages access from external networks into the
h
internal network. The access from the internal network to
external network is relatively loose in comparison. Firewall can
s :
not renew operation software periodically as other virus software,
ce
so the defense provided to new generated safety menace is
r
u
sometimes not enough.
o function is configured, the firewall will detect
s
If depth detection
e of a data packet, which will also increase the
R
the partial content
gcannot provide detection to encrypted packets or other
forwarding delay time and affect forwarding performance.
n
i transmitted in VPN tunnels that passes through the
Firewall
n
arfirewall.
packets
Le
r e
Mo
Page645
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page646
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
With the rapid development of the Internet, a growing number of
h
enterprises have begun to speed up development by taking
advantages of network services. It has become a concern of
s :
enterprises to protect their intranet in an open network
ce
environment. Huawei delivers the self-developed USG series
r
u
unified security gateway products for large- and medium-sized
so
enterprises. With 150 Mbit/s to 8 Gbit/s processing capabilities,
Re
these products provide cost-effective security solutions for large-
and medium-sized networks.
ng
USG unified security gateways are based on a high-performance
n i
hardware platform and advanced software architecture. They are
a requipped with high-performance or multi-core CPUs to provide
Le line-rate packet processing, data forwarding, and anti-attack
r e functions.
Page647
for flexible selection according to the network environments of
customers. In addition, the strong software scalability allows for
cost-effective network upgrade and capacity expansion.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
s :
r ce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page648
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
ni
a r
Le
r e
Mo
Page649
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page650
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
ni
a r
Le
r e
Mo
Page651
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page652
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
The USG devices are used on the enterprise headquarters
h
network, egress gateways of various branches, and security
gateways of regional offices and remote sites.
s :
ce to ensure communication security.
Providing firewall and UTM functions to ensure intranet security.
Providing rich VPN rfunctions
Providing 3G and ouWiFi functions for easy networking.
e s
R
ng
n i
ar
Le
r e
Mo
Page653
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
Q: How many variations of firewall are there, and what features
do they support?
h
:
A: Firewalls represent three variations: packet filtering, proxy and
s
ce
state detection. Packet filtering firewall utilizes special rule
u r
defined before (source/destination IP address, source/destination
TCP/IP port and protocol number) to filter packets. Proxy
so
firewalls are regarded as middle node of service access; for a
Re
client node, it represents a server and for a server, it represents
ng
the client. State detection is used to detect protocol information
of the application layer and supervise the protocol state of
n i
connection-oriented application layer. Through detecting the
a r state of TCP/UDP based connection, a firewall can dynamically
Le determine whether the packet can pass through the firewall or
r e not.
Mo
Q: Which models make up the USG firewall series?
A: it includes: 2100, 2200 and 5120.
Page654
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
ni
a r
Le
r e
Mo
Page655
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page656
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
ni
a r
Le
r e
Mo
Page657
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page658
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
A zone is an important firewall security concept. Firewalls is are
generally located at the boundary of a network, and so allows
different networks to be represented part of alternative zones.
:
The firewall adds interfaces into zones and enables security
s
ce
detection between zones (called a security policy). It can be used
to filter the data flowing through different zones. The common
u r
methods used for security detection includes ACL based
so
detection and application state detection.
Re
USG firewall has four reserved security Zones:
Untrusted zone: A low-level security zone, the security priority
ng
assigned is 5.
n i
DMZ: A mid-level security zone, the security priority assigned is
a r50.
Le
Trust Zone: A high-level security zone, the security priority
assigned is 85.
Mo assigned is 100.
If necessary, users can configure new security zones and define
the security priority. With exception to the Local zone, before
using any other zones, the security zone should be associated
with the firewall interfaces, achieved by adding the interface of
firewall into a security zone. The interface can only be added into
only one zone. The interface can be a physical or logical
interface. Adding an interface to a zone means that the network
connected to the interface belongs to the zone, the interface
Page659
itself belongs to the local zone.Association of security zones
and networks should obey the following rules: internal networks
should belong to Zone with a higher priority; external networks
should belong to zones with a lower priority; some network that can
provide conditioned services for external users should belong to
the DMZ.
The purpose of defining security priority is to distinguish the
e n
direction of data flow amongst security zones, whether inbound
or outbound. m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
s :
r ce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page660
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
When the data flow is forwarded between security zones, the
h
firewall security detection mechanisms will spring into action, in
particular the security policy of the firewall implemented between
s :
zones to manage traffic flow for example between the untrusted
ce
zone and trusted zone. Different security policies can be
r
u
implemented between different zones for example, packet
so
filtering policy, state filtering policy and so on.
Re
g
There are two directions of data flow between zones:
n
n i In which the data flow is transmitted from a zone with a
Inbound:
Page661
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
This example introduces how a security zone is created and how
to configure the priority and apply an interface to the created
zone.
s :
ce
[USG2100] firewall zone name userzone
r
u
// creates a security zone named userzone, the system can
so
support up to 16 zones in total, including the default 4 zones.
e
R
[USG2100-zone-userzone] set priority 60
n gcan nottheusepriority,
//configures with a range from 1 to 100, any two
n i cannot be modified.
zones the same priority, the priority of default 4
Page662
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
This example introduces how to configure security policy
between zones. When data flows between security zones, the
:
security detection mechanism will initialize. Generally, data from
s
ce
an untrusted zone can not enter a trusted zone, unless permitted
u r
explicitly. After applying the configuration displayed, data from an
untrusted zone can forward to a trusted Zone.
so
Re
ng
n i
a r
Le
r e
Mo
Page663
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page664
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
mode and composite mode. h tt
USG firewall can work in three modes: route mode, transparent
s :
If the USG firewall connects to the external network at layer 3
r ce
(meaning an IP address has been configured on the external
interface), it is regarded that the firewall is operating in route
u
so
mode. As shown in the figure above, when the USG firewall is
Re
located between an internal network and an external network,
the three interfaces on the firewall that connect to internal
g
network, external network and the DMZ area should be
n
i
configured with IP addresses as part of different network
n
a rsegments. The topology would recognize the firewall as
Le
corresponding to the operation of a router. When adopting route
mode, it can complete ACL packet filtering, ASPF (status based
Page665
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
If the USG firewall connects externally at layer 2 (an IP address
is not configured on the interface), the firewall is considered to be
:
operating in transparent mode. If the USG firewall adopts the
s
ce
transparent mode, the firewall only needs to be inserted into the
u r
network as bridge, the greatest advantage is that it is not
necessary to modify any configuration; the firewall functions as a
so
switch, and the internal network and external network must
Re
remain in the same subnet. At present, the USG firewall can not
g
support STP, so the usage of firewall should be done with care
n
n i
so as to avoid layer 2 loops in the network. In this mode, the
firewall will not only forward packets like a switch, but also
a r analyze the packet.
Le
r e
Mo
Page666
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
If USG firewall has not only interface which is working in route
mode (interface has IP address ) but also supports an interface
:
which is working in transparent mode (interface has no IP
s
ce
address), then the firewall is considered to be working in
u r
composite mode. This kind of mode is the mix of transparent
mode and route mode, at present, it is only used in special
so
applications of transparent mode to provide dual device hot
backup. Re
g
The IP address should be configured for the interface which has
n
i
VRRP (Virtual Router Redundancy Protocol) function enabled.
n
a rThe other interfaces do not require an IP address, furthermore
Le
the internal network and external network must be in the same
subnet.
r e
Mo
Page667
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page668
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
A firewall must provide the ability to control the network data flow,
h
so as to guarantee security, QoS requirement and constituting
policy. ACL (Access Control Lists) are one of the methods that
s :
can be used to control data flow. An ACL is a series of ordered
ce
rules composed of permit or deny statements. These rules
r
u
describe data packet through parameters such as the source
eso
address, destination address, port number and protocol. An ACL
can be applied in the following situations:
R
g Packet filtering is used between two networks with
1, Packet filtering as part of the network security protection
n
n i priorities to control the data flow of a network (inbound
mechanism.
different
arand outbound). When a firewall forwards the data packet, it will
Le first detect packet header (i.e: source address/destination
Page669
2, NAT (Network Address Translation) is the process used to
translate the IP address in a data packet header to another IP
address. It mainly implements this function so that the internal
network (using a private IP addressing) can forward traffic to the
external network (using public IP addressing). In the actual
application, it is hoped that some internal hosts (supporting
private IP addresses) can access the external network or Internet, e n
while other internal hosts can not. It is implemented through m/
association of the ACL and NAT address pool, meaning only data
c o
packets that satisfy the ACL rule can translate addresses, so as
i .
to control the range of address translation.
w e
An ACL can also be applied to other scenarios involving IPSec,a
h u
QoS and routing policies.
g .
i n
rn
e a
/l
: /
tp
ht
s :
c e
u r
s o
Re
ng
n i
ar
Le
r e
Mo
Page670
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
The firewall defines an ACL based on a numeral value. On USG
300/500/1000, an ACL can be divided into three kinds: basic ACL
:
(2000~2999), advanced ACL (3000~3999), and firewall ACL
s
ce
(5000~5499). Users can choose ACL according to the
r
requirement in order to define different data flows.
u
so
The data flow defined by the three kinds of ACL is different: basic
Re
ACL only uses source address to define data flow; advanced
ACL uses source address, destination address, source port
g
number, destination port number and protocol number to define
n
i
data flow. The firewall ACL uses source address, destination
n
a raddress and destination port number to define data flow.
Le
r e
Mo
Page671
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
word permit or deny. h tt
One ACL can be composed of multiple ACL rules that include key
:
Use command “acl [ number ] acl-number [ vpn-instance vpn-
s
ce
instance-name ]” in system view to create an ACL.
r
u
[ number ] acl-number can define one ACL. For basic ACL, the
e so
range is 2000~2999; for advanced ACL, the range is 3000~
3999; for a firewall ACL, the range is 5000~5499.
R
g
vpn-instance refers to the creation of a firewall ACL rule.
Aftern
{n
i enter basic ACL view, the command “rule [ rule-id ]
Page672
Permit and deny means the applied action when a match occurs.
“permit” will implement NAT or security policy detection on the
data packet and allow accordingly. “deny” is opposite, it will not
implement corresponding detection on a packet that is not in
accordance with the conditions set in the ACL.
“source { source-address source-wildcard | any }” indicates
e n
source address of an ACL rule
m/
“time-range time-name” indicates the time at which an ACL will
c o
take effect.
i .
After enter advanced ACL view, the command “rule [ rule-id ]
w e
ua
{ permit |deny } protocol [ source { source-address source-
h
wildcard | any } ] [ destination{ dest-address dest-mask | any } ]
.
ng
[ source-port operator port1 [ port2 ] ][ destination-port
operator port1 [ port2 ] ] [ icmp-type { icmp-type icmp-code |
n i
icmp-message } ] [ precedence precedence ] [ tos tos ] [ time-
ar
range timename ]” can be used to create an advanced ACL rule:
e
l
the usage of the key word and parameter is the same with those
in basic ACL rules.
: //
p
“protocol” uses name or number to indicate protocol type of IP
carrier.
h tt
An advanced ACL can filter multiple protocols, for example: TCP .
s :
UDP、ICMP、IP and so on. The IP packet is used to transmit
r ce
TCP and UDP, if we choose to filter IP protocols in protocol field,
it means to permit or refuse all the IP transmission based
u
so
protocol, like ICMP message, TCP messages or UDP messages;
Re
if we only plan to discard packets of specific protocols and permit
other packets to pass, then we must appoint those specific
ng
protocols.
n i
“destination { dest-address dest-wildcard | any }” indicates the
arlayer three destination of an ACL rule.
Le “icmp-type” indicates message type and code information of an
r e ICMP packet, it can take effect only when the ICMP protocol
Page673
“source-port” is used to indicate the layer four source port, it
can take effect only when the source port is defined. If it is not
indicated, it means any packet from any source port can match.
“destination-port” is used to indicate the layer four destination
port, it can take effect only when the destination port it defined. If
it is not indicated, it means a packet for any destination port can
e n
match.
m/
Precedence: An optional parameter, in which a data packet can
c o
be filtered according to priority, the range is 0~7 number or
i .
name.
w e
ua
tos: An optional parameter, that allows a data packet to be
h
filtered according to the service type. The range is 0~15 number
.
or name.
One firewall can include multiple ACL groups. Wheni
g
anpacket
r
matches an ACL rule, it should obey the following rule:n when
e
matching an ACL rule, the firewall ACL has prioritya over an
advanced ACL, an advanced ACL has priority
/ l over a basic ACL.
In firewall ACL, advanced ACL and basic
: /ACLfirst.
types, the ACL
p
with the smaller acl-number will be matched In the same
t has priority over others.
Once the data flow has matched
t
ACL rule group, rule with smaller rule-id
h ACL successfully, it will not
an
continue to look for further :matches. A firewall will implement
other operations on data s
e flow according to the ACL rule.
r c
ou
s
Re
n g
n i
ar
Le
r e
Mo
Page674
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
ni
a r
Le
r e
Mo
Page675
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
NAT is the process to transitioning individual IP addresses in IP
h
data packet headers to an alternative IP address. In the actual
application, NAT mainly implements the function to allow end
s :
systems in a private network to forward traffic over the external
network.
r ce
u
Public IP address space is limited, and as the world’s networks
so
continue to grow, available public IP address ranges have been
Re
completely absorbed. It is impossible to use the IPv4 address
ng
scheme for to apply individual public IP addresses for all end
system devices. The solution has been until now to use private
n i
IP addresses in internal enterprise networks and use public IP
a r addressing as an external interface to an internal network. The
Le private IP address cannot be used within the WAN domain, so if
Page677
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
Internet address distribution regulates that the following three
network address ranges are reserved as private address ranges.
10.0.0.0 - 10.255.255.255
s :
c e
172.16.0.0 -172.31.255.255
u r
192.168.0.0-192.168.255.255
s
The three network
o addresses will not be distributed on Internet,
R
but they can ebe used as part of an internal enterprise (LAN). The
n g chooses
enterprise proper network address range according to
Page678
As referred before, when private IP address users wish to access
public address domains such as the Internet, they must translate
private addresses to public addresses through NAT.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
s :
r ce
u
so
Re
ng
ni
a r
Le
r e
Mo
Page679
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
tt
When the Trust Zone establishes a connection to the Untrust
h
Zone and DMZ on the USG firewall, it will detect whether
corresponding data needs to implement NAT translation. If it is
s :
needed, it will be completed at the egress of IP forwarding
ce
interface, the source address of the packet (a private address) is
r
u
translated to a public address. At the ingress of the IP layer, the
e so
reply packet destination address (public address) will be
translated to a private address.
R
g network boundary. When an internal PC A
As shown in the figure above, the USG firewall is located at a
n
n i
private/public
(192.168.1.3) sends data packet1 to external server B
r
a (202.120.10.2), the data packet will go through the firewall. The
Le NAT process will check the content of the packet header, it will
Page680
when the packet gets to the firewall, NAT will check the packet
and lookup record in the NAT table. The destination address will
be replaced by a private address 192.168.1.3 of the internal PC.
The NAT process referred above is transparent to end system
devices (for example, the PC A-D and server). For the external
server, it regards IP address of internal PC as 202.169.10.1, it is
totally unaware of the address 192.168.1.3. Therefore in this
manner, NAT is able to “hide” the private network of an
e n
enterprise.
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
s :
r ce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page681
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
NO_PAT and NAPT. h tt
On USG firewall, there are two modes of address transition:
s :
c
NO_PAT: Individual privatee addresses correspond to individual
public addresses, itr
o
addresses in order
u does not need to associate ports with
to translate, and is straight forward to
s
Re todisadvantage
implement. The
private address
is that by corresponding a single
a single public address, it does not solve the
n g problem associated with public addressing. It does help
shortage
n i internal devices such as servers to allow direct mapping
to map
ardevicessimplifies
which the ability for external devices to reach such
ar
USG300/500/1000 however does not support this function.
e
l
: //
p
h tt
s :
r ce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page683
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
NAT hides the structure of the internal network, and has the
capability to “shield” internal hosts, while at the same time it
:
makes it capable for external devices to access internal hosts,
s
ce
for example, WWW server or FTP server. NAT can support
u r
internal servers, for example, address 202.168.0.11 which can
be used as an external address for the Web server, or address
so
202.168.0.12 which can be used as the external address of
Re
internally located FTP server.
n g
n
NATiprovides internal server function that external network can
arnetwork Asaccess
access. shown in the figure above, when user of external
h
:
At present, it has implemented ALG function of application
s
r ce
protocol for: DNS, FTP, H.323, HWCC, ICMP, ILS, MGCP (Media
Gateway Control Protocol), MSN , NetBIOS, PPTP , QQ, RAS
u
so
and SNP.
Re
ng
n i
a r
Le
r e
Mo
Page685
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
NAT combines NO-PAT mode and NAPT effectively on USG
firewall. If NAPT function is configured, in the process of address
:
transition, NAT will first translate private IP addresses into one
s
ce
public IP address, and then choose another public IP address to
u r
complete address translation. Address pool is the aggregation of
public IP addresses used for transition. Users should configure a
so
proper address pool according to the legal IP address quantity,
Re
host quantity within internal network and actual applications.
n g
n
USGi firewall utilizes ACL to limit address translation. Only the
arwhichpackets
data that satisfy ACL can implement address translation,
Page686
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
htt
This example introduces how NAT is configured on USG. As
shown in the figure above, firewall divides network into the
:
internal network Trust Zone, external Untrust Zone and DMZ.
s
ce
The host with the private address in Trust Zone needs to access
u r
the external network (Internet). The host with public address in
Untrust Zone needs to access the three servers of the DMZ.
so
Re
ng
n i
a r
Le
r e
Mo
Page687
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
[USG2100] nat address-group 1 202.168.0.10 202.168.0.20
//configure NAT address pool with series number 1, it includes
s :
public address for NAT transition.
[USG2100]nat-policy c e trust untrust outbound
interzone
u
//defining nat policyrbetween two areas
s o
R e
[USG2100-nat-policy-interzone-trust-untrust-outbound]policy 1
[USG2100-nat-policy-interzone-trust-untrust-outbound-1]policy
sourceg192.168.0.0 mask 24
i n the range of source IP addresses to be enabled NAT
n
//Defining
r
a [USG2100-nat-policy-interzone-trust-untrust-outbound-
Le 1]address-group 1 no-pat
Mo [USG2100-nat-policy-interzone-trust-untrust-outbound-1]action
source-nat
//Enable nat
Page688
e n
m/
c o
i .
w e
h ua
.
ing
n
e ar
l
: //
p
h tt
[USG2100] nat server global 202.168.0.10 inside 192.168.1.100
[USG2100] nat server protocol tcp global 202.168.0.11 80 inside
192.168.1.101 8080
s :
e tcp global 202.168.0.12 1021
[USG2100] nat servercprotocol
u
inside 192.168.1.102 r ftp
//command “nat s oserver” is used to define the mapping table of
R e The three commands above define separately
the internal server.
n
through
gpublic address 202.168.0.10 is able to access the
that each user can access the internal server 192.168.1.100
Page690
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
ni
a r
Le
r e
Mo
Page691
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
n i
a r
Le
r e
Mo
Page692
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
Q: Which operational modes does USG support?
A: Route mode, transparent mode and composite mode.
s :
c
Q: What are the default eUSG security zones?
u r Zone, DMZ and Local.
o
A: Trust Zone, Untrust
s
e
Q: What isRthe difference between a basic ACL and an advanced
ACL?ng
i
A:nA basic ACL only uses the source address to define data flow,
arwhereas an advanced ACL uses source/destination address,
Le source/destination port and upper-layer protocol to define data
r e flow.
Mo
Q: Which forms of NAT does USG support?
A: NO-PAT, NAPT.
Page693
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
hua
.
ng
Module 6 rni
e a
Product/l
/ :
p
htt
s :
c e
u r
s o
Re
n g
ni
a r
Le
r e
Mo
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
To calculate the spanning tree, switches need to exchange
s :
Configuration Bridge Protocol Data Unit (BPDU) and transmitted
between switches. c e
u r
In a broad sense, a BPDU refers to a data unit used to exchange
s o
information between switches. The configuration BPDU is one
Re
type of the BPDU.
g
Calculation of the spanning tree starts from election of the root
n
i
bridge. The root bridge is elected based on the bridge identifier.
rAn
bridge identifier consists of a 2-byte bridge priority and a 6-byte
a MAC
Le address. The bridge priority is configurable. The value
ranges from 0 to 65535 and the default value is 32768.
r e In the network, the switch with the smallest identifier becomes
Mo the root bridge. The system first compares the priority. If the
switches have the same priority, the system compares their MAC
addresses. The switch with the smallest MAC address is elected
first.
In this example, the three switches have the same priority. SWA
has the smallest MAC address, so SWA is elected as the root
bridge.
Page502
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page697
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page698
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page699
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page700
e n
m/
c o
i .
w e
h ua
.
ing
n
Huawei HUAWEI NetEngine40E UniversaleService ar Router
isla high-end router
z
s :
c e
u r
s o
Re
n g
rni
e a
L
r e
Mo
Page701
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page702
e n
m/
c o
i .
w e
h ua
.
ng
i
n
rAll LPUs can
a
z
Page703
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page704
e n
m/
c o
i .
w e
h ua
.
ng
i
n
ras shown in
The NE40E-X adopts a system architecture e a
Figure above. In this architecture,/l
z
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page705
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page706
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page707
e n
m/
c o
i .
w e
h ua
.
ing
r n
e
The control plane of the NE40E-X16 adopts MPU. a
z
l
The following USB interface attributes are/supported by MPU:
z
: /
t
Supports the biggest USB fat32p format, and supports the
ht
s : not allowed to write USB storage
For security reasons
device .
c e
u r
Updates automatically, insert the USB memory without
s o
any operating.
R e
n g
n i
a r
Le
r e
Mo
Page708
e n
m/
c o
i .
w e
h ua
.
ng
i
n
r the data
The control plane of the NE40E is separated e afrom
z
s
e in the market.
Supports the biggest
c
r
memory available
u
s o reasons not allowed to write USB storage
For security
Re .
device
n i any operating.
a r
Le
r e
Mo
Page709
e n
m/
c o
i .
w e
h ua
.
ing
n
r the system
e
The MPU of the NE40E-X3 controls and manages a
z
and switches data. The MPUs work in 1+1 /lbackup mode. The
/
: switching unit, system
MPU consists of the main control unit,
p
t and system maintenance
t
clock unit, synchronous clock unit,
unit. The functions of the hMPU are described from the
following aspects.
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page710
e n
m/
c o
i .
w e
h ua
.
ngi
n
r and is
e
A switching network is a key component of the aNE40E
z
/l
responsible for switching data between LPUs.
: /
t p
h t
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page711
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page712
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page713
e n
m/
c o
i .
w e
h ua
.
i ng
n
r (PFE)
a
z
le Specific
As shown in the figure, the Packet Forwarding Engine
adopts a Network Processor (NP) or an/Application
:
Integrated Circuit (ASIC) to implement/ high-speed packet
t p Static Random Access
ht Access Memory (DRAM),
routing. External memory types include
Memory (SRAM), Dynamic Random
n g
flow.
iUpstream process: The Physical Interface Card (PIC)
n encapsulates packets to frames and then sends them to the
r
z
a
Le PFE. On the PFE of the inbound interface, the system
Page714
z , the system searches the Forwarding Information Base (FIB)
for the outbound interfaces and next hops of packets to be
forwarded. To forward an IPv4 unicast packet, for instance,
the system searches the FIB for the outbound interface and
next hop according to the destination IP address of the
packet. Finally, the system sends the packets containing
information about outbound interfaces and next hops to the
e n
traffic management (TM) module.
m/
Downstream process: Information about packet types that c o
.
z
e
according to the QoS configurations on the outbound
l
//
interfaces. Finally, the system encapsulates the packets with
:
new Layer 2 headers on the outbound interfaces and sends
p
tt
them to the PIC.
h
s :
r ce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page715
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page716
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page717
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page718
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page719
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page720
e n
m/
c o
i .
w e
h ua
.
ing
n
r is the
The NE40E supports entire HQoS solutions, e a
HUAWE
z
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page721
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page722
e n
m/
c o
i .
w e
h ua
.
ng
i
n
r and IDC
The main scenario of NE40E Router: Campus e a
z
l
/ of WAN.
interconnection, Large branch access, Key nodes
: /
t p
h t
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page723
e n
m/
c o
i .
w e
h ua
.
ing
n
r of NE40E-
z
e a
What is the difference between the control planes
X8 and NE40E-X16?
The control plane of the NE40E-X8 /
l
data plane and the monitoring / is separated from the
:SRU integrates
plane. The SRU is
adopted on the NE40E-X8. The
t p an SFU
used for data switching.
The control plane of theh tNE40-X16 is MPU, on which
: the SFUs of NE40E-X8 and
doesn’t integrate SFU.
What is the difference esbetween
z
NE40E-X16?
r c
The SFU u
system o
on the NE40E-X8 switches data for the entire
s at wire speed of 480 Gbit/s (240 Gbit/s for the
e Thistraffic
upstream and 240 Gbit/s for the downstream
R
traffic). ensures a non-blocking switching network.
g The NE40E-X8 has three SFUs working in 2+1 load
Page724
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
s :
r ce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page725
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page726
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page727
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page728
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page729
e n
m/
c o
i .
w e
h ua
.
ing
n
r The first
e a
Huawei routers have evolved for three generations.
z
l
/ design, the
generation routers use integrated single-core
second generation routers integrated /
: multi-core design, and
p
t multi-core design.
Huawei AR G3 series routers
t
the third-generation routers distributed
h (AR G3 routers for short)
:access modes, including Ethernet,
z
Page730
e n
m/
c o
i .
w e
h ua
.
ng
i
n
r in the
The AR G3 routers provide the highest port e adensity
industry and flexible service interface/lcard (SIC) slots,
z
: / to a LAN, WAN, or
allowing enterprise customers to connect
wireless network. The AR G3tp
t routers provide the most
h solutions.
economical enterprise network
s
The AR G3 routers provide: flexible slot combinations. Two
z
n
customers
ieconomically.
r n
a
Le
r e
Mo
Page731
e n
m/
c o
i .
w e
h ua
.
i ng
n
r of routers,
The AR G3 routers integrate various servicese a
z
l
/ firewall, and
switches, and wireless devices, including voice,
VPN. : /
t p
h t
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page732
e n
m/
c o
i .
w e
h ua
.
i ng
n
rcan access
Depending on telecom carriers' networks, userse a
z
c
wireless servicese to ensure secure, fast, and reliable
u
data packet rforwarding.
s oa variety of value-added services, including
Re network address translation (NAT), domain name
Provide
DHCP,
n gsystem (DNS), and billing services.
n i
a r Provide security control mechanisms, including
Le
controlling access to internal networks and user rights, to
ensure the access security on the enterprise intranet and
Page733
z The headquarters and branches use the AR G3 routers to
connect each other on the Internet. The enterprise establishes
a VPN and uses GRE/IPSec VPN tunnels to secure the data.
The employees on a business trip use IPSec VPN tunnels to
communicate with the headquarters.
. h
gcan
the IP network, saving fees on internal communication. Within
n
ni In the
the voice communication system, an AR G3 router
function as an IP PBX or SIP access gatewayr(AG).
downlink direction, the router connects to POTSe ausers (analog
/ l (UE) users
phones or fax machines) and SIP user equipment
/ FXS or Ethernet
(IP phones or PC software terminals):through
t
interfaces. In the uplink direction, pthe router connects to the
PSTN through E1 or FXS h t or to the IP network
interfaces
s :
through Ethernet interfaces.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page734
e n
m/
c o
i .
w e
h ua
.
ing
n
roffices. They
The AR200 series routers apply to small-scale e a
z
c
They provide multiplee access modes, such as wireline LAN
and wireless AP.u rAdditionally, these routers provide flexible
s o users to install subcards to extend interfaces
slots that allow
Refunctions.
and enrich
n
The gAR2200 series routers feature powerful routing functions
iand multiple access modes. They support a variety of
z
r e the AR2240 is equipped with two main control boards and two
Page735
z The AR3200 series routers have a large capacity. They
provide many flexible slots that allow users to install different
cards in different usage scenarios. Additionally, their slots can
be combined to provide a higher port density. To improve
system reliability, these routers are configured with two main
control boards and two power supplies for redundancy
backup.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
s :
r ce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page736
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page737
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page738
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page739
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page740
e n
m/
c o
i .
w e
h ua
.
ing
n
r families in
Huawei has the most extensive enterprise switche a
z
/l
the industry, ranging from low-end, medium-range, to high-
end. : /
p
tS5700 switches are used at
z The S1700, S2700, S3700, and t
the access layer of a campushnetwork. The S1700 and S2700
s
provide Layer 2 FE access.: The S3700 supports Layer 3 FE
e for Layer 3 GE access and has a
access. The S5700callows
u
high port density.r Additionally, the S5700 supports cluster
management s oand features high fault tolerance through the use
Re technology.
of stacking
n
The gS5700, S7700, and S9300 are used at the convergence
ilayer of a campus network. These switches provide powerful
z
Page741
z campus network. They also apply to the access and core
switching layers of a large-scale data center. With a high port
density and a variety of cards, these switches provide various
ports to meet different requirements.
e n
m/
c o
i .
w e
h ua
.
i ng
n
e ar
l
: //
p
h tt
s :
r ce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page742
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page743
e n
m/
c o
i .
w e
h ua
.
ing
n
r enterprise
The SX7 series switches are intended for e athe
z
s :
cards in various usage scenarios.
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page744
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page745
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page746
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page747
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page748
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page749
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page750
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page751
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page752
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page753
e n
m/
c o
i .
w e
h ua
.
i ng
n
Principleᷛ ear
z
l
S2700/3700/5700/6700 is integrated /with internal HTTP
z
ht
interface through a variety of WEB
s :
c e
u r
s o
Re
n g
n i
a r
Le
r e
Mo
Page754
e n
m/
c o
i .
w e
h ua
.
ng
i
n
r implement
The following requirements must be met e ato
z
stacking: /l
All the member switches belong to :
/
z
p the same series. The EI
ta stack.
t
series and SI series cannot form
h
z
s :
All the member switches are connected by using stack cables
ce
and stack modules.
Page755
e n
m/
c o
i .
w e
h ua
.
ing
n
rprerequisites,
If all the member switches meet the stack setup e a
z
If all the devices starteat the same time, the one of the highest
z
priority becomes r
c
o u the master switch.
z
e s have the same priority and start at the same
If all the devices
time, theR one with the smallest MAC address becomes the
n g switch.
master
a The device that starts first among all the other devices
Le
z
r e
Mo z If all the other switches excluding the master switch start at
Page756
z the same time, the master switch preferentially selects the
switch connected to its stack interface 1 as the standby
switch.
Page757
e n
m/
c o
i .
w e
h ua
.
ing
n
r It provides
e a
The S7700 is a next generation switch of Huawei.
z
l
/ density ports.
large capacity, line-speed forwarding, and high
The S7700 is an important product for /
: establishing the MANs
in the future. The S7700 can t p
switch or a core switch for
t be used as an aggregation
h enterprise networks, campus
s :
networks, and data centers.
speed FE, s
o
Reswitch for enterprise networks, campus networks,
GE, and 10GE interfaces. The S7700 can function
as a core
n
and gdata centers.
n i
a r
Le
r e
Mo
Page758
e n
m/
c o
i .
w e
h ua
.
ing
n
rand S7712.
e
The S7700s are classified into the S7703, S7706,a
z
l
The S7700 uses a fully distributed/architecture and the
: / technology. The
tpthe interfaces can be
latest hardware forwarding engine
services supported by tall
forwarded at wire speed. h These services include IPv4,
MPLS, and Layers 2: forwarding services. The S7700 can
e
also use ACLscto forward packets at wire speed.
u rsupports wire-speed forwarding of multicast
The S7700
s o The hardware implements 2-level multicast
Re
packets.
replication:
n gThe SFU replicates multicast packets to the LPU.
n i
Page759
the large capacity and high-density interfaces of core
and convergence layer devices. The S7700 can meet
the increasing bandwidth requirements and maximally
reduce investments.
h u
.
architecture. The switching capability is 720 Gbit/s, that is,
g
120 Gbit/s x 2 x 3 (3 LPUs).
i n
z S7706/S7712's switching capacity:
r n
Adopting the switching network architecture,e athe S7706 or
l HIG group, that
z
/
S7712 provides 16 Gbit/s bandwidth in each
/The channel between
:
is, 4 x 5 Gbit/s x 8/10 (8B/10B code).
p four HIG groups (an
t
each slot and the backplane supports
active SRU and a standby ht SRU); therefore, the total
bandwidth for each slot is:64 Gbit/s. Each 12x10GE LPU slot
e s therefore, the total bandwidth is
c
supports eight HIG groups;
128 Gbit/s. (Onlyrtwo 12x10GE LPUs of the S7712 support
ou
s switching capability of the S7706 or S7712 is
wire-speed forwarding.)
e
z
R that is, 16 Gbit/s x 16 (ports) x 1 (switching
The maximum
2048
n g Gbit/s,
a r
Le
r e
Mo
Page760
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page761
e n
m/
c o
i .
w e
hua
.
ing
n
ISSU=In-service software upgrade. ear
l
z
://
p
h tt
s :
r ce
u
so
Re
n g
n i
a r
Le
r e
Mo
Page762
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
n g
ni
a r
Le
r e
Mo
Page763
e n
m/
c o
i .
w e
h ua
.
ing
n
r campus
e a
The figure on this slide shows a typical enterprise
network. Within this network, you can/l
z
Page764
e n
m/
c o
i .
w e
h ua
.
ing
n
1. What is the positioning of AR G3 ᷠ e ar
l
z
/
Deployment Position ᷛBetween an internal/ network and a
:
public network .
s :
switching cards/MSTP/VLAN/Static port aggregationᷜMPLS
VPN .
c e
u r
s o
Security ᷛEnterprise-class
IPSec/GRE/MPLS.
firewall ᷜIntegrated VPN access:
z 2.What R
e
are the Characteristics of Huawei Switches for Enterprises
ᷠ g
i n Seamless upgrading of port switching capacity.
n
ar
Le
Highly compatible software platform.
re
Universal platform and energy-efficient chips.
Mo
Page765
e n
m/
c o
i .
w e
hua
.
ing
n
ear
l
://
p
htt
s :
rce
u
so
Re
ng
ni
a r
Le
r e
Mo
The privilege of HCNA/HCNP/HCIE:
With any Huawei Career Certification, you have the privilege on http://learning.huawei.com/en to enjoy:
1、Comprehensive E-Learning Courses e n
m/
Content:All Huawei Career Certification E-Learning courses
c o
i .
Methods to get the E-learning privilege : submit Huawei Account and email being used for Huawei Account
registration to Learning@huawei.com . w e
u a
2、 Training Material Download
. h
Content: Huawei product training material and Huawei career certification
n g training material
Method:Logon http://learning.huawei.com/en and enter HuaWei n iTraining/Classroom Training ,then you can
ar
: /
t p all ICT technical domains like R&S, UC&C, Security,
Content:The Huawei career certification training covering
Storage and so on, which are conducted by Huawei ht professional instructors
Method:The plan and participate method please
s: refer to LVC Open Courses Schedule
e