CN Unit-5
CN Unit-5
CN Unit-5
Unit-5
Address Management
IPv4 Routing:
IPv4 Host Routing:
A host route is used to route traffic to a specific host. The subnet mask in the route will always be all
1's. That means the subnet mask for a host route will be /32 for IPv4 and /128 for IPv6.
A host route is configured to route packets to a specific host
The subnet mask will be all 1's
The IPv4 subnet mask of a host route will always be /32
The IPv6 subnet mask of a host route will always be /128
Host routes are automatically added to the routing table for all IPv4 and IPv6 addresses that are
configured on the router
The purpose of a host route iss to create a corresponding entry as a receive entry so that the packets
destined
ned to this IP address can be processed by the router itself
Loopback interfaces are commonly created with /32 subnet masks and will therefore appear as a host
route in the routing table
Host routes are the most specific route possible and therefore take pprecedence
recedence over all other routes
(based on the network mask)
Configure an IPv4 host route by typing:
config t
ip route <host-to-route-to>
to> 255.255.255.255 <exit
<exit-interface-on-this-router>
--OR--
ip route <network-to-route-to>
to> <subnet-mask>
<subnet <next-hops-ipv4-address>
Routers:
A Router is a networking device that forwards data packets between computer network.
This device is usually connected to two or more different networks. When a data packet comes to a
router port, the router reads address information in packet to determine out which port the packet will
be sent.
For example, a router provides you with the internet access by connecting your LAN with the Internet.
Routing Table:
A routing table is a set of rules, often viewed in table format that is used to determine where data
packets traveling over an Internet Protocol (IP) network will be directed. All IP-enabled devices,
including routers and switches, use routing tables.
See below a Routing Table:
Destination Subnet mask Interface
128.75.43.0 255.255.255.0 Eth0
128.75.43.0 255.255.255.128 Eth1
192.12.17.5 255.255.255.255 Eth3
default Eth2
The entry corresponding to the default gateway configuration is a network destination of 0.0.0.0
with a network mask (netmask) of 0.0.0.0.
The Subnet Mask of default route is always 255.255.255.255 .
A routing table contains the information necessary to forward a packet along the best path toward its
destination.
Each packet contains information about its origin and destination. Routing Table provides the device
with instructions for sending the packet to the next hop on its route across the network.
Each entry in the routing table consists of the following entries:
1. Network ID:
The network ID or destination corresponding to the route.
2. Subnet Mask:
The mask that is used to match a destination IP address to the network ID.
3. Next Hop:
The IP address to which the packet is forwarded
4. Outgoing Interface:
Outgoing interface the packet should go out to reach the destination network.
5. Metric:
A common use of the metric is to indicate the minimum number of hops (routers crossed) to the
network ID.
Routing table entries can be used to store the following types of routes:
Directly Attached Network IDs
Remote Network IDs
Host Routes
When a router receives a packet, it examines the destination IP address, and looks up into its Routing
Table to figure out which interface packet will be sent out.
3) Now, for Host A to send the packet to the router, it needs to know the hardware address of the router's
interface which is connected to its network (Network A), in case you didn't realise, we are talking about the
MAC (Media Access Control) address of interface E0. To get the hardware address, Host A looks in its ARP
cache - a memory location where these MAC addresses are stored for a few seconds.
5) The router responds with the hardware address of its E0 interface, to which the 192.168.0.1 IP is bound.
Host A now has everything it needs in order to transmit a packet out on the local network to the router.
Now, the Network Layer hands down to the Datalink Layer the packet it generated with the ping (ICMP
echo request), along with the hardware address of the router. This packet includes the source and
destination IP address as well as the ICMP echo request which was specified in the Network Layer.
6) The Datalink Layer of Host A creates a frame, which encapsulates the packet with the information needed
to transmit on the local network. This includes the source and destination hardware address (MAC) and
the type field which specifies the Network Layer protocol e.g IPv4 (that's the IP version we use), ARP. At
the end of the frame, in the FCS portion of the frame, the Datalink Layer will stick a Cyclic Redundancy
Check (CRC) to make sure the receiving machine (the router) can figure out if the frame it received has
been corrupted.
7) The Datalink Layer of Host A hands the frame to the Physical layer which encodes the 1s and 0s into a
digital signal and transmits this out on the local physical network.
8) The signal is picked up by the router's E0 interface and reads the frame. It will first do a CRC check and
compare it with the CRC value Host A added to this frame, to make sure the frame is not corrupt.
10) IP looks at the packet's destination IP address to determine if the packet is for the router. Since the
destination IP address is 200.200.200.5, the router determines from the routing table that 200.200.200.0
is a directly connected network on interface E1.
11) The router places the packet in the buffer of interface E1. The router needs to create a frame to send
the packet to the destination host. First, the router looks in the ARP cache to determine whether the
hardware address has already been resolved from a prior communication. If it is not in the ARP cache,
the router sends an ARP broadcast out E1 to find the hardware address of 200.200.200.5
13) The frame generated from the router's E1 interface has the source hardware address of E1 interface
and the hardware destination address of Host B's network interface card. However, the most important
thing here is that even though the frame's source and destination hardware address changed at every
interface of the router it was sent to and from, the IP source and destination addresses never changed.
The packet was never modified at all, only the frame changed.
14) Host B receives the frame and runs a CRC. If that checks out, it discards the frame and hands the
packet to IP. IP will then check the destination IP address. Since the IP destination address matches the
IP configuration of Host B, it looks in the protocol field of the packet to determine the purpose of the
packet.
15) Since the packet is an ICMP echo request, Host B generates a new ICMP echo-reply packet with a
source IP address of Host B and a destination IP address of Host A. The process starts all over again,
except that it goes in the opposite direction. However, the hardware address of each device along the
path is already known, so each device only needs to look in its ARP cache to determine the hardware
(MAC) address of each interface.
The DNS has to be converted to IP address before destination is reached. This conversion is needed because
computer understands only numbers. The conversion is done with the help of name server.
As soon as domain name is provided, it will be sent across the internet to contact name servers.
This name server is responsible for converting domain name to IP
If one of the name servers is not able to convert DNS to IP, it contacts other name server.
This process continues until IP address is generated.
Once the IP address is generated, the host can be accessed.
The hostname and all domain names form what is known as FULLY QUALIFIED DOMAIN NAME.
The following figure shows domain name conversion.
Types of ARP
Here are four types of Address Resolution Protocol, which is given below:
Proxy ARP
Gratuitous ARP
Reverse ARP
Inverse ARP
Proxy ARP:
This ARP type is configured on router which responds to the target IP address and maps the router’s
MAC address with the target IP address and sends when it is reached to its destination.
Gratuitous ARP:
This type of ARP request helps the network to identify the duplicate IP address.
Reverse ARP (RARP)
Reverse ARP, also now called RARP, is a type of ARP networking protocol which is used by the
client system in a LAN to request its IPv4 address from the ARP router table.
Inverse ARP (InARP)
Inverse ARP is also called InARP, is a type of ARP used to find the nodes’ IP of addresses from the
data link layer addresses.
The ICMP echo request and the ICMP echo reply messages are commonly known as ping messages.
Ping is a troubleshooting tool used by system administrators to manually test for connectivity between
network devices, and also to test for network delay and packet loss.
The ping command sends an ICMP echo request to a device on the network, and the device immediately
responds with an ICMP echo reply.
Sometimes, a company's network security policy requires ping (ICMP echo reply) to be disabled on all
devices to make them more difficult to be discovered by unauthorized persons.
The answer to “What is DHCP?” is that it’s the standard mechanism to dynamically assign IP
addresses within a network. It stands for Dynamic Host Configuration Protocol.
IP, or Internet Protocol, addressing is a logical means of assigning addresses to devices on a
network. Each device connected to a network requires a unique IP address.
Operation of NAT:
The border router is configured for NAT. The border router has two parts
Local interface
Global interface.
When the packets are transmitted from local host to another host in another network, then the packets are
moved from local network to global network.
Then, the NAT process of the border router converts the local IP address of the transmitted packet to a
global IP address.
When that packet moves from global network to local network, then again the global IP is converted to
local IP and the packet reaches the local host of that network.
Network Address Translation (NAT) Types
There are three ways to construct NAT. These are as follows −
Static NAT
Dynamic NAT
Port Address Translation (PAT)
Advantages of NAT
Complexity.
Problems due to lack of public address.
Compatibility with certain application.
Problems with security protocol.
Performance reduction.
IPv4 Issues:
1. The lack of address space - the number of different devices connected to the Internet grows
exponentially, and the size of the address space is quickly depleted;
2. Weak protocol extensibility - the insufficient size of the IPv4 header, which does not accommodate
the required number of additional parameters;
3. The problem of security of communications - no means are provided to limit access to information
hosted on the network. IPv4 has never been designed for security.
Originally designed as an isolated military network
Then adapted for public education and research network
4. Lack of quality of service support - placement of information about bandwidth, delays required for
smooth operation of some network applications are not supported;
5. Geographic limitations - since the Internet was created in the USA, this country is also involved in
the distribution of IP addresses. Almost 50% of all addresses are reserved for the United States.
Need of IPv6:
Internet Protocol version 6 (IPv6) is the latest revision of the Internet Protocol (IP) and the first version
of the protocol to be widely deployed. IPv6 was developed by the Internet Engineering Task Force
(IETF) to deal with the long-anticipated problem of IPv4 address exhaustion.
IP v6 is 128-bits address having an address space of 2^128, which is way bigger than IPv4. In IPv6 we
use Colon-Hexa representation. There are 8 groups and each group represents 2 Bytes.
Given below are major points which played key role in birth of IPv6:
Internet has grown exponentially and the address space allowed by IPv4 is saturating. There is a
requirement of protocol which can satisfy the need of future Internet addresses which are expected to
grow in an unexpected manner.
Using features such as NAT, has made the Internet discontiguous i.e. one part which belongs to intranet,
primarily uses private IP addresses; which has to go through number of mechanism to reach the other
part, the Internet, which is on public IP addresses.
IPv4 on its own does not provide any security feature which is vulnerable as data on Internet, which is a
public domain, is never safe. Data has to be encrypted with some other security application before being
sent on Internet.
IPv6 features:
Larger Address Space
In contrast to IPv4, IPv6 uses 4 times more bits to address a device on the Internet. This much of extra
bits can provide approximately 3.4×1038 different combinations of addresses. This address can
accumulate the aggressive requirement of address allotment for almost everything in this world.
According to an estimate, 1564 addresses can be allocated to every square meter of this earth.
Simplified Header
IPv6’s header has been simplified by moving all unnecessary information and options (which are
present in IPv4 header) to the end of the IPv6 header. IPv6 header is only twice as bigger than IPv4
provided the fact that IPv6 address is four times longer.
End-to-end Connectivity
Every system now has unique IP address and can traverse through the Internet without using NAT or
other translating components. After IPv6 is fully implemented, every host can directly reach other hosts
on the Internet, with some limitations involved like Firewall, organization policies, etc.
Auto-configuration
IPv6 supports both Stateful and stateless auto configuration mode of its host devices. This way, absence
of a DHCP server does not put a halt on inter segment communication.
Faster Forwarding/Routing
The eight groups make a total of 32 hexadecimal digits, four bits each, which makes a total of 128 bits.
RFC 4291 says that the preferred representation of an IPv6 address is x:x:x:x:x:x:x:x and RFC 5952
recommends that the address is written in lowercase.
It is obvious that IPv6 addresses are long and hard to remember and work with. That's why there are
rules that can significantly shorten the address