Friday, 21 November 2025

What is OSPFv3 IPsec authentication? How to configure OSPFv3 authentication?

 If you're coming from an OSPFv2 world, you're used to typing in a simple {IP OSPF AUTHENTICATION-KEY} command. When you jump to IPv6 OSPFv3, you might look for the equivalent command and be surprised to find it's not there.





How does OSPFv3 secure its neighbour relationships and routing updates? The answer is a fundamental shift in design: OSPFv3 relies on IPsec authentication. OSPFv3 doesn't include any authentication capabilities of its own. The OSPFv3 authentication field has been removed from OSPFv3 packet headers. OSPFv3 requires the IPv6 authentication header (AH) or IPv6 ESP header to ensure the integrity, authentication, and confidentiality of routing exchanges.


What are the benefits?

This approach has several benefits:

  1. No more cleartext passwords
  2. Stronger crypto (SHA-256, AES)
  3. Leverages existing infrastructure 
  4. Standardization


How does it work?

OSPFv3 supports two methods to implement IPsec.

1. Manual- this is the most straightforward and commonly used method, you manually configure a security policy index (SPI) and a pre-shared key on both routers.


The building blocks:

  •  SPI- a number that uniquely identifies the security policy to both routers. It must match on both sides.
  • Authentication algorithm- the hashing algorithm to use ( SHA1, SHA256).
  • Encryption key- the actual pre-shared password. It must match on both sides.


2. IPsec profile ( the scalable method)

  • For larger networks, manually configuring keys on every interface becomes a management headache. This is where the IPsec profile comes in.

  • An IPsec profile defines the security policy (algorithms, keys, etc) and is then applied to an OSPFv3 process. This applies the policy to all OSPFv3 interfaces, making it much more scalable.
  • This method is complex to set up, but it is the recommended way for large-scale deployments.


Let's see the configuration- So, we are going to configure OSPv3 authentication interface, and the area authentication.

Topology:-




Goal: ensure the integrity, authentication, and confidentiality of routing exchanges.
  • Configure the topology as per the diagram 
  • Configure the IPv6 addresses as per the topology
  • Configure OSPFv3, and both routers are in area 0
  • Configure OSPFv3 authentication on the interfaces
  • erase the previous configuration 
  • Reconfigure OSPFv3 authentication for the entire OSPFv3 area 0
  • Verify with show commands and messages.

R1(config)#interface fastethernet 0/0
R1(config-if)#ipv6 address 2001:1212:12:12::1/64
R1(config-if)#no shutdown
R1(config-if)#exit

R1(config)#interface fastethernet 2/0
R1(config-if)#ipv6 address fc00:1111:1111:1111::1/64
R1(config-if)#no shutdown
R1(config-if)#exit

R2(config)#interface fastethernet 0/0
R2(config-if)#ipv6 address 2001:1212:12:12::2/64
R2(config-if)#no shutdown
R2(config-if)#exit

R2(config)#interface fastethernet 2/0
R2(config-if)#ipv6 address fc00:2222:2222:2222::1/64
R2(config-if)#no shutdown
R2(config-if)#exit

R1(config)#ipv6 unicast-routing

R1(config)#ipv6 router ospf 100
R1(config-rtr)#router-id 10.10.10.10
R1(config-rtr)#exit

R1(config)#interface fastethernet 0/0
R1(config-if)#ipv6 ospf 100 area 0
R1(config-if)#exit
R1(config)#interface fastethernet 2/0
R1(config-if)#ipv6 ospf 100 area 0
R1(config-if)#exit

R2(config)#ipv6 unicast-routing

R2(config)#ipv6 router ospf 100
R2(config-rtr)#router-id 20.20.20.20
R2(config-rtr)#exit

