Lab Objective:
The focus of this lab is to understand OSPFv3 and RIPng implementation and configuration in Cisco IOS routers. Additional technologies include redistribution, path control, and security.
Lab Topology:
The lab network topology is illustrated below:
|
IMPORTANT NOTE If you are using the www.howtonetwork.net racks, please bring up the LAN interfaces connected to the routers by issuing the no shutdown command on the connected switches. If you are using a home lab with no interface fastethernet 0/0 Alternately, you can simply connect the interfaces to a hub or switch if you have one available in your own lab. |
Task 1
Configure hostnames and IPv6 addressing on all routers as illustrated in the network topology.
Task 2
Configure RIPng on the LAN segment between R1 and R4.
Task 3
Configure OSPFv3 as illustrated in the topology. Area 1 should be configured as a totally stub OSPF area, wherein R2 generates and advertises a default route to R3. Ensure that OSPF area 2 is still connected to the backbone. Ensure that no Hellos are sent out the LAN interfaces. Verify your configuration using the appropriate commands.
Task 4
Configure redistribution on routers R1 and R4.Use the most simple solution that negates the need to filter routes when redistributing. Verify your configuration using the appropriate commands.
Task 5
Configure R4 so that it prefers the path via R1 to reach all other subnets. In the event that this path is unavailable, the path via R3 should be used instead. Verify the configuration using the appropriate commands on R4.
Task 6
For security, configure area authentication for the OSPF backbone. Use the following parameters when you are configuring the authentication parameters:
- Use a Security Parameters Index (SPI) of 678
- Use Message Digest 5 (MD5) authentication
- Use a key of 1234567890abcdef1234567890abcdef
Verify your configuration using the appropriate commands.
Task 7
For security, configure interface authentication on the OSPF interfaces residing in area 2. Use the following parameters when you are configuring the
- Use a Security Parameters Index (SPI) of 500
- Use Message Digest 5 (MD5) authentication
- Use a key of 1234567890abcdef1234567890abcdef
Verify your configuration using the appropriate commands.
Lab Validation
Task 1
| Router(config)#hostname R1 R1(config)#ipv6 unicast-routing R1(config)#ipv6 cef R1(config)#interface fastethernet 0/0 R1(config-if)#ipv6 address 3ffe:abcd:1111:1::1/64 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface serial 0/0 R1(config-if)#ipv6 address 2001:abcd:1111:1::1/64 R1(config-if)#clock rate 2000000 R1(config-if)#no shutdown R1(config-if)#exit |
| Router(config)#hostname R2 R2(config)#ipv6 unicast-routing R2(config)#ipv6 cef R2(config)#interface fastethernet 0/0 R2(config-if)#ipv6 address 3ffe:abcd:1111:2::2/64 R2(config-if)#no shutdown R2(config)#interface serial 0/0 R2(config-if)#ipv6 address 2001:abcd:1111:1::2/64 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#interface serial 0/1 R2(config-if)#ipv6 address 2001:abcd:1111:3::2/64 R2(config-if)#no shutdown R2(config-if)#exit |
| Router(config)#hostname R3 R3(config)#ipv6 unicast-routing R3(config)#ipv6 cef R3(config)#interface fastethernet 0/0 R3(config-if)#ipv6 address 3ffe:abcd:1111:3::3/64 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#interface serial 1/1 R3(config-if)#ipv6 address 2001:abcd:1111:3::3/64 R3(config-if)#clock rate 128000 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#interface serial 1/2 R3(config-if)#ipv6 address 2001:abcd:1111:4::3/64 R3(config-if)#clock rate 128000 R3(config-if)#no shutdown R3(config-if)#exit |
| Router(config)#hostname R4 R4(config)#ipv6 unicast-routing R4(config)#ipv6 cef R4(config)#interface fastethernet 0/0 R4(config-if)#ipv6 address 3ffe:abcd:1111:1::4/64 R4(config-if)#no shutdown R4(config)#interface serial 0/0 R4(config-if)#ipv6 address 2001:abcd:1111:4::4/64 R4(config-if)#no shutdown R4(config-if)#exit |
Task 2
| R1(config)#ipv6 router rip CCNP R1(config-rtr)#exit R1(config)#interface fastethernet 0/0 R1(config-if)#ipv6 rip CCNP enable R1(config-if)#exit |
| R4(config)#ipv6 router rip CCNP R4(config-rtr)#exit R4(config)#interface fastethernet 0/0 R4(config-if)#ipv6 rip CCNP enable R4(config-if)#exit |
Verify your configuration using the show ipv6 rip <tag> database command:
| R1#show ipv6 rip CCNP database RIP process “CCNP”, local RIB 3FFE:ABCD:1111:1::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:F120, expires in 157 secs |
| R4#show ipv6 rip CCNP database RIP process “CCNP”, local RIB 3FFE:ABCD:1111:1::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:EC80, expires in 167 secs |
Task 3
The basic OSPF requirements are simple. However, to ensure that area 2 is connected to area 0 we need to configure a GRE Tunnel, since a virtual link cannot be established across a stub area. The encapsulation for this tunnel should be gre ipv6 because IPv6 will be the transport protocol. If you specify gre, the configuration will not work, because IPv4 is not the transport protocol. This task is completed as follows:
| R1(config)#ipv6 router ospf 1 R1(config-rtr)#router-id 1.1.1.1 R1(config-rtr)#exit R1(config)#interface serial 0/0 R1(config-if)#ipv6 ospf 1 area 0 R1(config-if)#exit |
| R2(config)#ipv6 router ospf 2 R2(config-rtr)#router-id 2.2.2.2 R2(config-rtr)#passive-interface fastethernet 0/0 R2(config-rtr)#area 1 stub no-summary R2(config-rtr)#exit R2(config)#interface fastethernet 0/0 R2(config-if)#ipv6 ospf 2 area 0 R2(config-if)#exit R2(config)#interface serial 0/0 R2(config-if)#ipv6 ospf 2 area 0 R2(config-if)#exit R2(config)#interface serial 0/1 R2(config-if)#ipv6 ospf 2 area 1 R2(config-if)#exit R2(config)#interface tunnel 0 R2(config-if)#tunnel source serial 0/1 R2(config-if)#tunnel destination 2001:abcd:1111:3::3 R2(config-if)#tunnel mode gre ipv6 R2(config-if)#ipv6 address 2001:abcd:1111:8::2/64 R2(config-if)#ipv6 ospf 2 area 0 R2(config-if)#exit |
| R3(config)#ipv6 router ospf 3 R3(config-rtr)#router-id 3.3.3.3 R3(config-rtr)#area 1 stub R3(config-rtr)#passive-interface fastethernet 0/0 R3(config-rtr)#exit R3(config)#interface serial 1/1 R3(config-if)#ipv6 ospf 3 area 1 R3(config-if)#exit R3(config)#interface fastethernet 0/0 R3(config-if)#ipv6 ospf 3 area 2 R3(config-if)#exit R3(config)#interface serial 1/2 R3(config-if)#ipv6 ospf 3 area 2 R3(config-if)#exit R3(config)#interface tunnel 0 R3(config-if)#tunnel source serial 1/1 R3(config-if)#tunnel destination 2001:abcd:1111:3::3 R3(config-if)#tunnel mode gre ipv6 R3(config-if)#ipv6 address 2001:abcd:1111:8::3/64 R3(config-if)#ipv6 ospf 3 area 0 R3(config-if)#exit |
| R4(config)#ipv6 router ospf 4 R4(config-rtr)#router-id 4.4.4.4 R4(config-rtr)#exit R4(config)#interface serial 0/0 R4(config-if)#ipv6 ospf 4 area 2 R4(config-if)#exit |
Verify your OSPF configuration using the show ipv6 ospf neighbor command:
| R1#show ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface |
| R2#show ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface |
| R3#show ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface |
| R4#show ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface |
Next, verify routing information using the show ipv6 route command:
| R1#show ipv6 route ospf IPv6 Routing Table – 11 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 OI 2001:ABCD:1111:3::/64 [110/128] via FE80::20D:28FF:FE9E:F940, Serial0/0 OI 2001:ABCD:1111:4::/64 [110/11956] via FE80::20D:28FF:FE9E:F940, Serial0/0 O 2001:ABCD:1111:8::/64 [110/11175] via FE80::20D:28FF:FE9E:F940, Serial0/0 O 3FFE:ABCD:1111:2::/64 [110/65] via FE80::20D:28FF:FE9E:F940, Serial0/0 OI 3FFE:ABCD:1111:3::/64 [110/11176] via FE80::20D:28FF:FE9E:F940, Serial0/0 |
| R2#show ipv6 route ospf IPv6 Routing Table – 12 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 OI 2001:ABCD:1111:4::/64 [110/11892] via FE80::213:7FFF:FEAF:3E00, Tunnel0 OI 3FFE:ABCD:1111:3::/64 [110/11112] via FE80::213:7FFF:FEAF:3E00, Tunnel0 |
| R3#show ipv6 route ospf IPv6 Routing Table – 12 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 2001:ABCD:1111:1::/64 [110/11175] via FE80::20D:28FF:FE9E:F940, Tunnel0 O 3FFE:ABCD:1111:2::/64 [110/11112] via FE80::20D:28FF:FE9E:F940, Tunnel0 |
| R4#show ipv6 route ospf IPv6 Routing Table – 11 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 OI 2001:ABCD:1111:1::/64 [110/11239] via FE80::213:7FFF:FEAF:3E00, Serial0/0 OI 2001:ABCD:1111:3::/64 [110/845] via FE80::213:7FFF:FEAF:3E00, Serial0/0 OI 2001:ABCD:1111:8::/64 [110/11175] via FE80::213:7FFF:FEAF:3E00, Serial0/0 OI 3FFE:ABCD:1111:2::/64 [110/11176] via FE80::213:7FFF:FEAF:3E00, Serial0/0 O 3FFE:ABCD:1111:3::/64 [110/65] via FE80::213:7FFF:FEAF:3E00, Serial0/0 |
Task 4
The most simple solution that can be used to complete this task is to redistribute the connected RIPng subnet into OSPFv3 and then redistribute OSPFv3 into RIP. This negates the need to implement any filters preventing routes from being re-advertised back to into the same protocol and potentially causing a routing information loop. This task is completed as follows:
| R1(config)#ipv6 router rip CCNP R1(config-rtr)#redistribute connected metric 1 R1(config-rtr)#redistribute ospf 1 metric 1 R1(config-rtr)#exit R1(config)#ipv6 router ospf 1 R1(config-rtr)#redistribute rip CCNP R1(config-rtr)#redistribute connected R1(config-rtr)#exit |
| R4(config)#ipv6 router rip CCNP R4(config-rtr)#redistribute connected metric 1 R4(config-rtr)#redistribute ospf 4 metric 1 R4(config-rtr)#exit R4(config)#ipv6 router ospf 4 R4(config-rtr)#redistribute connected R4(config-rtr)#redistribute rip CCNP R4(config-rtr)#exit |
Verify RIPng redistributed routes by verifying the entries in the RIPng database:
| R1#show ipv6 rip CCNP database RIP process “CCNP”, local RIB 2001:ABCD:1111:1::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:F120, expires in 178 secs 2001:ABCD:1111:3::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:F120, expires in 178 secs 2001:ABCD:1111:4::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:F120, expires in 178 secs 2001:ABCD:1111:8::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:F120, expires in 178 secs 3FFE:ABCD:1111:1::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:F120, expires in 178 secs 3FFE:ABCD:1111:2::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:F120, expires in 178 secs 3FFE:ABCD:1111:3::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:F120, expires in 178 secs |
| R4#show ipv6 rip CCNP database RIP process “CCNP”, local RIB 2001:ABCD:1111:1::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:EC80, expires in 162 secs 2001:ABCD:1111:3::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:EC80, expires in 162 secs 2001:ABCD:1111:4::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:EC80, expires in 162 secs 2001:ABCD:1111:8::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:EC80, expires in 162 secs 3FFE:ABCD:1111:1::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:EC80, expires in 162 secs 3FFE:ABCD:1111:2::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:EC80, expires in 162 secs 3FFE:ABCD:1111:3::/64, metric 2 FastEthernet0/0/FE80::20F:23FF:FE5E:EC80, expires in 162 secs |
Verify OSPFv3 redistributed routes by verifying Type 5 LSAs in the LSDB:
| R1#show ipv6 ospf database external
OSPFv3 Router with ID (1.1.1.1) (Process ID 1) Type-5 AS External Link States LS age: 158 Routing Bit Set on this LSA |
| R4#show ipv6 ospf database external
OSPFv3 Router with ID (4.4.4.4) (Process ID 4) Type-5 AS External Link States Routing Bit Set on this LSA LS age: 83 |
Task 5
To complete this task, simply raise the default administrative distance for OSPF internal routes, since there are no external OSPF routes, to a value higher than 120, which is the RIPng default administrative distance. Any value between 1 and 254 can be used to complete this task. This task is completed as follows:
| R4(config)#ipv6 router ospf 4 R4(config-rtr)#distance ospf intra-area 150 inter-area 150 R4(config-rtr)#exit |
Following this configuration, verify the contents of the routing table on R4:
| R4# Verify RIPng redistributed routes by verifying the entries in the RIPng database:
IPv6 Routing Table – 11 entries |
Task 6
OSPFv3 supports both authentication and encryption for security. To configure OSPFv3 area authentication, you need to use the area <area> authentication ipsec spi <size> [md5|sha1] <key> OSPFv3 configuration command. This task is completed as follows:
| R1(config)#ipv6 router ospf 1 R1(config-rtr)#$ication ipsec spi 678 md5 1234567890abcdef1234567890abcdef R2(config-rtr)#exit |
| R2(config)#ipv6 router ospf 2 R2(config-rtr)#$ication ipsec spi 678 md5 1234567890abcdef1234567890abcdef R2(config-rtr)#exit |
| R3(config)#ipv6 router ospf 3 R3(config-rtr)#$ication ipsec spi 678 md5 1234567890abcdef1234567890abcdef R3(config-rtr)#exit |
Verify OSPFv3 area authentication using the show ipv6 ospf command:
| R2#show ipv6 ospf Routing Process “ospfv3 2” with ID 2.2.2.2 It is an area border router SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs LSA group pacing timer 240 secs Interface flood pacing timer 33 msecs Retransmission pacing timer 66 msecs Number of external LSA 7. Checksum Sum 0x020EF4 Number of areas in this router is 2. 1 normal 1 stub 0 nssa Reference bandwidth unit is 100 mbps Area BACKBONE(0) Number of interfaces in this area is 3 MD5 Authentication, SPI 678 SPF algorithm executed 17 times Number of LSA 16. Checksum Sum 0x07AE65 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 Area 1 Number of interfaces in this area is 1 It is a stub area, no summary LSA in this area generates stub default route with cost 1 SPF algorithm executed 15 times Number of LSA 13. Checksum Sum 0x04EB52 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 |
By default, because IPv6 uses built-in IPsec functions, Cisco IOS software automatically creates IPsec policies for the configured authentication. The policy can be viewed using the show crypto ipsec sa [interface <name>] command on the router(s). Authentication Header (AH) is used. If you configure encryption, then Encapsulating Security Payload (ESP) will be used instead. Check the relevant SA states based on your configuration:
| R2#show crypto ipsec sa interface serial 0/0
interface: Serial0/0 IPsecv6 policy name: OSPFv3-2-678 protected vrf: (none) local crypto endpt.: FE80::20D:28FF:FE9E:F940, remote crypto endpt.: :: inbound esp sas: inbound ah sas: inbound pcp sas: outbound esp sas: outbound ah sas: outbound pcp sas: |
Additionally, you can also view the configuration parameters for the applied policy using the show crypto ipsec policy command on the router. The policy name, by default, will be OSPFv3-<process ID>-<SPI>. For example, on R1, the applied policy name will be OSPFv3-R1-678. This is validated and illustrated in the following output:
| R1#show crypto ipsec policy Crypto IPsec client security policy data Policy name: OSPFv3-1-678 |
Task 7
Interface authentication is applied at the interface using the ipv6 ospf authentication ipsec spi <spi> [md5|sha1] <key> interface configuration command. This task is completed by applying the specified configuration parameters on all interfaces within area 2:
| R3(config)#interface serial 1/2 R3(config-if)#$ion ipsec spi 500 md5 1234567890abcdef1234567890abcdef R3(config-if)#exit |
| R4(config)#interface serial 0/0 R4(config-if)#$ion ipsec spi 500 md5 1234567890abcdef1234567890abcdef R4(config-if)#exit |
Verify OSPFv3 interface authentication using the show ipv6 ospf interface command:
| R4#show ipv6 ospf interface serial 0/0 Serial0/0 is up, line protocol is up Link Local Address FE80::20F:23FF:FE5E:F120, Interface ID 5 Area 2, Process ID 4, Instance ID 0, Router ID 4.4.4.4 Network Type POINT_TO_POINT, Cost: 64 MD5 Authentication SPI 500, secure socket state UP (errors: 0) Transmit Delay is 1 sec, State POINT_TO_POINT, Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:02 Index 1/1/1, flood queue length 0 Next 0x0(0)/0x0(0)/0x0(0) Last flood scan length is 1, maximum is 5 Last flood scan time is 0 msec, maximum is 0 msec Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 3.3.3.3 Suppress hello for 0 neighbor(s) |
NOTE: You should have NO errors (as illustrated above). If you do, check the configuration.
As is the case with area authentication, a policy is dynamically created and applied by the Cisco IOS software. This can be viewed using the show crypto ipsec sa [interface <name>] command on the router on which interface authentication has been implemented. The policy name, by default, will be OSPFv3-<process ID>-<SPI> as illustrated below:
| R4#show crypto ipsec sa interface serial 0/0
interface: Serial0/0 IPsecv6 policy name: OSPFv3-4-500 protected vrf: (none) local crypto endpt.: FE80::20F:23FF:FE5E:F120, remote crypto endpt.: :: inbound esp sas: inbound ah sas: inbound pcp sas: outbound esp sas: outbound ah sas: outbound pcp sas: |
Final Router Configurations
R1
|
R1#term len 0 Current configuration : 1185 bytes R1# |
R2
|
R2#term len 0 Current configuration : 1315 bytes R2# |
R3
|
R3#term len 0 Current configuration : 1720 bytes R3# |
R4
|
R4#term len 0 Current configuration : 1214 bytes R4# |
