Unit 2 Addressing Scheme
Unit 2 Addressing Scheme
Unit 2 Addressing Scheme
ADDRESSING SCHEME:
Four levels of addresses are used in an internet using the TCP/IP protocols:
o Physical (link) addresses
o Logical (IP) addresses
o Port addresses
o Specific addresses
Each address is related to a specific layer in the TCP/IP architecture, as shown in Figure
below:
Physical Addresses:
o The physical address, also known as the link address, is the address of a node as
defined by its LAN or WAN.
o It is included in the frame used by the data link layer.
o It is the lowest-level address.
O The size and format of these addresses change depending on the network.
o Most local-area networks use a 48-bit (6-byte) physical address written as 12
hexadecimal digits;
o Every byte (2 hexadecimal digits) is separated by a colon, as shown below:
07:01:02:01:2C:4B
Logical Addresses
o Logical addresses are necessary for universal communications that are independent
of physical networks.
o A universal addressing system is needed in which each host can be identified
uniquely, regardless of the underlying physical network.
o The logical addresses are designed for this purpose.
o A logical address in the Internet is currently a 32-bit address that can uniquely
define a host connected to the Internet.
o No two hosts on the Internet can have the same IP address.
Note that although physical addresses will change from nod to nod, logical
addresses remain the same from the source to destination.
Port Addresses
o The IP address and the physical address are necessary for a quantity of data to
travel from a source to the destination host.
o However, arrival at the destination host is not the final objective of data
communications on the Internet.
o A system that sends nothing but data from one computer to another is not complete.
o Today, computers are devices that can run multiple processes at the same
time.
o For example, computer A can communicate with computer C by using TELNET. At
the same time, computer A communicates with computer B by using the File
Transfer Protocol (FTP). For these processes to receive data simultaneously, we
need a method to label the different processes.
o In other words, they need addresses.
o In the TCP/IP architecture, the label assigned to a process is called a port
address.
o A port address in TCP/IP is 16 bits in length.
Specific Addresses
o Some applications have user-friendly addresses that are designed for that specific
address.
o Examples include the e-mail address (for example, [email protected]).
IP Address scheme:
Logical Addresses
o A computer somewhere in the world needs to communicate with another computer
somewhere else in the world.
o Usually, computers communicate through the Internet.
o The packet transmitted by the sending computer may pass through several LANs or
WANs before reaching the destination computer.
o For this level of communication, we need a global addressing scheme; we call this
logical addressing.
o Today, we use the term IP address to mean a logical address in the network
layer of the TCP/IP protocol suite.
o The Internet addresses are 32 bits in length; this gives us a maximum of 232
addresses.
o These addresses are referred to as IPv4 (IP version 4) addresses or simply IP
addresses.
o The need for more addresses, in addition to other concerns about the IP layer,
motivated a new design of the IP layer called the new generation of IP or IPv6 (lP
version 6).
o In this version, the Internet uses 128-bit addresses that give much greater flexibility
in address allocation.
o These addresses are referred to as IPv6 (IP version 6) addresses.
o Here, we first discuss IPv4 addresses, which are currently being used in the
Internet.
o We then discuss the IPv6 addresses, which may become dominant in the future.
IPv4 ADDRESSES
1. An IPv4 address is a 32-bit long address.
2. It’s uniquely and universally identifies a device.
3. IPv4 addresses are unique.
IPv6 ADDRESSES
o An IPv6 address consists of 16 bytes (octets); it is 128 bits long.
o In this notation, 128 bits is divided into eight sections, each 2 bytes in length.
o They will be required to accommodate more number of nodes in future which may
not be able to accommodate by IPIV.
Addressing scheme means the process by which a node can send message to another
node.
An IP (Internet Protocol) address is a unique identifier for a node or host connection
on an IP network.
An IP address is a 32 bit binary number usually represented as 4 decimal values,
each representing 8 bits, in the range 0 to 255 separated by decimal points.
This is known as "dotted decimal" notation.
Example: 140.179.220.200
It is sometimes useful to view the values in their binary form.
Decimal 140. 179. 220. 200
Binary 10001100 . 10110011 . 11011100 . 11001000
Every IP address consists of two parts, one identifying the network and
another for identifying the node.
The Class of the address and the subnet mask determine which part belongs to
the network address and which part belongs to the node address.
The network address uniquely identifies each network.
Every machine on the same network shares that network address as part of its IP
address.
In the IP address 130.57.30.56, for example, the 130.57. is the network address.
The node address is assigned to, and uniquely identifies, each machine on a
network.
The part of the address must be unique because it identifies a particular machine.
In the sample IP address 130.57.30.56, the .30.56 is the node address.
ADDRESS CLASSES
The designers of the Internet decided to create classes of networks based on
network size.
For the small number of networks possessing a very large number of nodes, they
created the rank Class A network.
At the other extreme is the Class C network, reserved for the numerous networks
with a small number of nodes.
The class distinction for networks in between very large and very small is
predictably called a Class B network.
How one would subdivide an IP address into a network and node address is
determined by the class designation of one's network.
There are 5 different address classes. You can determine which class any IP
address is in by examining the first 4 bits of the IP address.
• Class A addresses begin with 0xxx, or 1 to 126 decimal.
• Class B addresses begin with 10xx, or 128 to 191 decimal.
• Class C addresses begin with 110x, or 192 to 223 decimal.
• Class D addresses begin with 1110, or 224 to 239 decimal.
• Class E addresses begin with 1111, or 240 to 254 decimal.
Addresses beginning with 01111111, or 127 decimal, are reserved for loopback and
for internal testing on a local machine.
You can test this: you should always be able to ping 127.0.0.1, which points to
yourself.
Class D addresses are reserved for multicasting.
Class E addresses are reserved for future use. They should not be used for host
addresses.
Now we can see how the Class determines, by default, which part of the IP
address belongs to the network (N) and which part belongs to the node (n).
• Class A -- NNNNNNNN.nnnnnnnn.nnnnnnn.nnnnnnn
• Class B -- NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn
• Class C -- NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn
In the example, 140.179.220.200 is a Class B address so by default the Network
part of the address (also known as the Network Address) is defined by the first two
octets (140.179.x.x) and the node part is defined by the last 2 octets (x.x.220.200).
In our example, 140.179.0.0 specifies the network address for 140.179.220.200.
When the node section is set to all "1"s, it specifies a broadcast that is sent to all
hosts on the network.
140.179.255.255 specifies the example broadcast address. Note that this is true
regardless of the length of the node section.
Multicasting
Some processes sometimes need to send the same message to a large number of
receivers simultaneously. This is called multicasting, which is a one-to-many
communication.
In multicast communication, there is one source and a group of destinations.
In this type of communication, the source address is a unicast address, but the
destination address is a group address, which defines one or more destinations.
The group address identifies the members of the group.
Figure below shows the idea behind multicasting.
A multicast packet starts from the source S1 and goes to all destinations that belong
to group G1.
Broadcasting
In broadcast communication, the relationship between the source and the
destination is one-to-all.
There is only one source, but all the other hosts are the destinations.
The Internet does not explicitly support broadcasting because of the huge amount
of traffic it would create and because of the bandwidth it would need.
Imagine the traffic generated in the Internet if one person wanted to send a
message to everyone else connected to the Internet.
Subnet Masks
o IP addresses are actually 32-bit binary numbers (for example, 11000000 10101000
00000001 00010100).
o Each 32-bit IP address consists of two sub-addresses, one identifying the network
and the other identifying the host to the network, with an imaginary boundary
separating the two.
o The location of the boundary between the network and host portions of an IP
address is determined through the use of a subnet mask.
o A subnet mask is another 32-bit binary number, which acts like a filter when
it is applied to the 32-bit IP address.
o By comparing a subnet mask with an IP address, systems can determine which
portion of the IP address relates to the network, and which portion relates to the
host.
o Anywhere the subnet mask has a bit set to "1", the underlying bit in the IP
address is part of the network address.
o Anywhere the subnet mask is set to "0", the related bit in the IP address is
part of the host address.
o For example, assume that the IP address 11000000 10101000 00000001
00010100 has a subnet mask of 11111111 11111111 11111111 00000000.
o In this example, the first 24 bits of the 32-bit IP address are used to identify the
network, while the last 8 bits are used to identify the host on that network.
o The size of a network (i.e., the number of host addresses available for use on it)
is a function of the number of bits used to identify the host portion of the address.
o If a subnet mask shows that 8 bits are used for the host portion of the address
block, a maximum of 256 possible host addresses are available for that specific
network.
o Similarly, if a subnet mask shows that 16 bits are used for the host portion of the
address block, a maximum of 65,536 possible host addresses are available for use
on that network.
Now suppose, if a network administrator wants to split a single network into
multiple virtual networks, the bit-pattern in use with the subnet mask can be
o For example, assume that we want to split the 24-bit 192.168.10.0 network
(which allows for 8 bits of host addressing, or a maximum of 256 host addresses)
into two smaller networks.
o All we have to do in this situation is change the subnet mask of the devices on the
network so that they use 25 bits for the network instead of 24 bits, resulting in two distinct
networks with 128 possible host addresses on each network.
o In this case, the first network would have a range of network addresses between
192.168.10.0 -192.168.10.127, while the second network would have a range of
addresses between 192.168.10.128 -192.168.10.255.
CIDR
Table below shows some of the most common subnet masks, and the number of
hosts available on them.
(Slash Subnet Mask (Dotted Network Bits in Host Bits in Subnet Hosts per
Prefix) Decimal) Subnet Mask Mask Net
/26 255.255.255.192 26 6 62
/27 255.255.255.224 27 5 30
/28 255.255.255.240 28 4 14
/29 255.255.255.248 29 3 6
/30 255.255.255.252 30 2 2
SUB-NETTING
An organization that is granted a large block of addresses may want to create
clusters of networks (called subnets) and divide the addresses between the different
subnets.
The rest of the world still sees the organization as one entity; however, internally
there are several subnets.
All messages are sent to the router address that connects the organization to the
rest of the Internet; the router routes the message to the appropriate subnets.
The organization, however, needs to create small sub-blocks of addresses, each
assigned to specific subnets.
Example:
A company is granted the site address 201.70.64.0 (class C). The company needs six
subnets. Design the subnets.
Solution:
o The number of 1s in the default mask is 24 (class C). i.e. 255.255.255.0
o The company needs six subnets.
o This number 6 is not a power of 2. (We have to see as per power of 2.)
o The next number that is a power of 2 is 8.
o We need 3 more 1s in the subnet mask. We will take them from host bits.
o The total number of 1s in the subnet mask is 27 (24 + 3).
o The total number of 0s is 5 (32 - 27). The mask is as shown below:
11111111 11111111 11111111 11100000
or
255.255.255.224
The number of subnets is 8.
The number of addresses in each subnet is 2 5 (5 is the number of 0s) or 32.
The number of hosts will go down as we increase the network bits.
• Networks must be able to transfer data from one device to another with acceptable
accuracy.
• For most applications, a system must guarantee that the data received are identical to
the data transmitted.
• Any time data are transmitted from one node to the next, they can become corrupted
in passage. So data can be corrupted during transmission.
• Many factors can alter one or more bits of a message.
• Some applications require a mechanism for detecting and correcting errors.
• So we can say that error detection and correction is a process by which we can
find the errors with data and correct the errors.
Let us understand some of the concepts related to error detection and correction
Types of Errors
Whenever bits flow from one point to another, they are subject to unpredictable
changes because of interference.
This interference can change the shape of the signal.
In a single-bit error, a 0 is changed to a 1 or a 1 to a O.
In a burst error, multiple bits are changed.
changed to allow as many networks as necessary.