Wednesday, December 8, 2010

Connecting Two OSPF Areas With Stub Area In Middle - Quick Solution & Verification

Here is quick solution and verification for my last post: BTW are you not in love with GRE tunnels still ? 
:-)


http://deepakarora1984.blogspot.com/2010/12/connecting-two-ospf-areas-with-stub.html


R1#sh ip ro | b ^G
Gateway of last resort is not set


     11.0.0.0/32 is subnetted, 1 subnets
C       11.11.11.11 is directly connected, Loopback0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0




R2#sh ip ro | b ^G
Gateway of last resort is 12.12.12.1 to network 0.0.0.0


     33.0.0.0/32 is subnetted, 1 subnets
O       33.33.33.33 [110/2] via 23.23.23.3, 00:01:19, FastEthernet1/0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet1/0
     11.0.0.0/32 is subnetted, 1 subnets
O IA    11.11.11.11 [110/2] via 12.12.12.1, 00:01:19, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
O*IA 0.0.0.0/0 [110/2] via 12.12.12.1, 00:01:19, FastEthernet0/0




R3#sh ip ro | b ^G
Gateway of last resort is not set


     33.0.0.0/24 is subnetted, 1 subnets
C       33.33.33.0 is directly connected, Loopback0
     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/0
====================================================


R1(config)#router ospf 1
R1(config-router)#area 1 virtual-link 255.255.255.2
% OSPF: Area 0.0.0.1 is a stub or nssa so virtual links are not allowed
R1(config-router)#


====================================================
R1(config)#int tu 1
R1(config-if)#ip add 112.112.112.1 255.255.255.0
R1(config-if)#tu so f0/0
R1(config-if)#tu dest 12.12.12.2 
R1(config-if)#exit


R2(config)#int tu 1
R2(config-if)#ip add 112.112.112.2 255.255.255.0
R2(config-if)#tu so f0/0
R2(config-if)#tu dest 12.12.12.1
R2(config-if)#exit

*Mar  1 00:19:34.695: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to up

====================================================
R1(config)#router ospf 1
R1(config-router)#net 112.112.112.1 0.0.0.0 a 0
R1(config-router)#exit

R2(config)#router ospf 1
R2(config-router)#net 112.112.112.2 0.0.0.0 a 0
R2(config-router)#exit

====================================================
R1#sh ip ro | b ^G
Gateway of last resort is not set

     33.0.0.0/32 is subnetted, 1 subnets
O IA    33.33.33.33 [110/11113] via 112.112.112.2, 00:01:35, Tunnel1
     23.0.0.0/24 is subnetted, 1 subnets
O IA    23.23.23.0 [110/11112] via 112.112.112.2, 00:01:35, Tunnel1
     112.0.0.0/24 is subnetted, 1 subnets
C       112.112.112.0 is directly connected, Tunnel1
     11.0.0.0/32 is subnetted, 1 subnets
C       11.11.11.11 is directly connected, Loopback0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0

R1#ping 33.33.33.33 so lo0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 33.33.33.33, timeout is 2 seconds:
Packet sent with a source address of 11.11.11.11 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/17/40 ms


R1#trace 33.33.33.33 so lo0

Type escape sequence to abort.
Tracing the route to 33.33.33.33

  1 112.112.112.2 4 msec 4 msec 4 msec
  2 23.23.23.3 12 msec *  24 msec

HTH...
Deepak Arora

Tuesday, December 7, 2010

Connecting Two OSPF Areas With Stub Area In Middle Challenge - Diagram & Initials


###################
# Here are the Initials  #
###################

^^^ R1 ^^^
^^^^^^^^^^

en
!
conf t
!
ho R1
!
no ip do lo
!
line con 0
no exec-time
exit
!
int lo0
ip add 11.11.11.11 255.255.255.255
exit
!
int f0/0
ip add 12.12.12.1 255.255.255.0
no sh
exit
!
router ospf 1
router-id 255.255.255.1
net 11.11.11.11 0.0.0.0 a 0.0.0.0
net 12.12.12.1 0.0.0.0 a 0.0.0.1
area 1 stub
exit
!
end
!
wr mem
!
==================================

^^^ R2 ^^^
^^^^^^^^^^

en
!
conf t
!
ho R2
!
no ip do lo
!
line con 0
no exec-time
exit
!
int f0/0
ip add 12.12.12.2 255.255.255.0
no sh
exit
!
int f1/0
ip add 23.23.23.2 255.255.255.0
no sh 
exit
!
router ospf 1
router-id 255.255.255.2
net 12.12.12.2 0.0.0.0 a 1
net 23.23.23.2 0.0.0.0 a 2
area 1 stub
exit
!
end
!
wr mem
!
==================================

