Showing posts with label OSPF. Show all posts
Showing posts with label OSPF. Show all posts

24 June, 2015

Bidirectional Forwarding Detection


[R1]
{INTERFACE}
interface Ethernet0/0
 ip address 10.99.1.1 255.255.255.0
 ip ospf bfd
 bfd interval 100 min_rx 100 multiplier 3

{OSPF}
router ospf 1
 router-id 1.1.1.1
 passive-interface default
 no passive-interface Ethernet0/0
 no passive-interface Ethernet0/1
 network 10.1.1.1 0.0.0.0 area 0
 network 10.1.2.1 0.0.0.0 area 0
 network 10.1.3.1 0.0.0.0 area 0
 network 10.99.1.1 0.0.0.0 area 0
 network 10.99.2.1 0.0.0.0 area 0
 bfd all-interfaces

[R2]
{INTERFACE}
interface Ethernet0/0
 ip address 10.99.1.2 255.255.255.0
 ip ospf bfd
 bfd interval 100 min_rx 100 multiplier 3

{OSPF}
router ospf 1
 router-id 2.2.2.2
 passive-interface default
 no passive-interface Ethernet0/0
 network 10.2.1.2 0.0.0.0 area 2
 network 10.2.2.2 0.0.0.0 area 2
 network 10.2.3.2 0.0.0.0 area 2
 network 10.99.1.2 0.0.0.0 area 0
 bfd all-interfaces

{SHOW COMMANDS AND DEBUG}
R1#show bfd ?
  drops      Display packets dropped 
  map        BFD map entry DB
  neighbors  BFD neighbors
  summary    BFD summary

R1#show bfd neighbors ?
  client         View neighbors of a specific client
  details        Display all BFD parameters
  hardware       Display hardware offloaded sessions
  inactive       Display inactive adjs
  ipv4           Neighbor IPv4 single-hop address
  ipv6           Neighbor IPv6 single-hop address
  mpls-pw        MPLS Pseudo-wire
  mpls-tp        MPLS TP
  multihop-ipv4  Multi-hop IPv4
  multihop-ipv6  Multi-hop IPv6
  vrf            Show entries for a VPN Routing/Forwarding instance
  |              Output modifiers
  <cr>

R1#show bfd summary 
                    Session          Up          Down
Total                     1           1             0

R1#show bfd neighbors 
IPv4 Sessions
NeighAddr                              LD/RD         RH/RS     State     Int
10.99.1.2                               1/1          Up        Up        Et0/0

R1#show bfd neighbors details 
IPv4 Sessions
NeighAddr                              LD/RD         RH/RS     State     Int
10.99.1.2                               1/1          Up        Up        Et0/0
Session state is UP and using echo function with 100 ms interval.
Session Host: Software
OurAddr: 10.99.1.1      
Handle: 1
Local Diag: 0, Demand mode: 0, Poll bit: 0
MinTxInt: 1000000, MinRxInt: 1000000, Multiplier: 3
Received MinRxInt: 1000000, Received Multiplier: 3
Holddown (hits): 0(0), Hello (hits): 1000(503)
Rx Count: 502, Rx Interval (ms) min/max/avg: 1/1077/882 last: 896 ms ago
Tx Count: 505, Tx Interval (ms) min/max/avg: 1/1042/878 last: 173 ms ago
Elapsed time watermarks: 0 0 (last: 0)
Registered protocols: OSPF
Uptime: 00:07:22
Last packet: Version: 1                  - Diagnostic: 0
             State bit: Up               - Demand bit: 0
             Poll bit: 0                 - Final bit: 0
             C bit: 0                                   
             Multiplier: 3               - Length: 24
             My Discr.: 1                - Your Discr.: 1
             Min tx interval: 1000000    - Min rx interval: 1000000
             Min Echo interval: 100000 

R1#show bfd drops 
BFD Drop Statistics
                        IPV4    IPV6    IPV4-M  IPV6-M  MPLS_PW MPLS_TP_LSP
