Professional Documents
Culture Documents
7 Module 5 03 Apr 2021material I 03 Apr 2021 Routing
7 Module 5 03 Apr 2021material I 03 Apr 2021 Routing
7 Module 5 03 Apr 2021material I 03 Apr 2021 Routing
• Hop
• The packet passes through a router
• The next hop
• the destination address of the next gateway
• A router doesn't need to know how to get everywhere
• It just needs to know how to get out of here
• A default route handles everything not specifically listed
• TTL in IPV4, hop limit in IPV^
• Avoid packet looping forever
• Every router needs to know where traffic should be dent.
• A router with the incorrect next hop will result in a routing problem
• Data will go wrong direction
Routing table
• Directions for the packets that is send.
• A table with routes to your destination.
• Packets stop at every router and ask for directions.
• The actual forwarding of IP packets by routers is called IP routing
Above we have two host computers and two routers. H1 is going to send an IP packet to
H2 which has to be routed by R1 and R2.
• IP Routing process
• Host (H1)
• This host creates an IP packet with its own IP address (192.168.1.1) as
the source and H2 (192.168.2.2) as the destination
• The first question from the H1 host is, Whether the destination is local or
remote?
• We need to know the mask,
Subnet Mask . . . . . . . . . . . : 255.255.255.0
• What is the network id, 192.168.1.0 so all IP addresses in the 192.168.1.1 –
254 range are local.
• Our destination (192.168.2.2) is outside of the local subnet so that
means we have to use the default gateway.
• do I know the destination MAC address of the default gateway?
• It checks its ARP table to find the answer, sends an arp request
Internet Address Physical Address
192.168.1.254 fa-16-3e-3f-fd-3c
• H1 will prepare its data,
A
B
C
D
New table, Router B
Destn Dist Nxt
Cost of reaching destination A from router B = min { 2+0 , 3+∞ , 7+1 } = 2 via A. hop
Cost of reaching destination C from router B = min { 2+∞ , 3+0 , 7+11 } = 3 via C.
A 2 A
Cost of reaching destination D from router B = min { 2+1 , 3+11 , 7+0 } = 3 via A
B 0 B
C 3 C
D 3 A
New table, Router C
Destn Dist Nxt
hop
A 5 B
B 3 B
C 0 C
D 10 B
C 6 A
D 0 D