Link to home
Start Free TrialLog in
Avatar of sambha03
sambha03

asked on

default interface command

If while using policy, I use the command:

set default interface ethernet 0

Then packets for whom no route is present in routing table are sent ethernet interface 0. Now will each node in ethernet try and fwd the packet and the destination may get duplicate packets? Am I understanding this correctly?
Avatar of celsmk
celsmk

The answer is unless you have misconfiguration or loops in your ethernet network,there will be no duplicate packets.

Bare in mind that the router will ARP to find out the MAC address of the node before sendind the actual packet.

Therefore, either a router in your ethernet, or the actual node with matching IP address of the packet will answer the ARP and receive it.
Avatar of sambha03

ASKER

since in policy routing "set default" interface is used only when the router does not have a route to the destination, whom will the router ARP for? I would think the packet would be sent on the braodcast mac address and each rotuer on the ethernet will try and send it to destination. So destination might get duplicate packets.
No, rule #1 for a router is to never propagate ethernet broadcasts, because this would lead to broadcast storms everywhere, making TCP/IP networks not viable.

A non-multicast or non-broadcast IP addressed packet will always be ARPed before being sent through a ethernet interface. If there is no answer (no host with that IP address, or no other router with matching entry in its routing table), the packet will be simply dropped.
celsmk: Let me explain in more detail. According to me scenario 2 should happen since scenario 1 does not serve any purpose. Am I missing something?


Scenario 1
------------
Router gets packet for desination C which it does not have the route.
Since "set default interface ethernet 0" is used, it sends an ARP for destination C. No one responds since the Router does not have a route to C. The packet is now dropped rendering "set default interface ethernet 0" as futile.

Scenario 2
------------
Router gets packet for desination C which it does not have the route.
Since "set default interface ethernet 0" is used, it sends it on ethernet 0on broadcast mac address. Each router on the ethernet now picks up the packet. It then either drops it or tries to send the packet to the destination if it has route(this is not same as forwarding a broadcast). The end host might get duplicate packets.

ASKER CERTIFIED SOLUTION
Avatar of celsmk
celsmk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks celsmk . I got it. 1 follow on question. Could you also describe what happens if in point 3 there are multiple routers like router B that have the route?
In case you have more than one router with route to destination C, each of them will respond with an ARP response, but router B will accept only the first ARP response, discarding other.
You will yield with one ARP request, several ARP responses, but just one data packet sent to the first router to respond ARP request to destination C.
Thanks a lot