Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 651
  • Last Modified:

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?
0
sambha03
Asked:
sambha03
  • 6
  • 4
1 Solution
 
celsmkCommented:
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.
0
 
sambha03Author Commented:
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.
0
 
celsmkCommented:
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.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
sambha03Author Commented:
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.

0
 
celsmkCommented:
In Scenario 2, this is what it will happen:
Router A gets packet for destination C, for which it does not have the route.
Since "set default interface ethernet 0" is used, router A will TRY to send it over ethernet 0. In preparation for this, it will look at its ARP table and see if there is an entry for destination C.
If there is one, it will put the MAC address found in ARP table in ethernet packet and will UNICAST the packet to ethernet to reach destination C (only ONE packet here!).

Otherwise, it will broadcast ARP REQUEST (not the real packet) and listen for ARP responses.
Now, we have the following scenarios:
1) If there is a host right there, it will answer ARP and the router will put the host MAC address in ethernet packet and UNICAST the packet to ethernet to reach destination (only ONE packet here!);
2) If there is no host with destination C address and no router, no one will respond to ARP request; router A will time-out ARP request response and drop packet (just one ARP request, no packet);
3) If there is no host with destination C and if there is a router sitting right there at ethernet with a route to destination C (lets say router B), we have the following scenarios:
  3.1) If destination C on router B is towards an interface which is not the same ethernet, the router will answer to ARP request, giving his own MAC address in ARP response; router A will populate its ARP table, put router B's MAC address in ethernet packet and UNICAST the packet to router B (3 packets: ARP request, ARP response, but just ONE real data packet);
  3.2) If destination C on router B is towards the same interface it received ARP request, it will NOT give any response; router A will time-out ARP request response and drop packet (just one ARP request, no packet).
0
 
sambha03Author Commented:
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?
0
 
celsmkCommented:
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.
0
 
sambha03Author Commented:
Thanks a lot
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now