Network Requirements
- Configure OSPFv3 for all devices.
- Enable the BFD detection function on the line between Device1 and Device3. If the line becomes faulty, BFD quickly detects the fault and notify OSPFv3 of the fault. Then, OSPFv3 switches the route to Device2 for communication.
Network Topology
![Networking for configuring OSPFv3 to coordinate with BFD](/storage/images/Document/Maipu/unicast-routing/config-ospfv3-coordinate-with-bfd.jpg)
Figure 8-3 Networking for configuring OSPFv3 to coordinate with BFD
Configuration Steps
Step 1: Configure VLAN, and add the port to the corresponding VLAN (omitted).
Step 2: Configure the IPv6 addresses of the interfaces. (Omitted)
Step 3: Configure an OSPFv3 process.
#Configure Device1.
Device1#configure terminal
Device1(config)#ipv6 router ospf 100
Device1(config-ospf6)#router-id 1.1.1.1
Device1(config-ospf6)#exit
Device1(config)#interface vlan2
Device1(config-if-vlan2)#ipv6 router ospf 100 area 0
Device1(config-if-vlan2)#exit
Device1(config)#interface vlan3
Device1(config-if-vlan3)#ipv6 router ospf 100 area 0
Device1(config-if-vlan3)#exit
Device1(config)#interface vlan4
Device1(config-if-vlan4)#ipv6 router ospf 100 area 0
Device1(config-if-vlan4)#exit
|
#Configure Device2.
Device2#configure terminal
Device2(config)#ipv6 router ospf 100
Device2(config-ospf6)#router-id 2.2.2.2
Device2(config-ospf6)#exit
Device2(config)#interface vlan2
Device2(config-if-vlan2)#ipv6 router ospf 100 area 0
Device2(config-if-vlan2)#exit
Device2(config)#interface vlan3
Device2(config-if-vlan3)#ipv6 router ospf 100 area 0
Device2(config-if-vlan3)#exit
|
#Configure Device3.
Device3#configure terminal
Device3(config)#ipv6 router ospf 100
Device3(config-ospf6)#router-id 3.3.3.3
Device3(config-ospf6)#exit
Device3(config)#interface vlan2
Device3(config-if-vlan2)#ipv6 router ospf 100 area 0
Device3(config-if-vlan2)#exit
Device3(config)#interface vlan3
Device3(config-if-vlan3)#ipv6 router ospf 100 area 0
Device3(config-if-vlan3)#exit
Device3(config)#interface vlan4
Device3(config-if-vlan4)#ipv6 router ospf 100 area 0
Device3(config-if-vlan4)#exit
|
Step 4: Configure OSPFv3 to coordinate with BFD.
#Configure Device1.
Device1(config)#interface vlan2
Device1(config-if-vlan2)#ipv6 ospf bfd
Device1(config-if-vlan2)#exit
|
#Configure Device3.
Device3(config)#interface vlan2
Device3(config-if-vlan2)#ipv6 ospf bfd
Device3(config-if-vlan2)#exit
|
Step 5: Check the result.
#View the OSPFv3 neighbor information and route table of Device1.
Device1#show ipv6 ospf neighbor 3.3.3.3 OSPFv3 Process (100)
Neighbor 3.3.3.3,interface address fe80::2212:1ff:fe01:104
In the area 0.0.0.0 via interface vlan4, BFD enabled
DR is 3.3.3.3 BDR is 1.1.1.1
Neighbor priority is 1, State is Full, 6 state changes
Options is 0x13 (-|R|-|-|E|V6)
Dead timer due in 00:00:37
Neighbor is up for 00:01:31
Database Summary List 0
Link State Request List 0
Link State Retransmission List 0
Thread Inactivity Timer on
Thread Database Description Retransmission off, 0 times
Thread Link State Request Retransmission off, 0 times
Thread Link State Update Retransmission off, 0 times
Device1#show ipv6 route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management
L ::1/128 [0/0]
via ::, 01:15:27, lo0
C 1001:1::/64 [0/0]
via ::, 01:15:27, vlan4
L 1001:1::1/128 [0/0]
via ::, 01:15:27, lo0
O 1001:2::/64 [110/2]
via fe80::2212:1ff:fe01:104, 00:02:40, vlan2
C 2001:1::/64 [0/0]
via ::, 01:15:27, vlan2
L 2001:1::1/128 [0/0]
via ::, 01:15:27, lo0
C 2001:2::/64 [0/0]
via ::, 01:15:27, vlan3
L 2001:2::1/128 [0/0]
via ::, 01:15:27, lo0
O 2001:3::/64 [110/2]
via fe80::201:7aff:fe5e:6d45, 00:02:40, vlan3
[110/2]
via fe80::2212:1ff:fe01:104, 00:02:40, vlan2
According to the OSPFv3 neighbor information, BFD has been enabled, and route 1001:2::/64 first selects the line between Device1 and Device3 for communication.
#View the BFD session of Device1.
Device1#show bfd session ipv6 detail
Total ipv6 session number: 1
OurAddr NeighAddr State Holddown Interface
fe80::201:7aff:fe61:7a25 fe80::2212:1ff:fe01:104 UP 5000 vlan2
Type:ipv6 direct
Local State:UP Remote State:UP Up for: 0h:0m:4s Number of times UP:1
Local Discriminator:5 Remote Discriminator:95
Send Interval:1000ms Detection time:5000ms(1000ms*5)
Local Diag:0 Demand mode:0 Poll bit:0
MinTxInt:1000 MinRxInt:1000 Multiplier:5
Remote MinTxInt:1000 Remote MinRxInt:1000 Remote Multiplier:5
Registered protocols:OSPFv3
OSPFv3 has successfully coordinated with BFD, and the session has been normally set up.
#If the line between Device1 and Device3 becomes faulty, BFD quickly detects the fault and informs OSPFv3 of the fault, and then, OSPFv3 switches the route to Device2 for communication. View the route table of Device1.
Device1#show ipv6 route
Codes: C - Connected, L - Local, S - static, R - RIP, B - BGP, i-ISIS
U - Per-user Static route
O - OSPF, OE-OSPF External, M - Management
L ::1/128 [0/0]
via ::, 01:16:10, lo0
C 1001:1::/64 [0/0]
via ::, 01:16:10, vlan4
L 1001:1::1/128 [0/0]
via ::, 01:16:10, lo0
O 1001:2::/64 [110/3]
via fe80::201:7aff:fe5e:6d45, 00:00:07, vlan3
C 2001:1::/64 [0/0]
via ::, 01:16:10, vlan2
L 2001:1::1/128 [0/0]
via ::, 01:16:10, lo0
C 2001:2::/64 [0/0]
via ::, 01:16:10, vlan3
L 2001:2::1/128 [0/0]
via ::, 01:16:10, lo0
O 2001:3::/64 [110/2]
via fe80::201:7aff:fe5e:6d45, 00:03:22, vlan3
The action of Device3 is similar to that of Device1.