R2(config)#interface fastethernet 0/0
R2(config-if)#ipv6 ospf 100 area 0
R2(config-if)#exit
R2(config)#interface fastethernet 2/0
R2(config-if)#ipv6 ospf 100 area 0
R2(config-if)#exit

 %OSPFv3-5-ADJCHG: Process 100, Nbr 20.20.20.20 on FastEthernet0/0 from LOADING to FULL, Loading Done
%OSPFv3-5-ADJCHG: Process 100, Nbr 10.10.10.10 on FastEthe rnet0/0 from LOADING to FULL, Loading Done 

R1(config)#interface fastethernet 0/0
R1(config-if)#IPv6 ospf authenticationb ipsec spi 499 md5 abcdef1234567890abcded1234567890
R1(config-if)#end

%IPSECV6-4-RECVD_PKT_NOT_IPSECV6: Rec'd packet not an IPSEC packet. (ip) dest_addr= FF02::5, src_addr= FE80::C802:63FF:FE30:0, prot= 89

 %OSPFv3-5-ADJCHG: Process 100, Nbr 20.20.20.20 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired

%IPSECV6-4-RECVD_PKT_NOT_IPSECV6: Rec'd packet not an IPSECv6 packet.
        (ip) dest_addr= FF02::5, src_addr= FE80::C802:63FF:FE30:0, prot= 89

R2(config)#interface fastethernet 0/0
R2(config-if)#IPv6 ospf authenticationb ipsec spi 499 md5 abcdef1234567890abcded1234567890
R2(config-if)#end

%OSPFv3-5-ADJCHG: Process 100, Nbr 10.10.10.10 on FastEthernet0/0 from LOADING to FULL, Loading Done
%OSPFv3-5-ADJCHG: Process 100, Nbr 20.20.20.20 on FastEthernet0/0 from LOADING to FULL, Loading Done

R1#show ipv6 ospf neighbor

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
20.20.20.20       1   FULL/DR         00:00:33    4               FastEthernet0/                                                                                                                                   0
R1#show ipv6 route ospf
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
O   FC00:2222:2222:2222::/64 [110/2]
     via FE80::C802:63FF:FE30:0, FastEthernet0/0

R2#show ipv6 ospf neighbor

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
10.10.10.10       1   FULL/BDR        00:00:34    4               FastEthernet0/                                                                                                                                   0
R2#show ipv6 route ospf
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
O   FC00:1111:1111:1111::/64 [110/2]
     via FE80::C801:3AFF:FE14:0, FastEthernet0/0

Saturday, 15 November 2025

IPv6 Static, Default, and Dynamic routing lab

 In this lab, we see the configuration of  IPv6 static, default, and dynamic routing protocols. This lab is divided into three labs:

  • IPv6 Static routing
  • IPv6 Default routing
  • IPv6 Dynamic routing


- starting with IPv6 Static routing

Topology:-



  • Configure the topology as per the picture.
  • Configure the IPv6 address as per the topology
  • Configure IPv6 Static routing 
  • Verify the configuration with ping and show commands



R1(config)#ipv6 unicast-routing
R1(config)#interface fastethernet 0/0
R1(config-if)#ipv6 address 2001:1234:1234:1234::1/64
R1(config-if)#no shutdown
R1(config-if)#exit

R1(config)#interface fastethernet 2/0
R1(config-if)#ipv6 address fc00:1111:1111:1111::1/64
R1(config-if)#no shutdown
R1(config-if)#exit

R2(config)#ipv6 unicast-routing
R2(config)#interface fastethernet 0/0
R2(config-if)#ipv6 address 2001:1234:1234:1234::2/64
R2(config-if)#no shutdown
R2(config-if)#exit

R2(config)#interface fastethernet 2/0
R2(config-if)#ipv6 address fc00:1111:1111:2222::2/64
R2(config-if)#no shutdown
R2(config-if)#exit

R1#show ipv6 interface brief
FastEthernet0/0            [up/up]
    FE80::C801:3FFF:FE40:0
    2001:1234:1234:1234::1

