Вы находитесь на странице: 1из 10

Unit 2 Addressing Scheme


Four levels of addresses are used in an internet using the TCP/IP protocols:


Physical (link) addresses


Logical (IP) addresses


Port addresses


Specific addresses

o Port addresses o Specific addresses Each address is related to a specific layer in the

Each address is related to a specific layer in the TCP/IP architecture, as shown in Figure below:

o Specific addresses Each address is related to a specific layer in the TCP/IP architecture, as

Physical Addresses:


The physical address, also known as the link address, is the address of a node as defined by its LAN or WAN.


It is included in the frame used by the data link layer.


It is the lowest-level address.


The size and format of these addresses change depending on the network.


Most local-area networks use a 48-bit (6-byte) physical address written as 12 hexadecimal digits;


Every byte (2 hexadecimal digits) is separated by a colon, as shown below:

Logical Addresses



Logical addresses are necessary for universal communications that are independent of physical networks.


A universal addressing system is needed in which each host can be identified uniquely, regardless of the underlying physical network.


The logical addresses are designed for this purpose.


A logical address in the Internet is currently a 32-bit address that can uniquely define a host connected to the Internet.


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


The IP address and the physical address are necessary for a quantity of data to travel from a source to the destination host.


However, arrival at the destination host is not the final objective of data communications on the Internet.


A system that sends nothing but data from one computer to another is not complete.


Today, computers are devices that can run multiple processes at the same time.


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.


In other words, they need addresses.


In the TCP/IP architecture, the label assigned to a process is called a port address.


A port address in TCP/IP is 16 bits in length.

Specific Addresses


Some applications have user-friendly addresses that are designed for that specific address.


Examples include the e-mail address (for example, pkverma@yahoo.com).

IP Address scheme:

Logical Addresses


A computer somewhere in the world needs to communicate with another computer somewhere else in the world.


Usually, computers communicate through the Internet.


The packet transmitted by the sending computer may pass through several LANs or WANs before reaching the destination computer.


For this level of communication, we need a global addressing scheme; we call this logical addressing.


Today, we use the term IP address to mean a logical address in the network layer of the TCP/IP protocol suite.


The Internet addresses are 32 bits in length; this gives us a maximum of 2 32 addresses.


These addresses are referred to as IPv4 (IP version 4) addresses or simply IP addresses.


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).


In this version, the Internet uses 128-bit addresses that give much greater flexibility in address allocation.


These addresses are referred to as IPv6 (IP version 6) addresses.


Here, we first discuss IPv4 addresses, which are currently being used in the Internet.


We then discuss the IPv6 addresses, which may become dominant in the future.



An IPv4 address is a 32-bit long address.


It’s uniquely and universally identifies a device.


IPv4 addresses are unique.



An IPv6 address consists of 16 bytes (octets); it is 128 bits long.


In this notation, 128 bits is divided into eight sections, each 2 bytes in length.


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.


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, 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, the .30.56 is the node address.


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, 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.


Leftmost bits

Start address

Finish address
















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


In the example, 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, specifies the network address for

When the node section is set to all "1"s, it specifies a broadcast that is sent to all hosts on the network. specifies the example broadcast address. Note that this is true regardless of the length of the node section.

Unicasting And Multicasting


Unicasting is the communication between one sender and one receiver.

It is a one-to-one communication.

In this type of communication, both the source and destination addresses, in the IP datagram, are the unicast addresses assigned to the hosts.

In Figure above, a unicast packet starts from the source S1 and passes through routers

In Figure above, a unicast packet starts from the source S1 and passes through routers to reach the destination D1.

We have shown the networks as a link between the routers to simplify the figure.

Note that in uni-casting, when a router receives a packet, it forwards the packet through as defined in the routing table.

The router may discard the packet if it cannot find the destination address in its routing table.


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.

 The group address identifies the members of the group.  Figure below shows the idea

A multicast packet starts from the source S1 and goes to all destinations that belong to group G1.


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


IP addresses are actually 32-bit binary numbers (for example, 11000000 10101000




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 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 -, while the second network would have a range of addresses between -


o In the modern networking environment defined by RFC 1519 [Classless Inter-

Domain Routing (CIDR)], the subnet mask of a network is typically annotated in written form as a "slash prefix" that trails the network number.

o In the sub-netting example in the previous paragraph, the original 24-bit network

would be written as, while the two new networks would be written as and

o Note that the slash prefix annotation is generally used for human benefit; infrastructure

devices still use the 32-bit binary subnet mask internally to identify networks and their routes.

O All networks must reserve any host addresses that are made up entirely of either ones

or zeros, to be used by the networks themselves.

o This is so that each subnet will have a network-specific address (the all-zeroes address) and a broadcast address (the all-ones address).

o For example, a /24 network allows for 8 bits of host addresses, but only 254 of the 256

possible addresses are available for use. Similarly, /25 networks have a maximum of 7 bits for host addresses, with 126 of the 128 possible addresses available (the all-ones and all- zeroes addresses from each subnet must be set aside for the subnets themselves).

Table below shows some of the most common subnet masks, and the number of hosts available on them.

Table B-1:Common Subnet Masks and Their Host Counts


Subnet Mask (Dotted Decimal)

Network Bits in Subnet Mask

Host Bits in Subnet Mask

Hosts per
































































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.


A company is granted the site address (class C). The company needs six subnets. Design the subnets.



The number of 1s in the default mask is 24 (class C). i.e.


The company needs six subnets.


This number 6 is not a power of 2. (We have to see as per power of 2.)


The next number that is a power of 2 is 8.


We need 3 more 1s in the subnet mask. We will take them from host bits.


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


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.

Error detection and correction

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.