Cisco Router route statement

On cisco router running IOS version 12.2 there is a route statement ip route

207.21.242.XXX 255.255.255.255 null0; what's the use of "null0"???

There are also several route statements that at the end of the route there is a single digit, I assume that this is used to weight routing so that if a primary route goes down it then uses the backup route.

Thanks

Barry Streets

Reply to
Barry Streets
Loading thread data ...

In article , Barry Streets wrote: :On cisco router running IOS version 12.2 there is a route statement ip route :207.21.242.XXX 255.255.255.255 null0; what's the use of "null0"???

This question would be better put to comp.dcom.sys.cisco.

But to save you the trouble: the null0 interface means that the packet should be dropped. You could achieve the same effect by using an ACL (access control list) to deny the traffic, but routing is more easily handled in hardware than ACL's are. There can also be differences about whether the router send back an icmp denial packet, which can make the ip route version a better choice for dealing with forged DoS attacks.

:There are also several route statements that at the end of the route there :is a single digit, I assume that this is used to weight routing so that if a :primary route goes down it then uses the backup route.

The effect of adding the metric would depend on what routing protocol the router is using, and upon how the router has been configured to "inject" one kind of routing protocol into a different kind.

If you are using the RIP protocol, then a metric of 16 means that the packet should be dropped.

If you have multiple ip route statements that match the same destinations, then the metric might be used to control the ratios with which the router load-balances between the various possibilities.

If you have all routing protocols turned off and are using just plain static routing, then Yes, under IOS if there is a static route to an interface and the interface is detected as having gone down, then that route will be disabled and the route with the next lowest numbered metric would take effect. In most versions of IOS since about IOS 11, on most Cisco routers and "multilayer switches", if you have multiple routes matching the same destination and the metrics are the same, then by default IOS will do per-packet load sharing.

Reply to
Walter Roberson

null0 is the logical equivalent of the Unix /dev/null device, i.e. packets matching that route will be silently dropped.

Nevertheless, the route is eligible for dynamic route redistribution.

It is usual to use such route statements to ensure that when interfaces go down (withdrawing their connected and recursively static routes), there is still a specific route left to distribute. Without such a measure there would be an IGP wide withdrawal of the route with fallback to a supernet / default route.

best regards Patrick

Reply to
Patrick Schaaf

No, these are not metric numbers, they are "administrative distance".

routing protocols have administrative distances - EBGP (5) is "more trustworthy" than EIGRP (90), IGRP (100), ospf (110) or RIP (120).

so, if your primary routing protocol were eigrp, you could create a static route with a distance of 95. If the native route inside EIGRP were to go away, the static route would then take over. if multiple routers were redistributing this static route (via a redistribute static route-map foo statement in the router eigrp stanza), then the static route would still take precedence over the external eigrp route.

Reply to
Daniel J McDonald

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.