What does the command "ip route" show

14,617

Solution 1

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.

Solution 2

I made a small schema to make it easier to understand

enter image description here

Share:
14,617

Related videos on Youtube

Sato
Author by

Sato

Updated on September 18, 2022

Comments

  • Sato
    Sato over 1 year

    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?

  • Sato
    Sato about 7 years
    So packet is directly sent to destination via a Switch?
  • bob
    bob about 7 years
    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