Tuesday, April 25, 2006

CCNP / BSCI Exam Tutorial: Using The IP Default Next-Hop Command

Part of the challenge of passing the BSCI exam and earning your CCNP certification is learning that while there are some commands that look almost the same, and seem to do the same thing, they don't! The ip default next-hop command is one such command. There is also an "ip next-hop" command, but the default next-hop command operates differently.

If you set an "ip default next-hop" with a route map, that next-hop will be used ONLY if an explicit path to the destination network is not present in the routing table. An extended ACL must be used here, since a source and destination must be defined.

R2(config)#access-list 150 permit ip host 172.1.1.1 210.1.1.0 0.0.0.255

R2(config)#route-map DEFAULT_NEXT_HOP permit
R2(config-route-map)#match ip address 150
R2(config-route-map)#set ip default next-hop 100.1.1.3

R2(config)#interface e0
R2(config-if)#ip policy route-map DEFAULT_NEXT_HOP

When a packet comes into ethernet0 with a source IP of 172.1.1.1 and is destined for any host on the 210.1.1.0/24 network, the next-hop address will be set to 100.1.1.3 IF there is no entry in the routing table for that network.

That's a big "if" - so be careful!

Chris Bryant
CCIE #12933
www.thebryantadvantage.com

No comments:

Blog Archive