Escolar Documentos
Profissional Documentos
Cultura Documentos
Basic conception
IP routing process
Router definition(1)
RouterA kind of computer device used to interconnect
network
Router functions(2)
The core function of router is interconnecting networks and
data forwarding.
Basic conception
IP routing process
Basic concepts
routed protocol
routing protocol
connected route
static route
dynamic route
default route
172.16.2.0
E0
S0
Network
Protocol
Connected
RIP
OSPF
Destination
Network
10.120.2.0
172.16.2.0
172.17.3.0
Exit Interface
fei_0/1
e1_1
e1_2
Routed protocol: IP
Routing protocol: RIP, OSPF
172.17.3.0
Route table
The information that router need to forward data is stored in a
table, called route table
Router check the destination address of the packet,and
choose the next hop based on the information in route table.
Route table is stored in RAM
Example
Dest
Mask
Gw
Interface
172.16.8.0
255.255.255.0
1.1.1.1
fei_0/1.1
static
172.16.8.0
255.255.255.0
1.1.1.1
fei_0/1.1
static
1
0
--------
Route Types
Directly
connected route
Static route
Default route
Dynamic route
192.168.0.1/30
A
IPv4 Routing Table:
Dest
Mask
10.0.0.0
10.0.0.1
192.168.0.0
192.168.0.1
ZXR10#
255.255.255.0
255.255.255.255
255.255.255.252
255.255.255.255
192.168.0.2/30
172.16.0.1/24
Gw
10.0.0.1
10.0.0.1
192.168.0.1
192.168.0.1
fei_0/1
fei_0/1
fei_1/1
fei_1/1
direct
0
address 0
direct
0
address 0
0
0
0
0
Stub Network
172.16.1.0
10.0.0.0
Network
SO
B
172.16.2.2
172.16.2.1
A
B
Example
172.16.1.0
Network
ip route
SO
A
172.16.2.2
172.16.2.1
0.0.0.0 0.0.0.0
172.16.2.2
Dynamic route
OSPF
1.0.0.0/8
RIP
OSPF
2.0.0.0/8
RIP
3.0.0.0/8
Route priority
Select the route that has the highest priority to the route table
10.0.0.0/16
RIP
OSPF
fei_1/1
10.0.0.0/16
10.0.0.0/16
Notice the comparison of
route priority must be between
identical routes.
fei_1/3
Route table
fei_1/3
Default priority
0
1
20
110
115
120
200
255
fei_1/1
e1_2/1.1
DDN
Network
serial_3/1
PSTN
e1_2/1.1
DDN
Network
serial_3/1
PSTN
255.0.0.0
255.255.255.255
255.0.0.0
255.255.255.255
255.0.0.0
255.255.255.255
255.0.0.0
255.255.0.0
255.255.255.0
0.0.0.0
Gw
Interface
Owner
pri
1.1.1.1
1.1.1.1
2.1.1.1
2.1.1.1
3.1.1.1
3.1.1.1
1.1.1.1
2.1.1.1
3.1.1.1
1.1.1.1
fei_1/1.1
fei_1/1.1
fei_1/1.2
fei_1/1.2
fei_1/1.3
fei_1/1.3
fei_1/1.1
fei_1/1.2
fei_1/1.3
fei_1/1.1
direct
address
direct
address
direct
address
ospf
static
rip
static
0
0
0
0
0
0
110
1
120
0
10.1.1.1?
0
0
0
0
0
0
10
0
5
0
Basic conception
IP routing process
Forwarding function
Data transferring and processing procedure(Receiving data
on one interface,then choose an appropriate interface to send
it out, including the work of frame encapsulation and
decapsulation)
Route function
Study and maintain the network topology mechanism is
regarded as the function of routing.It requires several basic
information
Forwarding Function
Frame checking and cache the
packet
Associate destination address
with the next hop interface
Create the frame head with the
physical address
Coming
interface
Route
table
ARP cache
LAN Mapping list
WAN
Out
interface
Maintained by routing
protocol
Maintained by
ARP or RARP
process
Routing
Routing
Routing
process
Routing
process
process
process
Route
table
Forwarding
process
Longest match
principles
Basic conception
IP routing process
To router1
Hub/switch
Communication
requirement
Communication process
Network
A
Hub
IP address 192.168.1.1
MAC
address
00:20:AF:00:00:01
Protocol
layer
IP layer
Encapsulate IP
address in
packet and send
to 192.168.1.2
No need to consider
higher layer protocols
IP address 192.168.1.2
MAC
address
00:20:AF:00:00:02
decapsulate
IP packet
Receiving
IP packet
IP layer
ARP
Ethernet
Encapsulate MAC
address in frame
and send to MAC
address
00:20:AF:00:00:02
Decapsulate
MAC frame
Receiving
MAC frame
Ethernet
Ethernet
PPP
Communication
requirements
Router
Network B
Ethernet
Ethernet
fei-1/1
HOST A
Ethernet
Send host
A
e1_2/1.1
No need to consider
higher layer protocols
Protocol
IP layer
e1_2/1.1
IP
packet
IP
packet
MAC
frame
IP layer
Ethernet
interface
Serial
interface
fei-1/1
HOST B
No need to consider
higher layer protocols
IP
IP
packet packet
PPP
frame
router
IP layer
Serial
interface
Ethernet
interface
router
PPP
packet
IP
IP
packet packet
IP layer
Ethernet
MAC
frame
Receiving
host B
Communication process
Get peer IP address
Whether in the same
network
with peer
YES
NO
YES
NO
Is gateway
configured
NO
YES
YES
Send data at
physical layer
NO
End
Get gateway MAC
address by ARP
IP communication process
IP communication process basic conception:
Every time the packet passed a data link layer,there will be a new
encapsulation of the packet
C
A
X
Application
Presentation
Session
Transport
Network
Data Link
Physical
A
Network
Data Link
Physical
Y
B
Network
Data Link
Physical
C
Network
Data Link
Physical
Application
Presentation
Session
Transport
Network
Data Link
Physical
192.168.1.0 /24
fei_1/1
R2
e1_1/1.1
192.168.4.0 /24
R1 route table
192.168.4.0 255.255.255.0 192.168.4.1 e1_1/1.1
0
0
192.168.2.0 255.255.255.0 192.168.2.1 fei_1/1
0
0
192.168.1.0 255.255.255.0 192.168.4.2 e1_1/1.1
120 1
192.168.6.0
e1_2/1.1 255.255.255.0 192.168.4.2 e1_1/1.1
120 1
192.168.6.0
/24
192.168.3.0
255.255.255.0
192.168.4.2 e1_1/1.1
120 2
e1_1/1.1
e1_1/1.1
R3
R1
fei_1/1
Destination address:
192.168.3.3
192.168.2.0 /24
192.168.2.3
fei_1/1
192.168.3.0 /24
B
192.168.3.3
direct
direct
rip
rip
rip
192.168.1.0 /24
fei_1/1
R2
e1_1/1.1
192.168.4.0 /24
e1_1/1.1
R2 route table
192.168.4.0 255.255.255.0 192.168.4.2 e1_1/1.1 direct
0
0
192.168.6.0 255.255.255.0 192.168.6.1 e1_2/1.1 direct
0
0
192.168.1.0 255.255.255.0 192.168.1.1 fei_1/1 direct 0
0
192.168.2.0 255.255.255.0 192.168.4.1 e1_1/1.1 rip
120 1e1_2/1.1
192.168.3.0 255.255.255.0 192.168.6.2 e1_1/1.1 rip
192.168.6.0 /24
120 1
Destination Address:
192.168.3.3
e1_1/1.1
R1
R3
fei_1/1
fei_1/1
192.168.3.0 /24
192.168.2.0 /24
192.168.2.3
1.Destination address:192.168.3.3
192.168.3.3
192.168.1.0 /24
fei_1/1
R2
e1_1/1.1
192.168.4.0 /24
e1_1/1.1
R3 route table
192.168.3.0 255.255.255.0 192.168.3.1 fei_1/1
0
0
192.168.6.0 255.255.255.0 192.168.6.2 e1_1/1.1
0
0
192.168.1.0 255.255.255.0 192.168.6.1 e1_1/1.1
120 1
192.168.4.0 255.255.255.0 192.168.6.1 e1_1/1.1
e1_2/1.1
120 1
192.168.6.0
/24
192.168.2.0
255.255.255.0
192.168.6.1 e1_1/1.1
120 2
Destination address:
192.168.3.3
R1
e1_1/1.1
R3
fei_1/1
fei_1/1
192.168.3.0 /24
192.168.2.0 /24
192.168.2.3
Return path
192.168.3.3
direct
direct
rip
rip
rip
Review
Definition of router
Router functions
Basic conceptions in routing
IP routing process within the same subnet
IP routing process between different subnet
Questions
Whats the two main functions of router?
How is the route table established?
What is the standard when a router is selecting the route to
route table?
When forwarding IP packet, If there are many matches, what
will router do?
Describe the encapsulation and decapsulation during the
process of IP routing .
univ.zte.com.cn