Tuesday, 5 August 2014

ARP-Address-Resolution-Protocol

ARP (Address Resolution Protocol) is a network protocol used to find out the hardware (MAC) address of a device from an IP address. It is used when a device wants to communicate with some other device on a local network (for example on an Ethernet network that requires physical addresses to be known before sending packets). The sending device uses ARP to translate IP addresses to MAC addresses. The device sends an ARP request message containing the IP address of the receiving device. All devices on a local network segment see the message, but only the device that has that IP address responds with the ARP reply message containing its MAC address. The sending device now has enough information to send the packet to the receiving device.
ARP request packets are sent to the broadcast addresses (FF:FF:FF:FF:FF:FF for the Ethernet broadcasts and 255.255.255.255 for the IP broadcast).
ARP broadcast explained: 
arp process
Let’s say that Host A wants to communicate with host B. Host A knows the IP address of host B, but it doesn’t know the host B’s MAC address. In order to find out the MAC address of host B, host A sends an ARP request, listing the host B’s IP address as the destination IP address and the MAC address of FF:FF:FF:FF:FF:FF (Ethernet broadcast). Switch will forward the frame out all interfaces (except the incoming interface). Each device on the segment will receive the packet, but because the destination IP address is host B’s IP address, only host B will reply with the ARP reply packet, listing its MAC address. Host A now has enough information to send the traffic to host B.
All operating systems maintain ARP caches that are checked before sending an ARP request message. You can display ARP entries in Windows by using the arp -a command:
 
windows arp

DHCP-Dynamic Host Configuration Protocol

DHCP is a network protocol that is used to assign various network parameters to a device. This greatly simplifies administration, since there is no need to assign static network parameters for each device separately. DHCP is a client-server protocol. A client is a device that is configured to use DHCP to request network parameters from a DHCP server. DHCP server maintains a pool of available IP addresses and assignes one of them to the host. A DHCP server can also provide some other parameters, such as:
• subnet mask
• default gateway
• domain name
• DNS server
Cisco routers can be used as a DHCP server.
DHCP process explained:
DHCP client goes through the four step process:
dhcp process explained
1: A DHCP client sends a broadcast packet (DHCP Discover) to discover DHCP servers on the LAN segment.
2: The DHCP servers receive the DHCP Discover packet and respond with DHCP Offer packets, offering IP addressing information.
3: If the client receives the DHCP Offer packets from multiple DHCP servers,
the first DHCP Offer packet is accepted. The client responds by broadcasting a DHCP Request packet, requesting network parameters from a single server.
4: The DHCP server approves the lease with a DHCP Acknowledgement packet. The packet includes the lease duration and other configuration information.

DNS -Domain Name System

DNS is a network protocol used to translate hostnames into IP addresses. DNS is not required to establish a network connection, but it is much more user friendly for human users than the numeric addressing scheme. Consider this example. You can access the Google homepage by typing 74.125.227.99, but it’s much easier just to type www.google.com!
To use DNS, you must have a DNS server configured to handle the resolution process. A DNS server have a special-purpose application installed. The application maintains a table of dynamic or static hostname-to-IP address mappings. When a user request some network resource using a hostname, (for example by typing www.google.com in a browser), a DNS request is sent to the DNS server asking for the IP address of the hostname. The DNS server then replies with the IP address. The user’s browser can now use that IP address to access www.google.com.
The figure below explains the concept:
dns process
Suppose that the DNS Client wants to communicate with the server named Server1. Since the DNC Client doesn’t know the IP address of Server1, it sends a DNS Request to the DNS Server, asking for Server1′s IP address. The DNS Server replies with the IP address of Server1 (DNS Reply).
The picture below shows a sample DNS record:
dns record
Here you can see that the host with the hostname APP1 is using the IP address of 10.0.0.3.

Telnet

Telnet is a network protocol that allows a user to communicate with a remote device. It is a virtual terminal protocol used mostly by network administrators to remotely access and manage devices. Administrator can access the device by “telnetting” to the IP address or hostname of a remote device.
To use telnet, you must have a software (Telnet client) installed. On a remote device, a Telnet server must be installed and running. Telnet uses TCP port 23.
One of the greatest disadvantages of this protocol is that all data, including usernames and passwords, is sent in clear text, which is a potential security risk. This is the main reason why Telnet is rarely used today and is being replaced by a much secure protocol called SSH.
The word “telnet” can also refer to the software that implements the telnet protocol.
On Windows, you can start a Telnet session by typing the telnet IP_ADDRESS or HOSTNAME command:
telnet windows

SSH-Secure Shell

SSH is a network protocol used to remotely access and manage a device. The key difference between Telnet and SSH is that SSH uses encryption, which means that all data transmitted over a network is secure from eavesdropping.
Like Telnet, a user accessing a remote device must have an SSH client installed. On a remote device, an SSH server must be installed and running. SSH uses TCP port 22 by default.
SSH relies on public key cryptography for its encryption.
Here is an example of creating an SSH session using Putty, a free SSH client:
putty

FTP -File Transfer Protocol

FTP is a network protocol used to transfer files from one computer to another over a TCP network. Like Telnet, it uses a client-network arhitecture, which means that a user has to have an FTP client installed to access an FTP server running on the remote machine. After establishing an FTP connection, the user can download or upload files to and from the FTP server.
FTP uses two TCP ports: port 20 for sending data and port 21 for sending control commands.
FTP can use authentication, but like Telnet, all data is sent in clear text, including usernames and passwords.

TFTP-Trivial File Protocol

TFTP is a network protocol used to transfer files between remote machines. It is a simple version of FTP, lacking some of the more advanced features FTP offers, but requiring less resources than FTP.
Because of it’s simplicity TFTP can be used only to send and receive files. It uses UDP port 69 for communication.
Because of it’s disadvantages TFTP is not widely used today, but it’s used to save and restore a router configuration or to backup an IOS image.
TFTP doesn’t support user authentication and sends all data in clear text