F2

548
-1

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
548
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

F2

  1. 1. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Routing Protocols Laurent Toutain Laurent Toutain Fili`re 2 e 1 / 31
  2. 2. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Router configuration Router’s interface must be manually configured assign an address + a prefix length routers install automatically in the FIB the prefix assigned to the interface δ.1 FIB eth3 Prefix Next Hop γ.1 α.1 Router α eth0 eth2 eth0 β eth1 eth1 γ eth2 δ eth3 β.1 Laurent Toutain Fili`re 2 e 2 / 31
  3. 3. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example : Cisco router RouterB25#sh ip ro Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is 193.50.69.73 to network 0.0.0.0 B 193.52.74.0/24 [200/0] via 193.50.69.74, 1d05h 192.44.77.0/24 is variably subnetted, 2 subnets, 2 masks B 192.44.77.0/24 [200/0] via 193.50.69.74, 1d05h C 192.44.77.96/28 is directly connected, GigabitEthernet0/1.16 10.0.0.0/24 is subnetted, 6 subnets S 10.1.1.0 [1/0] via 192.108.119.196 S 10.35.1.0 [1/0] via 192.108.119.205 S 10.35.4.0 [1/0] via 192.108.119.162 S 10.35.30.0 [1/0] via 192.108.119.160 C 10.51.0.0 is directly connected, GigabitEthernet0/1.51 C 10.49.0.0 is directly connected, GigabitEthernet0/1.49 192.108.119.0/24 is variably subnetted, 6 subnets, 4 masks C 192.108.119.128/25 is directly connected, GigabitEthernet0/1.5 .... Laurent Toutain Fili`re 2 e 3 / 31
  4. 4. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example : Cisco router RouterB25#sh ip ro Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is 193.50.69.73 to network 0.0.0.0 B 193.52.74.0/24 [200/0] via 193.50.69.74, 1d05h 192.44.77.0/24 is variably subnetted, 2 subnets, 2 masks B 192.44.77.0/24 [200/0] via 193.50.69.74, 1d05h C 192.44.77.96/28 is directly connected, GigabitEthernet0/1.16 10.0.0.0/24 is subnetted, 6 subnets S 10.1.1.0 [1/0] via 192.108.119.196 S 10.35.1.0 [1/0] via 192.108.119.205 S 10.35.4.0 [1/0] via 192.108.119.162 S 10.35.30.0 [1/0] via 192.108.119.160 C 10.51.0.0 is directly connected, GigabitEthernet0/1.51 C 10.49.0.0 is directly connected, GigabitEthernet0/1.49 192.108.119.0/24 is variably subnetted, 6 subnets, 4 masks C 192.108.119.128/25 is directly connected, GigabitEthernet0/1.5 .... Laurent Toutain Fili`re 2 e 3 / 31
  5. 5. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example : Unix % ifconfig en1 192.168.2.100/24 % netstat -rnf inet Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.2.1 UGSc 30 16 en1 10.37.129/24 link#8 UCS 1 0 en2 10.37.129.2 127.0.0.1 UHS 0 160 lo0 10.37.129.255 link#8 UHLWb 2 131 en2 10.211.55/24 link#9 UCS 2 0 en3 10.211.55.2 127.0.0.1 UHS 0 39 lo0 10.211.55.255 link#9 UHLWb 1 76 en3 127 127.0.0.1 UCS 0 0 lo0 127.0.0.1 127.0.0.1 UH 9 252039 lo0 169.254 link#5 UCS 0 0 en1 192.168.2 link#5 UC 1 0 en1 192.168.2.1 0:13:10:83:d5:3c UHLW 3 54 en1 1194 192.168.2.100 127.0.0.1 UHS 0 3 lo0 Laurent Toutain Fili`re 2 e 4 / 31
  6. 6. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example : Unix % ifconfig en1 192.168.2.100/24 % netstat -rnf inet Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.2.1 UGSc 30 16 en1 10.37.129/24 link#8 UCS 1 0 en2 10.37.129.2 127.0.0.1 UHS 0 160 lo0 10.37.129.255 link#8 UHLWb 2 131 en2 10.211.55/24 link#9 UCS 2 0 en3 10.211.55.2 127.0.0.1 UHS 0 39 lo0 10.211.55.255 link#9 UHLWb 1 76 en3 127 127.0.0.1 UCS 0 0 lo0 127.0.0.1 127.0.0.1 UH 9 252039 lo0 169.254 link#5 UCS 0 0 en1 192.168.2 link#5 UC 1 0 en1 192.168.2.1 0:13:10:83:d5:3c UHLW 3 54 en1 1194 192.168.2.100 127.0.0.1 UHS 0 3 lo0 Laurent Toutain Fili`re 2 e 4 / 31
  7. 7. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Static route Manually configured routes δ.1 α e0 α.2 .1 e0 R2 e1 e1 e3 α e0 β γ.1 e1 α.1 e2 R1 e0 γ e2 e3 δ e1 β.1 simple to configure, but subject to errors (loops) cannot find another path if router fails Laurent Toutain Fili`re 2 e 5 / 31
  8. 8. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Static route Manually configured routes δ.1 α e0 α.2 .1 e0 R2 e1 e1 e3 α e0 β e1 γ.1 α.1 γ e2 R1 e2 e0 e3 δ α.2 e1 β.1 simple to configure, but subject to errors (loops) cannot find another path if router fails Laurent Toutain Fili`re 2 e 5 / 31
  9. 9. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Static route Manually configured routes δ.1 α e0 e1 α.2 .1 β e0 R2 α.1 e1 γ e3 α.1 α.1 δ α e0 β e1 γ.1 α.1 γ e2 R1 e2 e0 e3 δ α.2 e1 β.1 simple to configure, but subject to errors (loops) cannot find another path if router fails Laurent Toutain Fili`re 2 e 5 / 31
  10. 10. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Static route Manually configured routes δ.1 α e0 e1 α.2 .1 β e0 R2 α.1 e1 γ e3 α.1 α.1 δ α e0 β e1 γ.1 α.1 γ e2 R1 e2 e0 e3 δ α.2 Internet e1 γ.2 β.1 simple to configure, but subject to errors (loops) cannot find another path if router fails Laurent Toutain Fili`re 2 e 5 / 31
  11. 11. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Static route Manually configured routes δ.1 α e0 e1 β α.1 α.2 .1 e0 R2 e1 γ α.1 e3 α.1 δ α 0/0 e0 α.1 β e1 γ γ.1 e2 α.1 e2 R1 e0 e3 δ α.2 Internet γ.2 0/0 e1 γ.2 β.1 simple to configure, but subject to errors (loops) cannot find another path if router fails Laurent Toutain Fili`re 2 e 5 / 31
  12. 12. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Static route Manually configured routes δ.1 α e0 e1 β α.1 α.2 .1 e0 R2 e1 γ α.1 e3 α.1 δ α 0/0 e0 α.1 β e1 γ γ.1 e2 α.1 e2 R1 e0 e3 δ α.2 Internet γ.2 0/0 e1 γ.2 β.1 simple to configure, but subject to errors (loops) cannot find another path if router fails Laurent Toutain Fili`re 2 e 5 / 31
  13. 13. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Static route Manually configured routes δ.1 α e0 e1 β α.1 α.2 .1 Broken e0 R2 e1 γ α.1 e3 α.1 δ α 0/0 e0 α.1 β e1 γ γ.1 e2 α.1 e2 R1 e0 e3 δ α.2 Internet α γ.2 0/0 e0 e1 e1 β γ.2 α.1 α.3 .2 e0 R3 e1 γ α.1 α.1 δ 0/0 α.1 β.1 simple to configure, but subject to errors (loops) cannot find another path if router fails Laurent Toutain Fili`re 2 e 5 / 31
  14. 14. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example : commands BSD: route add 10.1.2.0/24 10.0.0.1 route add default 10.0.0.1 Linux: route add 10.1.2.0/24 gw 10.0.0.1 route add default 10.0.0.1 Cisco: ip route 10.1.2.0 255.255.255.0 10.0.0.1 ip route 0.0.0.0 0.0.0.0 10.0.0.1 Laurent Toutain Fili`re 2 e 6 / 31
  15. 15. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example : Cisco router RouterB25#sh ip ro Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route Gateway of last resort is 193.50.69.73 to network 0.0.0.0 B 193.52.74.0/24 [200/0] via 193.50.69.74, 1d05h 192.44.77.0/24 is variably subnetted, 2 subnets, 2 masks B 192.44.77.0/24 [200/0] via 193.50.69.74, 1d05h C 192.44.77.96/28 is directly connected, GigabitEthernet0/1.16 10.0.0.0/24 is subnetted, 6 subnets S 10.1.1.0 [1/0] via 192.108.119.196 S 10.35.1.0 [1/0] via 192.108.119.205 S 10.35.4.0 [1/0] via 192.108.119.162 S 10.35.30.0 [1/0] via 192.108.119.160 C 10.51.0.0 is directly connected, GigabitEthernet0/1.51 C 10.49.0.0 is directly connected, GigabitEthernet0/1.49 192.108.119.0/24 is variably subnetted, 6 subnets, 4 masks C 192.108.119.128/25 is directly connected, GigabitEthernet0/1.5 .... Laurent Toutain Fili`re 2 e 7 / 31
  16. 16. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Routing Protocol Definition A routing protocol is an application sharing knowledge among routers to construct FIB The application may have its own database different from the FIB Two families of routing protocol are defined: Interior Gateway Protocol Simple configuration (even if protocol can be complex) Discover other routers, and exchange information Ex: RIPv2 (Distant Vector), OSPF or IS-IS (Link State) Exterior GAteway Protocol A lot of controls, nothing is automatically learnt Complex configuration to hide or show prefixes Used mainly between providers Only one protocol used : Border Gateway Protocol Laurent Toutain Fili`re 2 e 8 / 31
  17. 17. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee router’s behavior All router have a manual configuration of their interfaces Prefixes learnt from this configuration are spread among other routers Routers select announcement and add these prefixes in their FIB Routing announcement and traffic (forwarding) go the opposite direction R1 R2 R3 R.P. R.P. R.P. FIB FIB FIB Laurent Toutain Fili`re 2 e 9 / 31
  18. 18. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee router’s behavior All router have a manual configuration of their interfaces Prefixes learnt from this configuration are spread among other routers Routers select announcement and add these prefixes in their FIB Routing announcement and traffic (forwarding) go the opposite direction R1 R2 R3 R.P. R.P. R.P. α,FIB γ,FIB ,FIB β δ ζ Laurent Toutain Fili`re 2 e 9 / 31
  19. 19. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee router’s behavior All router have a manual configuration of their interfaces Prefixes learnt from this configuration are spread among other routers Routers select announcement and add these prefixes in their FIB Routing announcement and traffic (forwarding) go the opposite direction R1 R2 R3 α,R.P. γ,R.P. ,R.P. β δ ζ α,FIB γ,FIB ,FIB β δ ζ Laurent Toutain Fili`re 2 e 9 / 31
  20. 20. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee router’s behavior All router have a manual configuration of their interfaces Prefixes learnt from this configuration are spread among other routers Routers select announcement and add these prefixes in their FIB Routing announcement and traffic (forwarding) go the opposite direction R1 R2 R3 Routing Protocol Routing Protocol α,R.P. γ,R.P. ,R.P. β δ ζ α,FIB γ,FIB ,FIB β δ ζ Laurent Toutain Fili`re 2 e 9 / 31
  21. 21. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee router’s behavior All router have a manual configuration of their interfaces Prefixes learnt from this configuration are spread among other routers Routers select announcement and add these prefixes in their FIB Routing announcement and traffic (forwarding) go the opposite direction R1 R2 R3 Routing Protocol Routing Protocol α, β,R.P. , ζ γ, δ, α, β,R.P. , ζ γ, δ, α, β,R.P. , ζ γ, δ, α,FIB γ,FIB ,FIB β δ ζ Laurent Toutain Fili`re 2 e 9 / 31
  22. 22. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee router’s behavior All router have a manual configuration of their interfaces Prefixes learnt from this configuration are spread among other routers Routers select announcement and add these prefixes in their FIB Routing announcement and traffic (forwarding) go the opposite direction R1 R2 R3 Routing Protocol Routing Protocol α, β,R.P. , ζ γ, δ, α, β,R.P. , ζ γ, δ, α, β,R.P. , ζ γ, δ, α,FIB γ,FIB ,FIB β δ ζ Laurent Toutain Fili`re 2 e 9 / 31
  23. 23. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee router’s behavior All router have a manual configuration of their interfaces Prefixes learnt from this configuration are spread among other routers Routers select announcement and add these prefixes in their FIB Routing announcement and traffic (forwarding) go the opposite direction R1 R2 R3 Routing Protocol Routing Protocol α, β,R.P. , ζ γ, δ, α, β,R.P. , ζ γ, δ, α, β,R.P. , ζ γ, δ, α, β, FIB , ζ γ, δ, α, β, FIB , ζ γ, δ, α, β, FIB , ζ γ, δ, Laurent Toutain Fili`re 2 e 9 / 31
  24. 24. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee router’s behavior All router have a manual configuration of their interfaces Prefixes learnt from this configuration are spread among other routers Routers select announcement and add these prefixes in their FIB Routing announcement and traffic (forwarding) go the opposite direction R1 R2 R3 α α α, β,R.P. , ζ γ, δ, α, β,R.P. , ζ γ, δ, α, β,R.P. , ζ γ, δ, −>α α, β, FIB , ζ γ, δ, α, β, FIB , ζ γ, δ, α, β, FIB , ζ γ, δ, Laurent Toutain Fili`re 2 e 9 / 31
  25. 25. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Algorithm Very simple algorithm Routing Protocol database and FIB are common A cost (usually the number of router to cross) is just added to each prefix Router periodically broadcast their FIB on each link they are connected If a router find a new prefix in broadcasted information, ... or if an broadcasted prefix as a lower cost than the one already stored This entry is added/changed in the FIB Next Hop is set to the IP address of the broadcasting router Cost is increased by one Otherwise the information is ignored Current implementation: IPv4: RIPv2 (RFC 1723) IPv6: RIPng (RFC 2080) Laurent Toutain Fili`re 2 e 10 / 31
  26. 26. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Add Route) δ.1 α e0 (0) α.2 .1 e0 R2 e1 (0) e1 e3 α e0 (0) β e1 (0) γ.1 α.1 e2 R1 (0) e0 γ e2 e3 (0) δ e1 α e0 (0) α.3 .2 e0 R3 e1 (0) e1 β.1 Laurent Toutain Fili`re 2 e 11 / 31
  27. 27. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Add Route) α 1 β 1 R1 γ 1 1 δ δ.1 α e0 (0) α.2 .1 e0 R2 e1 (0) e1 e3 α e0 (0) β e1 (0) γ.1 α.1 e2 R1 (0) e0 γ e2 e3 (0) δ e1 α e0 (0) α.3 .2 e0 R3 e1 (0) e1 β.1 Laurent Toutain Fili`re 2 e 11 / 31
  28. 28. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Add Route) α 1 β 1 R1 γ 1 1 δ δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 e2 R1 (0) e0 γ e2 e3 (0) δ e1 α e0 (0) α.3 .2 e0 R3 e1 (0) e1 β.1 Laurent Toutain Fili`re 2 e 11 / 31
  29. 29. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Add Route) α 1 1 β 2 R2 γ 2 2 δ δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ α.2 (1) e1 α e0 (0) α.3 .2 e0 R3 e1 (0) e1 β.1 Laurent Toutain Fili`re 2 e 11 / 31
  30. 30. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Add Route) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β .1 (2) e1 e0 R3 γ .1 (2) .1 (2) δ β.1 Laurent Toutain Fili`re 2 e 11 / 31
  31. 31. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Add Route) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β .1 (2) e1 e0 R3 γ .1 (2) .1 (2) δ β.1 Laurent Toutain Fili`re 2 e 11 / 31
  32. 32. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Add Route) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β .1 (2) e1 e0 R3 γ .1 (2) .1 (2) δ β.1 Laurent Toutain Fili`re 2 e 11 / 31
  33. 33. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Add Route) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 11 / 31
  34. 34. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector (DV) implies periodic refreshing To discover best path To discover dead routers In RIP Routing Table are flooded every 30 seconds No specific message to remove an entry If an entry is not seen during X flooding, this entry is removed In RIP X = 3 (90 s) Remove is similar to set cost to ∞ DV cannot be used if Routing Table contains a lot of entries For instance core network routers may contain 220 000 entries DV can only be used in very small networks DV have also bad convergence performances... Laurent Toutain Fili`re 2 e 12 / 31
  35. 35. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Change Route) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 13 / 31
  36. 36. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Change Route) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 13 / 31
  37. 37. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Change Route) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ – (∞) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 13 / 31
  38. 38. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Change Route) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ – (∞) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 13 / 31
  39. 39. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Change Route) δ.1 α e0 (0) e1 (0) α.2 .1 β .2 (2) e1 e0 R2 γ .2 (2) e3 .2 (2) δ α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ α.3 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 13 / 31
  40. 40. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Bad Convergence) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (0) e0 e2 R1 e3 (0) δ α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 14 / 31
  41. 41. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Bad Convergence) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (∞) e0 e2 R1 δ e3 (0) α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 14 / 31
  42. 42. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Bad Convergence) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ – (∞) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (∞) e0 e2 R1 δ e3 (0) α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 14 / 31
  43. 43. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Bad Convergence) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.3 (2) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ α.2 (2) e0 e2 R1 δ e3 (0) α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 14 / 31
  44. 44. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Bad Convergence) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.3 (2) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ α.2 (2) e0 e2 R1 δ e3 (0) α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 14 / 31
  45. 45. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Bad Convergence) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.3 (2) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ α.2 (2) e0 e2 R1 δ e3 (0) α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (3) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 14 / 31
  46. 46. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Bad Convergence) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.3 (2) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ α.2 (2) e0 e2 R1 δ e3 (0) α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (3) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 14 / 31
  47. 47. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Bad Convergence) δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.3 (4) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ α.2 (4) e0 e2 R1 δ e3 (0) α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (3) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 14 / 31
  48. 48. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Conter Measures 3 ways to reduce this impact : 16 = ∞: Not only 15 routers in the network but : 15 routers between two links Poisoning reverse: When receiving a route marked ∞, mark it immediately ∞ Propagate rapidly route withdraw to avoid wrong routing messages Split Horizon: Do not announce through an interface, routes that use this interface. Laurent Toutain Fili`re 2 e 15 / 31
  49. 49. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Split Horizon) α 1 R2/R3 β 2 R2/R3 1 γ 1 2 δ δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (∞) e0 e2 R1 δ e3 (0) α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 16 / 31
  50. 50. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector Example (Split Horizon) Split Horizon does not work here! δ.1 α e0 (0) e1 (0) α.2 .1 β α.1 (1) e1 e0 R2 γ α.1 (1) e3 δ α.1 (1) α e0 (0) β e1 (0) γ.1 α.1 γ e2 (∞) e0 e2 R1 δ e3 (0) α.2 (1) α e0 (0) e1 (0) e1 α.3 .2 β α.1 (1) e1 e0 R3 γ α.1 (1) δ α.1 (1) β.1 Laurent Toutain Fili`re 2 e 16 / 31
  51. 51. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Distant Vector : Summary Distant Vector is very simple to understand, manage, implement. Performances are weak: Shortsighted network vision: based on summary made by other routers Like concierges exchanging gossips Can lead to routing loops or long delays to reconnect parts of the network. Periodically all routing table must be sent on the network: to detect dead routers to detect better paths Generates network and processing load Distant Vector must be limited to small network auto-configuration RIPv2 implement this algorithm Laurent Toutain Fili`re 2 e 17 / 31
  52. 52. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee RIP v2 0..................7...................15...................23....................31 Command Version=2 Unused Address Family=0x0800 Route Tag IPv4 Prefix Netmask Next Hop Cost Multicast address : 224.0.0.9, UDP Port Number 520 Next Hop : instead of the source address in the IP header Route Tag : Differentiate internal and external routes Laurent Toutain Fili`re 2 e 18 / 31
  53. 53. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee RIPng 0..................7...................15...................23....................31 Command Version=1 Unused IPv6 Prefix Route Tag Pref len Cost Multicast address : ff02:2::9, UDP Port Number 521 Next Hop : instead of the source address in the IP header Route Tag : Differentiate internal and external routes Laurent Toutain Fili`re 2 e 19 / 31
  54. 54. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Securing Routing Protocols Routing messages can be viewed as configuration messages: Forging wrong routing messages can highjack some traffics announcing default route may block communications Internet Laurent Toutain Fili`re 2 e 20 / 31
  55. 55. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Securing Routing Protocols Routing messages can be viewed as configuration messages: Forging wrong routing messages can highjack some traffics announcing default route may block communications default Black Hole Internet Laurent Toutain Fili`re 2 e 20 / 31
  56. 56. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Securing Routing Protocols Routing messages can be viewed as configuration messages: Forging wrong routing messages can highjack some traffics announcing default route may block communications Tunnel Internet Laurent Toutain Fili`re 2 e 20 / 31
  57. 57. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Securing Routing Protocol include a secret password on each message protect from configuration mistakes weak security, since packets can be eavesdropped and secret learnt use cryptographic RIPng uses built-in IPsec extentions RIPv2 uses its own mechanisms Originally based on MD5 algorithm (RFC 2082) Obsoleted by RFC 4822, recommending SHA1 algorithm. Laurent Toutain Fili`re 2 e 21 / 31
  58. 58. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee RIP v2 Authentication Tag: 0.........7........15..........23..........31 2: clear passwd (deprecated) Command Version=2 Unused 3: cryptographic A.F.=0xFFFF authentification =0003 RIPv2 packet len Key ID Auth len Key ID: describes security Sequence Number (non-decreasing) association (MD5 or Must Be Zero HMAC-SHA1) Must Be Zero Sequence: avoid replay (router RIPv2 routes must keep it in non-volatile 0x0001 0xFFFF memory) Auth. Data: result of the Hash Authentication Data (variable) algorithm Laurent Toutain Fili`re 2 e 22 / 31
  59. 59. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Link State Algorithm Distant Vector leads to a shortsighted view of network topology each router processes routing messages split horizon help for the first next hop periodically flush all routing information can be compared to caretaker exchanging gossip! Link State Protocols are divided in several states learn network topology exchange/flood local configuration compute shortest path to a destination prefix fill the FIB with Next Hop less traffic, incremental updates More a database synchronization algorithm than a routing protocol Two implementations OSPF : v2 for IPv4 and v3 for IPv6 IS-IS : IP agnostic Laurent Toutain Fili`re 2 e 23 / 31
  60. 60. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example: Database initialization η ζ D E F γ β δ A B C α Laurent Toutain Fili`re 2 e 24 / 31
  61. 61. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example: Database initialization η ζ η e0 ζ ζ e0 e0 D E F ppp0 β ppp0 e1 δ γ ppp1 γ β δ α e0 α α e0 e0 A B C γ ppp0 ppp0 β e1 ppp1 δ α Laurent Toutain Fili`re 2 e 24 / 31
  62. 62. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example: Database initialization η ζ D E F γ β δ η ζC A B η e0 ζ ζ e0 e0 α D E F ppp0 β ppp0 e1 δ γ ppp1 γ β δ α e0 α α e0 e0 A B C γ ppp0 ppp0 β e1 ppp1 δ α Laurent Toutain Fili`re 2 e 24 / 31
  63. 63. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example: Database initialization A cost is associated to each interface (for example related to the speed) η ζ η 10 ζ ζ 10 10 D E F β 100 100 10 δ γ 100 γ β δ α 10 η α α 10 10 ζC A B γ 100 β 100 10 100 e0 δ η ζ ζ e0 e0 α D E F ppp0 β ppp0 e1 δ γ ppp1 γ β δ α e0 α α e0 e0 A B C γ ppp0 ppp0 β e1 ppp1 δ α Laurent Toutain Fili`re 2 e 24 / 31
  64. 64. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example: Database state after synchronization After a flooding period (explained latter) all routers have exchanged their information Each router has all entries in its database η α 10 10 α α ζ ζ 10 10 10 10 γ β 100 100 A B C D E F β 100 10 100 10 δ γ 100 100 δ Entries are called Link State These entries gives a full knowledge of the network topology can be viewed as a graph with nodes (router) and vertex (prefixes) find the shortest paths from the root (router doing computation) to prefixes based on Dijkstra’s algorithm explore the graph always using the shortest path complexity is O(N 2 ) Laurent Toutain Fili`re 2 e 25 / 31
  65. 65. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example: Shortest Path First Algorithm A Laurent Toutain Fili`re 2 e 26 / 31
  66. 66. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example: Shortest Path First Algorithm A 100 10 α β 10 10 100 B C D Laurent Toutain Fili`re 2 e 26 / 31
  67. 67. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example: Shortest Path First Algorithm A 100 10 α β 10 10 100 B C D 20 110 110 γ α δ 20 20 A C Laurent Toutain Fili`re 2 e 26 / 31
  68. 68. ´ Ecole Nationale Sup´rieure des e T´l´communications de Bretagne ee Example: Shortest Path First Algorithm A 100 10 α β 10 10 100 B C D 110 110 γ δ 110 D Laurent Toutain Fili`re 2 e 26 / 31

×