Friday, December 26, 2014

Configuring OSPF

I recently configured a Cisco Nexus 5672UP multilayer switch and a Cisco ASR1002-X router for our MPLS core upgrade. We're running OSPF on our core network and configurations made more sense after performing numerous labs on this routing protocol.

This is me patching and configuring these devices at our core data center.


This is my OSPF lab network topology, configuration and troubleshooting during my CCNP ROUTE study.


R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#network 10.1.12.0 0.0.0.255 area 0
R1(config-router)#network 10.1.1.0 0.0.0.255 area 0
R1(config-router)#exit
R1(config)#interface loopback1
R1(config-if)#ip ospf network ?
  broadcast            Specify OSPF broadcast multi-access network
  non-broadcast        Specify OSPF NBMA network
  point-to-multipoint  Specify OSPF point-to-multipoint network
  point-to-point       Specify OSPF point-to-point network

R1(config-if)#ip ospf network point-to-point


R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#router ospf 1
R2(config-router)#network 10.1.12.0 0.0.0.255 area 0
*Dec 13 15:01:48.131: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial0/0/0 from LOADING to FULL, Loading Done
R2(config-router)#network 10.1.2.0 0.0.0.255 area 0
R2(config-router)#exit
R2(config)#interface loopback2
R2(config-if)#ip ospf network point-to-point


R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.2.1          0   FULL/  -        00:00:32    10.1.12.2       Serial0/0/0


R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1          0   FULL/  -        00:00:35    10.1.12.1       Serial0/0/0


R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 3 subnets
C       10.1.12.0 is directly connected, Serial0/0/0
O       10.1.2.0 [110/65] via 10.1.12.2, 00:01:27, Serial0/0/0
C       10.1.1.0 is directly connected, Loopback1


R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 4 subnets
C       10.1.12.0 is directly connected, Serial0/0/0
C       10.1.2.0 is directly connected, Loopback2
O       10.1.1.0 [110/65] via 10.1.12.1, 00:01:41, Serial0/0/0
C       10.1.23.0 is directly connected, Serial0/0/1


R2(config)#interface serial0/0/1
R2(config-if)#ip ospf ?
  <1-65535>            Process ID
  authentication       Enable authentication
  authentication-key   Authentication password (key)
  cost                 Interface cost
  database-filter      Filter OSPF LSA during synchronization and flooding
  dead-interval        Interval after which a neighbor is declared dead
  demand-circuit       OSPF demand circuit
  flood-reduction      OSPF Flood Reduction
  hello-interval       Time between HELLO packets
  lls                  Link-local Signaling (LLS) support
  message-digest-key   Message digest authentication password (key)
  mtu-ignore           Ignores the MTU in DBD packets
  network              Network type
  prefix-suppression   OSPF prefix suppression
  priority             Router priority
  resync-timeout       Interval after which adjacency is reset if oob-resync is
                       not started
  retransmit-interval  Time between retransmitting lost link state
                       advertisements
  transmit-delay       Link state transmit delay

R2(config-if)#ip ospf 1 ?
  area  Set the OSPF area ID

R2(config-if)#ip ospf 1 area ?
  <0-4294967295>  OSPF area ID as a decimal value
  A.B.C.D         OSPF area ID in IP address format

R2(config-if)#ip ospf 1 area 23    // ANOTHER WAY OF CONFIGURING OSPF IN INTERFACE CONFIG MODE


R3(config)#interface s0/0/1
R3(config-if)#ip ospf 1 area 23
R3(config-if)#
*Dec 13 15:42:47.679: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.1 on Serial0/0/1 from LOADING to FULL, Loading Done
R3(config-if)#interface lo3
R3(config-if)#ip ospf 1 area 23
R3(config-if)#ip ospf network point-to-point


R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1          0   FULL/  -        00:00:30    10.1.12.1       Serial0/0/0
172.20.200.1      0   FULL/  -        00:00:36    10.1.23.3       Serial0/0/1


R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 5 subnets
C       10.1.12.0 is directly connected, Serial0/0/0
O IA    10.1.3.0 [110/129] via 10.1.12.2, 00:00:51, Serial0/0/0 
O       10.1.2.0 [110/65] via 10.1.12.2, 00:04:44, Serial0/0/0
C       10.1.1.0 is directly connected, Loopback1
O IA    10.1.23.0 [110/128] via 10.1.12.2, 00:01:50, Serial0/0/0



