OSPFv3 route summarization configuration example
Network requirements
As shown in Figure 92:
Switch A, Switch B, and Switch C are in Area 2.
OSPFv3 process 1 and OSPFv3 process 2 run on Switch B. Switch B communicates with Switch A and Switch C through OSPFv3 process 1 and OSPFv3 process 2, respectively.
On Switch A, configure IPv6 addresses 2:1:1::1/64, 2:1:2::1/64, and 2:1:3::1/64 for VLAN-interface 200.
On Switch B, configure OSPFv3 process 2 to redistribute direct routes and the routes from OSPFv3 process 1. Switch C can then learn the routes destined for 2::/64, 2:1:1::/64, 2:1:2::/64, and 2:1:3::/64.
On Switch B, configure route summarization to advertise only summary route 2::/16 to Switch C.
Figure 92: Network diagram
Configuration procedure
Configure IPv6 addresses for interfaces. (Details not shown.)
Configure OSPFv3:
# Enable OSPFv3 process 1 on Switch A.
<SwitchA> system-view [SwitchA] ospfv3 1 [SwitchA-ospfv3-1] router-id 1.1.1.1 [SwitchA-ospfv3-1] quit [SwitchA] interface vlan-interface 100 [SwitchA-Vlan-interface100] ospfv3 1 area 2 [SwitchA-Vlan-interface100] quit [SwitchA] interface vlan-interface 200 [SwitchA-Vlan-interface200] ipv6 address 2:1:1::1 64 [SwitchA-Vlan-interface200] ipv6 address 2:1:2::1 64 [SwitchA-Vlan-interface200] ipv6 address 2:1:3::1 64 [SwitchA-Vlan-interface200] ospfv3 1 area 2 [SwitchA-Vlan-interface200] quit
# Enable OSPFv3 process 1 and OSPFv3 process 2 on Switch B.
<SwitchB> system-view [SwitchB] ospfv3 1 [SwitchB-ospfv3-1] router-id 2.2.2.2 [SwitchB-ospfv3-1] quit [SwitchB] interface vlan-interface 100 [SwitchB-Vlan-interface100] ospfv3 1 area 2 [SwitchB-Vlan-interface100] quit [SwitchB] ospfv3 2 [SwitchB-ospfv3-2] router-id 3.3.3.3 [SwitchB-ospfv3-2] quit [SwitchB] interface vlan-interface 300 [SwitchB-Vlan-interface300] ospfv3 2 area 2 [SwitchB-Vlan-interface300] quit
# Enable OSPFv3 process 2 on Switch C.
<SwitchC> system-view [SwitchC] ospfv3 2 [SwitchC-ospfv3-2] router-id 4.4.4.4 [SwitchC-ospfv3-2] quit [SwitchC] interface vlan-interface 300 [SwitchC-Vlan-interface300] ospfv3 2 area 2 [SwitchC-Vlan-interface300] quit [SwitchC] interface vlan-interface 400 [SwitchC-Vlan-interface400] ospfv3 2 area 2 [SwitchC-Vlan-interface400] quit
Configure OSPFv3 route redistribution:
# Configure OSPFv3 process 2 to redistribute direct routes and the routes from OSPFv3 process 1 on Switch B.
[SwitchB] ospfv3 2 [SwitchB-ospfv3-2] import-route ospfv3 1 [SwitchB-ospfv3-2] import-route direct [SwitchB-ospfv3-2] quit
# Display the routing table on Switch C.
[SwitchC] display ipv6 routing-table Destinations : 12 Routes : 12 Destination: ::1/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: 1::/64 Protocol : O_ASE2 NextHop : FE80::200:CFF:FE01:1C03 Preference: 150 Interface : Vlan300 Cost : 1 Destination: 2::/64 Protocol : O_ASE2 NextHop : FE80::200:CFF:FE01:1C03 Preference: 150 Interface : Vlan300 Cost : 1 Destination: 2:1:1::/64 Protocol : O_ASE2 NextHop : FE80::200:CFF:FE01:1C03 Preference: 150 Interface : Vlan300 Cost : 1 Destination: 2:1:2::/64 Protocol : O_ASE2 NextHop : FE80::200:CFF:FE01:1C03 Preference: 150 Interface : Vlan300 Cost : 1 Destination: 2:1:3::/64 Protocol : O_ASE2 NextHop : FE80::200:CFF:FE01:1C03 Preference: 150 Interface : Vlan300 Cost : 1 Destination: 3::/64 Protocol : Direct NextHop : 3::2 Preference: 0 Interface : Vlan300 Cost : 0 Destination: 3::2/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: 4::/64 Protocol : Direct NextHop : 4::1 Preference: 0 Interface : Vlan400 Cost : 0 Destination: 4::1/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: FE80::/10 Protocol : Direct NextHop : :: Preference: 0 Interface : NULL0 Cost : 0 Destination: FF00::/8 Protocol : Direct NextHop : :: Preference: 0 Interface : NULL0
Configure ASBR route summarization:
# On Switch B, configure OSPFv3 process 2 to advertise a single route 2::/16.
[SwitchB] ospfv3 2 [SwitchB-ospfv3-2] asbr-summary 2:: 16 [SwitchB-ospfv3-2] quit
# Display the routing table on Switch C.
[SwitchC] display ipv6 routing-table Destinations : 9 Routes : 9 Destination: ::1/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: 1::/64 Protocol : O_ASE2 NextHop : FE80::200:CFF:FE01:1C03 Preference: 150 Interface : Vlan300 Cost : 1 Destination: 2::/16 Protocol : O_ASE2 NextHop : FE80::200:CFF:FE01:1C03 Preference: 150 Interface : Vlan300 Cost : 1 Destination: 3::/64 Protocol : Direct NextHop : 3::2 Preference: 0 Interface : Vlan300 Cost : 0 Destination: 3::2/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: 4::/64 Protocol : Direct NextHop : 4::1 Preference: 0 Interface : Vlan400 Cost : 0 Destination: 4::1/128 Protocol : Direct NextHop : ::1 Preference: 0 Interface : InLoop0 Cost : 0 Destination: FE80::/10 Protocol : Direct NextHop : :: Preference: 0 Interface : NULL0 Cost : 0 Destination: FF00::/8 Protocol : Direct NextHop : :: Preference: 0 Interface : NULL0