ACN Chapter 1
ACN Chapter 1
ACN Chapter 1
• 32 bit number
• 4 octets
• Limitation : 4294967296 (232) addresses
• It is described in RFC 761 September 1981
• commonly in use today
• e.g. 172.115.56.48
Dynamic
• Dynamic IP addresses are assigned by ISP using DHCP
• Available IP address is assigned to a device when it is connected to the
network, after the session expiry the IP address released for other
device's use.
• Effective use of IP addresses is an advantage of Dynamic IP address
assigning.
• Since, the IP address changes frequently, it become not traceable.
Logical Addresses
• Logical addresses are used by networking software to allow packets to be
independent of the physical connection of the network, that is, to work with
different network topologies and types of media.
• A logical address in the Internet is currently a 32-bit address that can
uniquely define a host connected to the Internet. An internet address in IPv4
in decimal numbers 132.24.75.9
• No two publicly addressed and visible hosts on the Internet can have the
same IP address.
• The logical addresses can be either unicast (one single recipient), multicast (a
group of recipients), or broadcast (all systems in the network). There are
limitations on broadcast addresses.
Port Addresses
• There are many applications running on the computer. Each application run
with a port no.(logically) on the computer.
• A port number is part of the addressing information used to identify the
senders and receivers of messages.
• Port numbers are most commonly used with TCP/IP connections.
• These port numbers allow different applications on the same computer to
share network resources simultaneously.
• Example: a port address is a 16-bit address represented by one decimal
number 753.
Application-Specific Addresses
• Some applications have user-friendly addresses that are designed for that
specific application.
• Examples include the e-mail address (for example, forouzan@fhda.edu) and
the Universal Resource Locator (URL) (for example, www.mhhe.com). The
first defines the recipient of an e-mail; the second is used to find a document
on the World Wide Web.
IP Addressing
An Internet Protocol address (IP address) is a logical numeric address that is
assigned to every single computer, printer, switch, router or any other device that is
part of a TCP/IP-based network.
The IP address is the core component on which the networking architecture is built;
no network exists without it.
An IP address is a logical address that is used to uniquely identify every node in the
network. Because IP addresses are logical, they can change.
They are similar to addresses in a town or city because the IP address gives the
network node an address so that it can communicate with other nodes or networks,
just like mail is sent to friends and relatives.
• Network ID
• Host ID
Classful Addressing
The class of IP address is used to determine the bits used for network ID and host
ID and the number of total networks and hosts possible in that particular class. Each
ISP or network administrator assigns IP address to each device that is connected to
its network.
Note: While finding the total number of host IP addresses, 2 IP addresses are not
counted and are therefore, decreased from the total count because the first IP
address of any network is the network number and whereas the last IP address is
reserved for broadcast IP.
Class A:
IP address belonging to class A are assigned to the networks that contain a large
number of hosts.
• The network ID is 8 bits long.
• The host ID is 24 bits long.
The higher order bit of the first octet in class A is always set to 0.
The remaining 7 bits in first octet are used to determine network ID.
The 24 bits of host ID are used to determine the host in any network. The default
subnet mask for class A is 255.x.x.x. Therefore, class A has a total of:
• 2^7= 128 network ID
• 2^24 – 2 = 16,777,214 host ID
IP addresses belonging to class A ranges from 0.x.x.x – 127.x.x.x
Class B:
IP address belonging to class B are assigned to the networks that ranges from
medium-sized to large-sized networks.
• The network ID is 16 bits long.
• The host ID is 16 bits long.
The higher order bits of the first octet of IP addresses of class B are always set to
10. The remaining 14 bits are used to determine network ID. The 16 bits of host ID
is used to determine the host in any network. The default sub-net mask for class B is
255.255.x.x. Class B has a total of:
• 2^14 = 16384 network address
• 2^16 – 2 = 65534 host address
IP addresses belonging to class B ranges from 128.0.x.x – 191.255.x.x.
Class C:
IP address belonging to class C are assigned to small-sized networks.
• The network ID is 24 bits long.
• The host ID is 8 bits long.
The higher order bits of the first octet of IP addresses of class C are always set to
110. The remaining 21 bits are used to determine network ID. The 8 bits of host ID
is used to determine the host in any network. The default sub-net mask for class C is
255.255.255.x. Class C has a total of:
• 2^21 = 2097152 network address
• 2^8 – 2 = 254 host address
IP addresses belonging to class C ranges from 192.0.0.x – 223.255.255.x.
Class D:
IP address belonging to class D are reserved for multi-casting. The higher order bits
of the first octet of IP addresses belonging to class D are always set to 1110. The
remaining bits are for the address that interested hosts recognize.
Class D does not posses any sub-net mask. IP addresses belonging to class D ranges
from 224.0.0.0 – 239.255.255.255.
Class E:
IP addresses belonging to class E are reserved for experimental and research
purposes. IP addresses of class E ranges from 240.0.0.0 – 255.255.255.254.
This class doesn’t have any sub-net mask. The higher order bits of first octet of
class E are always set to 1111.
Classful addressing :
Using a classful IP addressing format worked well when the Internet was
relatively small. But as the number of networks on the Internet grew, the
limitations of classful addresses became apparent. The Class A address space
contains only 125 usable networks in the range 0–127 because networks 0
and 127 are reserved, and network 10 is used for private addressing. Each of
these 125 Class A networks could theoretically contain 224 – 2 or 16,777,214
hosts, but it's not realistic to have more than 16 million hosts on the same
network. Therefore, in the early 1990s, the Internet moved away from a
classful address space to a classless address space. In other words, the
number of bits used for the network portion of an IP address became variable
instead of fixed.
The network portion of classful IP addresses is fixed. For the network portion
of an IP address, Class A addresses use 8 bits, Class B addresses use 16
bits, and Class C addresses use 24 bits. A router could determine the address
class by inspecting the first byte of the address. A value of 1–126 is Class A,
128–191 is Class B, and 192–223 is Class C.
There are two common ways to refer to the mask that is used to determine the
number of bits used for the network component of an IP address. The first is to
use the number of 1 bits in the mask. A Class A mask is an 8-bit mask, Class
B is a 16- bit mask, and Class C is a 24-bit mask. The other way is to
represent the mask as / (slash) and then the number of 1 bits in the mask.
Class A is /8 (slash 8), Class B is /16 (slash 16), and Class C is /24 (slash 24).
An important rule is that the number of 1s and 0s in a mask must be
contiguous (all the 1s must be together and all the 0s must be together). For
example:
A * 0 = 0 where A = 0 or 1
156.26.32.1
AND
255.255.0.0
Equals
156.26.0.0
This might seem like a trivial operation. For classful addresses, this is a fair
statement because the network component is on an easy-to-use byte
boundary. But you want to be able to switch from classful to classless
addressing, and you will need a mask to do that.
IP Address = 156.26.0.0
If you use 2 additional bits, or a /18 bit mask, you will have four subnets. These
four subnets are identified by the four values possible with 2 bits:
00
01
10
11
The second subnet is determined by calculating the value of the third byte
when the most significant bits are 0 1:
0 1 0 0 0 0 0 0 = 64
The third subnet is determined by calculating the value of the third byte when
the most significant bits are 1 0:
1 0 0 0 0 0 0 0 = 128
And the fourth subnet is determined by calculating the value of the third byte
when the most significant bits are 1 1:
1 1 0 0 0 0 0 0 = 192
Class A Subnets
In Class A, only the first octet is used as Network identifier and rest of three
octets are used to be assigned to Hosts (i.e. 16777214 Hosts per Network).
To make more subnet in Class A, bits from Host part are borrowed and the
subnet mask is changed accordingly.
For example, if one MSB (Most Significant Bit) is borrowed from host bits of
second octet and added to Network address, it creates two Subnets (2 1=2)
with (223-2) 8388606 Hosts per Subnet.
Class B Subnets
By default, using Classful Networking, 14 bits are used as Network bits
providing (214) 16384 Networks and (216-2) 65534 Hosts. Class B IP
Addresses can be subnetted the same way as Class A addresses, by
borrowing bits from Host bits. Below is given all possible combination of
Class B subnetting:
Class C Subnets
Class C IP addresses are normally assigned to a very small size network
because it can only have 254 hosts in a network. Given below is a list of all
possible combination of subnetted Class B IP address:
Network Address Translation
(NAT)
To access Internet, one public IP address is needed, but we can use private
IP address in our private network. The idea of NAT is to allow multiple
devices to access Internet through a single public address. To achieve this,
translation of private IP address to a public IP address is required. Network
Address Translation (NAT) is a process in which one or more local IP address
is translated into one or more Global IP address and vice versa in order to
provide Internet access to the local hosts. Also, it does the translation of port
numbers i.e. masks the port number of the host with another port number, in
the packet that will be routed to destination. It then makes the corresponding
entries of ip address and port number in the NAT table. NAT generally
operates on router or firewall.
Suppose, if there are 3000 devices who needs access to 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 are not free, then the packet will be dropped as only fixed number of private IP
address can be translated to public addresses.
Suppose, if there is 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 are 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 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.
Supernetting
Internet Protocol
• The Internet Protocol is a protocol or set of rules, for routing data packets
across the network and reached towards its destination.
• Data Travels on the internet that divided in to smaller chunks, called as
Packets. IP information is attached to the packets and that helps the router to
route the packets towards its Destination.
• Every device that connected on the internet has IP address and packets are
directed towards the IP address.
• Internet Protocol is connectionless and unreliable protocol. It ensures no
guarantee of successfully transmission of data.
• In order to make it reliable, it must be paired with reliable protocol such as
TCP at the transport layer.
• Internet protocol transmits the data in form of a datagram Format as shown
in the following diagram:
Header Format