mac delivery mechanism


  1. your computer has a default gateway set 
    1. can figure out packet is not destined for the local network
    2. will use the MAC address of the default gateway 
  2. default gateway receives the layer-2 frame
    1. will see that the MAC address matches it's own
    2. will un-encapsulate the data link frame and 
    3. pass the data part up to the network layer
  3. at the network layer, layer 3
    1. will see that the destination IP address does not match it's own
      1. this is a packet that is supposed to be routed
    2. will look in it's routing table for the closest match
      1. which interface to send the packet out on
  4. will create a new data link frame addressed to the next hop
    1. data portion of this frame sent out the appropriate interface
  5. process will continue at each router along the way

Assume that none of the info in already cached in an ARP table on any of the machines or routers 
  1. your computer wants to send some data to a computer on network 3
    1. your computer will create an IP packet addressed to 200.0.3.2
    2. your computer will send out an ARP request for the default gateway's MAC address 
    3. on receiving the MAC address, your computer will send out the IP packet
      1. encapsulated within a data link frame that is addressed to the MAC address of router a's interface on network 1
  2. router a will receive this frame
    1. send the data portion up to the network layer 
    2. at the network layer, router a will see that the packet is not addressed to router a
    3. router a will look in it's routing table to find out where to send the packet
    4. routing table will show that network 3 is reachable via network 2
    5. routing table will also show the IP address for the next hop is 200.0.2.2
    6. router a will send out an ARP request onto network 2 asking for router b's MAC address
    7. on receiving MAC, router a will send the IP packet 
      1. encapsulated in a data link frame addressed to router b's MAC address
  3. router b receives this frame it will do the same thing that router a did
    1. will send the IP packet up to the network layer
    2. see that the packet is not addressed to router b 
    3. will then look up in it's routing table for the closest match and see that it is directly connected to network 3
      1. here isn't a next hop router to send it to. 
    4. will send out an ARP request to learn the MAC address for 200.0.3.2
    5. when MAC is received, router b will send out the IP packet
      1.  encapsulated within a data link frame that is addressed to the MAC address of the destination computer
  4. destination computer will see that the data link frame is addressed to it
    1. will pass the IP packet to the network layer. 
    2. at the network layer, the IP address will also match that of the computer
    3. the data from the IP packet will be passed up to the transport layer

Comments

Popular posts from this blog

Openvpn and unbound combined break dig command

Stress Linux system: stress-ng

Google Nexus 4: permanent back panel glass repair for less than a penny