0

A wants to send a datagram to B. A knows B's IP address. However B's MAC address is not in A's ARP table. So A broadcasts an ARP query packet to all machines on the LAN. B recognizes it's IP, so it responds by sending A it's MAC address.

Is this how it works? In this scenario, could A be a router? Doesn't seem to make sense, since routers are the ones that give each host its IP address, right? So shouldn't A always know what the MAC address for each IP address is?

If A is a host connected to a router, then does it still do this, or does it do something different?

Wintermute
  • 355
  • 1
  • 5
  • 12
  • 1
    this site is for PROFESSIONAL sysadmins,not students, there's plenty of other sites for that. If you have any appropriate questions for this site (see our FAQ or look around for a second) then they're welcome here but this homework stuff is better found elsewhere, wikipedia for a start. – Chopper3 May 19 '11 at 12:46
  • So which stackexchange site should be used? – Wintermute May 19 '11 at 13:02
  • 4
    There isn't one for homework questions. – Chopper3 May 19 '11 at 13:11

3 Answers3

1
  1. Yes, that is how it works.

  2. Routers aren't always the device that assigns ip addresses to hosts.

  3. Even if the router knows the ip address of a host, it doesn't neccessarily know the MAC address of the host and will need to ARP for it.

  4. ARP tables (in most cases) are transient, meaning the ARP entries are cached for a period of time and then flushed.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
0

First, SF is not a Q&A site for kids doing homework.

Yes, that's basically how ARP works. A router is a host just like any computer on the network, they all work the same. ARP table entries expire, else they'd eventually fill up and stop working. Routers don't assign IPs, they route (I know, complicated name). DHCP Servers use DHCP to assign IP addresses.

Chris S
  • 77,337
  • 11
  • 120
  • 212
0

Yes, basically that is the way ARP works. And yes, A could be a router or a "normal" host, it makes no difference.

Routers giving out IP addresses is a special "edge" case you normally only find in very small networks. Other systems could hand out IP addresses via DHCP or the systems could be configured to use static IP addresses, so in both cases the router wouldn't know about it and would need to use ARP itself.

Sven
  • 97,248
  • 13
  • 177
  • 225