Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
16 views

Internet Protocols and Addressing

Internet Protocols and Addressing

Uploaded by

indrayaneesawant
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Internet Protocols and Addressing

Internet Protocols and Addressing

Uploaded by

indrayaneesawant
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 82

Internet Protocols and

Addressing
MODULE - 3
What is DNS?

The Domain Name System (DNS) is the phonebook of the Internet.


Humans access information online through domain names, like
nytimes.com or espn.com. Web browsers interact through Internet
Protocol (IP) addresses. DNS translates domain names to IP
addresses so browsers can load Internet resources.
Each device connected to the Internet has a unique IP address
which other machines use to find the device. DNS servers
eliminate the need for humans to memorize IP addresses such as
192.168.1.1 (in IPv4), or more complex newer alphanumeric IP
addresses such as 2400:cb00:2048:1::c629:d7a2 (in IPv6).
How does DNS work?

The process of DNS resolution involves converting a hostname (such


as www.example.com) into a computer-friendly IP address (such as
192.168.1.1). An IP address is given to each device on the Internet,
and that address is necessary to find the appropriate Internet
device - like a street address is used to find a particular home.
When a user wants to load a webpage, a translation must occur
between what a user types into their web browser (example.com) and
the machine-friendly address necessary to locate the example.com
webpage.

In order to understand the process behind the DNS resolution, it’s


important to learn about the different hardware components a DNS
query must pass between. For the web browser, the DNS lookup occurs
"behind the scenes" and requires no interaction from the user’s
computer apart from the initial request.
Introduction to Internet Protocols
The Internet Protocol (IP) is a protocol, or set of rules, for routing and
addressing packets of data so that they can travel across networks and arrive
at the correct destination. Data traversing the Internet is divided into smaller
pieces, called packets. IP information is attached to each packet, and this
information helps routers to send packets to the right place. Every device or
domain that connects to the Internet is assigned an IP address, and as
packets are directed to the IP address attached to them, data arrives where it
is needed.

Once the packets arrive at their destination, they are handled differently
depending on which transport protocol is used in combination with IP. The
most common transport protocols are TCP and UDP.
What is an IP address? How does IP addressing work?

An IP address is a unique identifier assigned to a device or


domain that connects to the Internet. Each IP address is a
series of characters, such as '192.168.1.1'. Via DNS resolvers,
which translate human-readable domain names into IP
addresses, users are able to access websites without
memorizing this complex series of characters. Each IP packet
will contain both the IP address of the device or domain sending
the packet and the IP address of the intended recipient, much
like how both the destination address and the return address are
included on a piece of mail.
What is an IP address? How does IP addressing work?
What is an IP address and why does it matter?

IP’ stands for Internet Protocol, which is the set of rules that makes it possible for devices to
communicate over the Internet. With billions of people accessing the Internet every day,
unique identifiers are necessary to keep track of who is doing what. The Internet Protocol
solves this by assigning IP numbers to every device accessing the Internet.
A computer’s IP address is like the physical address of a house. If someone calls a pizzeria
to order a delivery, they need to provide their physical address. Without that address, the
pizza delivery person will have no idea which house to deliver the pizza to.

For example, when a user types a domain name, like google.com, into a web browser, this
will initiate a request to Google’s web server asking for content (the Google homepage).
Once Google receives the request, it needs to know where to send the website content. For
this reason, the request will contain the asker’s IP address. Using the provided IP address,
Google can send a response back to the user’s device, which will then display that content in
the user’s web browser.
What is an IP address and why does it matter?

The system that orchestrates all this is called DNS. It works like a phone book for
IP addresses so that users can access web services using human-friendly domain
names. When a user types a domain name like ‘facebook.com’ into their browser
window, this begins a DNS query which ultimately leads to a DNS server
translating the domain name into an IP address.
What is an IP address and why does it matter?
What is the difference between IPv4 and IPv6?

IPv4 and IPv6 are different versions of the Internet Protocol. IPv4 was implemented in 1983
and is still in use today. The format for IPv4 addresses is four sets of numbers separated by
dots, for example: ‘192.0.2.1’. This is a 32-bit format, which means that it allows for 232, or
about 4.3 billion, unique IP addresses, which it turns out is not enough for the amount of
devices that are now on the Internet. The need for more IP addresses led to the
implementation of IPv6.* IPv6 addresses use a more complex format that utilizes sets of
numbers and letters separated by single or double colons, for example:
‘2001:0db8:85a3:0000:0000:8a2e:0370:7334’. This 128-bit format can support 2128 unique
addresses. (That computes to a 39-digit number!)

