Chapter 3 Network layer
Chapter 3 Network layer
1. Network Layer
Network layer is a layer 3 that manages device addressing, tracks the location of devices on the
network. Also it determines the best path to move data from source to the destination based on the
network conditions, the priority of service, and other factors. The Network link layer is responsible
for routing and forwarding the packets. Routers are the layer 3 devices, they are specified in this
layer and used to provide the routing services within an internetwork. The protocols used to route
the network traffic are known as Network layer protocols. Examples of protocols are IP and Ipv6.
Addressing: A Network layer adds the source and destination address to the header of the frame.
Addressing is used to identify the device on the internet.
Routing: Routing is the major component of the network layer, and it determines the best optimal
path out of the multiple paths from source to the destination.
Packetizing: A Network Layer receives the packets from the upper layer and converts them into
packets. This process is known as Packetizing. It is achieved by internet protocol (IP). It is
1 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
encapsulation of packets received from upper-layer protocols and makes new packets. This new
packet called packet data units (PDU). Each PDU contains not only data but also control
information.
Fragmentation: It is decapsulates of the IPv4 datagram from the frame it receives and then
encapsulates again it in another frame. Or it making data or frame possible to pass through other
networks which is this is called fragmentation.
IP Packet
3 2 1
Fragmentation
Defragmentation: It is restoring or reassembling of the original IP packets. It only occurs once at
end router.
Source
Host
Internet
IP Packet 3 2 1
Original message
IP Packet
Fragmentation
Destination
Host
Defragmentation
2 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
Network layer protocol
The primary purpose of ICMP is for error reporting. When two devices connect over the Internet,
the ICMP generates errors to share with the sending device in the event that any of the data did not
get to its intended destination. For example, if a packet of data is too large for a router, the router
will drop the packet and send an ICMP message back to the original source for the data.
A secondary use of ICMP protocol is to perform network diagnostics; the commonly used terminal
utilities traceroute and ping both operate using ICMP. The traceroute utility is used to display the
routing path between two Internet devices. The routing path is the actual physical path of connected
routers that a request must pass through before it reaches its destination. The journey between one
router and another is known as a ‘hop,’ and a traceroute also reports the time required for each hop
along the way. This can be useful for determining sources of network delay. Host or network
unreachable.
Error reporting message: e.g. Destination unreachable, time exceeded, parameters problem
3 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
Network congestion message:-when router buffers too many packets, and cannot process with
same speed as received, it generates source quench message
It is a protocol that allows several devices to share one IP address so they can all receive the same
data. IGMP is a network layer protocol used to set up multicasting on networks that use the Internet
Protocol version 4 (IPv4). Specifically, IGMP allows devices to join a multicasting group. But
IGMP is not a multicasting routing protocol; it is a protocol that manages group membership. In
any network, there are one or more multicast routers that distribute multicast packets to hosts or
other routers. The IGMP protocol gives the multicast routers information about the membership
status of hosts (routers) connected to the network. IGMP helps the multicast router create and
update a list of loyal members related to each router interface.
Leaving a Group
When a host sees that no process is interested in a specific group, it sends a leave report. Similarly,
when a router sees that none of the networks connected to its interfaces is interested in a specific
group, it sends a leave report about that group. IGMP has three types of messages: the query, the
membership report, and the leave report.
2.Maximum Response Time: This 8-bit field defines the amount of time in which a query must
be answered.
4 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
3.Checksum: this is a 16-bit field carrying the checksum. The checksum is calculated over the 8-
byte message.
IGMP Operation
IGMP operates locally. A multicast router connected to a network has a list of multicasts addresses
of the groups with at least one loyal member in that network
It is a protocol, or set of rules, for routing and addressing packets of data so that they can travel
across networks and arrive at the correct destination. Data traversing the Internet is divided into
smaller pieces, called packets. IP information is attached to each packet, and this information helps
routers to send packets to the right place. Every device or domain that connects to the Internet is
assigned an IP address, and as packets are directed to the IP address attached to them, data arrives
where it is needed.
This mapping procedure is important because the lengths of the IP and MAC addresses differ, and
a translation is needed so that the systems can recognize one another. The most used IP today is
IP version 4 (IPv4). An IP address is 32 bits long. However, MAC addresses are 48 bits long. ARP
translates the 32-bit address to 48 and vice versa.
There is a networking model known as the Open Systems Interconnection (OSI) model. First
developed in the late 1970s, the OSI model uses layers to give IT teams a visualization of what is
going on with a particular networking system. This can be helpful in determining which layer
5 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
affects which application, device, or software installed on the network, and further, which IT or
engineering professional is responsible for managing that layer.
The MAC address is also known as the data link layer, which establishes and terminates a
connection between two physically connected devices so that data transfer can take place. The IP
address is also referred to as the network layer or the layer responsible for forwarding packets of
data through different routers. ARP works between these layers. Generally, ARP sender sends
ARP request to receiver which contains logical address of sender and logical address of receiver.
Then the receiver sends ARP response packet which contains the logical (IP) address and physical
address of the receiver with unicast directly to the sender because sender knows logical address of
receiver but not physical address of receiver at network layer ARP used to maps the logical address
of the receiver to physical address it obtains from receiver. So, ARP retrieves the physical address
of the receiver and maps 32-bit logical (IP) address to 48-bit physical address.
Reverse ARP is a networking protocol used by a client machine in a local area network to request
its Internet Protocol address (IPv4) from the gateway-router’s ARP table. The network
administrator creates a table in gateway-router, which is used to map the MAC address to
corresponding IP address.
When a new machine is setup or any machine which don’t have memory to store IP address, needs
an IP address for its own use. So, the machine sends a RARP broadcast packet which contains its
own MAC address in both sender and receiver hardware address field. Therefore, RARP is a
TCP/IP protocol that allows any host to obtain its IP address from the server. RARP perform
following steps to obtain an IP address from the server and the sender broadcast the RARP request
to all hots. The RARP request packet contains the physical address of the sender. All the host
receiving the RARP request packet process it but, the authorized host only which can serve RARP
service. The authorized RARP server replies directly to requesting host. Generally, Retrieves the
logical address for a computer from the server and maps 48-bit physical address to 32-bit logical
(IP) address.
6 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
Routing Protocols
Routing protocols used to evaluate what path will be the best for a packet to travel by using metrics.
A metric is a standard of measurement that is used by routing algorithms to determine the optimal
path to a destination. Different routing algorithms use different metrics for evaluating best path
such hop count, bandwidth, distance etc.
Static routing method is determine by administrator manually. Its routing table is not recorded by
speaking among routers. Once the routing table recorded only change by administrator.
Select and change best routing path for the packet is automatically by themselves. No administrator
interference on record routing table There are three types: Distance Vector (e.g. RIPv1, RIPv2,
IGRP ), Link State (e.g. OSPF) and Hybrid (e.g. EIGRP)
1. Distance vector routing: compute the best path from information passed to them from
neighbors (e.g RIPv1, RIPv2, IGRP ) and hop count metric for selecting best path. A distance
vector routing protocol uses a distance calculation and a vector direction of next hop router as
reported by neighboring routers to choose the best path. It requires that a router informs its
neighbors of topology changes periodically Distance Vector routing protocols base their
decisions on the best path to a given destination based on the distance. Distance is usually
measured in hops, though the distance metric could be delay, packets lost, or something
similar. If the distance metric is hop, then each time a packet goes through a router, a hop is
considered to have traversed. The route with the least number of hops to a given network is
concluded to be the best route towards that network. The vector shows the direction to that
specific network. Distance vector protocols send their entire routing table to directly connected
neighbors. Examples of distance vector protocols include RIP - Routing Information
Protocol and IGRP - Interior Gateway Routing Protocol.
7 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
2. Link State routing protocols: Link state protocols are also called shortest-path-first protocols.
All routers have a copy of the entire network map (or topology). Each node (routers) uses
Dijkstra's algorithm on the graph to calculate the optimal routes to all nodes. The Link state
routing algorithm is also known as Dijkstra's algorithm. This algorithm used to find the shortest
path from one node to every other node in the network Link state protocols are also called
shortest-path-first protocols. Link state routing protocols have a complete picture of the
network topology. Hence they know more about the whole network than any distance vector
protocol. Three separate tables are created on each link state routing enabled router. One table
is used to hold details about directly connected neighbors, one is used to hold the topology of
the entire internetwork and the last one is used to hold the actual routing table. Link state
protocols send information about directly connected links to all the routers in the network.
Examples of Link state routing protocols include OSPF - Open Shortest Path First and IS-
IS - Intermediate System to Intermediate System.
A
B
D
8 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
For link state routing algorithm knowledge about the neighborhood
Information that router broadcast to other routers are its identities and cost of the directly attached
links to other routers but not its routing table
Flooding: each router sends the information to every other router on the internetwork except its
neighbors. Every router that receives packet sends the copies to all its neighbors. Finally,
each and every router receives a copy of the same information.
Information sharing: A router sends the information to every other router only when the change
occurs in the information.
Generally in OSPF, a router attempts to route based on the “state of the links.” With the
following steps
9 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
Step 4: Evaluating Shortest Paths
Using all the details from its link state table, a router is able to compute, using the Dijkstra
algorithm, the shortest path to any given destination.
3. Hybrid routers: There are also routing protocols that are considered to be hybrid in the sense
that they use aspects of both distance vector and link state protocols. EIGRP - Enhanced
Interior Gateway Routing Protocol is one of those hybrid routing protocols. Hybrid routing
protocols are a combination of distance-vector and link-state routing protocols, and are used
to provide a more efficient and scalable routing solution in larger networks.
The autonomous system is structured around IP prefixes and can apply to class A, B or C networks.
The term prefix -- when used in conjunction with AS -- is equivalent to a Classless Inter-Domain
Routing (CIDR) block, which is a group of IP addresses that share the same prefix and contain the
same number of bits. For this reason, an autonomous system is sometimes referred to as a routing
domain.
10 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
What are autonomous system numbers?
Each autonomous system is assigned a globally unique number called an Autonomous System
Number (ASN). The number serves as an identifier for the AS and is used when exchanging
routing information with other autonomous systems. ASNs are available in both 16-bit and 32-bit
format, although ASNs issued before 2007 were all 16-bit.
An ASN can be either public or private. An AS must have a public ASN to exchange data with
other ASes on the internet. When an AS has a public ASN, all routes that originate from the AS
are visible to the internet. However, an AS can obtain a private ASN if it communicates with only
one provider and it uses Border Gateway Protocol (BGP) to carry out those communications. In
this case, the routing policy between the AS and the provider is not visible to the internet.
The Internet Assigned Numbers Authority (IANA) manages the ASN system and coordinates the
distribution of ASNs across five global regions. Each region maintains its own regional internet
registry, which is responsible for issuing ASNs to individual ASes within that region. The five
regional internet registries cover the following territories:
Currently, IANA functions are carried out by the Public Technical Identifiers organization, an
affiliate of the Internet Corporation for Assigned Names and Numbers, which is now responsible
for managing IANA functions.
11 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
IP Addressing
An IP address is a unique address that identifies a device on the internet or a local network. IP
stands for "Internet Protocol," which is the set of rules governing the format of data sent via the
internet or local network.
In essence, IP addresses are the identifier that allows information to be sent between devices on a
network: they contain location information and make devices accessible for communication. The
internet needs a way to differentiate between different computers, routers, and websites. IP
addresses provide a way of doing so and form an essential part of how the internet works.
What is an IP?
IP addresses are not random. They are mathematically produced and allocated by the Internet
Assigned Numbers Authority (IANA), a division of the Internet Corporation for Assigned Names
and Numbers (ICANN). ICANN is a non-profit organization that was established in the United
States in 1998 to help maintain the security of the internet and allow it to be usable by all. Each
time anyone registers a domain on the internet, they go through a domain name registrar, who pays
a small fee to ICANN to register the domain.
Types of IP addresses
There are different categories of IP addresses, and within each category, different types.
Private IP addresses
12 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
Every device that connects to your internet network has a private IP address. This includes
computers, smartphones, and tablets but also any Bluetooth-enabled devices like speakers,
printers, or smart TVs. With the growing internet of things, the number of private IP addresses you
have at home is probably growing. Your router needs a way to identify these items separately, and
many items need a way to recognize each other. Therefore, your router generates private IP
addresses that are unique identifiers for each device that differentiate them on the network. Private
IP address, 10.0.0.0 – 10.255.255.255, 172.16.0.0 – 172.31.255.255 and 192.168.0.0 –
192.168.255.255
Public IP addresses
A public IP address is the primary address associated with your whole network. While each
connected device has its own IP address, they are also included within the main IP address for your
network. As described above, your public IP address is provided to your router by your ISP.
Typically, ISPs have a large pool of IP addresses that they distribute to their customers. Your
public IP address is the address that all the devices outside your internet network will use to
recognize your network. It is globally unique address which assign to devices which connect to
internet. Company and organization purchase public IP address from IANA such as web servers
google servers, mail server and private IP address packet cannot route in public network (Internet)
but it should be translated to public IP address by technology called network address translation
(NAT). Examples form class A: 8.8.8.8 is public IP address.
Used to translate private IP address or local address into the public IP address. NAT is used to
slow down the rate of depletion of available IP address by translates the local IP or Private IP
address into global or public IP address. So, NAT reduce IP depletion issue by mapping thousands
of hidden internal addresses to public address which also increase a degree of security is
established for internal network. Purpose of NAT is a feature that allows the IP network of an
organization to appear from the outside to use a different IP address space than what it is actually
using. Therefore, NAT allows an organization with nonglobally routable addresses (private
13 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
address) to connect to the Internet by translating those addresses into a globally routable address
space. Used to translate private IP address or local address into the public IP address. NAT is used
to slow down the rate of depletion of available IP address by translates the local IP or Private IP
address into global or public IP address. So, NAT reduce IP depletion issue by mapping thousands
of hidden internal addresses to a range of easy-to-get Class C addresses.
It is an extension to network address translation (NAT) that permits multiple devices on a local
area network (LAN) to be mapped to a single public IP address. The goal of PAT is to conserve
IP addresses.
Most home networks use PAT. In such a scenario, the Internet Service Provider (ISP) assigns a
single IP address to the home network's router. When Computer X logs on the Internet, the router
assigns the client a port number, which is appended to the internal IP address. This, in effect, gives
Computer X a unique address. If Computer Z logs on the Internet at the same time, the router
assigns it the same local IP address with a different port number. Although both computers are
sharing the same public IP address and accessing the Internet at the same time, the router knows
exactly which computer to send specific packets to because each computer has a unique internal
address.
14 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
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:
When calculating hosts' IP addresses, 2 IP addresses are decreased because they cannot be
assigned to hosts, i.e. the first IP of a network is network number and the last IP is reserved for
Broadcast IP.
In the IPv4 IP address space, there are five classes: A, B, C, D and E. Each class has a specific
range of IP addresses (and ultimately dictates the number of devices you can have on your
network). Primarily, class A, B, and C are used by the majority of devices on the Internet. Class
D and class E are for special uses.
Class A Address
The first bit of the first octet is always set to 0 (zero). Thus the first octet ranges from 1 – 127, i.e.
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).
15 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
Class A IP address format is thus: 0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH
Class B Address
An IP address which belongs to class B has the first two bits in the first octet set to 10, i.e.
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.
Class B IP address format is: 10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
Class C Address
The first octet of Class C IP address has its first 3 bits set to 110, that is −
Class C IP addresses range from 192.0.0.x to 223.255.255.x. The default subnet mask for Class
C is 255.255.255.x.
Class C gives 2097152 (221) Network addresses and 254 (28-2) Host addresses.
Class C IP address format is: 110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH
Class D Address
Very first four bits of the first octet in Class D IP addresses are set to 1110, giving a range of −
Class D has IP address range from 224.0.0.0 to 239.255.255.255. Class D is reserved for
Multicasting. In multicasting data is not destined for a particular host, that is why there is no need
to extract host address from the IP address, and Class D does not have any subnet mask.
16 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
Class E Address
This IP Class is reserved for experimental purposes only for R&D or Study. IP addresses in this
class ranges from 240.0.0.0 to 255.255.255.254. Like Class D, this class too is not equipped with
any subnet mask. Generally classes of IP Address in the following table:
Routing is an important term in the world of computer networks. It is basically the name given to
the process of selecting a path for traffic in a network or between across multiple networks.
Routing is basically performed in many types of networks like circuit-switched networks, for
example, the public switched telephone network, commonly known as the PSTN or computer
networks, for example, the internet.
Routing is the higher-level decision making in packet switching networks as it directs network
packets from their source to their destination through intermediate network nodes with the help of
particular packet forwarding mechanisms. When we talk about Packet forwarding, we refer to the
transit of network packets from one network interface to another. The nodes in intermediate are
basically hardware devices in the network, for example, routers, gateways, firewalls, switches
including others. Packet forwarding is also done by general-purpose computers although there is
no specially optimized hardware for the task.
When we talk about routing, one important term is routing tables. The process usually directs
forwarding on the basis of routing tables that might be specified by an administrator. It basically
maintains a record of the routes to different network destinations. Routing tables either learn by
observing network traffic or are built with the assistance of particular routing protocols.
When the concept of routing is discussed, usually IP routing is talked about. IP routing basically
assumes that network addresses are structured and that similar addresses have proximity within
the network. In the concept of structured addresses, a single routing table entry is allowed to
represent the entire route to a group of devices. In large networks, structured addressing, which is
basically routing performs better than unstructured addressing, also known as bridging.
17 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
Routing has now become the most popular and widely used form of addressing on the Internet
whereas bridging is still widely used within local area networks, also known as LAN.
In today’s blog, we are going to talk about an important concept related to the routing in computer
networks. Classful and classless routing are protocols of routing. In today’s blog we are going to
discuss the difference between classful and classless routing.
Before understanding the difference, it’s important to get a hang of classful and classless routing
and the important terms associated with these routing protocols. Let’s get started with the blog in
order to advance our knowledge in computer networks.
1. Classful Addressing
Classful Addressing or Classful Routing was Introduced in 1981 where IPV4 addresses were
divided into 5 classes namely from class A to class E. Where classes A to C contain unicast
addresses and Class D talks about multicast addresses and Class E is reserved for future use. In
this segment, we are going to talk about each class in detail beginning from Class A.
Class A has addresses where the first bit of the first octet is always ‘0’ and hence the address range
of class A starts from 0.0.0.0 and reaches up to 127.255.255.255 (the decimal conversion of the
binary number ‘0111’ is 127). The IP address is divided into four octets (with each octet having 8
bits) where the first octet denotes the network portion and the rest of the 3 octets (or the 24 bits)
belong to the host portion. One example of Class A IP address can be 10.1.1.1
There is one exception in the Class A IP address. The address range 127.X.X.X is reserved for
loopback while the address range 0.X.X.X is reserved for default network. Hence, the actual range
of class A addresses starts from 1.0.0.0 and goes only up till the address 126.255.255.255
Class B has a range of addresses where the first octet would always start with ’10’ and hence the
range of Class B starts from 128.0.0.0 and goes up to 191.255.255.255. The first two octets (that
means 16 bits) denote the network portion and the remaining two octets (or the remaining 16 bits)
belong to the host portion. One example of Class B IP address is 172.16.1.1
18 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
The next in line is the Class C where the first octet starts from ‘110’ and hence the addresses range
starts from 192.0.0.0 and goes up to 223.255.255.255. In this class address, the first three octets,
i.e., the first 24 bits denote the network portion and the rest of the bits or the remaining last octet
belongs to the host portion. One example of Class C address is 192.168.1.1
Multicast addressing is represented in Class D where the first octet starts with ‘1110’ and hence
the range of IP addresses start from 224.0.0.0 and ends with 239.255.255.255. An example of a
Class D IP address is 239.2.2.2. In routing protocols like OSPF, RIP and others, IP addresses of
Class D are used.
The last class is classful addressing is Class E which is reserved for research purposes and future
use. The first octet in IP addresses from class E starts with ‘1111’ and thus, the IP address range
in Class E is from 240.0.0.0 to 255.255.255.255.
We have discussed all the classes that are a major part of classful addressing. We hope that the
concept is now clear in your mind. Classful Routing does not import subnet masks and subnet
mask is provided after the route update. For classful routing, subnet mask does not vary for devices.
In classful routing.
Now that we have discussed the various nuances of classful addressing, it is time we discuss the
disadvantages of Classful Addressing. We discussed that Class A has a mask of 255.0.0.0 and
hence can support 16, 777, 214 addresses and Class B with a mask of 255.255.0.0 supports 65,
534 addresses whereas Class C with a mask of 255.255.255.0 support 254 addresses. The problem
of classful addressing arises when 2000 addresses are required. The probable solution to this
problem is to provide the user Class B or Class C address but that would result in a waste of either
so many addresses or too many networks to handle. Hence, CIDR was introduced to resolve this
issue.
What is Network Masks? A network mask helps you know which portion of the address identifies
the network and which portion of the address identifies the node. Class A, B, and C networks have
default masks, also known as natural masks, as shown here:
19 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
An IP address on a Class A network that has not been subnetted would have an address/mask pair
similar to: 8.20.15.1 255.0.0.0. In order to see how the mask helps you identify the network and
node parts of the address, convert the address and mask to binary numbers.
8.20.15.1 = 00001000.00010100.00001111.00000001
255.0.0.0 = 11111111.00000000.00000000.00000000
Once you have the address and the mask represented in binary, then identification of the network
and host ID is easier. Any address bits which have corresponding mask bits set to 1 represent the
network ID. Any address bits that have corresponding mask bits set to 0 represent the node ID.
8.20.15.1 = 00001000.00010100.00001111.00000001
255.0.0.0 = 11111111.00000000.00000000.00000000
-------------------------------------------------------
net id | host id
netid = 00001000 = 8
Subnetting allows you to create multiple logical networks that exist within a single Class A, B, or
C network. Each data link on a network must have a unique network ID, with every node on that
link being a member of the same network. If you break a major network (Class A, B, or C) into
smaller subnetworks, it allows you to create a network of interconnecting subnetworks. Each data
link on this network would then have a unique network/subnetwork ID. Any device, or gateway,
that connects n networks/subnetworks has n distinct IP addresses, one for each network /
subnetwork that it interconnects. Subnetting is the technique of partitioning a large network into
smaller networks by borrowing bits from host portion of address . There are two types of subnetting
such FLSM and VLSM. FLSM: all subnets have equal number of host address and the same subnet
mask. VLSM: subnets have different numbers of host address and different subnet mask. The well-
defined method for the subnetting is variable length subnet mask (VLSM).
20 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
The difference between FLSM and VLSM subneting mechanism
In order to subnet a network, extend the natural mask with some of the bits from the host ID portion
of the address in order to create a subnetwork ID. For example, given a Class C network of
204.17.5.0 which has a natural mask of 255.255.255.0, you can create subnets in this manner:
204.17.5.0 - 11001100.00010001.00000101.00000000
255.255.255.224 - 11111111.11111111.11111111.11100000
------------------------------------------------|sub|----
By extending the mask to be 255.255.255.224, you have taken three bits (indicated by "sub") from
the original host portion of the address and used them to make subnets. With these three bits, it is
possible to create eight subnets. With the remaining five host ID bits, each subnet can have up to
32 host addresses, 30 of which can actually be assigned to a device since host ids of all zeros or
all ones are not allowed (it is very important to remember this). So, with this in mind, the following
subnet with host ranges have been created.
21 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
2. 204.17.5.32 255.255.255.224 host address range 33 to 62
3. 204.17.5.64 255.255.255.224 host address range 65 to 94
4. 204.17.5.96 255.255.255.224 host address range 97 to 126
5. 204.17.5.128 255.255.255.224 host address range 129 to 158
6. 204.17.5.160 255.255.255.224 host address range 161 to 190
7. 204.17.5.192 255.255.255.224 host address range 193 to 222
8. 204.17.5.224 255.255.255.224 host address range 225 to 254
These 8 network subnetting schemes in this section allows for eight subnets, and the network might
appear as in the following figure:
22 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
Introduction to IPv6 Address
An IPv6 address is 128 bits in length and consists of eight, 16-bit fields, with each field bounded
by a colon. Each field must contain a hexadecimal number, in contrast to the dotted-decimal
notation of IPv4 addresses. In the next figure, the x's represent hexadecimal numbers.
The leftmost three fields (48 bits) contain the site prefix. The prefix describes the public
topology that is usually allocated to your site by an ISP or Regional Internet Registry (RIR).
The next field is the 16-bit subnet ID, which you (or another administrator) allocate for your site.
The subnet ID describes the private topology, also known as the site topology, because it is
internal to your site.
The rightmost four fields (64 bits) contain the interface ID, also referred to as a token. The
interface ID is either automatically configured from the interface's MAC address or manually
configured in EUI-64 format. Example: 2001:0db8:3c4d:0015:0000:0000:1a2f:1a2b
This example shows all 128 bits of an IPv6 address. The first 48 bits, 2001:0db8:3c4d, contain
the site prefix, representing the public topology. The next 16 bits, 0015, contain the subnet ID,
23 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
representing the private topology for the site. The lower order, rightmost 64
bits, 0000:0000:1a2f:1a2b, contain the interface ID.
You can use the two-colon notation to replace any contiguous fields of all zeros in the IPv6 address.
For example, the IPv6 address 2001:0db8:3c4d:0015:0000:d234::3eee:0000 can be collapsed
into 2001:db8:3c4d:15:0:d234:3eee::.
Prefixes in IPv6
The leftmost fields of the IPv6 address contain the prefix, which is used for routing IPv6 packets.
IPv6 prefixes have the following format:
prefix/length in bits
Prefix length is stated in classless inter-domain routing (CIDR) notation. CIDR notation is a slash
at the end of the address that is followed by the prefix length in bits. For information on CIDR
format IP addresses, refer to Designing Your CIDR IPv4 Addressing Scheme.
The site prefix of an IPv6 address occupies up to 48 of the leftmost bits of the IPv6 address. For
example, the site prefix of the IPv6 address 2001:db8:3c4d:0015:0000:0000:1a2f:1a2b/48 is
24 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
contained in the leftmost 48 bits, 2001:db8:3c4d. You use the following representation, with zeros
compressed, to represent this prefix: 2001:db8:3c4d::/48
Note - The prefix 2001:db8::/32 is a special IPv6 prefix that is used specifically for documentation
examples.
You can also specify a subnet prefix, which defines the internal topology of the network to a
router. The example IPv6 address has the following subnet prefix.
2001:db8:3c4d:15::/64
The subnet prefix always contains 64 bits. These bits include 48 bits for the site prefix, in addition
to 16 bits for the subnet ID.
Unicast information transfer is very helpful when a single sender transmits data to a single
recipient. In simple words, it is called a one-to-one type of transmission. For instance, we can
consider a device with an IP address of 10.1.2.0 that is willing to send data packets (traffic stream)
to a device with an IP address 20.12.42 (while both of these belong to different networks). In this
case, the device will use a unicast data transfer. This mode of data transfer is the most common
one among various networks.
25 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
Generally, this type of information transfer is useful when there is a participation of single sender
and single recipient which shortly term it as a one-to-one transmission.
Multiple senders and recipients participate in the process of data transfer in Multicasting. In the
multicast method, the traffic reclines between the boundaries of broadcast (from one to all) to
unicast (from one to one). The multicast process lets the servers direct a single copy of data streams
to get simulated and routed to the hosts that requested them in the first place (or routed to groups
of devices). The IP multicast requires support from various other protocols such as Internet Group
Management Protocol (IGMP) and Multicast routing for the working. Also, Class D stays reserved
for multicast groups in the case of Classful IP addressing.
Generally, multicasting is when a group of devices all receive the same messages or packets and
any network traffic directed at that IP address will reach all devices that share the IP address,
instead of just one device.
Broadcast data transfer occurs when one sender transmits data to multiple recipients at any given
time. There are basically two major types of broadcasting transfer techniques:
Limited Broadcasting – It is helpful when a sender in a network wants to transmit data to the
devices over the same network in which it resides. A device will append a limited broadcasting
26 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
address in the datagram’s destination address to achieve limited broadcasting. It is reserved for
transferring data from a single client to all the recipients over the same network.
Direct Broadcasting – It is helpful when a sender in a network wants to transmit data to the
devices residing in an altogether different network. A device translates all the part bits of the Host
ID of a destination address to 1. It is known as Direct Broadcast Address for transferring
information in the datagram header.
Broadcasting is mainly helpful for audio and video distribution by television networks. ARP
(Address Resolution Protocol) is one of the most important protocols in this class that resolves the
IP address to a physical address. It is an important step for underlying communication.
A virtual LAN (VLAN) is a logical overlay network that groups together a subset of devices that
share a physical LAN, isolating the traffic for each group. A LAN is a group of computers or other
devices in the same place -- e.g., the same building or campus -- that share the same physical
27 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.
network. A LAN is usually associated with an Ethernet (Layer 2) broadcast domain, which is the
set of network devices an Ethernet broadcast packet can reach. VLANs partition a single switched
network into a set of overlaid virtual networks that can meet different functional and security
requirements, for management purpose. It used for different purpose such as better resources
utilization, reduce additional physical infrastructure for network, improve network security, to
limit automatically to access specific group of user by dividing workstations into different isolated
LAN segments, place some interface into one broadcast domain and some interfaces into another
and also make communication between two different VLANs we configure on the router inter
VLAN
28 | P a g e : SOURCES: Top-down 6th edition by James Kurose; Andrew S. Tanenbaum, 4th and 5th
Edition Book; Data Communications and Networking fourth edition By Behrouz A; Data & Computer
Communications 8 edition by William Stallings.
Compiled by Endale M.