Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Default Route Assigned to an Interface??

I've seen several configurations were the default route on a router is assigned to the router's internet interface.

The router isn't configured for any routing protocol but external messages seem to route properly. This is true even though there isn't a static route to the destination.

So, how does this work? The router can't just send an IP packet out on the Internet and have it route properly. Doesn't the router need a specific default gateway address?

Any insight into this would be a major help!

Thanks!

4 REPLIES
Hall of Fame Super Silver

Re: Default Route Assigned to an Interface??

Marcus

First I would like to address a specific comment in your post and then I will address the larger question that you are asking.

You say :"This is true even though there isn't a static route to the destination". It may be true that there is not a specific route for that specific destination. But if there is a valid default route on the router then there is a route to the destination. That is what default routes do - they provide a way to route for destinations for which we do not have a specific route.

The bigger question is the configuration of a static route pointed at the outbound interface. It is possible (but not always desirable) to configure a static route (route for a specific network or a default route) pointed at an interface. The router can take packets and send them out the interface. And if the next hop device knows what to do with the packets they may be delivered to their destination.

It is generally ok to point a static route to a point to point interface. It may work or may not work to point a static route at a multipoint interface (such as an Ethernet interface). With a point to point interface the router can just send the packet out and there is no ambiguity about to whom it is being sent (there is only one neighbor device on a point to point interface and so there is no layer 2 aqddress which must be supplied). If you point a static route at a multipoint interface the router must resolve what layer 2 address to put into the layer 2 header of the packet as it is forwarded out the interface. In practical terms that means that the router will probably have to ARP for every destination address (and received the same MAC address in every response). If the neighbor supports proxy ARP then this implementation can work (though it is somewhat higher overhead). If the neighbor device does not support proxy ARP then this implementation will not work.

So in some circumstances (point to point interfaces or multipoint interfaces which can resolve the layer 2 address to use) the router does NOT need a specific default gateway address. And in some circumstances yes the router does need a specific default gateway address.

HTH

Rick

New Member

Re: Default Route Assigned to an Interface??

Rick,

Thanks for the quick response. I do have a follow-up question that maybe you can help me understand.

I had believed that a router or host would not pick-up data off the media unless the MAC address matched its interface. This should be true on both point-to-point or multipoint links.

In that case, if a router has a default route set to an interface intead of a default gateway address, how does the packet get routed? The router wouldn't need to check it's ARP table because no default gateway address has been defined. What would the addressing of the level 2 frame look like that it sends out the interface desiganted as the default route? Why would any router or host on the attached network pick-up the frame and process it?

Anthony

Silver

Re: Default Route Assigned to an Interface??

Anthony

1-we dont need a layer 2 address for point 2 point connections

2-to answer your question, first you should read how proxy arp works.

http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080094adb.shtml

then you can understand that the layer 2 address of the outgoing paquet is the address of the remote router that has ARP proxy feature. your local router obtained this address after making an ARP request (bradcast).

Hall of Fame Super Silver

Re: Default Route Assigned to an Interface??

Anthony

When we send an IP packet there is layer 3 framing (including source and destination addresses) and there is layer 2 framing. The end station builds the packet and puts the addresses in the layer 3 header. And the layer 3 information stays the same along the path (other than things like NAT that may change the layer 3 addresses). While the layer 3 header stays the same along the path, the layer 2 header changes hop by hop along the path reflecting the local segment that it is traversing. So in forwarding a packet the router would not change the layer 3 header but would change the layer 2 header.

A router receives a packet on one interface (with a layer 2 header) and will forward the packet out another interface (and will re-write the layer 2 header for the new interface). MAC addresses are one kind of layer 2 address (and are associated with Ethernet) but they are not the only kind of layer 2 address. Other media have other addressing, for example DLCI is the layer 2 address for Frame Relay, VPI/VCI is the layer 2 addressing for ATM, etc. And some protocols like HDLC and PPP do not use unique station addresses in their layer 2 header. For point to point connections the router can re-write the layer 2 header without worrying about a unique station address (either there is no address (PPP or HDLC) or there is only a single neighbor and its address is known).

Perhaps some examples might help. Lets consider routerA which has interface serial1/0 which is HDLC. Lets assume that routerA has a static default route of ip route 0.0.0.0 0.0.0.0 serial1/0. If routerA gets a packet with destination address of 100.100.100.10 and there is no specific route in the routing table, then routerA will forward the packet out serial1/0. There is no station address in the layer 2 header so the router can easily create the layer 2 header, forward the packet, and the neighbor will receive it and process it.

Then consider routerB. Lets assume that routerB has a static default route of ip route 0.0.0.0 0.0.0.0 FastEthernet0/0. If routerB receives the packet with destination address of 100.100.100.10 and there is no specific route in the routing table then routerB will need to forward out the FastEthernet interface. routerB will need a destination MAC address to re-write the layer 2 header. routerB will look in its ARP cache to see if it has an entry for 100.100.100.10 and if it does not then it will ARP out interface FastEthernet0/0 for the address. If some device on that segment has enabled proxy ARP it will respond with its own MAC address. In this case routerB puts the MAC into its ARP cache and can forward the packet. If routerB does not receive and ARP response then it can not re-write the layer 2 header, can not forward the packet, and will drop the packet.

HTH

Rick

285
Views
0
Helpful
4
Replies
CreatePlease to create content