0

Here's my understanding:

  1. ipconfig lists all NICs my PC has (real or virtual) and with ipconfig /all. I can see all the info for them. Correct?

  2. arp -a prints the arp cache for each active NIC. The arp cache is used by the NIC to determine the MAC address of a device in my LAN if it wants to send an Ip packet to it. Correct?

Now, what exactly does route print tell me? How my computer should deal with incoming our outgoing IP packets? I always thought it was meant for outgoing packets, but then I saw video where someone said "on-link" tells my computer to listen for packets that it receives if they have a certain IP address.

If it is for incoming packets, how does my computer know where to send outgoing packets?

And why then would the route print need to contain the default gateway?

EDIT

  255.255.255.255  255.255.255.255   On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255   On-link    172.29.138.145   5256
  255.255.255.255  255.255.255.255   On-link         10.0.75.1    271
  255.255.255.255  255.255.255.255   On-link     192.168.2.191    311

1 Answer 1

5

ipconfig lists all NICs my PC has (real or virtual) and with ipconfig /all I can see all the info for them

Correct.

arp -a prints the ARP cache for each active NIC. The ARP cache is used by the NIC to determine the MAC address of a device in my LAN if it wants to send an IP packet to it.

Correct.

What exactly does route print tell me?

It tells you how packets to various destination are routed.

"on-link" tells my computer to listen for packets that it receives if they have a certain IP address

Incorrect.

On-link is a route that's directly reachable (the NIC is in direct contact with it, on the same subnet).

Because it is directly reachable it doesn't need a gateway address.

If it is for incoming packets

Incorrect.

It's for outgoing packets.

Then why would the route print need to contain the default gateway?

It is generally not feasible for all hosts to maintain knowledge of the routes to all other (non-local) networks (on the internet).

So, the Default Gateway is the address to which packets are sent if there is no specific gateway for a given destination listed in the routing table.

It maintains the routes to remote (non local) networks.


Further Reading

2
  • Thanks a lot for your reply! I edited my question... this part of the routing table confuses me a bit... this lists 4 possible interfaces for messages addressed to 255.255.255.255... does this mean that this Ip packet is sent to all four, since it is a broadcast? Jun 22, 2018 at 20:31
  • @user3813234 Yes, I think so.
    – DavidPostill
    Jun 22, 2018 at 20:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .