Anda di halaman 1dari 33

PROTOCOLS AND STANDARDS

Protocols are Rules and Standards are agreed upon Rules. In computers, Network communication occurs between entities in different systems. An Entity is anything capable of sending and receiving information. Two entities cannot simply send bit streams to each other and expect to be understood. So, for communication to occur, the entities must agree on a protocol. A protocol is a set of rules that governs data communication.

A Protocol defines what is communicated, how it is communicated, and when it is communicated. The key elements of a protocol are Syntax, Semantics and Timing.
Syntax: Syntax refers to the structure or format of the data i.e. the order in which they are presented. Semantics: It refers to the meaning of each section of bits. Timing : It refers to two charecteristics i.e. when data can be sent and how fast data can be sent.

What is ARP?

ARP stands for Address Resolution Protocol. It is used to associate a layer 3 (Network layer) address (such as an IP address) with a layer 2 (Data Link layer) address (MAC address).

Layer 2 vs. Layer 3 addressing

The IP address is a layer 3 (network layer) address. The MAC address is a layer 2 (data link) address. The layer 3 address is a logical address. It will pertain to a single protocol (such as IP, IPX, or Appletalk). The layer 2 address is a physical address. It pertains to the actual hardware interface (NIC) in the computer.

A computer can have any number of layer 3 addresses but it will only have One layer 2 address per LAN interface. The layer 3 packet (addressed to the destination host) will be encapsulated within a layer 2 frame (addressed to the next hop).

ARP operation for a local host

Our computer will have data that it needs to send (I'm assuming that we're using TCP/IP). When the data gets to the Network layer it will put on the destination IP address. All of this information is passed down to the data link layer where it is taken and placed within a data link frame. Based on the IP address (and the subnet mask), our computer should be able to figure out if the destination IP is a local IP or not.

If the IP is local, our computer will look in it's ARP table (a table where the responses to previous ARP requests are cached) to find the MAC address. If it's not there, then your computer will broadcast an ARP request to find out the MAC address for the destination IP. Since this request is broadcast, all machines on the LAN will receive it and examine the contents.

