Tuesday, November 24, 2009

MAC Addres Vs IP Addres

MAC Addres Vs IP Addres
-Historically each adapter card has a physical address (MAC address), which
is used to identify the interface for transmission. This is a flat address,
where each manufacturer is assigned a fixed prefix, which in turn ensures
no two adaptor cards have the same address.
-IP address is designed as a logical address primarily for routing. This is a
hierarchical address, which is divided into a subnet part (network address)
and a host ID within the network. These two parts is combined to a single IP
address.
-Destination address is used to determine the route by table lookup, i.e.,
determine the next hop to forward a packet or more precisely the outgoing
interface within a router or host.
-Recall the Internet is a packet switched network, the packet is stored and
forwarded hop by hop. For the actual hop by hop transmission, the next hop
MAC address is needed to form the link level frame.
-Address Resolution Protocol or ARP is used to translate an target IP
address into a target MAC address in a local area network. The key feature
is to take advantage of the broadcast nature in the local area network. In
case this is a point-to-point connection, a node will directly request the MAC
address of the other end node.


Random Access Protocols
-The most common medium access protocols used in local area networks are
random access protocols, in particular CSMA/CD (Ethernet).
-Slotted ALOHA protocol is one of the first randomaccess protocols designed,
where in each slot a node with a packet will transmit with a probability p.
The simple performance study on Slide 5-19 shows that the maximum
utilization is about 37%.
-CDMA/CD protocol improves over the ALOHA in two aspects, 1) it listen the
channel (Carrier Sense) before transmission, 2) it continue monitoring the
channel after transmission, when there is a collision detected, it will abort
the transmission.
-Assuming the maximum distance between two nodes in the Ethernet is D,
speed of light is R, frame length is L and transmission rate (link bandwidth
is B). The maximum amount of time that a node has to wait after a
transmission is 2D/R (a roundtrip delay). For CSMA/CD protocol to work, it
usually requires that L/B > 2D/R.
-Token Ring relies on the passing of token, in which only the node holding
the Token (a special packet) has the right to transmit. If the ring latency is
D (the propagation delay around the ring), packet size is L, link bandwidth
is B, and there are N nodes on the Ring (equally spaced out). Then the
maximum utilization is achieved when all nodes are having packets to
transmit, i.e., (NL/B)/(NL/B)+D), since there is D/N amount of time for
passing the token between each node (overhead).


Switch and Hub
-Hub is a repeater and it copies incoming packets and sends out to all other
ports with no buffering. So a hub simply extends the distance of a local area
network, which is still under one broadcast domain. More nodes the
network has, more likely there will be collision under CDMA/CD protocol.
-Switch can do intelligent filtering based on the destination MAC address. It
maintain a switch table, when a packet comes, it check whether the
destination MAC address is in the table to see if it can directly forward the
packet to one single outgoing port. If there is entry in the table, it simply
forward to all outgoing ports except the one it receives the packet (exactly
like a hub). See Slide 5-50.
-A switch has self-learning capability, as it can record the interface that it
receives a packet, by checking the source MAC address, it can build a record
in the switch table, record (MAC address, Interface, TTL). Noticing for this
to work, it mandates that a packet can not arrives from more than one
incoming port, that is the topology must be a tree (with no loop).

No comments:

Post a Comment