Internet Protocols and Addressing
Internet Protocols and Addressing
Addressing
MODULE - 3
What is DNS?
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?
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 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
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.
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.
Header Checksum: 16 bits header checksum for checking errors in the datagram header
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)
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 −
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 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.
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
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
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
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.
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
● Subnet Mask
● Router Address
● IP Address
DHCP
DHCP
● 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
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
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.
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.
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