If the IP address in the request is their own, they'll reply. On receiving this information, our computer will update it's ARP table to include the new information and will then send out the frame (addressed with the destination host's MAC address).

ARP operation for a remote host

If the IP is not local then the gateway (router) will see this (remember, the ARP request is broadcast so all hosts on the LAN will see the request). The router will look in it's routing table and if it has a route to the destination network, then it will reply with it's own MAC address.

ARP

IP was designed as a best effort delivery protocol,but it lacks some feature such as Flow Control And Error Control
Best effort delivery describes a network service in which the network does not provide any guarantees that data is delivered or that a user is given a guaranteed quality of service level or a certain priority. In a best effort network all users obtain best effort service, meaning that they obtain unspecified variable bit rate and delivery time, depending on the current traffic load. By removing features such as recovery of lost or corrupted data and preallocation of resources, the network operates more efficiently, and the network nodes are inexpensive.

It is a host to host protocol using Logical Addressing. We need protocol to create a mapping between Physical Address and Logical address. IP Packets uses logical (host to host) Addresses. This packet needs to be Encapsulated in a Frame, which needs physical address (node to node).

The protocol called ARP is designed for this purpose and for Reverse mapping the protocol RARP is used. An Internet is made up of a combination of physical network connected by internetworking devices such as routers, hosts etc. The hosts and routers are recognized at the network level by their logical (IP) Addresses. Packet passes through physical networks to reach these hosts and routers.

At the Physical level, the hosts and routers are recognized by their physical addresses. A Physical address is a local address.An Example of Physical address is the 48 bit MAC Address in the Ethernet protocol, which is imprinted in the NIC card.

Mapping Of Logical address to Physical Address

Anytime a host or a router has an IP datagram to send to another host or router,it has the Logical (IP)address of the receiver. If the sender is a host, the logical address is obtained from the DNS. If the sender is a router, the logical address is obtained from a routing table. But the IP datagram must be encapsulated in a frame to be able to pass through the physical network.

This means the sender needs the Physical address of the receiver. The host or the routers sends an ARP query packet. The packet includes the Physical and the IP Address of the sender and the IP address of the receiver. As the sender does not know the physical address of the receiver the query is broadcasted over the network.

Every host or routers on the network receives and processes the ARP query packet, but only the intended receipent recognizes its IP Address and sends back an ARP response packet. The Response packet contains the receipents IP address and Physical Address. The packet is Unicasted directly to the inquirer by using the physical address received in the query packet.

Cache Memory

Using ARP is inefficient if a sender needs to broadcast an ARP request for each IP packet it needs to send to the receiver. It could have broadcast the IP packet itself. ARP can be useful if the ARP reply is cached(kept in a cache memory for a while) because a system normally sends several packet to the same destination. A system that receives an ARP reply stores the mapping in the cache memory and keeps it for 20 - 30 minutes unless the space in the cache memory is exhausted.

Packet Format

Hardware address type (e.g., Ethernet, Packet Radio Net.) : 16 bits Protocol address type : 16 bits Hardware Length : 8 bits Protocol Length : 8 bits Operation Code : 16 bits Hardware address of sender of this packet, n from the 3rd field. : n bytes Protocol address of sender of this packet, m from the 4th field. : m bytes Hardware address of target of this packet (if known). : n bytes Protocol address of target. : m bytes

Encapsulation

An ARP packet is encapsulated directly into a data frame : 1. Preamble and SFD : 8 bytes 2. Destination address : 6 bytes(All 48 bits are set to binary 1, since this frame is intended to be received) 3. Sources Address : 6 bytes 4. Type : 2 bytes 5. Data : ARP Request or Reply packet 6. CRC : 4 bytes

Operation

These are the steps in an ARP process: 1. The sender knows the IP address of the target. 2. IP asks ARP to create an ARP request message,filling in the sender physical address, sender IP address and the target IP address. The target physical address field is filled with 0s. 3. The message is passed to the datalink layer where it is encapsulated in a frame by using the physical address of the sender as the source address and the physical broadcast address as the Broadcast Address.

4. Every host or router receives the frame.Because the frame contains a broadcast destination address,all station remove the message and pass it to ARP. All the machines except the one targeted drop the packet.The target machine recognizes its IP address. 5. The target machine replies with an ARP reply message that contains its physical address.The message is Unicast.

6. The sender receives the reply message.It now knows the physical address of the target machine.
7. The IP datagram , which carries data for the target machine, is now encapsulated in a frame and is unicasted to the destination.

Broadcast Frame

In Ethernet networks, a frame that has a hexadecimal MAC address of FF-FF-FF-FF-FF-FF. This hexadecimal address is equivalent to 48 binary ones. The meaning of this address in Ethernet is simply that this frame is intended to be received and processed by every node on the network of computers. Broadcast frames are generated when certain network services need to make announcements to other hosts on the network. Too many broadcast frames on a network can degrade communication between nodes on the network.

Four different cases

The following are four different cases in which the services of the ARP can be used : 1. The sender is a host and wants to send a packet to another host on the same network.In this case, the logical address that must be mapped to a physical address is the destination IP address in the datagram header.

2. The sender is a host and wants to send a packet to another host on another network. In this case, the host looks at its routing table and finds the IP address of the next hop (router) for the destination.If it does not have a routing table,it looks for the IP address of the default router.The IP address of the router becomes the logical address that must be mapped to a physical address.

3. The sender is a router that has received a datagram destined for a host on another network.It checks its routing table and finds the IP address of the next router.The IP address of the next router becomes the logical address that must be mapped to a physical address.
4. The sender is a router that has received a datagram destined for a host on the same network.The destination IP address of the datagram becomes the logical address that must be mapped to a physical address.

An ARP request is broadcasted AND An ARP reply is Unicasted

Proxy ARP

A proxy ARP is an ARP that acts on behalf of a set of hosts.


2. Whenever a router running a proxy ARP receives an ARP request looking for the IP address of one of these host, the router sends an ARP reply announcing its own hardware(physical) address.

3. After the router receives the actual IP packet , it sends the packet to the appropriate host or router.

InARP

InARP stands for Inverse Address Resolution Protocol. It is used for obtaining Layer 3 address of other nodes from Layer 2 address. Its header packet structure is same as like ARP packets.

RARP

RARP stands for Reverse Address Resolution Protocol.


It helps in mapping the physical address to Logical address. This is used incase of : An organization does not have enough IP address to assign to each station. It needs to assign IP address on demand . RARP is used to obtain the Layer 3 address of the requesting station itself, while in InARP the requesting station is querying the Layer 3 address of another station.

DRARP

DRARP stands for Dynamic Reverse Address Resolution Protocol


It is just similar to RARP. The only difference is that , incase an DRARP Reply message is not being generated then a DRARP_ERROR message is being sent in response to the DRARP Request.

The status value for the ERROR message in DRARP are: DRARPERR_RESTRICTED (1) DRARPERR_NOADDRESSES (2) DRARPERR_SERVERDOWN (3) DRARPERR_MOVED (4) DRARPERR_FAILURE (5)

Anda mungkin juga menyukai