R2#show ip route     // NO INTER AREA ROUTE SINCE IT'S ABR
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 5 subnets
C       10.1.12.0 is directly connected, Serial0/0/0
O       10.1.3.0 [110/65] via 10.1.23.3, 00:01:33, Serial0/0/1
C       10.1.2.0 is directly connected, Loopback2
O       10.1.1.0 [110/65] via 10.1.12.1, 00:02:38, Serial0/0/0
C       10.1.23.0 is directly connected, Serial0/0/1


R1#tclsh
R1(tcl)#foreach address {
+>(tcl)#10.1.1.1
+>(tcl)#10.1.2.1
+>(tcl)#10.1.3.1
+>(tcl)#10.1.12.1
+>(tcl)#10.1.12.2
+>(tcl)#10.1.23.2
+>(tcl)#10.1.23.3
+>(tcl)#172.20.200.1
+>(tcl)#} {
+>(tcl)#ping $address }

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.23.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.20.200.1, timeout is 2 seconds:
.....     // NOT YET ADVERTISED IN OSPF
Success rate is 0 percent (0/5)


R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#router ospf 1
R2(config-router)#area ?
  <0-4294967295>  OSPF area ID as a decimal value
  A.B.C.D         OSPF area ID in IP address format

R2(config-router)#area 23 ?
  authentication  Enable authentication
  default-cost    Set the summary default-cost of a NSSA/stub area
  filter-list     Filter networks between OSPF areas
  nssa            Specify a NSSA area
  range           Summarize routes matching address/mask (border routers only)
  sham-link       Define a sham link and its parameters
  stub            Specify a stub area
  virtual-link    Define a virtual link and its parameters

R2(config-router)#area 23 stub
R2(config-router)#
*Dec 13 15:10:02.747: %OSPF-5-ADJCHG: Process 1, Nbr 172.20.200.1 on Serial0/0/1 from FULL to DOWN, Neighbor Down: Adjacency forced to reset


R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#area 23 stub
R3(config-router)#
*Dec 13 15:47:25.059: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.1 on Serial0/0/1 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
R3(config-router)#
*Dec 13 15:47:31.323: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.1 on Serial0/0/1 from LOADING to FULL, Loading Done


R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1          0   FULL/  -        00:00:32    10.1.12.1       Serial0/0/0
172.20.200.1      0   FULL/  -        00:00:36    10.1.23.3       Serial0/0/1


R3#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.2.1          0   FULL/  -        00:00:36    10.1.23.2       Serial0/0/1


R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.1.23.2 to network 0.0.0.0

     172.20.0.0/24 is subnetted, 1 subnets
C       172.20.200.0 is directly connected, Loopback20
     10.0.0.0/24 is subnetted, 5 subnets
O IA    10.1.12.0 [110/128] via 10.1.23.2, 00:01:16, Serial0/0/1
C       10.1.3.0 is directly connected, Loopback3
O IA    10.1.2.0 [110/65] via 10.1.23.2, 00:01:16, Serial0/0/1
O IA    10.1.1.0 [110/129] via 10.1.23.2, 00:01:16, Serial0/0/1
C       10.1.23.0 is directly connected, Serial0/0/1
O*IA 0.0.0.0/0 [110/65] via 10.1.23.2, 00:01:16, Serial0/0/1    // STUB AREA ONLY RECEIVES A DEFAULT AND IA ROUTES