Invalid TTL             0        0       0       0       0       0
BFD Not Configured      0        0       0       0       0       0
No BFD Adjacency        0        0       0       0       0       0
Invalid Header Bits     0        0       0       0       0       0
Invalid Discriminator   0        0       0       0       0       0
Session AdminDown       0        0       0       0       0       0
Authen invalid BFD ver  0        0       0       0       0       0
Authen invalid len      0        0       0       0       0       0
Authen invalid seq      0        0       0       0       0       0
Authen failed           0        0       0       0       0       0

{Debug BFD}

R2(config)#in ethernet 0/0
R2(config-if)#shutdown 
R2(config-if)#no shutdown

R1#debug bfd event 
*Jun 24 06:37:47.063: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:ECHO FAILURE state:UP (0)
*Jun 24 06:37:47.064: BFD-DEBUG EVENT: bfd_session_destroyed, proc:OSPF, handle:1 act

*Jun 24 06:37:47.064: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: BFD node down

*Jun 24 06:37:47.065: BFD-DEBUG Event: notify client(OSPF) IP:10.99.1.2, ld:1, handle:1, event:1, cp independent failure (0)
*Jun 24 06:37:47.065: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:Session delete state:DOWN (0)

*Jun 24 06:37:50.067: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:DETECT TIMER EXPIRED state:ADMIN DOWN (0)
*Jun 24 06:37:50.067: BFD-DEBUG Event: decreasing credits by 12 [to 0] (0)

*Jun 24 06:37:52.789: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0/0 from LOADING to FULL, Loading Done

*Jun 24 06:37:52.808: BFD-DEBUG EVENT: bfd_session_created, proc:OSPF, idb:Ethernet0/0 handle:1 act
*Jun 24 06:37:53.627: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:RX DOWN state:DOWN (0)
*Jun 24 06:37:53.628: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:RX UP state:INIT (0)
*Jun 24 06:37:53.628: BFD-DEBUG Event: notify client(OSPF) IP:10.99.1.2, ld:1, handle:1, event:0,  (0)

R2(config)#router ospf 1
R2(config-router)#no network 10.99.1.2 0.0.0.0 area 0

*Jun 24 06:42:08.307: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:RX ADMINDOWN state:UP (0)
*Jun 24 06:42:08.308: BFD-DEBUG Event: notify client(OSPF) IP:10.99.1.2, ld:1, handle:1, event:1 adminDown,  (0)
*Jun 24 06:42:09.137: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:RX ADMINDOWN state:DOWN (0)
*Jun 24 06:42:10.107: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:RX ADMINDOWN state:DOWN (0)
*Jun 24 06:42:10.968: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:RX ADMINDOWN state:DOWN (0)

*Jun 24 06:42:45.805: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired

*Jun 24 06:42:45.805: BFD-DEBUG EVENT: bfd_session_destroyed, proc:OSPF, handle:1 act
*Jun 24 06:42:45.806: BFD-DEBUG Event: decreasing credits by 12 [to 0] (0)

R2(config-router)#network 10.99.1.2 0.0.0.0 area 0

*Jun 24 06:44:20.170: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0/0 from LOADING to FULL, Loading Done
*Jun 24 06:44:20.183: BFD-DEBUG EVENT: bfd_session_created, proc:OSPF, idb:Ethernet0/0 handle:1 act
*Jun 24 06:44:21.077: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:RX DOWN state:DOWN (0)
*Jun 24 06:44:21.077: BFD-DEBUG Event: V1 FSM ld:1 handle:1 event:RX UP state:INIT (0)
*Jun 24 06:44:21.077: BFD-DEBUG Event: notify client(OSPF) IP:10.99.1.2, ld:1, handle:1, event:0,  (0)

R2(config)#interface ethernet 0/0
R2(config-if)#shutdown 
R2(config-if)#no shutdown 