IPv6 provides some other updates to IPv4, including security and privacy improvements.
Despite their differences, both IPv4 and IPv6 have been used concurrently on the web for
over a decade. The two versions can run in parallel, but special measures had to be
implemented to facilitate communications between IPv4 and IPv6 devices. This compromise
had to be made because so much of the web is still running on IPv4 addresses.
What is the difference between static IPs and dynamic IPs?

The limited supply of IPv4 addresses led to the introduction of


dynamically assigning IP addresses, which is still a very common
practice. Most devices connected to the Internet are assigned
temporary IP addresses.
For example, when a home user connects to the Internet on their
laptop, that user’s ISP assigns them a temporary IP address from a
pool of shared IP addresses. This is known as a dynamic IP
address. This is more cost-effective for the ISP than assigning each
user a permanent, or static, IP address.
What is the difference between static IPs and dynamic IPs?
What is the difference between static IPs and dynamic IPs?

Some ISP customers, such as large enterprises, will pay to


maintain a static IP address (for example, Cloudflare’s
1.1.1.1). However, for most users, having a dynamic IP
address is sufficient. When hosting a web server, such as a
self-hosted website, API, or gaming server, a dynamic IP
address can create problems. A change in IP address can
cause their DNS queries to fail, effectively taking the
resource offline.
IPV4 datagram format

The network layer is the third layer (from bottom) in the OSI Model. The network
layer is concerned with the delivery of a packet across multiple networks. The
network layer is considered the backbone of the OSI Model. It selects and
manages the best logical path for data transfer between nodes. This layer
contains hardware devices such as routers, bridges, firewalls, and switches, but it
actually creates a logical image of the most efficient communication route and
implements it with a physical medium. Network layer protocols exist in every host
or router. The router examines the header fields of all the IP packets that pass
through it. Internet Protocol and Netware IPX/SPX are the most common protocols
associated with the network layer. In the OSI model, the network layer responds to
requests from the layer above it (transport layer) and issues requests to the layer
below it (data link layer). Responsibilities of Network Layer:
IPV4 datagram format

here are two types of network transmission techniques, circuit


switched network and packet switched network. Circuit Switch vs
Packet Switch In circuit switched network, a single path is
designated for transmission of all the data packets. Whereas in
case of a packet-switched network, each packet may be sent
through a different path to reach the destination. In a circuit
switched network, the data packets are received in order whereas
in a packet switched network, the data packets may be received
out of order. The packet switching is further subdivided into Virtual
circuits and Datagram.
IPV4 datagram format

IPv4: IPv4 is a connectionless protocol used for packet-switched networks. It operates on a


best-effort delivery model, in which neither delivery is guaranteed, nor proper sequencing or
avoidance of duplicate delivery is assured. Internet Protocol Version 4 (IPv4) is the fourth
revision of the Internet Protocol and a widely used protocol in data communication over
different kinds of networks. IPv4 is a connectionless protocol used in packet-switched layer
networks, such as Ethernet. It provides a logical connection between network devices by
providing identification for each device. There are many ways to configure IPv4 with all kinds
of devices – including manual and automatic configurations – depending on the network
type. IPv4 is defined and specified in IETF publication RFC 791. IPv4 uses 32-bit addresses
for Ethernet communication in five classes: A, B, C, D and E. Classes A, B and C have a
different bit length for addressing the network host. Class D addresses are reserved for
multicasting, while class E addresses are reserved for military purposes. IPv4 uses 32-bit
(4-byte) addressing, which gives 232 addresses. IPv4 addresses are written in the
dot-decimal notation, which comprises of four octets of the address expressed individually in
decimal and separated by periods, for instance, 192.168.1.5.
IPV4 datagram format

IPv4 Datagram Header Size of the header is 20 to 60 bytes.


IPV4 datagram format

VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4

HLEN: IP header length (4 bits), which is the number of 32 bit words in the header. The minimum
value for this field is 5 and the maximum is 15.

Type of service: Low Delay, High Throughput, Reliability (8 bits)

Total Length: Length of header + Data (16 bits), which has a minimum value 20 bytes and the
maximum is 65,535 bytes.

Identification: Unique Packet Id for identifying the group of fragments of a single IP datagram (16
bits)

Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more fragments flag
(same order)

