天天看点

Default Routes and On-Demand Routing

Fundamentals of Default routes

Using a default routes on this backbone is a bad design decision.Having each backbone router advertise only a default route into its local internetwork,on the other hand,can be a very good design choice.

Fundamentals of On-Demand Routing

ODR  –  On-Demand Routing

The transport mechanism for ODR routes is Cisco Discovery Protocol(CDP),a proprietary data link proprietary data link protocol that gathers information about neighboring network devices.

With ODR a hub router can automatically discover stub networks while the stub routers still use a default route to the hub.ODRconveys address prefixes – that is,only the network portion of the address – rather than the entire address – so VLSM is supported.

ODR is not a true routing protocol.It discovers information about stub networks,but does not provide any routing information to the stub routers.

CDP runs on any dedia that supports the subnetwork access protocol(SNAP),which means that ODR also depends on SNAP support.

Configuring Default Routes and ODR

Default routes can be configured either on each router that needs a default route or on the router that in turn advertises the routes to its peers.

Classful Routing Protocols without ‘ip classless’

                                 | --- N ---à  Drop

---àMajor Network   |

                                      |---- Y ----à  Subnets  à  Forward

Classful Routing Protocols with ‘ip classless’

                          | --- N --→  Defualt  --- N --→ Drop

----àSubnets  |                        ↓Y

                          | --- Y --→  Forward

The mask of the default route is a summary mask taken to its extreme.

Case Study:  Static Default Routes

However,the static route is not actually the route being redistributed.After a default route is identified in the routing table,RIP,IGRP,and EIGRP will automatically advertise it.OSPF and IS-IS require some additional configuration.

router eigrp 1

 redistribute rip metric 1000 100 255 1 1500

 passive-interface ethernet0

 passive-interface ethernet1

 network 192.168.25.0

!

router rip

 passive-interface serial0

ip classless

ip route 0.0.0.0 0.0.0.0 null0

The rip don’t need such a redistribution commmand, it will automatically advertise it to other rip-peers.

Case Study: The Default-Nework Command

The network that the ‘ip default-network’ refered may be directly connected to the router,specified byt a static route,or discovered by a dynamic routing protocol.

It won’t have directly effects on the local router, but advertised it to other peers as a Gateway of last resort.

IGRP uses the actual network address,that address must be configured to be advertised.

For RIP:

 network 172.16.0.0

ip default-network 10.0.0.0

For IGRP:

router igrp 1

 network 10.0.0.0 Case Study: The Default-Information Originate Command

An OSPF ASBR and an IS-IS interdomain router will not automatically advertise a default route into their routing domains,even when one exists.

The default-information originate command is a specialized from of the redistribute command,causing a default route to be redistributed into OSPF or IS-IS.

For OSPF:

router ospf 1

 network 172.16.0.0 0.0.255.255 area 0

 default-information originate metric 10 metric-type 1 ip route 0.0.0.0 0.0.0.0 10.1.1.2

The default-information originate command also will redistribute into OSPF or IS-IS a default route that has been discovered by another routing process.

router bgp 65501

 neighbor 10.1.1.2 remote-as 65502

Now router has learned a route to 0.0.0.0 from its BGP neighbor and will advertise the route into the OSPF domain via type 5 LSAs.

A stable solution is to use the

always

attribute to avoid route flapping.With this configuration,router will always advertise a default route into the OSPF domain,regardless of whether it actually has a route to 0.0.0.0.If a router within the OSPF domain defaults a packet to this router and the router has no default route,it will send an ICMP Destination Unreachable message to the rource address and drop the packet.

 default-information originate always metric 10 metric-type 1 Case Study: Configuring On-Demand Routing router odr  redistribute odr metric 100

 network 172.16.0.0 0.0.255.255 area 5

继续阅读