R1#debug bfd packet 
*Jun 24 13:10:15.049: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: BFD node down
*Jun 24 13:10:15.050: BFD-DEBUG Packet: Tx IP:10.99.1.2 ld/rd:1/0 diag:2(Echo Function Failed) Down   cnt:1787 (0)
*Jun 24 13:10:15.054: BFD-DEBUG Packet: Tx IP:10.99.1.2 ld/rd:1/0 diag:7(Administratively Down) AdminDown   cnt:1788 (0)

*Jun 24 13:10:56.535: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Ethernet0/0 from LOADING to FULL, Loading Done
*Jun 24 13:10:57.381: BFD-DEBUG Packet: Rx IP:10.99.1.2 ld/rd:1/1 diag:0(No Diagnostic) Init  cnt:1 ttl:254 (0)
*Jun 24 13:10:57.381: BFD-DEBUG Packet: Tx IP:10.99.1.2 ld/rd:1/1 diag:0(No Diagnostic) Up   cnt:2 (0)
*Jun 24 13:10:57.381: BFD-DEBUG Packet: Rx IP:10.99.1.2 ld/rd:1/1 diag:0(No Diagnostic) Up  cnt:2 ttl:254 (0)

R1#show bfd drops 
BFD Drop Statistics
                        IPV4    IPV6    IPV4-M  IPV6-M  MPLS_PW MPLS_TP_LSP
Invalid TTL             0        0       0       0       0       0
BFD Not Configured      0        0       0       0       0       0
No BFD Adjacency        0        0       0       0       0       0
Invalid Header Bits     0        0       0       0       0       0
Invalid Discriminator   0        0       0       0       0       0
Session AdminDown       2        0       0       0       0       0
Authen invalid BFD ver  0        0       0       0       0       0
Authen invalid len      0        0       0       0       0       0
Authen invalid seq      0        0       0       0       0       0
Authen failed           0        0       0       0       0       0

R1#show clock 
*10:55:17.078 UTC Wed Jun 24 2015
R1#show interfaces ethernet 0/0 stats 
Ethernet0/0
          Switching path    Pkts In   Chars In   Pkts Out  Chars Out
               Processor        528     248328        787     264600
             Route cache      52560    2869584      52570    2870208
                   Total      53088    3117912      53357    3134808

R1#show clock                         
*10:55:44.779 UTC Wed Jun 24 2015
R1#show interfaces ethernet 0/0 stats 
Ethernet0/0
          Switching path    Pkts In   Chars In   Pkts Out  Chars Out
               Processor        532     248962        794     265414
             Route cache      53178    2903340      53187    2903898
                   Total      53710    3152302      53981    3169312

R1#show processes cpu sorted | in BFD
 221        5448      286802         18  1.91%  1.94%  1.93%   0 BFD IOU Process  
 130           8        1346          5  0.00%  0.00%  0.00%   0 BFD              
 187           0           3          0  0.00%  0.00%  0.00%   0 BFD events       
 208           0           5          0  0.00%  0.00%  0.00%   0 BFD debugs       
 254           8         408         19  0.00%  0.00%  0.00%   0 BFD packet stats 


- BFD is always unicast.

- BFD control packets are always UDP, sourced from 49152 and sent to 3784. BFD echo packets are also UDP, and are sourced from 3785 and sent to 3785 (why this is will become obvious later).

BFD Single-Hop Authentication here
If you wish to take a look at the Cisco BFD Configuration Guide, it can be found here

04 May, 2015

ASA Device Manager (ASDM) Management and Syslog


ASA(config)# show mode
Security context mode: single
ASA(config)# show firewall
Firewall mode: Router

! Configure Interfaces Gi0,Gi1 i Gi3
ASA(config)# in g 1
ASA(config-if)# no shu
ASA(config-if)# nameif inside
ASA(config-if)# ip address 10.0.0.254 255.255.255.0
ASA(config-if)# security-level 100
ASA(config-if)# ping 10.0.0.1
!!!!!

ASA# show ip
System IP Addresses:
Interface                Name                   IP address      Subnet mask     Method
GigabitEthernet0         ouside                 192.168.0.254   255.255.255.0   manual
GigabitEthernet1         inside                 10.0.0.254      255.255.255.0   manual
GigabitEthernet2         dmz                    20.0.0.254      255.255.255.0   manual