Fragment Offset: Represents the number of Data Bytes ahead of the particular fragment in the
particular Datagram. Specified in terms of number of 8 bytes, which has the maximum value of
65,528 bytes.
IPV4 datagram format

Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop through the
network by restricting the number of Hops taken by a Packet before delivering to the
Destination.

Protocol: Name of the protocol to which the data is to be passed (8 bits)

Header Checksum: 16 bits header checksum for checking errors in the datagram header

Source IP address: 32 bits IP address of the sender

Destination IP address: 32 bits IP address of the receiver

Option: Optional information such as source route, record route. Used by the Network
administrator to check whether a path is working or not.

Due to the presence of options, the size of the datagram header can
be of variable length (20 bytes to 60 bytes).
IP CLASSES (CLASSFUL ADDRESS)

Internet Protocol hierarchy contains several classes of IP Addresses to be used


efficiently in various situations as per the requirement of hosts per network. Broadly,
the IPv4 Addressing system is divided into five classes of IP Addresses. All the five
classes are identified by the first octet of IP Address.

The first octet referred here is the left most of all. The octets numbered as follows
depicting dotted decimal notation of IP Address −
The number of networks and the number of hosts per class can be derived by this
formula −

When calculating hosts' IP addresses, 2 IP addresses are decreased because they


cannot be assigned to hosts, i.e. the first IP of a network is network number and the
last IP is reserved for Broadcast IP.
Class A Address
The first bit of the first octet is always set to 0 (zero). Thus the first octet ranges from 1 –
127, i.e.

Class A addresses only include IP starting from 1.x.x.x to 126.x.x.x only. The IP range
127.x.x.x is reserved for loopback IP addresses.

The default subnet mask for Class A IP address is 255.0.0.0 which implies that Class A
addressing can have 126 networks (27-2) and 16777214 hosts (224-2).

Class A IP address format is thus: 0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH


Class B Address
An IP address which belongs to class B has the first two bits in the first octet set to 10, i.e.

Class B IP Addresses range from 128.0.x.x to 191.255.x.x. The default subnet mask for Class B is
255.255.x.x.

Class B has 16384 (214) Network addresses and 65534 (216-2) Host addresses.

Class B IP address format is: 10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH


Class E Address
This IP Class is reserved for experimental purposes only for
R&D or Study.Class E addresses are reserved for research
purposes and future use. The first octet in a class E address
starts with ‘1111’. IP addresses in this class ranges from
240.0.0.0 to 255.255.255.254. Like Class D, this class too is not
equipped with any subnet mask.
Disadvantage of Classful Addressing:
1. Class A with a mask of 255.0.0.0 can support 128 Network, 16,777,216
addresses per network and a total of 2,147,483,648 addresses.
2. Class B with a mask of 255.255.0.0 can support 16,384 Network, 65,536
addresses per network and a total of 1,073,741,824 addresses.
3. Class C with a mask of 255.255.255.0 can support 2,097,152 Network,
256 addresses per network and a total of 536,870,912 addresses.

But what if someone requires 2000 addresses ?


One way to address this situation would be to provide the person
with class B network. But that would result in a waste of so many
addresses.
Another possible way is to provide multiple class C networks, but that
too can cause a problem as there would be too many networks to
handle.
CLASSLESS ADDRESS

To resolve problems like the one mentioned above CIDR was introduced.
Classless Inter-Domain Routing (CIDR):
CIDR or Class Inter-Domain Routing was introduced in 1993 to replace
classful addressing. It allows the user to use VLSM or Variable Length
Subnet Masks.

CIDR notation:
In CIDR subnet masks are denoted by /X. For example a subnet of
255.255.255.0 would be denoted by /24. To work a subnet mask in
CIDR, we have to first convert each octet into its respective binary value.
For example, if the subnet is of 255.255.255.0. then :
CLASSLESS ADDRESS

First Octet –
255 has 8 binary 1's when converted to binary
Second Octet –
255 has 8 binary 1's when converted to binary
Third Octet –
255 has 8 binary 1's when converted to binary
Fourth Octet –
0 has 0 binary 1's when converted to binary
Therefore, in total there are 24 binary 1’s, so the subnet mask is /24.
While creating a network in CIDR, a person has to make sure that the
masks are contiguous, i.e. a subnet mask like 10111111.X.X.X can’t exist.
CLASSLESS ADDRESS

