Unit 2 ACN
Unit 2 ACN
Unit 2 ACN
So, what about the devices that require internet access from within the organization or
home? There may be a few devices to hundreds or even thousands of devices that require an
internet connection and an IP address to communicate to the internet from within a company. If
ISPs give their customers a single public IPv4 address on their modem or router, how can this
single public IPv4 address serve more than one device from within the organization or home?
The internet gateway or router is usually configured with Network Addresses Translation (NAT),
which is the method of mapping either a group of IP addresses or a single IP address on the
internet-facing interface to the local area network (LAN). For any devices that are behind the
internet gateway that want to communicate with another device on the internet, NAT will
translate the sender’s source IP address to the public IPv4 address. Therefore, all of the devices
on the internet will see the public IPv4 address and not the sender’s actual IP address.
Private IPv4 addresses
As defined by RFC 1918, there are three classes of private IPv4 address that are allocated for
private use only. This means within a private network such as LAN. The benefit of using the
private address space (RFC 1918) is that the classes are not unique to any particular organization
or group. They can be used within an organization or a private network. However, on the
internet, the public IPv4 address is unique to a device. This means that if a device is directly
connected to the internet with a private IPv4 address, there will be no network connectivity to
devices on the internet. Most ISPs usually have a filter to prevent any private addresses (RFC
1918) from entering their network.
The private address space is divided into three classes:
Class A—10.0.0.0/8 network block 10.0.0.0 – 010.255.255.255
Class B—172.16.0.0/12 network block 172.16.0.0 – 172.31.255.255
Class C—192.168.0.0/16 network block 192.168.0.0 – 192.168.255.255
Notations
numbers, each ranging from 0 to 255, separated by dots, e.g., 172.16.254.1. Each part represents
a group of 8 bits (an octet) of the address. In some cases of technical writing,[specify] IPv4
addresses may be presented in various hexadecimal, octal, or binary representations.
Classful Addressing:
Introduced in 1981, with classful routing, IP v4 addresses were divided into 5 classes(A to E).
Classes A-C: unicast addresses
Class D: multicast addresses
Class E: reserved for future use
Class A
In a class A address, the first bit of the first octet is always ‘0’. Thus, class A addresses
range from 0.0.0.0 to 127.255.255.255(as 01111111 in binary converts to 127 in decimal).
The first 8 bits or the first octet denote the network portion and the rest 24 bits or the 3
octets belong to the host portion.
Example: 10.1.1.1
Exception:
- 127.X.X.X is reserved for loopback
- 0.X.X.X is reserved for default network
Therefore, the actual range of class A addresses is: 1.0.0.0 to 126.255.255.255
Class B
In a class B address, the first octet would always start with ’10’. Thus, class B addresses
range from 128.0.0.0 to 191.255.255.255. The first 16 bits or the first two octets denote the
network portion and the remaining 16 bits or two octets belong to the host portion.
Example: 172.16.1.1
Class C
In a class C address, the first octet would always start with ‘110’. Thus, class C addresses
range from 192.0.0.0 to 223.255.255.255. The first 24 bits or the first three octets denote
the network portion and the rest 8 bits or the remaining one octet belong to the host portion.
Example: 192.168.1.1
Class D
Class D is used for multicast addressing and in a class D address the first octet would
always start with ‘1110’. Thus, class D addresses range from 224.0.0.0 to 239.255.255.255.
Example: 239.2.2.2
Class D addresses are used by routing protocols like OSPF, RIP, etc.
Class E
Class E addresses are reserved for research purposes and future use. The first octet in a
class E address starts with ‘1111’. Thus, class E addresses range from 240.0.0.0 to
255.255.255.255.
Disadvantage of Classful Addressing:
1. Class A with a mask of 255.0.0.0 can support 16, 777, 214 addresses
2. Class B with a mask of 255.255.0.0 can support 65, 534 addresses
3. Class C with a mask of 255.255.255.0 can support 254 addresses
Classless Addressing-
CIDR Block-
When a user asks for specific number of IP Addresses,
CIDR dynamically assigns a block of IP Addresses based on certain rules.
This block contains the required number of IP Addresses as demanded by the user.
This block of IP Addresses is called as a CIDR block.
Rules For Creating CIDR Block-
Inside local address – An IP address that is assigned to a host on the Inside (local) network.
The address is probably not a IP address assigned by the service provider i.e., these are
private IP address. This is the inside host seen from the inside network.
Inside global address – IP address that represents one or more inside local IP addresses to
the outside world. This is the inside host as seen from the outside network.
Outside local address – This is the actual IP address of the destination host in the local
network after translation.
Outside global address – This is the outside host as seen form the outside network. It is the
IP address of the outside destination host before translation.
Network Address Translation (NAT) Types –
There are 3 ways to configure NAT:
1. Static NAT – In this, a single unregistered (Private) IP address is mapped with a legally
registered (Public) IP address i.e one-to-one mapping between local and global address. This
is generally used for Web hosting. These are not used in organisations as there are many
devices who will need Internet access and to provide Internet access, the public IP address is
needed.
Suppose, if there are 3000 devices who need access to the Internet, the organisation have to
buy 3000 public addresses that will be very costly.
2. Dynamic NAT – In this type of NAT, an unregistered IP address is translated into a
registered (Public) IP address from a pool of public IP address. If the IP address of pool is
not free, then the packet will be dropped as an only a fixed number of private IP address can
be translated to public addresses.
Suppose, if there is a pool of 2 public IP addresses then only 2 private IP addresses can be
translated at a given time. If 3rd private IP address wants to access Internet then the packet
will be dropped therefore many private IP addresses are mapped to a pool of public IP
addresses. NAT is used when the number of users who wants to access the Internet is fixed.
This is also very costly as the organisation have to buy many global IP addresses to make a
pool.
3. Port Address Translation (PAT) – This is also known as NAT overload. In this, many local
(private) IP addresses can be translated to a single registered IP address. Port numbers are
used to distinguish the traffic i.e., which traffic belongs to which IP address. This is most
frequently used as it is cost-effective as thousands of users can be connected to the Internet
by using only one real global (public) IP address.
Advantages of NAT –
NAT conserves legally registered IP addresses .
It provides privacy as the device IP address, sending and receiving the traffic, will be hidden.
Eliminates address renumbering when a network evolves.
Disadvantage of NAT –
Translation results in switching path delays.
Certain applications will not function while NAT is enabled.
Complicates tunneling protocols such as IPsec.
Also, router being a network layer device, should not tamper with port numbers (transport
layer) but it has to do so because of NAT.6
A link local address is required on every IP6 interface even if no routing is present.
Unique Local
Unique Local are meant to be used inside an internal network.
They are routed on the Internal network but not routed on the Internet.
They are equivalent to the IPv4 addresses are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16
The address space is divided into two /8 spaces: fc00::/8 for globally assigned addressing,
and fd00::/8 for locally assigned addressing.
For manually assignment by an organisation use the fd00 prefix.
Using IPv6 Addresses in URLs
On IPv4 networks you can access a network rsource e.g. a web page using the format
http://192.168.1.21/webpage
However IPv6 addresses contain a colon as separator and so must be enclosed in square brackets.
http://[IPv6 address]/webpage.
INTERNETWORKING
The physical layer and the data link layer of the particular network locally.These two layers are
used for the delivery of the data on the network from one node to the other node.
The internetwork is made of five networks-4 LANs and 1 WAN.
Internetworking
Need for Network Layer-
To solve the problem of the delivery through different links the network or the internetwork
layer was designed.The network layer is responsible for host to host delivery and for the
routing of the packets through switches.
When the packet arrives the switch consults its routing table and then finds the interface.e
from which the packet must be sent.Then the packet after some changes in the header with the
routing informations are passed to the data link layer.The network layer at the destination is
responsible for some address verification.
Internet as a Datagram Network
The internet at the network layer is the packet switched network.The internet has been chosen as
the datagram approach to the switching in the network layer.It uses the universal addresses
defined in the network layer to route packets from the source to the destination.The switching at
the network layer in the internet uses the datagram approach to the packet switching.Packets in
the IPv4 layer are called as datagrams.
datagram map
Internet as a Connectionless Network-
The delivery of the packet can be accomplished by connection oriented or connection less
network.In the connection oriented the source first makes the connection with the destination
before sending the packet.after the connection is established a sequence of the packets from same
source to the destination are sent one after the other in the sequential manner.when all the packet
data are sent the connection is terminated.
Fragmentation
A datagram can flow through different networks.Each router decodes the Ipv4 datagram from the
frame it receives then processes it further encaptulates it in the other frame.The size of the frame
received depends on the protocol used by the physical layer through which the frame travelled.
Checksum
The implementation of the checksum in the IPv4 packet follows the same principles.
The value of the checksum field is set to 0.
The header is divided into 16 bit sections and then added together.The result is complemented
then inserted into the chechsum field.
The checksum in the IPv4 covers only the packets not data.
Options
The header of the Ipv4 datagram is made up of the two parts
fixed part
variable part.
The fixed part is 20 bytes long and the variable part is around 40 bytes long.
Option as the signifies that are not required by the datagram.They can be used for the network
testing and debugging.The options are not required for the Ipv4 header option processing is
required for the Ipv4 software.
.IPv6
Advantages
1.Larger address space
2.Better header format
3.New options to allow functionality
4.Allowance for extension
5.support for more security
Packet Format
Each packet is compised of the base header followed by the payload.The payload consists of the
two parts-
1.optional extention header
2.data from the upper header
Extension Headers
The length of the base header is fixed at 40 bytes.To give greater functionality to the IP datagram
the base headers can be followed by upto six extension headers.May be these headers are the
options in the IPv6.
TRANSITION FROM IPv4 TO IPv6
Due to the huge number of the systems on the internet the transition from IPv4 to IPv6 can’t
happen suddenly.It takes considerable amount of the time before every system in the internet can
move from IPv4 toIPv6,The transition must be smooth to prevent any losses in the system.