CN Unit 3
CN Unit 3
PPP operation is generally made using three different parameters as given below:
2. Network Control Protocol (NCP) : NCP protocols are required to configure the various
communication protocols. Each NCP is particular to a network-layer protocol like IP or
IPX/SPX or Apple Talk. IP is the most common layer-3 protocol that is being negotiated. At
least one NCP is always present there for each higher-layer protocol that is supported by PPP.
Different NCP protocols are given below:
• Compression Control Protocol (CCP) – CCP is basically responsible for
configuring, enabling, disabling, or negotiating and controlling or maintaining data
compression algorithms on both of the ends of the PP connection.
• Bridging Control Protocol (BCP) – BCP is basically responsible for
configuring, enabling, disabling, or negotiating and controlling or maintaining
bridge control modules on both of the ends of the PP connection. It is similar to
IPCP but rather than routing, it initializes bridging.
• Internet Protocol Control Protocol (IPCP) – This protocol is especially
requiring to configure, enable, also disable the IP protocol modules at every end of
the connection. Routers also exchange IPCP simply to negotiate options that are
specific to IP.
• Encryption Control Protocol (ECP)– This protocol is especially required to
configure, enable, disable negotiate and control or maintain data encryption
algorithms on both of ends of the PP connection.
In the above diagram, we can see that there are two networks - Network 1 and Network 2. A1
is the sender and there are two receivers - D1 and D2. In case of physical address, receiver D1
receives the data but receiver D2 is unable to receive data. This is because receiver D2 does
not belong to the same network as the sender A1 belongs to. Physical address can only be
passed in the same network and not in different networks. The purpose of using Physical
address is to identify devices in the same network.
Advantages
• Physical address can uniquely identify devices and deliver data packets accurately.
• We can restrict access to any network by allowing only those devices which have
the authorized MAC addresses to connect. Thus, it can also be used for network
security.
Disadvantages
• MAC addresses can be easily spoofed. Thus, the devices can easily gain
unauthorized access to a network.
• As physical addresses cannot traverse through the routers therefore they can only
be used in local networks and not between different networks.
Physical and Logical Address
In the above diagram , we can see that there are two networks - Network 1 and Network 2. A1
is the sender and there are two receivers - D1 and D2. In case of logical address, receiver D1
as well as D2 receives the data. This is because logical address can be passed in different
networks. The purpose of using logical address is to send the data across networks.
Advantages
• Logical address can be used in different networks because they can traverse
through routers.
• They can handle a number devices and networks. Even if the number of devices
and network increases, the logical address is able to handle all them very easily.
Thus, they are highly scalable.
Disadvantages
• Internet Protocol is vulnerable to attacks such as hacking, phishing etc. and there
can be data loss.
• It lacks privacy. The data which is moving through the packets can be intercepted,
traced and monitored by unauthorized entities.
Differences between Physical Address and Logical Address
ARP
4. ICMP
ICMP stands for Internet Control Message Protocol. ICMP is a part of IP protocol suite. ICMP
is an error reporting and network diagnostic protocol. Feedback in the network is reported to
the designated host. Meanwhile, if any kind of error occur it is then reported to ICMP. ICMP
protocol consists of many error reporting and diagnostic messages. ICMP protocol handles
various kinds of errors such as time exceeded, redirection, source quench, destination
unreachable, parameter problems etc. The messages in ICMP are divided into two types. They
are given below:
• Error Message: Error message states the issues or problems that are faced by the
host or routers during the processing of IP packets.
• Query Message: Query messages are used by the host in order to get information
from a router or another host.
ICMP Work
• The main and most significant protocol in the IP suite is called ICMP. However,
unlike TCP and UDP, ICMP is a connectionless protocol, meaning it doesn't require
a connection to be established with the target device to transmit a message.
• TCP and ICMP operate differently from one another; TCP is a connection-
oriented protocol, while ICMP operates without a connection. Every time a
connection is made before a message is sent, a TCP Handshake is required of both
devices.
• Datagrams including an IP header containing ICMP data are used to transmit
ICMP packets. An independent data item like a packet is comparable to an ICMP
datagram.
5. IGMP
IGMP stands for Internet Group Message Protocol. IGMP is a multicasting communication
protocol. It utilizes the resources efficiently while broadcasting the messages and data packets.
IGMP is also a protocol used by TCP/IP. Other hosts connected in the network and routers
makes use of IGMP for multicasting communication that have IP networks. In many networks
multicast routers are used in order to transmit the messages to all the nodes. Multicast routers
therefore receive a large number of packets that need to be sent. But to broadcast these packets
is difficult as it would increase the overall network load. IGMP helps the multicast routers by
addressing them while broadcasting. As multicast communication consists of more than one
sender and receivers the Internet Group Message Protocol is majorly used in various
applications such as streaming media, web conference tools, games, etc.
IGMP Work
• Devices that can support dynamic multicasting and multicast groups can use IGMP.
• The host can join or exit the multicast group using these devices. It is also possible
to add and remove customers from the group using these devices.
• The host and local multicast router use this communication protocol. Upon
creation of a multicast group, the packet's destination IP address is changed to the
multicast group address, which falls inside the class D IP address range.
The destination host receives the network layer packet from its data link layer, decapsulates
the packet, and delivers the payload to the corresponding upper layer protocol. The routers in
the path are not allowed to change either the source or the destination address. The routers in
the path are not allowed to decapsulate the packets they receive unless they need to be
fragmented.
3. Host-to-Host Delivery
The network layer ensures data is transferred from the source device (host) to the destination
device (host) across one or multiple networks. This involves:
• Determining the destination address.
• Ensuring that data is transmitted without duplication or corruption.
Host-to-host delivery is a foundational aspect of communication in large-scale, interconnected
systems like the internet.
4. Forwarding
Forwarding is the process of transferring packets between network devices such as routers,
which are responsible for directing the packets toward their destination. When a router receives
a packet from one of its attached networks, it needs to forward the packet to another attached
network (unicast routing) or to some attached networks (in the case of multicast routing).The
router uses:
• Routing tables: These tables store information about possible paths to different
networks.
• Forwarding decisions: Based on the destination IP address in the packet header.
Forwarding ensures that packets move closer to their destination efficiently.
5. Fragmentation and Reassembly of Packets
Some networks have a maximum transmission unit (MTU) that defines the largest packet
size they can handle. If a packet exceeds the MTU, the network layer:
• Fragments the packet into smaller pieces.
• Adds headers to each fragment for identification and sequencing. At the
destination, the fragments are reassembled into the original packet. This ensures
compatibility with networks of varying capabilities without data loss.
6. Logical Subnetting
Logical subnetting involves dividing a large IP network into smaller, more manageable sub-
networks (subnets). Subnetting helps:
• Improve network performance by reducing congestion.
• Enhance security by isolating parts of a network.
• Simplify network management and troubleshooting. Subnetting uses subnet
masks to define the range of IP addresses within each subnet, enabling efficient
address allocation and routing.
7. Network Address Translation (NAT)
NAT allows multiple devices in a private network to share a single public IP address for
internet access. This is achieved by:
• Translating private IP addresses to a public IP address for outbound traffic.
• Reversing the process for inbound traffic. Benefits of NAT include:
• Conserving IPv4 addresses by reducing the need for unique public IPs for each
device.
• Enhancing security by masking internal IP addresses from external networks.
8. Routing
Routing is the process of moving data from one device to another device. These are two other
services offered by the network layer. In a network, there are several routes available from the
source to the destination. The network layer specifies some strategies which find out the best
possible route. This process is referred to as routing. Several routing protocols are used in this
process and they should be run to help the routers coordinate with each other and help in
establishing communication throughout the network.
Advantages of Network Layer Services
• Packetization service in the network layer provides ease of transportation of the
data packets.
• Packetization also eliminates single points of failure in data communication
systems.
• Routers present in the network layer reduce network traffic by creating collision
and broadcast domains.
• With the help of Forwarding, data packets are transferred from one place to
another in the network.
Disadvantages of Network Layer Services
• There is a lack of flow control in the design of the network layer.
• Congestion occurs sometimes due to the presence of too many datagrams in a
network that is beyond the capacity of the network or the routers. Due to this, some
routers may drop some of the datagrams, and some important pieces of information
may be lost.
• Although indirect error control is present in the network layer, there is a lack of
proper error control mechanisms as due to the presence of fragmented data packets,
error control becomes difficult to implement.
Types of Routing
Routing is the process of determining paths through a network for sending data packets. It
ensures that data moves effectively from source to destination, making the best use of network
resources and ensuring consistent communication. Routing performed by layer 3 (or network
layer) devices to deliver the packet by choosing an optimal path from one network to another.
It is an autonomous process handled by the network devices to direct a data packet to its
intended destination. The node here refers to a network device called Router.
Routing is classified into Static Routing, Default Routing, and Dynamic Routing. In this article,
we will see types of routing in detail.
Routing is essential for determining the optimal path for data packets across networks.
Different routing techniques, such as static, dynamic, and hybrid, are used depending on the
network.
Types of Routing
Routing is typically of 3 types, each serving its purpose and offering different functionalities.
Types of Routing
1. Static Routing
Static routing is also called as “non-adaptive routing”. In this, routing configuration is done
manually by the network administrator. Let’s say for example, we have 5 different routes to
transmit data from one node to another, so the network administrator will have to manually
enter the routing information by assessing all the routes.
Advantages of Static Routing
• No routing overhead for the router CPU which means a cheaper router can be used
to do routing.
• It adds security because only an only administrator can allow routing to particular
networks only.
• No bandwidth usage between routers.
Disadvantage of Static Routing
• For a large network, it is a hectic task for administrators to manually add each
route for the network in the routing table on each router.
• The administrator should have good knowledge of the topology. If a new
administrator comes, then he has to manually add each route so he should have very
good knowledge of the routes of the topology.
2. Default Routing
This is the method where the router is configured to send all packets toward a single router
(next hop). It doesn’t matter to which network the packet belongs, it is forwarded out to the
router which is configured for default routing. It is generally used with stub routers. A stub
router is a router that has only one route to reach all other networks.
Advantages of Default Routing
• Default routing provides a “last resort” route for packets that don’t match any
specific route in the routing table. It ensures that packets are not dropped and can
reach their intended destination.
• It simplifies network configuration by reducing the need for complex routing tables.
• Default routing improves network reliability and reduces packet loss.
Disadvantages of Default Routing
• Relying solely on default routes can lead to inefficient routing, as it doesn’t
consider specific paths.
• Using default routes may introduce additional network latency.
3. Dynamic Routing
Dynamic routing makes automatic adjustments of the routes according to the current state of
the route in the routing table. Dynamic routing uses protocols to discover network destinations
and the routes to reach them. RIP and OSPF are the best examples of dynamic routing
protocols. Automatic adjustments will be made to reach the network destination if one route
goes down. A dynamic protocol has the following features:
• The routers should have the same dynamic protocol running in order to exchange
routes.
• When a router finds a change in the topology then the router advertises it to all
other routers.
Advantages of Dynamic Routing
• Easy to configure.
• More effective at selecting the best route to a destination remote network and also
for discovering remote networks.
Disadvantage of Dynamic Routing
• Consumes more bandwidth for communicating with other neighbors.
• Less secure than static routing.
Static routing does not use complex Dynamic routing uses complex routing
routing algorithms. algorithms.
In static routing, additional resources are In dynamic routing, additional resources are
not required. required.
In static routing, failure of the link In dynamic routing, failure of the link does
disrupts the rerouting. not interrupt the rerouting.
Another name for static routing is non- Another name for dynamic routing is adaptive
adaptive routing. routing.
Routing algorithms can be classified into various types such as distance vector, link state, and
hybrid routing algorithms. Each has its own strengths and weaknesses depending on the
network structure.
1. Adaptive Algorithms
These are the algorithms that change their routing decisions whenever network topology or
traffic load changes. The changes in routing decisions are reflected in the topology as well as
the traffic of the network. Also known as dynamic routing, these make use of dynamic
information such as current topology, load, delay, etc. to select routes. Optimization parameters
are distance, number of hops, and estimated transit time.
Further, these are classified as follows:
• Isolated: In this method each, node makes its routing decisions using the
information it has without seeking information from other nodes. The sending nodes
don’t have information about the status of a particular link. The disadvantage is that
packets may be sent through a congested network which may result in delay.
Examples: Hot potato routing, and backward learning.
• Centralized: In this method, a centralized node has entire information about the
network and makes all the routing decisions. The advantage of this is only one node
is required to keep the information of the entire network and the disadvantage is
that if the central node goes down the entire network is done. The link state
algorithm is referred to as a centralized algorithm since it is aware of the cost of
each link in the network.
• Distributed: In this method, the node receives information from its neighbors and
then takes the decision about routing the packets. A disadvantage is that the packet
may be delayed if there is a change in between intervals in which it receives
information and sends packets. It is also known as a decentralized algorithm as it
computes the least-cost path between source and destination.
2. Non-Adaptive Algorithms
These are the algorithms that do not change their routing decisions once they have been
selected. This is also known as static routing as a route to be taken is computed in advance and
downloaded to routers when a router is booted.
Further, these are classified as follows:
• Flooding: This adapts the technique in which every incoming packet is sent on
every outgoing line except from which it arrived. One problem with this is that
packets may go in a loop and as a result of which a node may receive duplicate
packets. These problems can be overcome with the help of sequence numbers, hop
count, and spanning trees.
• Random walk: In this method, packets are sent host by host or node by node to
one of its neighbors randomly. This is a highly robust method that is usually
implemented by sending packets onto the link which is least queued.
Random Walk
3. Hybrid Algorithms
As the name suggests, these algorithms are a combination of both adaptive and non-adaptive
algorithms. In this approach, the network is divided into several regions, and each region uses
a different algorithm. Further, these are classified as follows:
• Link-state: In this method, each router creates a detailed and complete map of the
network which is then shared with all other routers. This allows for more accurate
and efficient routing decisions to be made.
• Distance vector: In this method, each router maintains a table that contains
information about the distance and direction to every other node in the network.
This table is then shared with other routers in the network. The disadvantage of this
method is that it may lead to routing loops.
May give the shortest path. Always gives the shortest path.
Leaky Bucket
Similarly, each network interface contains a leaky bucket and the following steps are involved
in the leaky bucket algorithm:
• When a host wants to send a packet, the packet is thrown into the bucket.
• The bucket leaks at a constant rate, meaning the network interface transmits
packets at a constant rate.
• Bursty traffic is converted to uniform traffic by the leaky bucket.
• In practice the bucket is a finite queue that outputs at a finite rate.
In the above figure, we assume that the network has committed a bandwidth of 3 Mbps for a
host. The use of the leaky bucket shapes the input traffic to make it conform to this
commitment. In the above figure, the host sends a burst of data at a rate of 12 Mbps for 2s, for
a total of 24 Mbits of data. The host is silent for 5 s and then sends data at a rate of 2 Mbps for
3 s, for a total of 6 Mbits of data. In all, the host has sent 30 Mbits of data in 10 s. The leaky
bucket smooths out the traffic by sending out data at a rate of 3 Mbps during the same 10 s.
Without the leaky bucket, the beginning burst may have hurt the network by consuming more
bandwidth than is set aside for this host. We can also see that the leaky bucket may prevent
congestion.
Leaky Bucket Algorithm Work
A simple leaky bucket algorithm can be implemented using FIFO queue. A FIFO queue holds
the packets. If the traffic consists of fixed-size packets, the process removes a fixed number of
packets from the queue at each tick of the clock. If the traffic consists of variable-length
packets, the fixed output rate must be based on the number of bytes or bits.
The following is an algorithm for variable-length packets:
1. Initialize a counter to n at the tick of the clock.
2. Repeat until n is smaller than the packet size of the packet at the head of the queue.
1. Pop a packet out of the head of the queue, say P.
2. Send the packet P, into the network
3. Decrement the counter by the size of packet P.
3. Reset the counter and go to step 1.
In the below examples, the head of the queue is the rightmost position and the tail of the queue
is the leftmost position.
Example: Let n=1000
Packet=
Since n > size of the packet at the head of the Queue, i.e. n > 200
Therefore, n = 1000-200 = 800
Packet size of 200 is sent into the network.
Now, again n > size of the packet at the head of the Queue, i.e. n > 400
Therefore, n = 800-400 = 400
Packet size of 400 is sent into the network.
Since, n < size of the packet at the head of the Queue, i.e. n < 450
Therefore, the procedure is stopped.
Initialize n = 1000 on another tick of the clock.
This procedure is repeated until all the packets are sent into the network.
Reliability
It implies packet reached or not, information lost or not. Lack of reliability means losing a
packet or acknowledgement, which entails re-transmission. Reliability requirements may differ
from program to program. For example, it is more important that electronic mail, file transfer
and internet access have reliable transmissions than telephony or audio conferencing.
Delay
It denotes source-to-destination delay. Different applications can tolerate delay in different
degrees. Telephony, audio conferencing, video conferencing, and remote log-in need minimum
delay, while delay in file transfer or e-mail is less important.
Jitter
Jitter is the variation in delay for packets belonging in same flow. High jitter means the
difference between delays is large; low jitter means the variation is small. For example, if
packets 0,1,2,3s arrive at 6,7,8,9s it represents same delay. Jitter would signify that packets
departed at 0,1,2,3s reach destination at 4,6,10,15s. Audio and video applications don't allow
jitter.
Bandwidth
Different applications need different bandwidths. In video conferencing we need to send
millions of bits per second to refresh a color screen while the total number of bits in an e-mail
may not reach even a million.
Techniques to Improve QoS
There are several ways to improve QoS like Scheduling and Traffic shaping, We will see each
and every part of this in brief.
Scheduling
Packets from different flows arrive at a switch or router for processing. A good scheduling
technique treats the different flows fairly and appropriately. Three scheduling techniques are:
1. FIFO Queuing
2. Priority Queuing
3. Weighted Fair Queuing
Traffic Shaping
It is a mechanism to control the amount and the rate of the traffic sent to the network. The
techniques used to shape traffic are: leaky bucket and token bucket.
If the bucket is full, the token is discarded, If the bucket is full, then packets are
not the packet. discarded.
The bucket holds tokens generated at When the host has to send a packet, the
regular intervals of time. packet is thrown in the bucket.
If there is a ready packet, a token is removed Bursty traffic is converted into uniform
from Bucket and the packet is sent. traffic by leaky buckets.
The packet cannot be sent if there is no In practice bucket is a finite queue that
token in the bucket. outputs at a finite rate.
IPv6
The next-generation Internet Protocol (IP) address standard, known as IPv6, is designed to
work in conjunction with IPv4. To communicate with other devices, a computer, smartphone,
home automation component, Internet of Things sensor, or any other Internet-connected
device needs a numerical IP address. Because so many connected devices are being used, the
original IP address scheme, known as IPv4, is running out of addresses. This new IP address
version is being deployed to fulfil the need for more Internet addresses. With a 128-bit
address space, it allows for 340 undecillion unique addresses.
Difference between IPv6 and IPv4
IPv6 IPv4
IPv6 has a 128-bit address length. IPv4 has a 32-bit address length.
It supports Auto and renumbering address It Supports Manual and DHCP address
configuration. configuration.
IPv6 has a header of 40 bytes fixed. IPv4 has a header of 20-60 bytes.
Representation of IPv6
An IPv6 address consists of eight groups of four hexadecimal digits separated by ‘ . ‘ and
each Hex digit representing four bits so the total length of IPv6 is 128 bits. Structure given
below.
IPV6-Representation
The first 48 bits represent Global Routing Prefix. The next 16 bits represent the student ID
and the last 64 bits represent the host ID. The first 64 bits represent the network portion and
the last 64 bits represent the interface id.
• Global Routing Prefix: The Global Routing Prefix is the portion of an IPv6
address that is used to identify a specific network or subnet within the larger
IPv6 internet. It is assigned by an ISP or a regional internet registry (RIR).
• Student Id: The portion of the address used within an organization to identify
subnets. This usually follows the Global Routing Prefix.
• Host Id: The last part of the address, is used to identify a specific host on a
network.
Example: 3001:0da8:75a3:0000:0000:8a2e:0370:7334
Types of IPv6 Address
Now that we know about what is IPv6 address let’s take a look at its different types.
• Unicast Addresses : Only one interface is specified by the unicast address. A
packet moves from one host to the destination host when it is sent to a unicast
address destination.
• Multicast Addresses: It represents a group of IP devices and can only be used
as the destination of a datagram.
• Anycast Addresses: The multicast address and the anycast address are the same.
The way the anycast address varies from other addresses is that it can deliver the
same IP address to several servers or devices. Keep in mind that the hosts do not
receive the IP address. Stated differently, multiple interfaces or a collection of
interfaces are assigned an anycast address.
Advantages
• Faster Speeds: IPv6 supports multicast rather than broadcast in IPv4.This
feature allows bandwidth-intensive packet flows (like multimedia streams) to be
sent to multiple destinations all at once.
• Stronger Security: IPSecurity, which provides confidentiality, and data
integrity, is embedded into IPv6.
• Routing efficiency
• Reliability
• Most importantly it’s the final solution for growing nodes in Global-network.
• The device allocates addresses on its own.
• Internet protocol security is used to support security.
• Enable simple aggregation of prefixes allocated to IP networks; this saves
bandwidth by enabling the simultaneous transmission of large data packages.
Disadvantages
• Conversion: Due to widespread present usage of IPv4 it will take a long period
to completely shift to IPv6.
• Communication: IPv4 and IPv6 machines cannot communicate directly with
each other.
• Not Going Backward Compatibility: IPv6 cannot be executed on IPv4-capable
computers because it is not available on IPv4 systems.
• Conversion Time: One significant drawback of IPv6 is its inability to uniquely
identify each device on the network, which makes the conversion to IPV4
extremely time-consuming.
• Cross-protocol communication is forbidden since there is no way for IPv4 and
IPv6 to communicate with each other.