R2#show ip ospf
 Routing Process "ospf 1" with ID 10.1.2.1
 Start time: 00:07:26.160, Time elapsed: 00:11:51.372
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Supports area transit capability
 It is an area border router
 Router is not originating router-LSAs with maximum metric
 Initial SPF schedule delay 5000 msecs
 Minimum hold time between two consecutive SPFs 10000 msecs
 Maximum wait time between two consecutive SPFs 10000 msecs
 Incremental-SPF disabled
 Minimum LSA interval 5 secs
 Minimum LSA arrival 1000 msecs
 LSA group pacing timer 240 secs
 Interface flood pacing timer 33 msecs
 Retransmission pacing timer 66 msecs
 Number of external LSA 0. Checksum Sum 0x000000
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 Number of DCbitless external and opaque AS LSA 0
 Number of DoNotAge external and opaque AS LSA 0
 Number of areas in this router is 2. 1 normal 1 stub 0 nssa
 Number of areas transit capable is 0
 External flood list length 0
 IETF NSF helper support enabled
 Cisco NSF helper support enabled
    Area BACKBONE(0)
        Number of interfaces in this area is 2 (1 loopback)
        Area has no authentication
        SPF algorithm last executed 00:03:21.984 ago
        SPF algorithm executed 6 times
        Area ranges are
        Number of LSA 4. Checksum Sum 0x01A65B
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
    Area 23
        Number of interfaces in this area is 1
        It is a stub area   
          generates stub default route with cost 1
        Area has no authentication
        SPF algorithm last executed 00:02:50.368 ago
        SPF algorithm executed 8 times
        Area ranges are
        Number of LSA 6. Checksum Sum 0x026C6C
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0


R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.1.23.2 to network 0.0.0.0

     172.20.0.0/24 is subnetted, 1 subnets
C       172.20.200.0 is directly connected, Loopback20
     10.0.0.0/24 is subnetted, 5 subnets
O IA    10.1.12.0 [110/128] via 10.1.23.2, 00:04:23, Serial0/0/1
C       10.1.3.0 is directly connected, Loopback3
O IA    10.1.2.0 [110/65] via 10.1.23.2, 00:04:23, Serial0/0/1
O IA    10.1.1.0 [110/129] via 10.1.23.2, 00:04:23, Serial0/0/1
C       10.1.23.0 is directly connected, Serial0/0/1
O*IA 0.0.0.0/0 [110/65] via 10.1.23.2, 00:04:23, Serial0/0/1


