6

These are my outputs from the command ip route

10.1.40.0/24 via 10.255.115.1 dev eth1
10.255.114.0/23 dev eth1  proto kernel  scope link  src 10.255.115.18
default via 10.1.1.1 dev eth0  metric 100

Am I understanding correctly?

  1. packet goes to 10.1.40.0/24 will be sent to next hop router(10.255.115.1) via eth1 ?
  2. 10.255.114.0/23 will be sent via eth1 which ip is 10.255.115.18 , NOT via a router???
  3. others will be sent to next hop router(10.1.1.1) via eth0 ?

What does proto kernel scope link src mean?

4

Your assumption is accurate:

  • 10.255.114.0/23 is directly connected as it is in the same subnet as 10.255.115.18 (i.e. /23 is 10.255.114.0 to 10.255.115.255 ).
  • 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.
2
  • 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
0

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.