ASA# show nameif
Interface                Name                     Security
GigabitEthernet0         ouside                     0
GigabitEthernet1         inside                   100
GigabitEthernet2         dmz                       50

! Configuration to support ASDM
ASA(config)# http server enable
ASA(config)# http 192.168.0.0 255.255.255.0 ouside
ASA(config)# http 0 0 ouside ! (Permit Any IP)
ASA(config)# username admin password cisco priv 15

ASA(config)# show flash: | in asdm
   89  18927088    May 04 2015 13:48:32  asdm-649.bin

ASA(config)# asdm image flash:/asdm-649.bin


! Configure OSPF in GUI ASDM





! After Apply config Check CLI
ASA(config)# show run router
!
router ospf 1
 network 10.0.0.254 255.255.255.255 area 0
 network 20.0.0.254 255.255.255.255 area 0
 network 192.168.0.254 255.255.255.255 area 0
 area 0
!

! Check R1 OSPF Process R1#show ip route ospf
O        2.2.2.2 [110/12] via 10.0.0.254, 00:49:46, FastEthernet0/0
O        3.3.3.3 [110/12] via 10.0.0.254, 00:49:46, FastEthernet0/0
O        20.0.0.0 [110/11] via 10.0.0.254, 00:49:46, FastEthernet0/0
O     192.168.0.0/24 [110/11] via 10.0.0.254, 00:49:46, FastEthernet0/0

R1#tel 3.3.3.3
Trying 3.3.3.3 ... Open
R3>

R1#tel 2.2.2.2
Trying 2.2.2.2 ... Open
R2>

ASA(config)# show conn all
7 in use, 14 most used
OSPF ouside 224.0.0.5 NP Identity Ifc192.168.0.254, idle 0:00:03, bytes 1540
OSPF dmz 224.0.0.5 NP Identity Ifc20.0.0.254, idle 0:00:04, bytes 1900
OSPF inside 224.0.0.5 NP Identity Ifc10.0.0.254, idle 0:00:02, bytes 1364
TCP ouside 192.168.0.100:49194 NP Identity Ifc 192.168.0.254:443, idle 0:00:00, bytes 409853, flags UOB  ! (ASDM Connection)
OSPF inside 10.0.0.1 NP Identity Ifc224.0.0.5, idle 0:00:01, bytes 2120
OSPF ouside 192.168.0.3 NP Identity Ifc224.0.0.5, idle 0:00:03, bytes 2040
OSPF dmz 20.0.0.2 NP Identity Ifc224.0.0.5, idle 0:00:09, bytes 2104

ASA(config)# show route | in O
       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, E - EGP
       * - candidate default, U - per-user static route, o - ODR
O    1.1.1.1 255.255.255.255 [110/11] via 10.0.0.1, 0:51:26, inside
O    2.2.2.2 255.255.255.255 [110/11] via 20.0.0.2, 0:51:26, dmz
O    3.3.3.3 255.255.255.255 [110/11] via 192.168.0.3, 0:51:26, ouside


ASA(config)# ping 1.1.1.1
!!!!!
ASA(config)# ping 2.2.2.2
!!!!!
ASA(config)# ping 3.3.3.3
!!!!!

! Enable/Disable Log Message by Number.

ASA(config)# logging on
ASA(config)# logging console 7
ASA(config)# show arp
        inside 10.0.0.1 ca00.0510.0008 6054
        dmz 20.0.0.2 ca03.0840.0008 3831
        ouside 192.168.0.100 0200.4c4f.4f50 1
        ouside 192.168.0.3 ca06.0840.0008 2239
%ASA-7-111009: User 'enable_15' executed cmd: show arp

ASA(config)# no logging message 111009
Or

ASA(config)# show arp
        inside 10.0.0.1 ca00.0510.0008 6152
        dmz 20.0.0.2 ca03.0840.0008 3928
        ouside 192.168.0.100 0200.4c4f.4f50 18
        ouside 192.168.0.3 ca06.0840.0008 2336
