Spine and Leaf Practical Applications, OSPF

As covered in the previous post, base configuration of a spine-and-leaf fabric is actually pretty simple. This will be pretty short, but we'll cover the conversion of the previously built fabric to OSPF.

Here's the updated diagram: (YAML). As we move to a more full-fledged implementation, we'll do dual-stack.

OSPF Fabric Diagram

The cleanup for this is as follows:

1no router rip  

From here, we can configure the router statements on all devices. It can be the same for all, because of the summarization performed while planning out the network.

1router ospf 1  
2 ispf  
3 log-adjacency-changes  
4 nsf cisco  
5 network 10.6.0.0 0.0.0.255 area 0  
6 network 10.6.240.0 0.0.1.255 area 0  

In a production environment you should add passive-interface default on the leafs if the ToR does not peer dynamic routing with anything sub-tending it.

Unsurprisingly, this just works. Now, to setup IPv6!

1ospf-s0#conf t  
2Enter configuration commands, one per line.  End with CNTL/Z.  
3ospf-s0(config)#ipv6?  
4% Unrecognized command  

Well, it looks like IPv6 is not available until IOS 12.2.55. Let's use this network to upgrade it, by hooking up a TFTP server to leaf-1:

1  
2interface FastEthernet0/14  
3 no switchport  
4 ip address 10.66.0.1 255.255.255.0  
5!  
6router ospf 1  
7 network 10.66.0.1 0.0.0.0 area 0  

We test reachability from the other leaf - this is a fully layer 3 switched path:

1ospf-l0#ping 10.66.0.180  
2  
3Type escape sequence to abort.  
4Sending 5, 100-byte ICMP Echos to 10.66.0.180, timeout is 2 seconds:  
5!!!!!  
6Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/8 ms  

And then we copy it over TFTP:

1ospf-s1#copy tftp flash:  
2Address or name of remote host []? 10.66.0.180  
3Source filename []? c3560-ipservicesk9-mz.122-55.SE6.bin  
4Destination filename [c3560-ipservicesk9-mz.122-55.SE6.bin]?  
5Accessing tftp://10.66.0.180/c3560-ipservicesk9-mz.122-55.SE6.bin...  
6Loading c3560-ipservicesk9-mz.
7[OK - 12752912 bytes]  
8  
912752912 bytes copied in 201.133 secs (63405 bytes/sec)  

Note that this, while a practical application, is still non-redundant.

UPGRADING INTENSIFIES
Now to implement IPv6 as follows: (YAML)

OSPFv3 Fabric Diagram

Note: We used ; instead of : due to a feature issue with drawthe.net. We're using /126 prefixes because this is on older equipment, which may not support /127 prefixes reliably.
On all devices, we need to enable ipv6 routing / OSPFv3:

1ipv6 unicast-routing  
2ipv6 router ospf 2  
3 log-adjacency-changes  

We then configure each device:

 1ospf-l0# configure terminal  
 2interface Loopback0  
 3 ip address 10.6.0.0 255.255.255.255  
 4 ipv6 address FD00:6::/128  
 5 ipv6 ospf 2 area 0  
 6interface FastEthernet1/0/21  
 7 no switchport  
 8 ip address 10.6.241.1 255.255.255.254  
 9 ipv6 address FD00:6:241::2/126  
10 ipv6 enable  
11 ipv6 ospf 2 area 0  
12interface FastEthernet1/0/24  
13 no switchport  
14 ip address 10.6.240.1 255.255.255.254  
15 ipv6 address FD00:6:240::2/126  
16 ipv6 enable  
17 ipv6 ospf 2 area 0  
18  
19ospf-l1# configure terminal  
20interface Loopback0  
21 ip address 10.6.0.1 255.255.255.255  
22 ipv6 address FD00:6::1/128  
23 ipv6 ospf 2 area 0  
24interface FastEthernet0/22  
25 no switchport  
26 ip address 10.6.240.3 255.255.255.254  
27 ipv6 address FD00:6:240::6/126  
28 ipv6 enable  
29 ipv6 ospf 2 area 0  
30interface FastEthernet0/23  
31 no switchport  
32 ip address 10.6.241.3 255.255.255.254  
33 ipv6 address FD00:6:241::6/126  
34 ipv6 enable  
35 ipv6 ospf 2 area 0  
36  
37ospf-s0# configure terminal  
38interface Loopback0  
39 ip address 10.6.0.240 255.255.255.255  
40 ipv6 address FD00:6::240/128  
41 ipv6 ospf 2 area 0  
42interface FastEthernet0/22  
43 no switchport  
44 ip address 10.6.240.2 255.255.255.254  
45 ipv6 address FD00:6:241::1/126  
46 ipv6 enable  
47 ipv6 ospf 2 area 0  
48interface FastEthernet0/24  
49 no switchport  
50 ip address 10.6.240.0 255.255.255.254  
51 ipv6 address FD00:6:240::1/126  
52 ipv6 enable  
53 ipv6 ospf 2 area 0  
54  
55ospf-s1# configure terminal  
56interface Loopback0  
57 ip address 10.6.0.241 255.255.255.255  
58 ipv6 address FD00:6::241/128  
59 ipv6 ospf 2 area 0  
60interface FastEthernet0/21  
61 no switchport  
62 ip address 10.6.241.0 255.255.255.254  
63 ipv6 address FD00:6:241::1/126  
64 ipv6 enable  
65 ipv6 ospf 2 area 0  
66interface FastEthernet0/23  
67 no switchport  
68 ip address 10.6.241.2 255.255.255.254  
69 ipv6 address FD00:6:241::5/126  
70 ipv6 enable  
71 ipv6 ospf 2 area 0  