With CIDR, we can create Variable Length Subnet Masks, leading to less
wastage of IP addresses. It is not necessary that the divider between the
network and the host portions is at an octet boundary. For example, in
CIDR a subnet mask like 255.224.0.0 or
11111111.11100000.00000000.00000000 can exist.
Difference between Classful Addressing and Classless Addressing
Difference between Classful Addressing and Classless Addressing
IPv4 ADDRESS

IPv4 supports three different types of addressing modes. −


Unicast Addressing Mode
In this mode, data is sent only to one destined host. The Destination Address field contains 32- bit IP address of
the destination host. Here the client sends data to the targeted server −
IPv4 ADDRESS

Broadcast Addressing Mode


In this mode, the packet is addressed to all the hosts in a network segment. The Destination
Address field contains a special broadcast address, i.e. 255.255.255.255. When a host sees
this packet on the network, it is bound to process it. Here the client sends a packet, which is
entertained by all the Servers −
IPv4 ADDRESS

Multicast Addressing Mode


This mode is a mix of the previous two modes, i.e. the packet sent is neither
destined to a single host nor all the hosts on the segment. In this packet, the
Destination Address contains a special address which starts with 224.x.x.x
and can be entertained by more than one host.

Here a server sends packets which are entertained by more than one
servers. Every network has one IP address reserved for the Network
Number which represents the network and one IP address reserved for
the Broadcast Address, which represents all the hosts in that network.
IPv4 ADDRESS
IPv4 ADDRESS

Hierarchical Addressing Scheme


IPv4 uses hierarchical addressing scheme. An IP address, which is 32-bits in length, is divided into
two or three parts as depicted −

A single IP address can contain information about the network and its
sub-network and ultimately the host. This scheme enables the IP
Address to be hierarchical where a network can have many
sub-networks which in turn can have many hosts.
IPv4 ADDRESS
IPv4 ADDRESS
IPv4 ADDRESS
Subnetting and supernetting

A computer network is a group of devices linked together to share


resources and data. Each network device has an id number known
as an IP address. Subnetting and Supernetting are two methods
for organizing IP addresses in a logical order based on the
situation. Subnetting is the technique of separating a network into
subnetworks, and supernetting combines small networks into an
extensive network. Subnetting increases the bits in network
addresses. On the other hand, supernetting increases the bits in
host addresses. It is intended to make the routing process easier,
decrease the routing table information size and require less RAM in
the router. FLSM and VLSM methods are utilized in subnetting, and
CIDR is utilized in supernetting.
Subnetting and supernetting

What is Subnetting?
Subnetting is a method of dividing a single physical network into numerous
smaller logical sub-networks. These subnetworks are referred to as subnets. An IP
address is formed by combining a network and host segments. A subnet is created
by accepting bits from the IP address host part and is used to split the original
network into smaller subnetworks.

The process of subnetting involves turning host bits into network bits. Its approach
was originally intended to slow the depletion of IP addresses. It permits the
administrator to split a single class A, class B, or class C network into smaller
sections. VLSM (Variable Length Subnet Mask) divides IP address space into
subnets of varying sizes while preventing memory waste. Furthermore, FLSM
(Fixed Length Subnet Mask) occurs when the number of hosts in subnets is the
same.
Subnetting

Advantages
1. Subnetting reduces broadcast volume and hence reduces network traffic.
2. The permitted host numbers in the local area network are increased by
subnetting.
3. Subnetworks are simple to handle and maintain.
4. The network security may easily be utilized amongst sub-networks
instead of using it on the entire network.
5. It increases the flexibility of address.
Disadvantages
1. You require a qualified administrator to perform the subnetting process.
2. The subnetting process is quite expensive.
Subnetting and supernetting

What is Supernetting?
Supernetting is the inverse of subnetting, in which many networks are combined
into a single network. During supernetting, the mask bits are moved to the left of
the default mask. It is sometimes referred to as router summarization and
aggregation. It leads to the production of more addresses at the cost of network
addresses, where network bits are essentially turned into host bits.

Supernetting is operated by internet service providers (ISPs) rather than regular


users to ensure the best IP address distribution. Classless Inter-Domain
Routing (CIDR) is a network routing method that is utilized to route network traffic
over the internet. CIDR is a supernetting technology in which many subnets are
joined for network routing. To put it another way, CIDR allows IP addresses to be
organized in subnetworks regardless of their value.
supernetting

