Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
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
add comment

closed as off topic by Chris S, Chopper3 May 19 '11 at 12:46

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers

  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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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