These are my outputs from the command ip route via dev eth1 dev eth1  proto kernel  scope link  src
default via dev eth0  metric 100

Am I understanding correctly?

  1. packet goes to will be sent to next hop router( via eth1 ?
  2. will be sent via eth1 which ip is , NOT via a router???
  3. others will be sent to next hop router( via eth0 ?

What does proto kernel scope link src mean?


Your assumption is accurate:

  • is directly connected as it is in the same subnet as (i.e. /23 is to ).
  • scope link means the packet is just dropped on the link and sent straight to interface as the destination is in the subnet will "hear" the packet so no gateway needed.
  • So packet is directly sent to destination via a Switch? – Sato Mar 17 '17 at 8:40
  • its sent to the "cable" eth1 in your example if this is connected to a swich then yes... technically there will be a arp request then a arp response for the dest . ip and then the packet will be sent to the switch with the right mac address and the right ip , the switch then looks up the mac table and sends it to the proper port .... if there is no arp response then the packet "dies" there. when its sent to the gateway the same happens but instead of arp-ing for the dest its for the gw that its done – bob Mar 17 '17 at 8:49

I made a small schema to make it easier to understand

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.