R2#show ip ospf database

            OSPF Router with ID (10.1.2.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
10.1.1.1        10.1.1.1        826         0x80000004 0x0056D6 3
10.1.2.1        10.1.2.1        617         0x80000004 0x0055D3 3

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.1.3.0        10.1.2.1        299         0x80000001 0x00EFEF
10.1.23.0       10.1.2.1        612         0x80000001 0x0009C3

                Router Link States (Area 23)

Link ID         ADV Router      Age         Seq#       Checksum Link count
10.1.2.1        10.1.2.1        303         0x80000004 0x00298C 2
172.20.200.1    172.20.200.1    304         0x80000005 0x00B563 3

                Summary Net Link States (Area 23)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         10.1.2.1        330         0x80000001 0x003BF4
10.1.1.0        10.1.2.1        332         0x80000002 0x0022C0
10.1.2.0        10.1.2.1        332         0x80000003 0x00928E
10.1.12.0       10.1.2.1        332         0x80000003 0x009C3B


R2(config)#router ospf 1
R2(config-router)#area 23 stub ?
  no-ext-capability  Do not send domain specific capabilities into stub area
  no-summary         Do not send summary LSA into stub area
  <cr>

R2(config-router)#area 23 stub no-summary   // TO CONFIGURE TOTALLY STUBBY AREA


R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.1.23.2 to network 0.0.0.0

     172.20.0.0/24 is subnetted, 1 subnets
C       172.20.200.0 is directly connected, Loopback20
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.3.0 is directly connected, Loopback3
C       10.1.23.0 is directly connected, Serial0/0/1
O*IA 0.0.0.0/0 [110/65] via 10.1.23.2, 00:00:21, Serial0/0/1


R3#show ip ospf database

            OSPF Router with ID (172.20.200.1) (Process ID 1)

                Router Link States (Area 23)

Link ID         ADV Router      Age         Seq#       Checksum Link count
10.1.2.1        10.1.2.1        423         0x80000004 0x00298C 2
172.20.200.1    172.20.200.1    422         0x80000005 0x00B563 3

                Summary Net Link States (Area 23)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         10.1.2.1        72          0x80000002 0x0039F5



R2(config)#router ospf 1
R2(config-router)#no area 23 stub
*Dec 13 15:19:18.779: %OSPF-5-ADJCHG: Process 1, Nbr 172.20.200.1 on Serial0/0/1 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
R2(config-router)#area 23 nssa    // CONVERTS TYPE 7 TO TYPE 5 LSA
*Dec 13 15:19:28.779: %OSPF-5-ADJCHG: Process 1, Nbr 172.20.200.1 on Serial0/0/1 from DOWN to DOWN, Neighbor Down: Adjacency forced to reset


R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#no area 23 stub
R3(config-router)#area 23 ?
  authentication  Enable authentication
  default-cost    Set the summary default-cost of a NSSA/stub area
  filter-list     Filter networks between OSPF areas
  nssa            Specify a NSSA area
  range           Summarize routes matching address/mask (border routers only)
  sham-link       Define a sham link and its parameters
  stub            Specify a stub area
  virtual-link    Define a virtual link and its parameters

R3(config-router)#area 23 nssa
R3(config-router)#
*Dec 13 15:57:21.139: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.1 on Serial0/0/1 from LOADING to FULL, Loading Done
R3(config-router)#redistribute ?
  bgp             Border Gateway Protocol (BGP)
  connected       Connected
  eigrp           Enhanced Interior Gateway Routing Protocol (EIGRP)
  isis            ISO IS-IS
  iso-igrp        IGRP for OSI networks
  maximum-prefix  Maximum number of prefixes redistributed to protocol
  metric          Metric for redistributed routes
  metric-type     OSPF/IS-IS exterior metric type for redistributed routes
  mobile          Mobile routes
  odr             On Demand stub Routes
  ospf            Open Shortest Path First (OSPF)
  rip             Routing Information Protocol (RIP)
  route-map       Route map reference
  static          Static routes
  subnets         Consider subnets for redistribution into OSPF
  tag             Set tag for routes redistributed into OSPF
  <cr>

R3(config-router)#redistribute connected ?
  metric       Metric for redistributed routes
  metric-type  OSPF/IS-IS exterior metric type for redistributed routes
  route-map    Route map reference
  subnets      Consider subnets for redistribution into OSPF
  tag          Set tag for routes redistributed into OSPF
  <cr>

R3(config-router)#redistribute connected subnets   // TO ADVERTISE EXTERNAL AND EXACT SUBNET INTO NSSA AREA INCLUDING LOOPBACK 20


R2#show ip ospf
 Routing Process "ospf 1" with ID 10.1.2.1
 Start time: 00:07:26.160, Time elapsed: 00:23:04.308
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Supports area transit capability
 It is an area border and autonomous system boundary router
 Redistributing External Routes from,
 Router is not originating router-LSAs with maximum metric
 Initial SPF schedule delay 5000 msecs
 Minimum hold time between two consecutive SPFs 10000 msecs
 Maximum wait time between two consecutive SPFs 10000 msecs
 Incremental-SPF disabled
 Minimum LSA interval 5 secs
 Minimum LSA arrival 1000 msecs
 LSA group pacing timer 240 secs
 Interface flood pacing timer 33 msecs
 Retransmission pacing timer 66 msecs
 Number of external LSA 1. Checksum Sum 0x00CA2F
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 Number of DCbitless external and opaque AS LSA 0
 Number of DoNotAge external and opaque AS LSA 0
 Number of areas in this router is 2. 1 normal 0 stub 1 nssa
 Number of areas transit capable is 0
 External flood list length 0
 IETF NSF helper support enabled
 Cisco NSF helper support enabled
    Area BACKBONE(0)
        Number of interfaces in this area is 2 (1 loopback)
        Area has no authentication
        SPF algorithm last executed 00:05:04.072 ago
        SPF algorithm executed 10 times
        Area ranges are
        Number of LSA 4. Checksum Sum 0x01AA54
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
    Area 23
        Number of interfaces in this area is 1
        It is a NSSA area  
        Perform type-7/type-5 LSA translation  
        Area has no authentication
        SPF algorithm last executed 00:03:56.008 ago
        SPF algorithm executed 15 times
        Area ranges are
        Number of LSA 6. Checksum Sum 0x025299
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.20.0.0/24 is subnetted, 1 subnets
O N2    172.20.200.0 [110/20] via 10.1.23.3, 00:04:31, Serial0/0/1 
     10.0.0.0/24 is subnetted, 5 subnets
C       10.1.12.0 is directly connected, Serial0/0/0
O       10.1.3.0 [110/65] via 10.1.23.3, 00:04:49, Serial0/0/1
C       10.1.2.0 is directly connected, Loopback2
O       10.1.1.0 [110/65] via 10.1.12.1, 00:05:44, Serial0/0/0
C       10.1.23.0 is directly connected, Serial0/0/1


R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.20.0.0/24 is subnetted, 1 subnets
O E2    172.20.200.0 [110/20] via 10.1.12.2, 00:05:12, Serial0/0/0   // TRANSLATED EXTERNAL ROUTE
     10.0.0.0/24 is subnetted, 5 subnets
C       10.1.12.0 is directly connected, Serial0/0/0
O IA    10.1.3.0 [110/129] via 10.1.12.2, 00:05:31, Serial0/0/0
O       10.1.2.0 [110/65] via 10.1.12.2, 00:23:26, Serial0/0/0
C       10.1.1.0 is directly connected, Loopback1
O IA    10.1.23.0 [110/128] via 10.1.12.2, 00:20:33, Serial0/0/0


R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     172.20.0.0/24 is subnetted, 1 subnets
C       172.20.200.0 is directly connected, Loopback20
     10.0.0.0/24 is subnetted, 5 subnets
O IA    10.1.12.0 [110/128] via 10.1.23.2, 00:06:23, Serial0/0/1  
C       10.1.3.0 is directly connected, Loopback3
O IA    10.1.2.0 [110/65] via 10.1.23.2, 00:06:23, Serial0/0/1  
O IA    10.1.1.0 [110/129] via 10.1.23.2, 00:06:23, Serial0/0/1 
C       10.1.23.0 is directly connected, Serial0/0/1


R2(config)#router ospf 1
R2(config-router)#area 23 nssa ?
  default-information-originate  Originate Type 7 default into NSSA area
  no-ext-capability              Do not send domain specific capabilities into
                                 NSSA
  no-redistribution              No redistribution into this NSSA area
  no-summary                     Do not send summary LSA into NSSA
  translate                      Translate LSA
  <cr>

R2(config-router)#area 23 nssa no-summary   // TOTALLY STUBBY NSSA


R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.1.23.2 to network 0.0.0.0

     172.20.0.0/24 is subnetted, 1 subnets
C       172.20.200.0 is directly connected, Loopback20
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.3.0 is directly connected, Loopback3
C       10.1.23.0 is directly connected, Serial0/0/1
O*IA 0.0.0.0/0 [110/65] via 10.1.23.2, 00:00:47, Serial0/0/1  


R2#show ip ospf database

            OSPF Router with ID (10.1.2.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
10.1.1.1        10.1.1.1        1628        0x80000004 0x0056D6 3
10.1.2.1        10.1.2.1        566         0x80000005 0x0059CC 3

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
10.1.3.0        10.1.2.1        512         0x80000001 0x00EFEF
10.1.23.0       10.1.2.1        1415        0x80000001 0x0009C3

                Router Link States (Area 23)

Link ID         ADV Router      Age         Seq#       Checksum Link count
10.1.2.1        10.1.2.1        516         0x80000007 0x00B0F7 2
172.20.200.1    172.20.200.1    500         0x80000008 0x003DCE 3

                Summary Net Link States (Area 23) 

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         10.1.2.1        78          0x80000001 0x00C265

                Type-7 AS External Link States (Area 23)  

Link ID         ADV Router      Age         Seq#       Checksum Tag
172.20.200.0    172.20.200.1    501         0x80000001 0x0076FC 0

                Type-5 AS External Link States    

Link ID         ADV Router      Age         Seq#       Checksum Tag
172.20.200.0    10.1.2.1        495         0x80000001 0x00CA2F 0


R2(config)#interface serial0/0/1
R2(config-if)#ip ospf ?
  <1-65535>            Process ID
  authentication       Enable authentication
  authentication-key   Authentication password (key)
  cost                 Interface cost
  database-filter      Filter OSPF LSA during synchronization and flooding
  dead-interval        Interval after which a neighbor is declared dead
  demand-circuit       OSPF demand circuit
  flood-reduction      OSPF Flood Reduction
  hello-interval       Time between HELLO packets
  lls                  Link-local Signaling (LLS) support
  message-digest-key   Message digest authentication password (key)
  mtu-ignore           Ignores the MTU in DBD packets
  network              Network type
  prefix-suppression   OSPF prefix suppression
  priority             Router priority
  resync-timeout       Interval after which adjacency is reset if oob-resync is
                       not started
  retransmit-interval  Time between retransmitting lost link state
                       advertisements
  transmit-delay       Link state transmit delay

R2(config-if)#ip ospf authentication
R2(config-if)#ip ospf authentication-key ?
  <0-7>  Encryption type (0 for not yet encrypted, 7 for proprietary)
  LINE   The OSPF password (key) (maximum 8 characters)

R2(config-if)#ip ospf authentication-key cisco


R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#interface serial0/0/1
R3(config-if)#ip ospf authentication
*Dec 13 16:07:45.779: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.1 on Serial0/0/1 from FULL to DOWN, Neighbor Down: Dead timer expired
R3(config-if)#ip ospf authentication-key cisco
R3(config-if)#
*Dec 13 16:07:58.435: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.1 on Serial0/0/1 from LOADING to FULL, Loading Done


R3#show ip ospf interface s0/0/1
Serial0/0/1 is up, line protocol is up
  Internet Address 10.1.23.3/24, Area 23
  Process ID 1, Router ID 172.20.200.1, Network Type POINT_TO_POINT, Cost: 64
  Enabled by interface config, including secondary ip addresses
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:04
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 10.1.2.1
  Suppress hello for 0 neighbor(s)
  Simple password authentication enabled  


R1(config)#interface s0/0/0
R1(config-if)#ip ospf authentication ?
  message-digest  Use message-digest authentication
  null            Use no authentication
  <cr>

R1(config-if)#ip ospf authentication message-digest
R1(config-if)#ip ospf ?
  <1-65535>            Process ID
  authentication       Enable authentication
  authentication-key   Authentication password (key)
  cost                 Interface cost
  database-filter      Filter OSPF LSA during synchronization and flooding
  dead-interval        Interval after which a neighbor is declared dead
  demand-circuit       OSPF demand circuit
  flood-reduction      OSPF Flood Reduction
  hello-interval       Time between HELLO packets
  lls                  Link-local Signaling (LLS) support
  message-digest-key   Message digest authentication password (key)
  mtu-ignore           Ignores the MTU in DBD packets
  network              Network type
  prefix-suppression   OSPF prefix suppression
  priority             Router priority
  resync-timeout       Interval after which adjacency is reset if oob-resync is
                       not started
  retransmit-interval  Time between retransmitting lost link state
                       advertisements
  transmit-delay       Link state transmit delay

R1(config-if)#ip ospf message-digest-key ?
  <1-255>  Key ID

R1(config-if)#ip ospf message-digest-key 1 ?
  md5  Use MD5 algorithm

R1(config-if)#ip ospf message-digest-key 1 md5 ?
  <0-7>  Encryption type (0 for not yet encrypted, 7 for proprietary)
  LINE   The OSPF password (key) (maximum 16 characters)

R1(config-if)#ip ospf message-digest-key 1 md5 cisco
R1(config-if)#
*Dec 13 16:51:46.895: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.1 on Serial0/0/0 from FULL to DOWN, Neighbor Down: Dead timer expired


R2(config)#interface s0/0/0
R2(config-if)#ip ospf authentication message-digest
R2(config-if)#ip ospf message-digest-key 1 md5 cisco
R2(config-if)#
*Dec 13 15:35:12.019: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial0/0/0 from LOADING to FULL, Loading Done


R2#show ip ospf interface s0/0/0
Serial0/0/0 is up, line protocol is up
  Internet Address 10.1.12.2/24, Area 0
  Process ID 1, Router ID 10.1.2.1, Network Type POINT_TO_POINT, Cost: 64
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 10.1.1.1
  Suppress hello for 0 neighbor(s)
  Message digest authentication enabled  
    Youngest key id is 1  


R1#tclsh
R1(tcl)#foreach address {
+>(tcl)#10.1.1.1
+>(tcl)#10.1.2.1
+>(tcl)#10.1.3.1
+>(tcl)#10.1.12.1
+>(tcl)#10.1.12.2
+>(tcl)#10.1.23.2
+>(tcl)#10.1.23.3
+>(tcl)#172.20.200.1
+>(tcl)#} {
+>(tcl)#ping $address }

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.3.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/60 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.23.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.20.200.1, timeout is 2 seconds: 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms

No comments:

Post a Comment