! Not Generates Log Message

21 July, 2014

T-Shoot OSPF INE

### OSPF Workflow

* OSPF operation can be subdivided into four discrete steps...
- Discover OSPF Neighbours.
- Exchange Topology Information.
- Choose Best Path.
- Neighbour and Topology Table Maintenance.

### Discover OSPF Neighbours

* Requires IP protocol 89 multicast (224.0.0.5/224.0.0.6) or unicast transport depending on network type.
- Possible NBMA pseudo-broadcast support issues.
- Possible filtering issues.

* Attributes that must be unique to proceed.
- IP Address.
- Router-ID.

* Attributes that must match to proceed.
- Subnet.
- Area.
- Compatible Network Types (Support DR/BDR election or not).
- Timers.
- MTU.
- Stub Flags.
- Authentication.

### Exchanging OSPF Topology info.

* Intra-area routes flooded via LSA 1 & LSA 2.
- Duplicate Router-ID issues.
- DR/BDR on NBMA issues.
* Inter-area routes flooded via LSA 3 by ABR.
- Discontinuous area 0 issue.
* External routes flooded via LSA 4, and 5 or 7.
- Duplicate Router-ID
- NSSA connectivity issues.
- Forward address issue on translated 7 to  LSA.

### Common OSPF Verifications

- show ip route
- show ip ospf neighbor
- show ip ospf database
- debug ip ospf adj

### Practice OSPF ISSUES


* We have configured OSPF AS 1 with areas 0,1 and 2. (Basic configuration)

### NON_BROADCAST issue

* When we configure all devices, we can see that R5 not established as neighbour R2 and R4. 

R5(config-router)#do show ip ospf interface serial 0/0 | in Type
  Process ID 1, Router ID 10.1.5.5, Network Type NON_BROADCAST, Cost: 64

* Here we can see that this type of connection not permits Broadcast traffic. 
 - We have to configure neighbor statement in OSPF.

# R5
R5(config)#router ospf 1 
R5(config-router)#neighbor 10.1.245.2
R5(config-router)#neighbor 10.1.245.4
# R2
R2(config-router)#neighbor 10.1.245.5
# R4
R4(config-router)#neighbor 10.1.245.5

R5#show ip ospf neighbor  
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.2.2          1   FULL/DROTHER    00:01:48    10.1.245.2      Serial0/0
10.1.4.4          1   FULL/BDR        00:01:58    10.1.245.4      Serial0/0

### Timer issue

* Configure hello timer at serial 0/0 on R4
R4#conf terminal 
R4(config)#in serial 0/0 
R4(config-if)#ip ospf hello-interval 4 

R4(config-if)#do show running-config interface serial 0/0 | in interval
 ip ospf hello-interval 4

* Note: R5 by default has 30 sec. 

R5#debug ip ospf adj 
OSPF adjacency events debugging is on

R5#clear ip ospf process 
Reset ALL OSPF processes? [no]: yes
<Output omitted>
*Mar  1 04:36:07.150: OSPF: 0.0.0.0 address 10.1.245.4 on Serial0/0 is dead
*Mar  1 04:36:07.150: OSPF: 0.0.0.0 address 10.1.245.4 on Serial0/0 is dead, state DOWN
*Mar  1 04:36:07.154: %OSPF-5-ADJCHG: Process 1, Nbr 0.0.0.0 on Serial0/0 from ATTEMPT to DOWN, Neighbor Down: Dead timer expired

R5#show ip ospf neighbor 
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.2.2          1   FULL/BDR        00:01:41    10.1.245.2      Serial0/0
N/A               0   ATTEMPT/DROTHER    -        10.1.245.4      Serial0/0   <-- R4

* Solution 
R2(config)#in serial 0/0 
R2(config-if)#ip ospf hello-interval 4

R5(config)#in serial 0/0 
R5(config-if)#ip ospf hello-interval 4