Advantages
1. The router memory table size is reduced by condensing numerous
routing data entries into a single entry.
2. It also minimizes network traffic.
3. It also speeds up the lookup of routing tables.
4. It allows the router to isolate topology changes from other routers.
Disadvantages
1. The supernet's networks must all use the same IP address class.
2. The block combination should be constructed in power 2; if three
blocks are required, then four blocks must be assigned.
3. The entire network should be in the same class.
Key differences between Subnetting and Supernetting

1. 1.Subnetting splits a network into smaller networks. On the other


hand, Supernetting combines the subnetworks and merges them
into a single network.
2. 2.Subnetting decreases address depletion. On the other hand,
Supernetting speeds up the routing process.
3. 3.Mask bits are relocated to the right of the default mask during
subnetting. On the other hand, Supernetting shifts the mask bits to
the left of the normal mask.
4. 4.Subnetting transforms host bits into network bits and increases
the number of network bits. In contrast, supernetting converts
network bits to host bits and increases host bits numbers.
5. 5.Subnetting utilizes VLSM and FL techniques. In contrast,
supernetting utilizes CIDR.
Key differences between Subnetting and Supernetting
DHCP

Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that


automatically provides an Internet Protocol (IP) host with its IP address and
other related configuration information such as the subnet mask and default
gateway. In DHCP, port number 67 is used for the server and 68 is used for the
client.

DHCP allows a network administrator to supervise and distribute IP addresses


from a central point and automatically sends a new Internet Protocol (IP) address
when a computer is plugged into a different place in the network.

DHCP is an application layer protocol that provides −

● Subnet Mask
● Router Address
● IP Address
DHCP
DHCP

DHCP Discover Message − Client Requests DHCP


Information
● It is the first message produced by a client in the communication process
between the client and server with the target address 255.255.255.255
and the source address 0.0.0.0.
● This message is produced by the client host to discover if there are any
DHCP servers present in a network or not.
● The message might contain other requests like subnet mask, domain
name server, and domain name, etc.
● The message is broadcast to all the devices in a network to find the
DHCP server.
DHCP

DHCP Offer Message − DHCP Server Offers


Information to Client
● The DHCP server will reply/respond to the host in this message,
specifying the unleashed IP address and other TCP configuration
information.
● This message is broadcasted by the server.
● If there are more than one DHCP servers present in the network,
then the client host accepts the first DHCP OFFER message it
receives.
● Also, a server ID is specified in the packet to identify the server.
DHCP

DHCP Request Message − Client Accepts DHCP


Server Offer
● The Client receives the DHCP offer message from the DHCP
server that replied/responded to the DHCP discover message.
● After receiving the offer message, the client will compare the offer
that is requested, and then select the server it wants to use.
● The client sends the DHCP Request message to accept the offer,
showing which server is selected.
● Then this message is broadcast to the entire network to let all the
DHCP servers know which server was selected.
DHCP

DHCP Acknowledgment Message − DHCP server acknowledges the client and


leases the IP address.

● If a server receives a DHCP Request message, the server marks the


address as leased.
● Servers that are not selected will return the offered addresses to their
available pool.
● Now, the selected server sends the client an acknowledgment (DHCP
ASK), which contains additional configuration information.
● The client may use the IP address and configuration parameters. It
will use these settings till its lease expires or till the client sends a
DHCP Release message to the server to end the lease.
DHCP
DHCP Request, DHCP ACK Message − Client attempts to renew the lease

● The client starts to renew a lease when half of the lease time has passed.
● The client requests the renewal by sending a DHCP Request message to the
server.
● If the server accepts the request, it will send a DHC ACK message back to the
client.
● If the server does not respond to the request, the client might continue to use
the IP address and configuration information until the lease expires.
● As long as the lease is still active, the client and server do not need to go
through the DHCP Discover and DHCP Request process.
● When the lease has expired, the client must start over with the DHCP
Discover process.
DHCP

The client ends the lease −


