Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure OSPFv3 Basic Functions

Network Requirements

  • Configure the OSPFv3 protocol for all devices, and divide the devices into three areas: Area 0, Area 1, and Area 2. After configuration, all devices should be able to learn routes from each other.
  • On a back-to-back Ethernet interface, to speed up set of OSPFv3 neighbors, you can change the network type of the OSPFv3 interface to P2P. Modify the network type of the interfaces in Area 2 to P2P. After the configuration, all devices can learn routes from each other.

Network Topology

Networking for configuring basic OSPFv3 functions

Figure 8-1 Networking for configuring basic OSPFv3 functions

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 and let the interface cover different areas.

#On Device1, configure an OSPFv3 process and configure the interfaces to cover area 1.

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 1
Device1(config-if-vlan2)#exit
Device1(config)#interface vlan3
Device1(config-if-vlan3)#ipv6 router ospf 100 area 1
Device1(config-if-vlan3)#exit

#On Device2, configure an OSPFv3 process and configure the interfaces to cover Area 0 and Area 1.

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 1
Device2(config-if-vlan2)#exit
Device2(config)#interface vlan3
Device2(config-if-vlan3)#ipv6 router ospf 100 area 0
Device2(config-if-vlan3)#exit

#On Device3, configure an OSPFv3 process and configure the interfaces to cover Area 0 and Area 2.

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 2
Device3(config-if-vlan3)#exit

#On Device4, configure an OSPFv3 process and configure the interfaces to cover area 2.

Device4#configure terminal
Device4(config)#ipv6 router ospf 100
Device4(config-ospf6)#router-id 4.4.4.4
Device4(config-ospf6)#exit
Device4(config)#interface vlan2
Device4(config-if-vlan2)#ipv6 router ospf 100 area 2
Device4(config-if-vlan2)#exit
Device4(config)#interface vlan3
Device4(config-if-vlan3)#ipv6 router ospf 100 area 2
Device4(config-if-vlan3)#exit

note


  • The Router ID in OSFPv3 must be configured manually, and the Router IDs of any two routers in the AS cannot be the same.
  • When an interface is enabled to OSPFv3, it is necessary to specify which interface instance is enabled to the OSPFv3 process, and the two instance numbers should be consistent. By default, it is in instance 0.

#Query the OSPFv3 neighbor information and routing table of Device1.

Device1#show ipv6 ospf neighbor OSPFv3 Process (100) 
Neighbor ID   Pri  State     DeadTime   Interface   Instance ID 
2.2.2.2       1    Full/DR   00:00:38   vlan3       0 
 
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 ::, 00:41:07, lo0
C 2001:1::/64 [0/0] 
     via ::, 00:32:19, vlan3
L 2001:1::1/128 [0/0] 
     via ::, 00:32:18, lo0
O 2001:2::/64 [110/2] 
     via fe80::201:7aff:fe5e:6d45, 00:23:06, vlan3
O  2001:3::/64 [110/3] 
     via fe80::201:7aff:fe5e:6d45, 00:23:00, vlan3
C  2001:4::/64 [0/0] 
     via ::, 00:16:46, vlan2
L 2001:4::1/128 [0/0] 
     via ::, 00:16:45, lo0
O 2001:5::/64 [110/4] 
     via fe80::201:7aff:fe5e:6d45, 00:01:42, vlan3 

#Query the OSPFv3 neighbors and routing table of Device2.

Device2#show ipv6 ospf neighbor OSPFv3 Process (100) 
Neighbor ID  Pri   State          Dead Time   Interface   Instance ID 
1.1.1.1      1     Full/Backup    00:00:34    vlan2       0 
3.3.3.3      1     Full/DR        00:00:33    vlan3       0 
 
Device2#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 ::, 00:50:36, lo0
C 2001:1::/64 [0/0] 
     via ::, 00:43:05, vlan2
L 2001:1::2/128 [0/0] 
     via ::, 00:43:04, lo0
C 2001:2::/64 [0/0] 
     via ::, 00:40:01, vlan3
L 2001:2::1/128 [0/0] 
     via ::, 00:39:57, lo0
O 2001:3::/64 [110/2] 
     via fe80::2212:1ff:fe01:101, 00:34:00, vlan3
O 2001:4::/64 [110/2] 
     via fe80::201:7aff:fe61:7a24, 00:27:28, vlan2
O  2001:5::/64 [110/3] 
     via fe80::2212:1ff:fe01:101, 00:12:41, vlan3 

#Query OSPFv3 Link Status Database (LSDB) of Device2.

Device2#show ipv6 ospf database   
 
            OSPFv3 Router with ID (2.2.2.2) (Process 100) 
 
                Link-LSA (Interface vlan2) 
Link State ID   ADV Router  Age Seq#       CkSum Prefix
0.0.0.1         1.1.1.1     81  0x80000001 0x8d18      1   
0.0.0.1         2.2.2.2     78  0x80000001 0xf996      1   
 
                Link-LSA (Interface vlan3) 
Link State ID   ADV Router  Age Seq#       CkSum Prefix
0.0.0.2         2.2.2.2     71  0x80000003 0x2467      1   
0.0.0.1         3.3.3.3     35  0x80000003 0xcd12      1   
 
                Router-LSA (Area 0.0.0.0) 
Link State ID   ADV Router  Age Seq#       CkSum Link
0.0.0.0         2.2.2.2     37  0x80000004 0x0dd6      1   
0.0.0.0         3.3.3.3     25  0x80000007 0xda03      1   
 
                Network-LSA (Area 0.0.0.0) 