^^^ R3 ^^^
^^^^^^^^^^

en
!
conf t
!
ho R3
!
no ip do lo
!
line con 0
no exec-time
exit
!
int f0/0
ip add 23.23.23.3 255.255.255.0
no sh
exit
!
int lo0
ip add 33.33.33.33 255.255.255.0
no sh 
exit
!
router ospf 1
router-id 255.255.255.3
net 33.33.33.33 0.0.0.0 a 2
net 23.23.23.3 0.0.0.0 a 2
exit
!
end
!
wr mem
!
********************************

Cisco IP Routing Video Tutorials - Free & Downloadable

Found some Cisco IP Routing Video Tututials (Downloadble) on web. Hope some of the guys preparing for CCENT, CCNA and CCNP will find those helpful.

http://www.firstdigest.com/vid/routehub/Cisco-IP-Routing-part1.flv
http://www.firstdigest.com/vid/routehub/Cisco-IP-Routing-part2.flv
http://www.firstdigest.com/vid/routehub/Cisco-IP-Routing-part3.flv
http://www.firstdigest.com/vid/routehub/Cisco-IP-Routing-part4.flv
 
HTH...
Deepak Arora

Monday, December 6, 2010

BGP Back Door Routes - Short Post

So in this short post I am going to discuss about BGP BackDoor Route feature.

So here is the quick topology I am going to use. The idea here is simple. R1/R2's Loopback 1 interfaces are advertised into EBGP as well as OSPF. Now by theory EBGP has lower AD of 20 Compare to OSPF AD of 110. So in that sense the route that will be installed locally in routing table of R1 & R2 will be through EBGP. But say you want to Prefer OSPF here instead of BGP for some reason. Usually Design constraints ...which are not reflecting in my topology here though :-) hehehe


Ummm....there are many ways to do it like AD manipulation and all. But another quick dirty way is configuring BGP backdoor route  feature. What essentially it does is that it instructs BGP process to allow IGP with lower AD to take precedence over EBGP learned route for same destination.


Here are quick initials:


^^^ R1 ^^^
==========


!
en
!
conf t
!
ho R1
!
line con 0
no exec-time
exit
!
int lo0
ip add 1.1.1.1 255.255.255.255
!
int lo1
ip add 11.11.11.11 255.0.0.0
ip ospf net point-to-p
exit
!
int f0/0
ip add 12.12.12.1 255.255.255.0
no sh
!
int f0/1
ip add 13.13.13.1 255.255.255.0
no sh
exit
!
ip route 2.2.2.2 255.255.255.255 f0/0 12.12.12.2
!
ip route 3.3.3.3 255.255.255.255 f0/1 13.13.13.3
!
router ospf 1
net 11.11.11.11 0.0.0.0 a 0
net 12.12.12.1 0.0.0.0 a 0
exit
!
router bgp 100
no au
no sync
net 11.0.0.0
nei 2.2.2.2 remote 200
nei 2.2.2.2 update lo0
nei 2.2.2.2 disable
nei 3.3.3.3 remote 300
nei 3.3.3.3 update lo0
nei 3.3.3.3 ebgp
exit
!
end
!
wr mem
!
=====================================================

^^^ R2 ^^^
==========

!
en
!
conf t
!
ho R2
!
line con 0
no exec-time
exit
!
int lo0
ip add 2.2.2.2 255.255.255.255
!
int lo1
ip add 22.22.22.22 255.0.0.0
exit
!
int f0/0
ip add 12.12.12.2 255.255.255.0
ip ospf net point-to-p
no sh
!
int f0/1
ip add 23.23.23.2 255.255.255.0
no sh
exit
!
ip route 1.1.1.1 255.255.255.255 f0/0 12.12.12.1
!
ip route 3.3.3.3 255.255.255.255 f0/1 23.23.23.3
!
router ospf 1
net 22.22.22.22 0.0.0.0 a 0
net 12.12.12.2 0.0.0.0 a 0
exit
!
router bgp 200
no au
no sync
net 22.0.0.0
nei 1.1.1.1 remote 100
nei 1.1.1.1 update lo0
nei 1.1.1.1 disable
nei 3.3.3.3 remote 300
nei 3.3.3.3 update lo0
nei 3.3.3.3 ebgp
exit
!
end
!
wr mem
!
=================================================