R5#show ip ospf neighbor 
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.2.2          1   FULL/DROTHER    00:00:15    10.1.245.2      Serial0/0
10.1.4.4          1   FULL/DR         00:00:11    10.1.245.4      Serial0/0

### DR/BDR election issue

* In this case R4 is DR and R5 is BDR.
R5#show ip ospf neighbor 
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.2.2          1   FULL/DROTHER    00:00:15    10.1.245.2      Serial0/0
10.1.4.4          1   FULL/DR         00:00:11    10.1.245.4      Serial0/0

* On Frame Relay networks we don´t have full connectivity. 
* R2 to reach R4 needs to cross R5.
* If R2 wants to send an update out of the network, its really needs to go R5 and than down to R4.
* The problem is an non-broadcast network only DR is allowed to LSA replication. 
* DR have to be someone who has full connectivity to the rest of the network.

* Check Route Table
R2#show ip route ospf 
     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
O       10.1.13.0/24 [110/74] via 10.1.23.3, 00:14:37, FastEthernet0/0
O       10.1.3.3/32 [110/11] via 10.1.23.3, 00:14:37, FastEthernet0/0

R4#show ip route ospf 
     10.0.0.0/8 is variably subnetted, 8 subnets, 2 masks
O       10.1.6.6/32 [110/11] via 10.1.146.6, 00:30:13, FastEthernet0/0
O       10.1.5.5/32 [110/65] via 10.1.245.5, 00:12:33, Serial0/0
O       10.1.1.1/32 [110/11] via 10.1.146.1, 00:30:13, FastEthernet0/0
O       10.1.60.0/24 [110/20] via 10.1.146.6, 00:30:13, FastEthernet0/0
O       10.1.50.0/24 [110/74] via 10.1.245.5, 00:12:33, Serial0/0

* We cannot see IA networks and the problem is DR election. 

* Solution
R2(config)#in ser 0/0 
R2(config-if)#ip ospf priority 0

R4(config)#in ser 0/0 
R4(config-if)#ip ospf priority 0

R2#show ip ospf neighbor | in 10.1.5.5
10.1.5.5          1   FULL/DR         00:00:13    10.1.245.5      Serial0/0

R4#show ip ospf neighbor | in 10.1.5.5
10.1.5.5          1   FULL/DR         00:00:15    10.1.245.5      Serial0/0

R5#show ip ospf neighbor 
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.2.2          0   FULL/DROTHER    00:00:12    10.1.245.2      Serial0/0
10.1.4.4          0   FULL/DROTHER    00:00:13    10.1.245.4      Serial0/0

* Check Route Table Again
R2#show ip route ospf                 
     10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
O       10.1.13.0/24 [110/74] via 10.1.23.3, 00:20:26, FastEthernet0/0
O IA    10.1.6.6/32 [110/75] via 10.1.245.4, 00:00:06, Serial0/0
O       10.1.5.5/32 [110/65] via 10.1.245.5, 00:00:06, Serial0/0
O IA    10.1.4.4/32 [110/65] via 10.1.245.4, 00:00:06, Serial0/0
O       10.1.3.3/32 [110/11] via 10.1.23.3, 00:20:26, FastEthernet0/0
IA    10.1.1.1/32 [110/75] via 10.1.245.4, 00:00:06, Serial0/0
IA    10.1.60.0/24 [110/84] via 10.1.245.4, 00:00:06, Serial0/0
O       10.1.50.0/24 [110/74] via 10.1.245.5, 00:00:06, Serial0/0
IA    10.1.146.0/24 [110/74] via 10.1.245.4, 00:00:06, Serial0/0

R4#show ip route ospf 
     10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks
IA    10.1.13.0/24 [110/138] via 10.1.245.2, 00:00:26, Serial0/0
O       10.1.6.6/32 [110/11] via 10.1.146.6, 00:36:26, FastEthernet0/0
O       10.1.5.5/32 [110/65] via 10.1.245.5, 00:00:26, Serial0/0
IA    10.1.3.3/32 [110/75] via 10.1.245.2, 00:00:26, Serial0/0
IA    10.1.2.2/32 [110/65] via 10.1.245.2, 00:00:26, Serial0/0
O       10.1.1.1/32 [110/11] via 10.1.146.1, 00:36:26, FastEthernet0/0
IA    10.1.23.0/24 [110/74] via 10.1.245.2, 00:00:26, Serial0/0
O       10.1.60.0/24 [110/20] via 10.1.146.6, 00:36:25, FastEthernet0/0
O       10.1.50.0/24 [110/74] via 10.1.245.5, 00:00:26, Serial0/0

### MTU issue

* Configure MTU value on R3 incorectlly 
R3#conf terminal 
R3(config)#in ser 0/0 
R3(config-if)#mtu 1490

R3#debug ip ospf adj 
OSPF adjacency events debugging is on

R3#clear ip  ospf process
Reset ALL OSPF processes? [no]: yes

<Output omitted>
*Mar  1 05:22:01.346: OSPF: Send DBD to 10.1.1.1 on Serial0/0 seq 0x2006 opt 0x52 flag 0x7 len 32
*Mar  1 05:22:01.350: OSPF: Retransmitting DBD to 10.1.1.1 on Serial0/0 [5]
*Mar  1 05:22:01.394: OSPF: Rcv DBD from 10.1.1.1 on Serial0/0 seq 0x2006 opt 0x52 flag 0x2 len 232  mtu 1500 state EXSTART
*Mar  1 05:22:01.398: OSPF: Nbr 10.1.1.1 has larger interface MTU

R3#show ip ospf neighbor | in ^Ne|10.1.1.1
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1          0   EXSTART/  -     00:00:11    10.1.13.1       Serial0/0  <-- Its stacks in EXSTART state

*Mar  1 05:26:46.338: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial0/0 from EXSTART to DOWN, Neighbor Down: Too many retransmissions
*Mar  1 05:27:46.338: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial0/0 from DOWN to DOWN, Neighbor Down: Ignore timer expired

* Debug on R1 
*Mar  1 05:29:46.262: OSPF: Rcv DBD from 10.1.3.3 on Serial0/0 seq 0xEB opt 0x52 flag 0x7 len 32  mtu 1490 state EXCHANGE
*Mar  1 05:29:46.266: OSPF: Nbr 10.1.3.3 has smaller interface MTU
*Mar  1 05:29:46.266: OSPF: Send DBD to 10.1.3.3 on Serial0/0 seq 0xEB opt 0x52 flag 0x2 len 232

* Solution
R3#conf terminal 
R3(config)#in ser 0/0 
R3(config-if)#no mtu

*Mar  1 05:32:05.538: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.1.1 on Serial0/0 from LOADING to FULL, Loading Done

R3#show ip ospf neighbor | in ^Ne|10.1.1.1
Neighbor ID     Pri   State           Dead Time   Address         Interface
10.1.1.1          0   FULL/  -        00:00:09    10.1.13.1       Serial0/0

### Duplicate Router-ID issue

* Check Router ID on R1
R1#show ip ospf database | in OSPF  
            OSPF Router with ID (10.1.1.1) (Process ID 1)

* Configure Router-ID to 10.1.2.2 (As a R2)

R1(config)#router ospf 1
R1(config-router)#router-id 10.1.2.2 
* Note: Reload or use "clear ip ospf process" command, for this to take effect

R1#clear ip ospf process
Reset ALL OSPF processes? [no]: yes

* When you have duplicate Router-ID your Route table is not complete and router generate log message every 4 min. %OSPF-4-DUP_RTRID_AREA.

*Mar  1 05:47:37.238: %OSPF-4-DUP_RTRID_AREA: Detected router with duplicate router ID 10.1.2.2 in area 1
*Mar  1 05:47:43.410: %OSPF-4-FLOOD_WAR: Process 1 flushes LSA ID 10.1.4.4 type-3 adv-rtr 10.1.2.2 in area 1