From here, we test by initiating traffic from a subtending network on Leaf-1 to Leaf-0, and checking the routing tables:

 1ospf-l1#ping ipv6 fd00:6::  
 2  
 3Type escape sequence to abort.  
 4Sending 5, 100-byte ICMP Echos to FD00:6::, timeout is 2 seconds:  
 5!!!!!  
 6Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/8 ms  
 7ospf-l1#show ip route  
 8Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
 9       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area  
10       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
11       E1 - OSPF external type 1, E2 - OSPF external type 2  
12       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
13       ia - IS-IS inter area, * - candidate default, U - per-user static route  
14       o - ODR, P - periodic downloaded static route  
15  
16Gateway of last resort is not set  
17  
18     10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks  
19O       10.6.0.0/32 [110/3] via 10.6.241.2, 00:03:58, FastEthernet0/23  
20                    [110/3] via 10.6.240.2, 00:03:58, FastEthernet0/22  
21C       10.6.0.1/32 is directly connected, Loopback0  
22O       10.6.240.0/31 [110/2] via 10.6.240.2, 00:03:58, FastEthernet0/22  
23O       10.6.0.240/32 [110/2] via 10.6.240.2, 00:03:58, FastEthernet0/22  
24O       10.6.241.0/31 [110/2] via 10.6.241.2, 00:03:58, FastEthernet0/23  
25O       10.6.0.241/32 [110/2] via 10.6.241.2, 00:03:58, FastEthernet0/23  
26C       10.6.240.2/31 is directly connected, FastEthernet0/22  
27C       10.6.241.2/31 is directly connected, FastEthernet0/23  
28ospf-l1#show ipv6 route  
29IPv6 Routing Table - Default - 11 entries  
30Codes: C - Connected, L - Local, S - Static, U - Per-user Static route  
31       B - BGP, R - RIP, D - EIGRP, EX - EIGRP external  
32       ND - Neighbor Discovery  
33       O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2  
34       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2  
35O   FD00:6::/128 [110/2]  
36     via FE80::216:C8FF:FE04:4741, FastEthernet0/22  
37     via FE80::223:4FF:FE42:F3C2, FastEthernet0/23  
38LC  FD00:6::1/128 [0/0]  
39     via Loopback0, receive  
40O   FD00:6::240/128 [110/1]  
41     via FE80::216:C8FF:FE04:4741, FastEthernet0/22  
42O   FD00:6::241/128 [110/1]  
43     via FE80::223:4FF:FE42:F3C2, FastEthernet0/23  
44O   FD00:6:240::/126 [110/2]  
45     via FE80::216:C8FF:FE04:4741, FastEthernet0/22  
46C   FD00:6:240::4/126 [0/0]  
47     via FastEthernet0/22, directly connected  
48L   FD00:6:240::6/128 [0/0]  
49     via FastEthernet0/22, receive  
50O   FD00:6:241::/126 [110/1]  
51     via FastEthernet0/22, directly connected  
52C   FD00:6:241::4/126 [0/0]  
53     via FastEthernet0/23, directly connected  
54L   FD00:6:241::6/128 [0/0]  
55     via FastEthernet0/23, receive  
56L   FF00::/8 [0/0]  
57     via Null0, receive  

Note: technically we don't have to number the leaf-spine-leaf links in IPv6 with OSPFv3/RIP-ng/EIGRP, but that is a personal preference of mine to keep it consistent with future designs, and to allow for ease of troubleshooting.

As always, example configurations are here.

Posts in this Series