Every network device has a Network Interface Card (NIC) installed in it.
To see the settings that exists on this network interface card, we can open your command prompt and write the following command,
This will show us all the NIC settings as seen in figure (7.1),
Figure 7.1: the NIC settings
We already know the ‘physical address’, the ‘IPv4 address’ and the ‘subnet mask’.
Nevertheless, what is the ‘default gateway’, the ‘DNS servers’ and the ‘DHCP’? That is what we should know in this hour.
The default gateway is the gateway that interconnects all the network devices in the network with the external world.
In figure (7.2), the default gateway is the router’s interface GE0/0.
Figure 7.2:the default gateway
In figure (7.2), if ‘computer A’ needs to send a packet to a computer that exists inside its network, – e.g. ‘computer C’ –, it will send the packet directly to it as seen in figure (7.3),
Figure 7.3: sending a packet inside the network
If ‘computer A’ needs to send a packet to a computer that exists outside its network – e.g. computer 10.0.0.1 that exists outside the network –, it will send the packet to the default gateway as seen in figure (7.4),
Figure 7.4: sending a packet outside the network
You can observe that the destination IP is the IP address of the computer that exists outside the network while the destination MAC address is the MAC address of the default gateway. This is because that ‘layer 2’, where the MAC address operates, is responsible for the communication between any two nodes inside the same network.
The DNS (Domain Name System) server is responsible of resolving the names to IP addresses.
This is because computers are able to deal with the IP addresses not the names.
Figure 7.5:the DNS server
Suppose that you are setting on ‘computer A’ and need to browse Google’s website, the following will happen,
The DHCP (Dynamic Host Configuration Protocol) server is used to automatically configure NIC settings.
The NIC settings contains the following,
There are two ways to configure the NIC settings,
The network administrator configures every NIC manually. This method has high administrative effort, which is a disadvantage. So, this method is used only when the number of network devices is small.
The DHCP server will automatically provide every NIC with the required configuration. This method has a little administrative effort, which is an advantage.
There are some values that should be configured on the DHCP server, the network administrator configure those values on the DHCP server. The following are the values that should be configured on the DHCP server,
Figure 7.6: the DHCP server
The IP address range that the DHCP server uses to assign the IP addresses to the network devices.
The subnet mask that should be assigned to the network devices.
It includes the following, the ‘default gateway IP’, the ‘DNS server IPs’ and the ‘lease time’.
The ‘lease time’ is the lifetime of the IP address that is assigned to a network device. The network device should renew its IP address from the DHCP server before this time expires.
Suppose that ‘computer A’ in figure (7.7) is starting up and needs to take the NIC configurations from the DHCP server. The following will happen,
Figure 7.7:getting the NIC settings
Figure 7.8: ‘DHCPDISCOVER‘ packet
Source MAC: the MAC address of ‘computer A’.
Destination MAC: the ‘layer 2’ broadcast (all Ones).
Source IP: all zeros (This means that this computer is asking for its IP address).
Destination IP: ‘layer 3’ broadcast (all Ones).
Note: The network administrator may configure the router to work as a DHCP server.
APIPA (Automatic Private IP Addressing) is a range of IP addresses (169.254.0.0: 169.254.255.255).
Suppose that a computer is configured to take its NIC settings from a DHCP server.
At startup, the computer will try to communicate with the DHCP by sending a broadcast ‘DHCPDISCOVER’ message.
If the computer is unable to communicate with the DHCP to have its NIC settings from it, it will give itself an APIPA IP address which is an IP address in the range (169.254.0.0: 169.254.255.255).
ARP is the ‘Address Resolution Protocol’.
Every computer contains a table called the ‘ARP table’ stored in its memory. This table contains the IP and the MAC addresses of the other devices.
Figure 7.9: the ARP table
If a source computer needs to send some data to a destination computer, the source computer must know the IP address and the MAC address of the destination computer.
If the source computer knows only the IP address of the destination computer, it will use the ‘ARP protocol’ to know the MAC address of the destination computer and store those IP and the MAC addresses in its ARP table.
Figure 7.10: the ARP protocol
In figure (7.10), suppose the following,
Computer A needs to send some data to 192.168.18.91 (computer B)
In this case, ‘computer A’ will find the MAC address of 192.168.18.91 in the ARP table. Therefore, ‘computer A’ will simply send the data to ‘computer B’ as following,
Computer A needs to send some data to 192.168.18.92 (computer C)
Therefore, it will use the ARP protocol to get the MAC address of 192.168.18.192 as following,
Figure 7.11: the proxy ARP
The proxy ARP is used when the computer needs to know the MAC address of a computer in a different network.
As seen in figure (7.11), if PC_A needs to know the MAC address of PC_B, it will use the proxy ARP.
It is used if the computer knows the MAC address of the destination computer, and it needs to know its IP address.
Currently, the DHCP replaced the RARP. Therefore, nodoby uses RARP now.
ICMP (Internet Control Message Protocol) provides the network devices with the information about different network problems.
• Echo request and echo reply:
It is used to examine the network connectivity.
• The destination unreachable:
The router uses ICMP to send a message to the sender in case that the destination is unreachable.
Figure 7.12: ICMP protocol case study
In figure (7.12), you are setting on ‘computer A’ and need to test the connectivity to ‘computer B’.
First, ‘computer A’ will use ARP protocol to know the MAC address of ‘computer B’.
Then, ‘computer A’ will use ICMP protocol to send an echo request to ‘computer B’.
Then, ‘computer B’ will use ICMP protocol to send an echo reply to ‘computer A’.
If the echo request and the echo reply are successful, you will know that there are no problems in the connectivity between the source and the destination.