DHCPRELEASE
● The client ends the lease by sending a DHCP
Release message to the DHCP server.
● The server will then return the client's IP address to
the available address pool and cancel any
remaining lease time.
NAT (network address translation)
The number of home users and small businesses that want to use the Internet is ever
increasing. In the beginning, a user was connected to the Internet with a dial-up line, which
means that she was connected for a specific period of time. An ISP with a block of addresses
could dynamically assign an address to this user. An address was given to a user when it was
needed. But the situation is different today. Home users and small businesses can be
connected by an ADSL line or cable modem. In addition, many are not happy with one address;
many have created small networks with several hosts and need an IP address for each host.
With the shortage of addresses, this is a serious problem. A quick solution to this problem is
called network address translation (NAT). NAT enables a user to have a large set of addresses
internally and one address, or a small set of addresses, externally. The traffic inside can use the
large set; the traffic outside, the small set.
NAT (network address translation)
all set. To separate the addresses used inside the home or business and the ones
used for the Internet, the Internet authorities have reserved three sets of addresses
as private addresses, shown in Table
NAT (network address translation)
Any organization can use an address out of this set without permission
from the Internet authorities. Everyone knows that these reserved
addresses are for private networks. They are unique inside the
organization, but they are not unique globally. No router will forward a
packet that has one of these addresses as the destination address. The
site must have only one single connection to the global Internet through
a router that runs the NAT software. Figure 19.10 shows a simple
implementation of NAT. As Figure 19.10 shows, the private network
uses private addresses. The router that connects the network to the
global address uses one private address and one global address. The
private network is transparent to the rest of the Internet; the rest of the
Internet sees only the NAT router with the address 200.24.5.8
NAT (network address translation)
NAT (network address translation)
All the outgoing packets go through the NAT router, which replaces the source
address in the packet with the global NAT address. All incoming packets also pass
through the NAT router, which replaces the destination address in the packet (the
NAT router global address) with the appropriate private address. Figure 19.11 shows
an example of address translation
NAT (network address translation)
Translation Table The reader may have noticed that translating the source
addresses for outgoing packets is straightforward. But how does the NAT
router know the destination address for a packet coming from the Internet?
There may be tens or hundreds of private IP addresses, each belonging to
one specific host. The problem is solved if the NAT router has a translation
table. Using One IP Address In its simplest fonn, a translation table has only
two columns: the private' address and the external address (destination
address of the packet). When the router translates the source address of
the outgoing packet, it also makes note of the destination address-where
the packet is going. When the response comes back from the destination,
the router uses the source address of the packet (as the external address)
to find the private address of the packet. Figure 19.12 shows the idea. Note
that the addresses that are changed (translated) are shown in color
NAT (network address translation)
NAT (network address translation)
In this strategy, communication must always be initiated by the private network. The
NAT mechanism described requires that the private network start the
communication. As we will see, NAT is used mostly by ISPs which assign one single
address to a customer. The customer, however, may be a member of a private
network that has many private addresses. In this case, communication with the
Internet is always initiated from the customer site, using a client program such as
HTTP, TELNET, or FTP to access the corresponding server program. For example,
when e-mail that originates from a noncustomer site is received by the ISP e-mail
server, the e-mail is stored in the mailbox of the.customer until retrieved. A private
network cannot run a server program for clients outside of its network if it is using
NAT technology. Using a Pool ofIP Addresses Since the NAT router has only one
global address, only one private network host can access the same external host. To
remove this restriction, the NAT router uses a pool of global addresses.
NAT (network address translation)
For example, instead of using only one global address (200.24.5.8), the NAT
router can use four addresses (200.24.5.8, 200.24.5.9, 200.24.5.10, and
200.24.5.11). In this case, four private network hosts can communicate with
the same external host at the same time because each pair of addresses
defines a connection. However, there are still some drawbacks. In this
example, no more than four connections can be made to the same
destination. Also, no private-network host can access two external server
programs (e.g., HTTP and FfP) at the same time. Using Both IP Addresses
and Port Numbers To allow a many-to-many relationship between
private-network hosts and external server programs, we need more
information in the translation table. For example, suppose two hosts with
addresses 172.18.3.1 and 172.18.3.2 inside a private network need to
access the HTTP server on external host
NAT (network address translation)
25.8.3.2. Ifthe translation table has five columns, instead of two, that
include the source and destination port numbers ofthe transport layer
protocol, the ambiguity is eliminated. We discuss port numbers in Chapter
23. Table 19.4 shows an example of such a table.
NAT (network address translation)
Note that when the response from HTTP comes back, the combination of
source address (25.8.3.2) and destination port number (1400) defines
the-private network host to which the response should be directed. Note
also that for this translation to work, the temporary port numbers (1400 and
1401) must be unique.

