ヨタ助

携帯用ページ http://www.google.co.jp/gwt/x?u=http%3a%2f%2funipass.blogspot.com&btngo=go&source=wax&ie=utf-8&oe=utf-8

Friday, November 26, 2010

INE WB I: 6.39 OSPF Filtering with Administrative Distance

How the AD in router OSPF configuration mode.

If you want to not install 1 of 2 next hop candidates into routing table, need to use 255. Otherwise, all the source candidates will be installed in routing table, even if the AD which you configured larger AD value to specific source IP address.

Let's take a look an example here.

R5 is using OSPF and destination network is 155.1.67.0/24. Currently, R5 has 2 next hop candidates from 150.1.30.30 and 150.1.6.6. I want to not install 150.1.6.6 as a source IP address using AD filtering function.

If I use AD 120 or 254 to 150.1.6.6 as distance command that are lager than AD 110 which is default value of OSPF AD, both 150.1.30.30 and 150.1.6.6 will remain with the value of AD which I configured.

R5 Configuration
router ospf 1
 router-id 150.1.5.5
 log-adjacency-changes
 no discard-route internal
 area 0 range 150.1.0.0 255.255.252.0
 distribute-list 12 in
 distance 254 150.1.6.6 0.0.0.0 1
!
!
access-list 1 permit 155.1.67.0
!


#####
it's supposed that distance (AD) 254 will be applied to 155.1.67.0/24 network only coming from 150.1.6.6/32 using the commands above.
#####

However, the result will be like this. (both source IP addresses have distance 254)

Rack1R5#sh ip route 155.1.67.0
Routing entry for 155.1.67.0/24
  Known via "ospf 1", distance 254, metric 66, type inter area
  Last update from 155.1.0.1 on Serial0/0, 00:08:57 ago
  Routing Descriptor Blocks:
  * 155.1.0.3, from 150.1.30.30, 00:08:57 ago, via Serial0/0
      Route metric is 66, traffic share count is 1
    155.1.0.1, from 150.1.6.6, 00:08:57 ago, via Serial0/0
      Route metric is 66, traffic share count is 1





So, in this kind of case, I need to use 255 as Administrative Distance.


router ospf 1
 distance 255 150.1.6.6 0.0.0.0 1


Rack1R5#sh ip route 155.1.67.0
Routing entry for 155.1.67.0/24
  Known via "ospf 1", distance 110, metric 66, type inter area
  Last update from 155.1.0.3 on Serial0/0, 00:00:02 ago
  Routing Descriptor Blocks:
  * 155.1.0.3, from 150.1.30.30, 00:00:02 ago, via Serial0/0
      Route metric is 66, traffic share count is 1

source IP of 150.1.6.6 was removed and only 150.1.30.30 with distance 110 will be shown.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home