Link State ID   ADV Router  Age Seq#       CkSum
0.0.0.1         3.3.3.3     35  0x80000001 0x5790   
 
                Inter-Area-Prefix-LSA (Area 0.0.0.0) 
Link State ID   ADV Router  Age Seq#       CkSum     Prefix
0.0.0.2         2.2.2.2     42  0x80000007 0x9e25 2001:1::/64   
0.0.0.3         2.2.2.2     23  0x80000002 0xcef4 2001:4::/64   
0.0.0.1         3.3.3.3     35  0x80000005 0xaa16 2001:3::/64   
0.0.0.3         3.3.3.3     55  0x80000001 0xc0fe 2001:5::/64   
 
                Intra-Area-Prefix-LSA (Area 0.0.0.0) 
Link State ID   ADV Router  Age Seq#       CkSum Prefix   Reference
0.0.0.3         3.3.3.3     34  0x80000001 0xb2d3      1  Network-LSA   
 
                Router-LSA (Area 0.0.0.1) 
Link State ID   ADV Router  Age Seq#       CkSum Link
0.0.0.0         1.1.1.1     41  0x80000004 0xc726      1   
0.0.0.0         2.2.2.2     37  0x80000004 0xac3c      1   
 
                Network-LSA (Area 0.0.0.1) 
Link State ID   ADV Router  Age Seq#       CkSum
0.0.0.1         2.2.2.2     42  0x80000001 0x21d2   
 
                Inter-Area-Prefix-LSA (Area 0.0.0.1) 
Link State ID   ADV Router  Age Seq#       CkSum     Prefix
0.0.0.1         2.2.2.2     42  0x80000004 0xbc0a 2001:2::/64   
0.0.0.4         2.2.2.2     19  0x80000001 0xb80c 2001:3::/64   
0.0.0.5         2.2.2.2     19  0x80000001 0xd0ef 2001:5::/64   
 
                Intra-Area-Prefix-LSA (Area 0.0.0.1) 
Link State ID   ADV Router  Age Seq#       CkSum Prefix   Reference
0.0.0.1         1.1.1.1     35  0x80000005 0xc4ce      1  Router-LSA   
0.0.0.3         2.2.2.2     41  0x80000001 0x8807      1  Network-LSA 

For Device2, routes 2001:3::/642 and 2001:5::/64 are inter-area routes. You can query the LSA information of the related routes in Inter-Area-Prefix-LSA (Area 0.0.0.0). In the case of intra-area routes, run the show ipv6 ospf database intra-prefix command to query the LSA information of the related routes.

Step 4: Configure the network type of OSPFv3 interfaces to P2P.

#On Device3, configure the OSPFv3 network type of interface vlan3 to P2P.

Device3(config)#interface vlan3
Device3(config-if-vlan3)#ipv6 ospf network point-to-point
Device3(config-if-vlan3)#exit

#On Device4, configure the OSPFv3 network type of interface vlan2 to P2P.

Device4(config)#interface vlan2
Device4(config-if-vlan2)#ipv6 ospf network point-to-point
Device4(config-if-vlan2)#exit

Step 5: Check the result.

#Query the OSPFv3 neighbors and routing table of Device3.

Device3#show ipv6 ospf neighbor OSPFv3 Process (100) 
Neighbor ID   Pri   State          Dead Time  Interface   Instance ID 
2.2.2.2       1     Full/Backup    00:00:39   vlan2       0 
4.4.4.4       1     Full/ -        00:00:39   vlan3       0 
 
Device3#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 ::, 1d:09:10:10, lo0
O 2001:1::/64 [110/2] 
     via fe80::201:7aff:fe5e:6d46, 02:07:25, vlan2
C  2001:2::/64 [0/0] 
     via ::, 03:07:51, vlan2
L 2001:2::2/128 [0/0] 
     via ::, 03:07:48, lo0
C 2001:3::/64 [0/0] 
     via ::, 03:07:41, vlan3
L 2001:3::1/128 [0/0] 
     via ::, 03:07:39, lo0
O 2001:4::/64 [110/3] 
     via fe80::201:7aff:fe5e:6d46, 02:07:25, vlan2
O  2001:5::/64 [110/2] 
     via fe80::201:2ff:fe03:405, 00:00:22, vlan3 

note


  • If OSPFv3 neighbor relations are set up in a P2P network, no DR or BDR election will be performed.

#Query the OSPFv3 neighbors and routing table of Device4.

Device4#show ipv6 ospf neighbor OSPFv3 Process (100) 
Neighbor ID  Pri   State     Dead Time  Interface   Instance ID 
3.3.3.3      1     Full/ -   00:00:38   vlan2       0 
 
Device4#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 ::, 00:05:34, lo0
O 2001:1::/64 [110/3] 
     via fe80::2212:1ff:fe01:102, 00:03:12, vlan2
O 2001:2::/64 [110/2] 
     via fe80::2212:1ff:fe01:102, 00:03:12, vlan2
C  2001:3::/64 [0/0] 
     via ::, 00:04:34, vlan2
L 2001:3::2/128 [0/0] 
     via ::, 00:04:31, lo0
O 2001:4::/64 [110/4] 
     via fe80::2212:1ff:fe01:102, 00:03:12, vlan2
C  2001:5::/64 [0/0] 
     via ::, 00:03:14, vlan3
L 2001:5::1/128 [0/0] 
     via ::, 00:03:13, lo0 

After the network type of OSPFv3 interfaces are modified to P2P, neighbors can be set up normally, and routes can be learned normally.