Advantages of NAT –
● NAT conserves legally registered IP addresses.
● It provides privacy as the device’s IP address, sending and receiving the traffic,
will be hidden.
● Eliminates address renumbering when a network evolves.
NAT (network address translation)
DISADVANTAGES OF NAT

● Translation results in switching path delays.


● Certain applications will not function while NAT is enabled.
● Complicates tunneling protocols such as IPsec.
● Also, the router being a network layer device, should not
tamper with port numbers(transport layer) but it has to do so
because of NAT.
IPv6 Datagram Format
The wonder of IPv6 lies in its header. An IPv6 address is 4
times larger than IPv4, but surprisingly, the header of an IPv6
address is only 2 times larger than that of IPv4. IPv6 headers
have one Fixed Header and zero or more Optional (Extension)
Headers. All the necessary information that is essential for a
router is kept in the Fixed Header. The Extension Header
contains optional information that helps routers to understand
how to handle a packet/flow.
IPv6 Datagram Format
IPv6 fixed header is 40 bytes long and contains the following information
IPv6 Datagram Format
IPv6 Datagram Format
IPv6 Datagram Format
Extension Headers
In IPv6, the Fixed Header contains only that much information which is necessary,
avoiding those information which is either not required or is rarely used. All such
information is put between the Fixed Header and the Upper layer header in the
form of Extension Headers. Each Extension Header is identified by a distinct
value.

When Extension Headers are used, IPv6 Fixed Header’s Next Header field points
to the first Extension Header. If there is one more Extension Header, then the first
Extension Header’s ‘Next-Header’ field points to the second one, and so on. The
last Extension Header’s ‘Next-Header’ field points to the Upper Layer Header.
Thus, all the headers points to the next one in a linked list manner.
IPv6 Datagram Format
If the Next Header field contains the value 59, it indicates that there are no headers
after this header, not even Upper Layer Header.

The following Extension Headers must be supported as per RFC 2460:


IPv6 Datagram Format
The sequence of Extension Headers should be:
IPv6 Datagram Format
These headers:

● 1. should be processed by First and subsequent destinations.


● 2. should be processed by Final Destination.

Extension Headers are arranged one after another in a linked list manner, as depicted
in the following diagram:
Transition from IPv4 to IPv6 address
In the current scenario, the IPv4 address is exhausted and IPv6 had come to
overcome the limit.

Various organization is currently working with IPv4 technology and in one day
we can’t switch directly from IPv4 to IPv6. Instead of only using IPv6, we use
combination of both and transition means not replacing IPv4 but co-existing of
both.

When we want to send a request from an IPv4 address to an IPv6 address,


but it isn’t possible because IPv4 and IPv6 transition is not compatible. For a
solution to this problem, we use some technologies. These technologies are
Dual Stack Routers, Tunneling, and NAT Protocol Translation. These are
explained as following below.
Transition from IPv4 to IPv6 address
1. Dual-Stack Routers: In dual-stack router, A router’s interface is attached with IPv4 and
IPv6 addresses configured are used in order to transition from IPv4 to IPv6.

In this above diagram, A given server with both IPv4 and IPv6 addresses configured can
communicate with all hosts of IPv4 and IPv6 via dual-stack router (DSR). The dual stack
router (DSR) gives the path for all the hosts to communicate with the server without
changing their IP addresses.
Transition from IPv4 to IPv6 address
2. Tunneling: Tunneling is used as a medium to communicate the transit network with the
different IP versions.In this diagram, the different IP versions such as IPv4 and IPv6 are
present. The IPv4 networks can communicate with the transit or intermediate network on
IPv6 with the help of the Tunnel. It’s also possible that the IPv6 network can also
communicate with IPv4 networks with the help of a Tunnel.
Transition from IPv4 to IPv6 address
3. NAT Protocol Translation: With the help of the NAT Protocol Translation technique,
the IPv4 and IPv6 networks can also communicate with each other which do not
understand the address of different IP version. Generally, an IP version doesn’t
understand the address of different IP version, for the solution of this problem we use
NAT-PT device which removes the header of first (sender) IP version address and add
the second (receiver) IP version address so that the Receiver IP version address
understand that the request is sent by the same IP version, and its vice-versa is also
possible.
Transition from IPv4 to IPv6 address

In the above diagram, an IPv4 address communicates


with the IPv6 address via a NAT-PT device to
communicate easily. In this situation, the IPv6 address
understands that the request is sent by the same IP
version (IPv6) and it responds.

You might also like