R2#show ip ospf database router 10.1.2.2 | beg Area 1    
                Router Link States (Area 1)
  LS age: 5
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 10.1.2.2
  Advertising Router: 10.1.2.2           <-- Router-ID
  LS Seq Number: 80000070
  Checksum: 0x38FA
  Length: 48
  Area Border Router
  Number of Links: 2
<Output omitted>

* When R1 receives updates from R2 the Advertising Router is the same. 

* Create Lo 3 in R3 and redistribute into OSPF.
R3#conf terminal 
R3(config)#in lo 3 
R3(config-if)#ip address 3.3.3.3 255.255.255.255
R3(config-if)#router ospf 1 
R3(config-router)#redistribute connected subnets
R3(config-router)#end

R3#show ip ospf database | begin Ext  
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
3.3.3.3         10.1.3.3        267         0x80000001 0x00D3AF 0

* Check Route table in R6.
R6#show ip route 3.3.3.3
Routing entry for 3.3.3.3/32
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 84
  Last update from 10.1.146.4 on FastEthernet0/0, 00:06:40 ago
  Routing Descriptor Blocks:
  * 10.1.146.4, from 10.1.3.3, 00:06:40 ago, via FastEthernet0/0              
      Route metric is 20, traffic share count is 1

* in this case if we have the duplicate Router-ID between R3 and R6 we have problems.

* Configure incorrectly R6 Router-ID.

R6#conf terminal 
R6(config)#router ospf 1 
R6(config-router)#router-id 10.1.3.3

R6#clear ip ospf process 
Reset ALL OSPF processes? [no]: yes

* Check again Database and Routing table in R6.
* You can see route 3.3.3.3 in the OSPF database but it never install into the routing table.

R6#show ip ospf database | beg Type-5    
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
3.3.3.3         10.1.3.3        3659        0x8000000C 0x00F497 0

R6#show ip route 3.3.3.3
% Network not in table

* On R3 you receive Log Message:  %OSPF-4-FLOOD_WAR.

*Mar  1 05:47:43.410: %OSPF-4-FLOOD_WAR: Process 1 flushes LSA ID 10.1.3.3 type-5 adv-rtr 10.1.3.3 in area 1

* Make ping from R5 to route 3.3.3.3
R5#ping 3.3.3.3     
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/27/44 ms

* Note: If we make debug ip routing in R5 we can see what happens.

R5#debug ip routing 
IP routing debugging is on

*Mar  1 06:26:27.874: OSPF: Rcv LS UPD from 10.1.4.4 on Serial0/0 length 64 LSA count 1
*Mar  1 06:26:27.886: RT: del 3.3.3.3/32 via 10.1.245.2, ospf metric [110/20]
*Mar  1 06:26:27.886: RT: delete subnet route to 3.3.3.3/32
*Mar  1 06:26:27.890: RT: NET-RED 3.3.3.3/32
*Mar  1 06:26:27.894: RT: delete network route to 3.0.0.0
*Mar  1 06:26:27.894: RT: NET-RED 3.0.0.0/8

*Mar  1 06:26:32.890: OSPF: Rcv LS UPD from 10.1.4.4 on Serial0/0 length 64 LSA count 1
*Mar  1 06:26:32.902: RT: SET_LAST_RDB for 3.3.3.3/32
*Mar  1 06:26:32.902: RT:  NEW rdb: via 10.1.245.2
*Mar  1 06:26:32.906: RT: add 3.3.3.3/32 via 10.1.245.2, ospf metric [110/20]
*Mar  1 06:26:32.910: RT: NET-RED 3.3.3.3/32

* It deletes and than adds again all times this network.

### Virtual-link issue 

* In our Lab, if R2 loses S0/0 connection, now Area 1 is isolated from Area 0. 

* To fix this problem we need to create Virtual-Link between R1 and R4 through Area 2.

* Configure Virtual-Link between R1 and R4.
R1#conf terminal 
R1(config)#router ospf 1 
R1(config-router)#area 2 virtual-link 10.1.4.4

R4#conf terminal 
R4(config)#router ospf 1 
R4(config-router)#area 2 virtual-link 10.1.1.1