User Datagram Protocol (UDP) and its header
User Datagram Protocol (UDP) provides connectionless services for application-level procedures. UDP is an unreliable service; delivery and duplicate protection are not guaranteed. This does reduce the overhead of the protocol and may be adequate in many cases. Connectionless service is more robust.
UDP sits on top of IP. UDP header includes a source port (16 bits) and destination port (16 bits). The length (16 bits) field contains the length of the entire UDP segment, including header and data. The checksum (16 bits) field contains the result of a cyclic redundancy check (CRC) computation performed by the transmitting system, and is used by the receiving system to detect errors in the UDP header, data and the part of IP header. The checksum applies to the entire UDP segment plus a pseudo header prefixed to the UDP header at the time of calculation.
Source Port – The source port is the virtual port number assigned by the local computer when it transmits data to a remote machine. This is typically a number above 1023 and is the next highest number not already in use. This field is not always used, but when it is, it should indicate the port number the remote machine should use when sending any replies back to the source.
Destination Port – The Destination port is usually a “well known port number” such as 69 for trivial file transfer protocol, or 53 for DNS. These port numbers allow the remote machine to recognize a request for a particular type of service. When used with a source port, this allows a remote machine to recognize a data connection.
Length – Length is specified as a number of octets, and since it is a 16-bit value, it provides for a datagram of up to 65,535 bytes, including the header and data.
Checksum – A checksum is calculated using the 16-bit one’s complement of the one’s complement sum of data pulled from the IP header, the UDP header, and some of the data. This data is padded with zeroes so that it is a multiple of two octets before the checksum algorithm is run.
The Address Resolution Protocol (ARP)
The Address Resolution Protocol (ARP) is a network protocol, which maps a network layer protocol address to a data link layer hardware address. For example, ARP is used to resolve IP address to the corresponding Ethernet address.
ARP belongs to the OSI data link layer (Layer 2). ARP protocol is implemented by the network protocol driver. ARP packets are encapsulated by Ethernet headers and transmitted.
A host in an Ethernet network can communicate with another host, only if it knows the Ethernet address (MAC address) of that host. The higher level protocols like IP use a different kind of addressing scheme (like IP address) from the lower level hardware addressing scheme like MAC address. ARP is used to get the Ethernet address of a host from its IP address. ARP is extensively used by all the hosts in an Ethernet network.
The length of a MAC address is 6 bytes and the length of an IP address is 4 bytes. Obviously, the MAC address cannot be represented using the IP address. So an IP address must be mapped to the corresponding MAC address.
ARP is a general protocol, which can be used in any type of broadcast network. The fields in the ARP packet specify the type of the MAC address and the type of the protocol address. ARP is used with most IEEE 802.x Local Area Networking (LAN) media. In particular, it is also used with FDDI, Token Ring, and Fast Ethernet, in precisely the same way as it is with Ethernet.
When ARP needs to resolve a given IP address to Ethernet address, it broadcasts an ARP request packet. The ARP request packet contains the source MAC address and the source IP address and the destination IP address. Each host in the local network receives this packet. The host with the specified destination IP address sends an ARP reply packet to the originating host with its MAC and IP address.
The format of an ARP message is shown below:
ARP maintains the mapping between IP address and MAC address in a table in memory called ARP cache. The entries in this table are dynamically added and removed. A host will update its ARP cache, only if the ARP request is for its IP address. Otherwise, it will discard the ARP request.
Circuit switching
In circuit switching, a connection is established between two network nodes before they begin transmitting data. Bandwidth is dedicated to this connection and remains available until the users terminate communication between the two nodes. While the nodes remain connected, all data follows the same path initially selected by the switch. This works much like a normal telephone line works for voice communication. Integrated Services Digital Network (ISDN) is a good example of circuit switching. When a router has data for a remote site, the switched circuit is initiated with the circuit number of the remote network. In the case of ISDN circuits, the device actually places a call to the telephone number of the remote ISDN circuit. When the two network node s are connected and authenticated, they can transfer data. When the data transmission is complete, the call can be terminated. There are three phases involved in circuit switching as below:
Circuit establishment – In this phase, the circuit must be established, when signals are transmitted from one network node to other node. This can send information through signals before that the receiving end and sending end must establish their circuit.
Data transfer – In this data transfer phase, information can be transmitted from one network node to other network node through network. The data may be analog signals or digital signals that depend on the nature of the network protocol.
Circuit disconnect – After some time of data transfer, the connection is terminated, generally by the action of one of the two network nodes. Signals must be propagated to given nodes to deallocate the dedicated resources.
The above figure shows that device A is connected to device E through the switches I, III & IV. Other devices can connect to each others by moving the levers of the switches.







