A quick guide to creating OSPF routing loops at home

Crossposting, original publication





OSFP, being a link-state protocol, eliminates topology loops by building a shortest path tree within one zone using Dijkstra's algorithm. However, the behavior of OSPF between zones is more like the behavior of distance-vector protocols, which exchange only prefixes and corresponding metrics without any information about the actual topology; for this reason, some authors may refer to OSPF as a hybrid routing protocol. The mechanism for protecting against routing loops between zones, however, is quite simple: all zones must exchange routing information through the backbone zone, zone 0, direct exchange of routes between zones is not possible.





, OSPF – OSPF Virtual Link (VL). , VL – ; , VL . , VL , - . , VL.





, google.com. GNS3 Cisco 7200:





(loopback0) OSPF RID ; loopback ABR 0. : 192.168.xy.x|y/24 Rx Ry (, 192.168.12.1 f0/1 R1). OSPF, R1 R3 VL.





, ; R1 R5:





R1#ping 5.5.5.5 so lo 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/30/40 ms
R1#traceroute 5.5.5.5 so lo 0 numeric
Type escape sequence to abort.
Tracing the route to 5.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
 1 192.168.14.4 16 msec 24 msec 20 msec
 2 192.168.45.5 48 msec 16 msec 24 msec
      
      



, . :





R1(config)#router os 1
R1(config-router)#no capability transit
      
      



Transit area capability – OSPFv2 , VL. : , VL, LSA3; LSA3 , . OSPFv1 , , VL. , . :





R1#traceroute 5.5.5.5 so lo 0 n
Type escape sequence to abort.
Tracing the route to 5.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
 1 192.168.12.2 44 msec 16 msec 20 msec
 2 192.168.23.3 20 msec 40 msec 40 msec
 3 192.168.35.5 76 msec 44 msec 44 msec
      
      



, : R1 VL OSPFv1 transit capability. ? :





R2(config)#int f1/0
R2(config-if)#ip os cost 100
      
      



R3(config)#int f1/0
R3(config-if)#ip os cost 100
      
      



, ?





R1#traceroute 5.5.5.5 so lo 0 n
Type escape sequence to abort.
Tracing the route to 5.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
 1 192.168.12.2 20 msec 16 msec 16 msec
 2 192.168.12.1 24 msec 16 msec 16 msec
 3 192.168.12.2 36 msec 32 msec 44 msec
 4 192.168.12.1 28 msec 36 msec 40 msec
 5 192.168.12.2 44 msec 48 msec 64 msec
 6 192.168.12.1 60 msec 60 msec 60 msec
 7 192.168.12.2 80 msec 80 msec 80 msec
 8 192.168.12.1 84 msec 76 msec 76 msec
      
      



, – . :





  • VL R1-R3;





  • Transit capability ;





  • R2-R3 .





: R1 next-hop 5.5.5.5/32 R2:





R2#sho ip ro 5.5.5.5 255.255.255.255 longer-prefixes 
 5.0.0.0/32 is subnetted, 1 subnets
O IA 5.5.5.5 [110/4] via 192.168.12.1, 00:06:21, FastEthernet0/1
      
      



R2 ; R1 :





R1#sho ip ro 5.5.5.5 255.255.255.255 longer-prefixes 
 5.0.0.0/32 is subnetted, 1 subnets
O 5.5.5.5 [110/103] via 192.168.12.2, 00:08:07, FastEthernet0/1
      
      



OSPFv1:





  • 5.5.5.5/32 VL 0;





  • , VL.





R2 VL, transit area; , LSA3.





, – transit capability, VL. , : OSPFv1 OSPFv2 transit area. , , , . , : , - VL OSPFv1 .





OSPFv2 RFC OSPFv1:





β€œWhen summarizing information into a virtual link's transit area, version 2 of the OSPF specification prohibits the collapsing of multiple backbone IP networks/subnets into a single summary link.”





Section F.2.3, RFC 1247





, RFC , . 0 ABR, LSA3 VL. :





  1. VL 0; - LSA3 VL;





  2. LSA3.





, R3 5.5.5.0/24, R2 5.5.5.0/25 R4, . ? 0, , .. . , , 0, ; ABR - LSA1/2 LSA3. , 0, . ; LSA1-LSA3 , .





Conclusion: it is better not to touch some little-known default settings.





PS There is an equally interesting way to shoot yourself in the foot .





Assisted in editing the article: Anastasia Kuralyova, Maxim Klimanov.








All Articles