Locations of visitors to this page Perfect dream will never let you sleep in peace...untill you make it real: May 2011

Monday, May 2, 2011

OSPF areas

Stub area:
* filters Type 5 LSAs
* default route is inserted into routing table on all routers in Stubby area
* E1/E2 routes are removed from routing table on all routers in Stubby area
* there can only be one exit point out of this area
* no external routes cannot be learned via Stubby area and then inserted into all OSPF areas (because LSA Type 5 is filtered in Stubby area)

Totally Stubby area:
* filters Type 3, 4, 5 LSAs
* default route is inserted into routing table on all routers in Totally Stubby area
* E1/E2 routes are removed from routing table on all routers in Totally Stubby area
* IA routes are removed from routing table on all routers in Totally Stubby area
* there can only be one exit point out of this area
* no external routes cannot be learned via Totally Stubby area and then inserted into all OSPF areas (because LSA Type 5 is filtered in Stubby area)

Not So Stubby area:
* filters Type 5 LSAs but permits Type 7 LSAs to pass through NSSA and once they reach backbone area they are converted back into Type 5 LSAs
* default route is inserted into routing table on all routers in NSSA
* E1/E2 routes are removed from routing table on all routers in NSSA
* external routes can be learned via NSSA and then inserted into all OSPF areas


Not So Stubby Totally Stubby area:
* filters Type 3,4, 5 LSAs but permits Type 7 LSAs to pass through Not So Stubby Totally Stubby area and once they reach backbone area they are converted back into Type 5 LSAs
* default route is inserted into routing table on all routers in Not So Stubby Totally Stubby area
* E1/E2 routes are removed from routing table on all routers in Not So Stubby Totally Stubby area
* IA routes are removed from routing table on all routers in Not So Stubby Totally Stubby area
* external routes can be learned via Not So Stubby Totally Stubby area and then inserted into all OSPF areas

Sunday, May 1, 2011

CCNP : Time to give CCNP routing

Preparing the final time for the ccnp routing exam. I will give it as soon as I come back from my KSA trip next month. In the mean time, I would revise everything. BGP took hell lot of time, but I feel more confident and comfortable now with BGP. Atleast, I know little. I will know what they are talking about the issue.

BGP Best path selection


The following process summarizes how BGP chooses the best route on a Cisco router.

1> Prefer the route with the highest weight. (The weight attribute is proprietary to Cisco and is local to the router only.)
2> If multiple routes have the same weight, prefer the route with the highest local preference
value. (The local preference is used within an autonomous system.)

3>If multiple routes have the same local preference, prefer the route that the local router originated. A locally originated route has a next hop of 0.0.0.0 in the BGP table.

4>If none of the routes were locally originated, prefer the route with the shortest autonomous system path.

5>If the autonomous system path length is the same, prefer the lowest origin code (IGP < EGP < incomplete).

6> If all origin codes are the same, prefer the path with the lowest MED. (The MED is exchanged between autonomous systems.) The MED comparison is made only if the neighboring autonomous system is the same for all routes considered, unless the bgp always-compare-med command is enabled

7>If the routes have the same MED, prefer external paths to internal paths. If synchronization is disabled and only internal paths remain, prefer the path through the closest IGP neighbor, which means that the router
prefers the shortest internal path within the autonomous system to reach the destination (the
shortest path to the BGP next hop).

8>For EBGP paths, select the oldest route to minimize the effect of routes going up and down (flapping).
9>Prefer the route with the lowest neighbor BGP router ID value.

10>If the BGP router IDs are the same, prefer the router with the lowest neighbor IP address.--->this will for sure break the tie

Example for MED BGP












R1,R2,R4 are in AS 100 and R4 is in AS 200. Consider R3 as office router having two connections to one ISP via R1 and R4. Below is the config for MED

R1
===========

!
interface Loopback1
 ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 192.168.12.1 255.255.255.0
 serial restart-delay 0
 no fair-queue
!
interface Serial1/1
 ip address 192.168.14.1 255.255.255.0
 serial restart-delay 0
!
interface Serial1/2
 ip address 192.168.13.1 255.255.255.0
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!        
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 1.1.1.0 mask 255.255.255.0
 neighbor 3.3.3.3 remote-as 200
 neighbor 3.3.3.3 ebgp-multihop 2
 neighbor 192.168.12.2 remote-as 100
 neighbor 192.168.14.2 remote-as 100
 no auto-summary
!
ip http server
!
ip route 3.3.3.3 255.255.255.255 192.168.13.2
!

R2
============

!
interface Loopback1
 ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 192.168.12.2 255.255.255.0
 serial restart-delay 0
!
interface Serial1/1
 ip address 192.168.24.1 255.255.255.0
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!        
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 2.2.2.0 mask 255.255.255.0
 neighbor 192.168.12.1 remote-as 100
 neighbor 192.168.24.2 remote-as 100
 no auto-summary
!

R4
=============


!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial1/0
 ip address 192.168.14.2 255.255.255.0
 serial restart-delay 0
!
interface Serial1/1
 ip address 192.168.24.2 255.255.255.0
 serial restart-delay 0
!
interface Serial1/2
 ip address 192.168.34.1 255.255.255.0
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 200
 neighbor 3.3.3.3 ebgp-multihop 2
 neighbor 192.168.14.1 remote-as 100
 neighbor 192.168.24.1 remote-as 100
 no auto-summary
!
ip http server
!
ip route 3.3.3.3 255.255.255.255 192.168.34.2
!


R3
==========



!
!
interface Loopback1
 ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
 ip address 10.10.10.1 255.255.255.0
 duplex auto
 speed auto
 no keepalive
!
interface FastEthernet0/1
 ip address 20.20.20.1 255.255.255.0
 duplex auto
 speed auto
 no keepalive
!
interface Serial1/0
 ip address 192.168.13.2 255.255.255.0
 serial restart-delay 0
!
interface Serial1/1
 ip address 192.168.34.2 255.255.255.0
 serial restart-delay 0
!
interface Serial1/2
 no ip address
 shutdown
 serial restart-delay 0
!
interface Serial1/3
 no ip address
 shutdown
 serial restart-delay 0
!        
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 10.10.10.0 mask 255.255.255.0
 network 20.20.20.0 mask 255.255.255.0
 neighbor 192.168.13.1 remote-as 100
 neighbor 192.168.13.1 ebgp-multihop 2
 neighbor 192.168.13.1 update-source Loopback1
 neighbor 192.168.13.1 route-map forr2 out
 neighbor 192.168.34.1 remote-as 100
 neighbor 192.168.34.1 ebgp-multihop 2
 neighbor 192.168.34.1 update-source Loopback1
 no auto-summary
!
ip http server
!
!
!
access-list 1 permit 10.10.10.0 0.0.0.255
access-list 2 permit 20.20.20.0 0.0.0.255
!
route-map forf2 permit 20
!        
route-map forr1 permit 1
 match ip address 1
 set metric 200
!
route-map forr2 permit 20
 match ip address 2
 set metric 400
!