ATM1/0                     [administratively down/down]
FastEthernet2/0            [up/up]
    FE80::C801:3FFF:FE40:38
    FC00:1111:1111:1111::1

GigabitEthernet3/0         [administratively down/down]
FastEthernet4/0            [administratively down/down]
FastEthernet4/1            [administratively down/down]

R2#show ipv6 interface brief
FastEthernet0/0            [up/up]
    FE80::C802:6CFF:FE10:0
    2001:1234:1234:1234::2

ATM1/0                     [administratively down/down]
FastEthernet2/0            [up/up]
    FE80::C802:6CFF:FE10:38
    FC00:1111:1111:2222::2

GigabitEthernet3/0         [administratively down/down]
FastEthernet4/0            [administratively down/down]
FastEthernet4/1            [administratively down/down]

PC2> ip auto
GLOBAL SCOPE      : fc00:1111:1111:1111:2050:79ff:fe66:6801/64
ROUTER LINK-LAYER : ca:01:3f:40:00:38

PC7> ip auto
GLOBAL SCOPE      : fc00:1111:1111:2222:2050:79ff:fe66:6805/64
ROUTER LINK-LAYER : cc:04:3e:ac:00:00

R1(config)#ipv6 route fc00:1111:1111:2222::/64 2001:1234:1234:1234::2
R1(config)#end

R2(config)#ipv6 route fc00:1111:1111:1111::/64 2001:1234:1234:1234::1
R2(config)#end

R1#show ipv6 route static
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
S   FC00:1111:1111:2222::/64 [1/0]
     via 2001:1234:1234:1234::2


R2#show ipv6 route static
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
S   FC00:1111:1111:1111::/64 [1/0]
     via 2001:1234:1234:1234::1


R1#ping fc00:1111:1111:2222::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FC00:1111:1111:2222::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/48/64 ms


R1#traceroute fc00:1111:1111:2222::2
Type escape sequence to abort.
Tracing the route to FC00:1111:1111:2222::2
  1 FC00:1111:1111:2222::2 36 msec 32 msec 56 msec
PC2> ping 2001:1234:1234:1234::1/64
2001:1234:1234:1234::1 icmp6_seq=1 ttl=64 time=32.271 ms
2001:1234:1234:1234::1 icmp6_seq=2 ttl=64 time=32.632 ms
2001:1234:1234:1234::1 icmp6_seq=3 ttl=64 time=32.318 ms
2001:1234:1234:1234::1 icmp6_seq=4 ttl=64 time=32.362 ms
2001:1234:1234:1234::1 icmp6_seq=5 ttl=64 time=32.418 ms
PC2> ping 2001:1234:1234:1234::2/64
2001:1234:1234:1234::2 icmp6_seq=1 ttl=63 time=128.036 ms
2001:1234:1234:1234::2 icmp6_seq=2 ttl=63 time=79.702 ms
2001:1234:1234:1234::2 icmp6_seq=3 ttl=63 time=95.755 ms
2001:1234:1234:1234::2 icmp6_seq=4 ttl=63 time=80.116 ms
2001:1234:1234:1234::2 icmp6_seq=5 ttl=63 time=80.655 ms
PC2> ping fc00:1111:1111:2222::2/64
fc00:1111:1111:2222::2 icmp6_seq=1 ttl=63 time=80.813 ms
fc00:1111:1111:2222::2 icmp6_seq=2 ttl=63 time=63.469 ms
fc00:1111:1111:2222::2 icmp6_seq=3 ttl=63 time=80.616 ms
fc00:1111:1111:2222::2 icmp6_seq=4 ttl=63 time=64.005 ms
fc00:1111:1111:2222::2 icmp6_seq=5 ttl=63 time=79.650 ms



What is OSPFv3 IPsec authentication? How to configure OSPFv3 authentication?

 If you're coming from an OSPFv2 world, you're used to typing in a simple {IP OSPF AUTHENTICATION-KEY} command. When you jump to IPv...