^^^ R3 ^^^
==========

!
en
!
conf t
!
ho R3
!
line con 0
no exec-time
exit
!
int lo0
ip add 3.3.3.3 255.255.255.255
!
int lo1
ip add 33.33.33.33 255.0.0.0
exit
!
int f0/0
ip add 13.13.13.3 255.255.255.0
no sh
!
int f0/1
ip add 23.23.23.3 255.255.255.0
no sh
exit
!
ip route 1.1.1.1 255.255.255.255 f0/0 13.13.13.1
!
ip route 3.3.3.3 255.255.255.255 f0/1 23.23.23.2
!
router bgp 300
no au
no sync
net 33.0.0.0
nei 1.1.1.1 remote 100
nei 1.1.1.1 update lo0
nei 1.1.1.1 disable
nei 2.2.2.2 remote 200
nei 2.2.2.2 update lo0
nei 2.2.2.2 ebgp
exit
!
end
!
wr mem
!

#########################

Lets check routing table of R1 and R2:


R1#sh ip ro | b ^G
Gateway of last resort is not set


     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
S       2.2.2.2 [1/0] via 12.12.12.2, FastEthernet0/0
B    33.0.0.0/8 [20/0] via 3.3.3.3, 01:04:55
     3.0.0.0/32 is subnetted, 1 subnets
S       3.3.3.3 [1/0] via 13.13.13.3, FastEthernet0/1
B    22.0.0.0/8 [20/0] via 2.2.2.2, 00:46:54
C    11.0.0.0/8 is directly connected, Loopback1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/1


R2#sh ip route | b ^G
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
S       1.1.1.1 [1/0] via 12.12.12.1, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
B    33.0.0.0/8 [20/0] via 1.1.1.1, 01:05:28
     3.0.0.0/32 is subnetted, 1 subnets
S       3.3.3.3 [1/0] via 23.23.23.3, FastEthernet0/1
     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
C    22.0.0.0/8 is directly connected, Loopback1
B    11.0.0.0/8 [20/0] via 1.1.1.1, 01:08:49
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0

Now lets see if ospf has same route in database:

R1#sh ip ospf database router | b 22
  Link State ID: 22.22.22.22
  Advertising Router: 22.22.22.22
  LS Seq Number: 80000004
  Checksum: 0x24DF
  Length: 48
  Number of Links: 2

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 12.12.12.1
     (Link Data) Router Interface address: 12.12.12.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 10

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 22.0.0.0
     (Link Data) Network Mask: 255.0.0.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

R2#sh ip ospf database

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

Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
11.11.11.11     11.11.11.11     1197        0x80000004 0x008BDC 2
22.22.22.22     22.22.22.22     1056        0x80000004 0x0024DF 2

Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
12.12.12.1      11.11.11.11     443         0x80000003 0x005C06

Now lets configure BGP backdoor feature and see the differences in the routing table:

R1(config)#router bgp 100
R1(config-router)#network 22.0.0.0 backdoor
R1(config-router)#exit

R2(config)#router bgp 200
R2(config-router)#net 11.0.0.0 backdoor
R2(config-router)#exit

R1#sh ip ro | b ^G
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
S       2.2.2.2 [1/0] via 12.12.12.2, FastEthernet0/0
B    33.0.0.0/8 [20/0] via 3.3.3.3, 01:09:45
     3.0.0.0/32 is subnetted, 1 subnets
S       3.3.3.3 [1/0] via 13.13.13.3, FastEthernet0/1
O    22.0.0.0/8 [110/11] via 12.12.12.2, 00:01:01, FastEthernet0/0
C    11.0.0.0/8 is directly connected, Loopback1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
C       13.13.13.0 is directly connected, FastEthernet0/1


R2#sh ip ro | b ^G
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
S       1.1.1.1 [1/0] via 12.12.12.1, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
B    33.0.0.0/8 [20/0] via 1.1.1.1, 01:10:03
     3.0.0.0/32 is subnetted, 1 subnets
S       3.3.3.3 [1/0] via 23.23.23.3, FastEthernet0/1
     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
C    22.0.0.0/8 is directly connected, Loopback1
O    11.0.0.0/8 [110/11] via 12.12.12.1, 00:00:47, FastEthernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0


HTH...
Deepak Arora

Friday, December 3, 2010

Over 12000 Page Views Since June 2010...Ummm Not Bad

Just pulled out this information this morning from my blog console. Looks like many people are finding this helpful.


Looking forward to help people and new comers as much as I can :-)