You are on page 1of 44

Contents

Mid 1...........................................................................................................................................................4
1.What are the three criteria necessary for an effective and efficient network? For n devices in a
network, what is the number of cable links required for a mesh, ring, bus, and star topology?.............4
3. What are the three fundamental characteristics determine the effectiveness of the data
communication system?..........................................................................................................................5
2. What is the protocol data unit (PDU) employed at each lower layer?.................................................5
3. In Fig. 1, computer A sends a message to computer D via LAN 1, router Rl, and LAN 2. Show the
contents of the packets and frames at the network and data link layer for each hop interface.............5
4. In Fig. 1, assume that the communication is between a process running at computer A with port
address i and a process running at computer D with port address 1. Show the contents of packets and
frames at the network, data link, and transport layer for each hop........................................................5
5. What are the responsibilities of the network and transport layer in the Internet model?!................6
Transport Layer(4)................................................................................................................................6
network layer or Internet Layer...............................................................................................................8
Following are the protocols used in this layer are:................................................................8
6. If the data link layer can detect errors between hops, why do you think we need another checking
mechanism at the transport layer?.......................................................................................................11
7. What is the difference between a port address, a logical address, and a physical address?.............11
2nd mid.......................................................................................................................................................13
1.What is subnetting? 4.........................................................................................................................13
An organization is granted the block 211.17.180.0/24. The administrator 4 wants to create 32 subnets.
...............................................................................................................................................................13
i) Find the subnet mask.........................................................................................................................13
ii) Find the number of addresses in each subnet...................................................................................13
iii) Find the first and last addresses in subnet 1.....................................................................................13
iv) Find the first and last addresses in subnet 32...................................................................................13
2. Draw the IPv4 datagram format. Write short note about time to live (TTL) and protocol in IPv4
datagram...............................................................................................................................................13
3.Why fragmentation is needed in IPv4? 2............................................................................................13
In an IPv4 packet, the value of HLEN is 5, and the.................................................................................13
value of total length field is 0X0028. How many bytes of data are being carried by this packet?.........13
4. Discuss about network specific and host specific packet forwarding techniques. (2).......................13
5. What is two-node loop instability problem in distance vector routing? How can we solve it? 3......14
1. Split horizon..............................................................................................................................14
2. Split horizon with poison reverse........................................................................................14
6. Explain link state routing protocol with example. 6...........................................................................14
3 batch question solutions........................................................................................................................17
rd

1.a) What is DHCP? How does DHCP work? Write down the advantages and disadvantages of...........17
DHCP? (4)..............................................................................................................................................17
1.b) What is socket address? From Fig. 1, Assume that the communication is between a process 1
running at computer A with port address j and a process running at computer D with port address i.
Show the contents of packets and frames at the network, data link, and transport layer for each hop.
(3)..........................................................................................................................................................17
1 .c) What are the responsibilities of the transport layer in the Internet model? Draw the IPv4
datagram format.(5)..............................................................................................................................17
2.a) Explain the advantages of IPv6 when compared to IPv4. In which transition strategy do we need
to encapsulate IPv6 packets in the IPv4 packets? (4)............................................................................19
2.b) Switch is a 'self-learning' device. What does it learn when time progress? How does it learn?
Describe it using a simple scenario.(3)..................................................................................................19
2.d) What do you mean by loopback interface? An organization is assigned the block
2000:1456:2474/48. What is the IPv6 address of an interface in the third subnet if the IEEE physical
address of the computer is (F5-A9-23-14-7A-D2)16?(3)........................................................................20
3.a) What is subnetting? An organization is granted the block 130.56.0.0/16. The administrator wants
to create 512 subnets.(5).......................................................................................................................20
i) Find the subnet mask.........................................................................................................................20
ii) Find the number of addresses in each subnet...................................................................................20
iii) Find the first and last addresses in subnet 1.....................................................................................20
iv) Find the first and last addresses in subnet 512.................................................................................20
3.b) Describe the TCP terms in brief. (3)................................................................................................20
3.c) What is NAT? How can NAT help in address depletion? Explain with necessary diagram.(4).........20
(4.a) What is indirect packet delivery? Discuss about network specific and host specific packet
forwarding techniques.(4).....................................................................................................................20
4. b) Derive the routing table for the following Fig. 2. Also, show the forwarding process if a packet
arrives at R1 with the destination address 180.70.65.140 (5)...............................................................20
4.c) Compare among the Internet, WWW, and HTTP.(3)......................................................................20
5. a) Why should we use routing protocol? What is the difference between Link-state and Distance
Vector routing? The network given below (Fig. 3) uses Link-state routing, What will be the routing
table of router A?(5)..............................................................................................................................21
5. b) What are the policies of congestion control in TCP? Explain any of them with necessary diagram.
(5)..........................................................................................................................................................21
5.c) Write a short note on Address Resolution Protocol (ARP).(2)........................................................21
6 .a) Use the Caesar cipher with k = 10 to encrypt the plaintext "exam". Then decrypt the message to
get the original plaintext.(3)..................................................................................................................22
6.b) In the Go-Back-N protocol, the size of the send window can be 2m - 1, while the size of the
receive window is only 1. How can flow control be accomplished when there is a big difference
between the size...................................................................................................................................22
c) Do the MAC addresses used in an 802.3 (Wired Ethernet) and the MAC addresses used in an 802.11
(Wireless Ethernet) belong to two different address spaces?(2)...........................................................22
6. d) Since UDP is unreliable, why is it used in transport layer?(2)........................................................22
d) Since UDP is unreliable, why is it used in transport layer?................................................................22
7.a) What is RSA algorithm? Alice wants to send message a to Bob. Then Bob need to select keys.
Suppose, Bob chosen p = 11 and q = 5 in the RSA algorithm. Now, find the value of d. Also, encrypt the
message "GOOD" using Bob's public key so that he can only decrypt. For simplicity, do the encryption
and decryption character by character.(5)............................................................................................23
7. b) Define the type of attack in each of the following cases(3)...........................................................23
i) A student breaks into a professor's office to obtain a copy of the next test......................................23
ii) A student gives a check for $10 to buy a used book. Later the student finds out that the check was
cashed for $100.....................................................................................................................................23
iii) A student sends hundreds of e-mails per day to the school using a phony return e........................23
mail address..........................................................................................................................................23
7.c) What is digital signature? How authentication is provided using digital signature?(4)..................23
8.a) How message authentication code (MAC) works? Explain. Does it provide message integrity? (5)
...............................................................................................................................................................23
8.b) Alice and Bob exchange confidential messages. They share a very large number as the encryption
and decryption key in both directions. Is this an example of symmetric-key or asymmetric-key
cryptography? Explain. c) When Diffie-Hellman algorithm is effective compared with RSA in public-key
cryptography? (2)..................................................................................................................................23
8.c) Let's assume that, Alice wants to establish a shared secret with Bob and they agree on a prime
number, p and a base, g in advance. For our example, let's assume that p= 13 and g 9. Now, calculate
the shared secret using Diffie-Hellman algorithm.(5)............................................................................24
Mid 1
1.What are the three criteria necessary for an effective and efficient network? For n
devices in a network, what is the number of cable links required for a mesh, ring, bus, and
star topology?

The most important criteria are performance, reliability and security. Performance of the network
depends on number of users, type of transmission medium, the capabilities of the connected h/w
and the efficiency of the s/w. Reliability is measured by frequency of failure, the time it takes a
link to recover from the failure and the network’s robustness in a catastrophe. Security issues
include protecting data from unauthorized access and viruses.

 Mesh topology: In this topology, each and every device has been connected
to other device through ‘point to point link’. For n devices in a
network,   links are required for mesh topology.

 ‘Ring topology’: Here, every device is connected to 2 devices on either side.


For ‘n devices in a network’, n links are required for ring topology.

 Bus topology: Here, the ‘devices are connected’ to main cables using drop


lines. For n devices in a network, n+1 cables are required.

 Star topology: Here, every device is connected using star hub. For ‘n


devices’ in a ‘network’, n cable links are used in star topology.  
3. What are the three fundamental characteristics determine the effectiveness of the data
communication system?

The effectiveness of the data communication system depends on 3 fundamental characters:


Delivery: The system must deliver data to the correct destination.

Accuracy: The system must deliver data accurately.

Timeliness: The system must deliver data in a timely manner.

2. What is the protocol data unit (PDU) employed at each lower layer?

In telecommunications, a protocol data unit (PDU) is a single unit of information transmitted among


peer entities of a computer network. A PDU is composed of protocol-specific control information
and user data. In the layered architectures of communication protocol stacks, each layer implements
protocols tailored to the specific type or mode of data exchange.
For example, the Transmission Control Protocol (TCP) implements a connection-oriented transfer
mode, and the PDU of this protocol is called a segment, while the User Datagram Protocol (UDP)
uses datagrams as protocol data units for connectionless communication. A layer lower in
the Internet protocol suite, at the Internet layer, the PDU is called a packet, irrespective of its
payload type.

3. In Fig. 1, computer A sends a message to computer D via LAN 1, router Rl, and LAN 2.
Show the contents of the packets and frames at the network and data link layer for each
hop interface.

4. In Fig. 1, assume that the communication is between a process running at computer A


with port address i and a process running at computer D with port address 1. Show the
contents of packets and frames at the network, data link, and transport layer for each hop.
5. What are the responsibilities of the network and transport layer in the Internet model?!

Transport Layer(4)
The transport layer is responsible for the reliability, flow control, and correction of data
which is being sent over the network.

The two protocols used in the transport layer are User Datagram protocol and
Transmission control protocol.

o User Datagram Protocol (UDP)


o It provides connectionless service and end-to-end delivery of transmission.
o It is an unreliable protocol as it discovers the errors but not specify the
error.
o User Datagram Protocol discovers the error, and ICMP protocol reports the
error to the sender that user datagram has been damaged.
o UDP consists of the following fields:
Source port address: The source port address is the address of the
application program that has created the message.
Destination port address: The destination port address is the address of
the application program that receives the message.
Total length: It defines the total number of bytes of the user datagram in
bytes.
Checksum: The checksum is a 16-bit field used in error detection.
o UDP does not specify which packet is lost. UDP contains only checksum; it
does not contain any ID of a data segment.
o Transmission Control Protocol (TCP)
o It provides a full transport layer services to applications.
o It creates a virtual circuit between the sender and receiver, and it is active
for the duration of the transmission.
o TCP is a reliable protocol as it detects the error and retransmits the
damaged frames. Therefore, it ensures all the segments must be received
and acknowledged before the transmission is considered to be completed
and a virtual circuit is discarded.
o At the sending end, TCP divides the whole message into smaller units
known as segment, and each segment contains a sequence number which
is required for reordering the frames to form an original message.
o At the receiving end, TCP collects all the segments and reorders them
based on sequence numbers.
network layer or Internet Layer
o An internet layer is the third layer of the TCP/IP model.

o An network layer is also known as the Internet Layer Internet Layer.


o The main responsibility of the internet layer is to send the packets from any network, and
they arrive at the destination irrespective of the route they take.

Following are the protocols used in this layer are:

IP Protocol: IP protocol is used in this layer, and it is the most significant part of the
entire TCP/IP suite.

Following are the responsibilities of this protocol:

o IP Addressing: This protocol implements logical host addresses known as IP addresses.


The IP addresses are used by the internet and higher layers to identify the device and to
provide internetwork routing.
o Host-to-host communication: It determines the path through which the data is to be
transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the
transport layer protocol. An IP protocol ensures that the data is sent and received
securely, it encapsulates the data into message known as IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by
data link layer protocol is known as Maximum Transmission unit (MTU). If the size of
IP datagram is greater than the MTU unit, then the IP protocol splits the datagram into
smaller units so that they can travel over the local network. Fragmentation can be done
by the sender or intermediate router. At the receiver side, all the fragments are
reassembled to form an original message.
o Routing: When IP datagram is sent over the same local network such as LAN, MAN,
WAN, it is known as direct delivery. When source and destination are on the distant
network, then the IP datagram is sent indirectly. This can be accomplished by routing the
IP datagram through various devices such as routers.
ARP Protocol

o ARP stands for Address Resolution Protocol.


o ARP is a network layer protocol which is used to find the physical address(MAC) from the
IP address(IP).
o The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical address of the device, it
broadcasts the ARP request to the network.
o ARP reply: Every device attached to the network will accept the ARP request and
process the request, but only recipient recognize the IP address and sends back
its physical address in the form of ARP reply. The recipient adds the physical
address both to its cache memory and to the datagram header

RARP

RARP is abbreviation of Reverse Address Resolution Protocol.

The client broadcasts a RARP request with an Ethernet broadcast address and
with its own physical address. The server responds by informing the client its IP
address.
o How is RARP different from ARP ?
RARP ARP

RARP stands for Reverse Address ARP stands for Address Resolution
Resolution Protocol Protocol

In RARP, we find our own IP In ARP, we find the IP address of a


address remote machine

The MAC address is known and the The IP address is known, and the MAC
IP address is requested address is being requested

It uses the value 3 for requests and 4 It uses the value 1 for requests and 2 for
for responses responses
Uses of RARP :
RARP is used to convert the Ethernet address to an IP address.
It is available for the LAN technologies like FDDI, token ring LANs, etc.

ICMP Protocol

o ICMP stands for Internet Control Message Protocol.


o It is a mechanism used by the hosts or routers to send notifications regarding datagram
problems back to the sender.
o A datagram travels from router-to-router until it reaches its destination. If a router is
unable to route the data because of some unusual conditions such as disabled links, a
device is on fire or network congestion, then the ICMP protocol is used to inform the
sender that the datagram is undeliverable.
o An ICMP protocol mainly uses two terms:
o ICMP Test: ICMP Test is used to test whether the destination is reachable or not.
o ICMP Reply: ICMP Reply is used to check whether the destination device is
responding or not.
o The core responsibility of the ICMP protocol is to report the problems, not correct them.
The responsibility of the correction lies with the sender.
o ICMP can send the messages only to the source, but not to the intermediate routers
because the IP datagram carries the addresses of the source and destination but not of
the router that it is passed to.

IGMP

IGMP is acronym for Internet Group Management Protocol. IGMP is a


communication protocol used by hosts and adjacent routers for multicasting
communication with IP networks and uses the resources efficiently to transmit
the message/data packets.

Applications:
 Streaming –
Multicast routing protocol are used for audio and video streaming over the
network i.e., either one-to-many or many-to-many.
 Gaming –
Internet group management protocol is often used in simulation games
which has multiple users over the network such as online games.
 Web Conferencing tools –
Video conferencing is a new method to meet people from your own
convenience and IGMP connects to the users for conferencing and transfers
the message/data packets efficiently.

6. If the data link layer can detect errors between hops, why do you think we need another
checking mechanism at the transport layer?

7. What is the difference between a port address, a logical address, and a physical address?

Port address - transport layer, logical address - network


layer, physical address - data link and physical layer. Port
address is the address of a process on a host. A logical
address (IP) in the Internet is currently a 32-bit address
that can uniquely define a host connected to the
Internet. Physical address is address of node as defined by
it's LAN or WAN. 
Give some advantages and disadvantages of combining the session, presentation,
and application layer in the OSI model into one single application layer in the
Internet model.
The Advantages are :
a). Single layer to study as all the functionalities is provided at this layer.
b). Higher Bandwidth as number of layers is reduced.
c). It reflects the real-life separation of application from the TCP-downward sections of the OSI
model.

The Disadvantages are :-


a). Can make reasoning about the architecture of network systems less effective.
b). There will be security issues as the Network security and Application Security will open at a
single point which may expose our network open to our threat.
c). It makes troubleshooting hard as multiple errors may reside at a single...
2nd mid
1.What is subnetting? 4

A subnetting is a network within a network.


Subnetting is the strategy used to partition a single physical network into more than one smaller
logical sub-networks (subnets)

An organization is granted the block 211.17.180.0/24. The administrator wants to create 32


subnets.

i) Find the subnet mask 

ii) Find the number of addresses in each subnet 

iii) Find the first and last addresses in subnet 1

iv) Find the first and last addresses in subnet 32


2. Draw the IPv4 datagram format. Write short note about time to live (TTL) and protocol
in IPv4 datagram 

Time to live: It is a 8 bit field in IPV4 datagram format. A datagram has a limited lifetime in its
travel through an internet.
This field was originally designed to hold a timestamp, which was decremented by each visited
router. The datagram was discarded when the value became zero.

Protocol. This 8-bit field defines the higher-level protocol that uses the services of
the IPv4 layer. An IPv4 datagram can encapsulate data from several higher-level
protocols such as TCP, UDP, ICMP, and IGMP. This field specifies the final destination
protocol to which the IPv4 datagram is delivered.
3.Why fragmentation is needed in IPv4? 2

Different Networks may have different maximum transmission unit (MTU), for
example due to differences in LAN technology. When one network wants to
transmit datagrams to a network with a smaller MTU, the routers on path may
fragment and reassemble datagrams.

In an IPv4 packet, the value of HLEN is 5, and the

value of total length field is 0X0028. How many bytes of data are being carried by this
packet? 

Solution The HLEN value is 5, which means the total number of bytes in the header is 5 × 4, or 20 bytes
(no options) The total length is 40 bytes, which means the packet is carrying 20 bytes of data (40 − 20).

4. Discuss about network specific and host specific packet forwarding techniques. (2)

2. Network-Specific Method

Here the routing table does not have an entry for all the destination hosts in
the network connected to the router. Instead, it has an entry of the destination
networks itself connected to the router.

3. Host-Specific Method

It is the reverse of the network-specific method. Here the routing table has
an entry for all the destination hosts in the destination network. It
reduces the efficiency of the routing table as the size of the routing table is
increased. It is usually used for checking the routes and for security purposes.
 5. What is two-node loop instability problem in distance vector routing? How can we solve
it? 3

Two-Node Loop Instability problem with distance vector routing is instability, which means that
a network using this protocol can become unstable. This problem is known as count to infinity.
and solution to this problem is :
1. Split horizon
The addition of split horizon solves the count to infinity problem. Here, when a router
sends a routing update to its neighbors, it does not send those routes it learned from
each neighbor back to that neighbor.
2. Split horizon with poison reverse
We can demonstrate a stronger version of split horizon, called split horizon with poison
reverse. In this variation of split horizon, when a router sends a routing update to its
neighbors, it sends those routes it learned from each neighbor back to that neighbor
with infinite cost information to make sure that the neighbour does not use that route.
 6. Explain link state routing protocol with example. 6

Link state routing is the second family of routing protocols.


In this protocol, each node of the network maintains entire topology of the
network. To update the routing table ie for the formation of shortest path tree
for each node, Dijkstra Algorithm is used which is a greedy single source
shortest path algorithm.
While distance-vector routers use a distributed algorithm to compute their
routing tables, link-state routing uses link-state routers to exchange messages
that allow each router to learn the entire network topology.

Features of link state routing protocols – 


 Link state packet – A small packet that contains routing information. 
 
 Link state database – A collection of information gathered from the link-
state packet. 
 
 Shortest path first algorithm (Dijkstra algorithm) – A calculation
performed on the database results in the shortest path 
 
 Routing table – A list of known paths and interfaces.

Examples of link state routing protocols are: (1st 2 ta dibi)


 Open Shortest Path First (OSPF) for IP
 The ISO's Intermediate System to Intermediate System (IS-IS) for CLNS and IP
 DEC's DNA Phase V
 Novell's NetWare Link Services Protocol (NLSP)

OSPF Messages – Open Shortest Path First (OSPF) is a routing protocol for Internet


Protocol (IP) networks. It uses a link state routing (LSR) algorithm to gathers link state
information from available routers and constructs a topology map of the network. The
topology is presented as a routing table to the Internet Layer for routing packets by their
destination IP address. OSPF supports Internet Protocol Version 4 (IPv4) and Internet
Protocol Version 6 (IPv6) networks and supports the Classless Inter-Domain
Routing (CIDR) addressing model.
Intermediate System to Intermediate System (IS-IS, also written ISIS) is a routing
protocol designed to move information efficiently within a computer network, a
group of physically connected computers or similar devices. It accomplishes this
by determining the best route for data through a packet switching network.
The IS-IS protocol is defined as an international standard within the Open Systems
Interconnection (OSI) reference design
3rd batch question solutions
1.a) What is DHCP? How does DHCP work? Write down the advantages and
disadvantages of DHCP? (4)

Dynamic Host Configuration Protocol is a network management protocol that is used to


dynamically assign the IP address and other information to each host on the network so that
they can communicate efficiently.

How do DHCP works?


DHCP works at the application layer to dynamically assign the IP address to the client and this
happens through the exchange of a series of messages called DHCP transactions or DHCP
conversation.

 DHCP Discovery: The DHCP client broadcast messages to discover the DHCP servers.
The client computer sends a packet with the default broadcast destination
of 255.255.255.255 or the specific subnet broadcast address if any configured.
255.255.255.255 is a special broadcast address, which means “this network”: it lets
you send a broadcast packet to the network you’re connected to.

 DHCP Offer: When the DHCP server receives the DHCP Discover message then it
suggests or offers an IP address(form IP address pool) to the client by sending a DHCP
offer message to the client. This DHCP offer message contains the proposed IP address
for DHCP client, IP address of the server, MAC address of the client, subnet mask,
default gateway, DNS address, and lease information.
1. the proposed IP address for DHCP client (here 192.168.1.11)
2. Subnet mask to identify the network (here 255.255.255.0)
3. IP of the default gateway for the subnet (here 192.168.1.1)
4. IP of DNS server for name translations (here 8.8.8.8)

 DHCP Request: In most cases, the client can receive multiple DHCP offer because in a
network there are many DHCP servers(as they provide fault tolerance). If the IP
addressing of one server fails then other servers can provide backup. But, the client
will accept only one DHCP offer. In response to the offer, the client sends a DHCP
Request requesting the offered address from one of the DHCP servers. All the other
offered IP addresses from remaining DHCP servers are withdrawn and returned to the
pool of IP available addresses.

 DHCP Acknowledgment: The server then sends Acknowledgment to the client


confirming the DHCP lease to the client. The server might send any other configuration
that the client may have asked. At this step, the IP configuration is completed and the
client can use the new IP settings.
Advantages of DHCP

1. It is easy to implement and automatic assignment of an IP address means an accurate


IP address.
2. The manual configuration of the IP address is not required. Hence, it saves time and
workload for the network administrators.
3. Duplicate or invalid IP assignments are not there which means there is no IP address
conflict.
4. It is a great benefit for mobile users as the new valid configurations are automatically
obtained when they change their network.

Disadvantages of DHCP

1. As the DHCP servers have no secure mechanism for the authentication of the client so
any new client can join the network. This posses security risks like unauthorized clients
being given IP address and IP address depletion from unauthorized clients.
2. The DHCP server can be a single point of failure if the network has only one DHCP
server.

1.b) What is socket address? From Fig. 1, Assume that the communication is between a
process 1 running at computer A with port address j and a process running at computer D
with port address i. Show the contents of packets and frames at the network, data link, and
transport layer for each hop.(3)

In the standard Internet protocols TCP and UDP, a socket address is the combination
of an IP address and a port number
1 .c) What are the responsibilities of the transport layer in the Internet model? Draw the
IPv4 datagram format.(5)

The transport layer is responsible for the reliability, flow control, and correction of data
which is being sent over the network.

The two protocols used in the transport layer are User Datagram protocol and
Transmission control protocol.

o User Datagram Protocol (UDP)


o It provides connectionless service and end-to-end delivery of transmission.
o It is an unreliable protocol as it discovers the errors but not specify the
error.
o User Datagram Protocol discovers the error, and ICMP protocol reports the
error to the sender that user datagram has been damaged.
o UDP consists of the following fields:
Source port address: The source port address is the address of the
application program that has created the message.
Destination port address: The destination port address is the address of
the application program that receives the message.
Total length: It defines the total number of bytes of the user datagram in
bytes.
Checksum: The checksum is a 16-bit field used in error detection.
o UDP does not specify which packet is lost. UDP contains only checksum; it
does not contain any ID of a data segment.
o Transmission Control Protocol (TCP)
o It provides a full transport layer services to applications.
o It creates a virtual circuit between the sender and receiver, and it is active
for the duration of the transmission.
o TCP is a reliable protocol as it detects the error and retransmits the
damaged frames. Therefore, it ensures all the segments must be received
and acknowledged before the transmission is considered to be completed
and a virtual circuit is discarded.
o At the sending end, TCP divides the whole message into smaller units
known as segment, and each segment contains a sequence number which
is required for reordering the frames to form an original message.
o At the receiving end, TCP collects all the segments and reorders them
based on sequence numbers.
Differences between IPv4 and IPv6
 
IPv4 IPv6

IPv4 has a 32-bit address length IPv6 has a 128-bit address length

It Supports Manual and DHCP It supports Auto and renumbering address


address configuration configuration

In IPv4 end to end, connection In IPv6 end to end, connection integrity is


integrity is Unachievable Achievable

It can generate 4.29×109 address Address space of IPv6 is quite large it can


space produce 3.4×1038 address space

The Security feature is dependent IPSEC is an inbuilt security feature in the IPv6
on application protocol

Address representation of IPv4 is in


decimal Address Representation of IPv6 is in hexadecimal
IPv4 IPv6

Fragmentation performed by Sender In IPv6 fragmentation performed only by the


and forwarding routers sender

In IPv4 Packet flow identification is In IPv6 packet flow identification are Available
not available and uses the flow label field in the header

In IPv4 checksum field is available In IPv6 checksum field is not available

It has broadcast Message In IPv6 multicast and anycast message


Transmission Scheme transmission scheme is available

In IPv6 Encryption and Authentication are


In IPv4 Encryption and provided 
Authentication facility not provided  

IPv6 has header of 40 bytes fixed 


IPv4 has a header of 20-60 bytes.  

2.a) Explain the advantages of IPv6 when compared to IPv4. In which transition strategy
do we need to encapsulate IPv6 packets in the IPv4 packets? (4)

 More Efficient Routing – IPv6 reduces the size of routing tables and makes
routing more efficient and hierarchical. In IPv6 networks, fragmentation is
handled by the source device, rather than a router, using a protocol for discovery
of the path’s maximum transmission unit.
 More efficient packet processing – Compared with the IPv4, IPv6 contains no IP-
level checksum, so the checksum does not need to be recalculated at every
router hop.
 Directed Data Flows – IPv6 supports multicast rather than broadcast. Multicast
allows bandwidth-intensive packet flows to be sent to multiple destinations
simultaneously, saving network bandwidth.
 Simplified network configuration – IPv6 devices can independently auto-
configure themselves when connected to other IPv6 devices. Configuration tasks
that can be carried out automatically include IP address assignment and device
numbering.
 Security – IPSec security, which provides confidentiality, authentication, and data
integrity, is engraved into IPv6.
Transition from IPv4 to IPv6 address
 
When we want to send a request from an IPv4 address to an IPv6 address, but it isn’t
possible because IPv4 and IPv6 transition is not compatible. For a solution to this
problem, we use some technologies. These technologies are Dual Stack Routers,
Tunneling, and NAT Protocol Translation. These are explained as following below. 
 
1. Dual-Stack Routers: 
In dual-stack router, A router’s interface is attached with IPv4 and IPv6 addresses
configured are used in order to transition from IPv4 to IPv6. 
 

In this above diagram, A given server with both IPv4 and IPv6 addresses configured can
communicate with all hosts of IPv4 and IPv6 via dual-stack router (DSR). The dual stack
router (DSR) gives the path for all the hosts to communicate with the server without
changing their IP addresses. 

 
1. Tunneling: 
Tunneling is used as a medium to communicate the transit network with the different
IP versions.

In this above diagram, the different IP versions such as IPv4 and IPv6 are present. The
IPv4 networks can communicate with the transit or intermediate network on IPv6 with
the help of the Tunnel. It’s also possible that the IPv6 network can also communicate
with IPv4 networks with the help of a Tunnel. 
 
1. NAT Protocol Translation: 
With the help of the NAT Protocol Translation technique, the IPv4 and IPv6 networks
can also communicate with each other which do not understand the address of
different IP version. 
Generally, an IP version doesn’t understand the address of different IP version, for the
solution of this problem we use NAT-PT device which removes the header of first
(sender) IP version address and add the second (receiver) IP version address so that
the Receiver IP version address understand that the request is sent by the same IP
version, and its vice-versa is also possible. 
 

In the above diagram, an IPv4 address communicates with the IPv6 address via a NAT-
PT device to communicate easily. In this situation, the IPv6 address understands that the
request is sent by the same IP version (IPv6) and it responds

2.b) Switch is a 'self-learning' device. What does it


learn when time progress? How does it learn?
Describe it using a simple scenario.(3)
 Hub: Hub is a multiport repeater. It has multiple ports that accept Ethernet connections from
different network devices.  It is considered as the least intelligent device as it neither filters the
data, nor it knows where the data is supposed to be sent. When a data packet arrives at one
of the ports, it is copied to all of the other ports connected to it. As a result, all the devices
receive the data packet, even if it is not for them. There are two types of hubs – active and
passive. An active hub is a multi-point repeater which can regenerate signals, while a passive
hub is a connector which connects wires coming from other systems.
 Switch: A switch is smarter than a hub. Similar to the hub, it is a connection point for
all the devices in the network. However, it is more efficient at passing a data packet
across the network. It records the MAC addresses of the computers connected to it in a
tabular format. When the data packet arrives, it reads the destination address and
sends it to the appropriate system rather than sending it to all connected devices. If the
destination address is not available, the switch sends the data packet to all the devices
across the network.
 Router: It is the most intelligent of the three networking devices. It is designed to understand,
manipulate, and direct data packets based on their IP addresses. It connects a local area
network (LANs) and wide area network (WANs) and features a dynamically updating routing
table based on which they make decisions on routing data packets. When a data packet is
received, it inspects the IP address and determines if the packet was meant for its network or
not. If yes, then it receives the data packet, and if not then it sends it off to another network.
2.c) Why does a computer need MAC address in spite
of having an IP address? What is the difference
between switch and hub?(2)

So again, IP Addresses are logical and routeable addresses.  Computer A could potentially
learn the IP Address of Computer 2.   However, MAC Addresses are physical and are NOT
routeable.  So, Computer A could not really learn the MAC Address of Computer 2.

And that’s why computers have both MAC Addresses and IP Addresses.  MAC Addresses
handle the physical connection from computer to computer while IP Addresses handle the
logical routeable connection from both computer to computer AND network to network.

Difference between Hub and Switch: 


 
S.N
O HUB SWITCH
Hub is operated on Physical layer of OSI While switch is operated on Data link
1. model. layer of OSI Model.
While switch is a Unicast, multicast and
2. Hub is a broadcast type transmission. broadcast type transmission.
3. Hub have 4/12 ports. While switch can have 24 to 48 ports.
While in switch, different ports have
4. In hub, there is only one collision domain. own collision domain.
While switch is a full duplex
5. Hub is a half duplex transmission mode. transmission mode.
While in switch, Packet filtering is
6. In hub, Packet filtering is not provided. provided.
7. Hub cannot be used as a repeater. While switch can be used as a repeater.
Hub is not an intelligent device that sends While switch is an intelligent device that
message to all ports hence it is sends message to selected destination so
8. comparatively inexpensive. it is expensive.
Hub is simply old type of device and is not While switch is very sophisticated
9. generally used. device and widely used.
Hacking of systems attached to hub is Hacking of systems attached to switch is
10. complex. little easy.
2.d) What do you mean by loopback interface? An organization is assigned the block
2000:1456:2474/48. What is the IPv6 address of an interface in the third subnet if the IEEE
physical address of the computer is (F5-A9-23-14-7A-D2)16?(3)

A loopback interface is a virtual interface that is always up and reachable as


long as at least one of the IP interfaces on the switch is operational. As a result, a
loopback interface is useful for debugging tasks since its IP address can always be
pinged if any other switch interface is up.

3.a) What is subnetting? An organization is granted the block 130.56.0.0/16. The


administrator wants to create 512 subnets.(5)

i) Find the subnet mask

ii) Find the number of addresses in each subnet

iii) Find the first and last addresses in subnet 1

iv) Find the first and last addresses in subnet 512


3.b) Describe the TCP terms in brief. (3)

3.c) What is NAT? How can NAT help in address depletion? Explain with necessary
diagram.(4)

NAT stands for network address translation. It's a way to map multiple local private
addresses to a public one before transferring the information.

The issue with address depletion is only a problem for IPV4. IPv6 has enough addresses for
the foreseeable future.

So NAT for ipV4 allows all the systems in a local network to share one public IP address,
while using private IP addresses that are different for each machine. So there are systems
that are addressed as 192.168.1.1 all over the world, but NAT changes those private
addresses to real public ones before leaving the local network. NAT is responsible for
keeping track of the conversations to return responses to the correct price IP address.

NAT helps with address depletion by reusing private address space in designated private
networks, instead of using limited public address space. As an example take most people’s
home network.

"Home users and small businesses may have created small networks with
several hosts and need an IP address for each host. With the shortage of
addresses, this is a serious problem. A quick solution to this problem is called
network address translation (NAT). NAT enables a user to have a large set of
addresses internally and one address, or a small set of addresses, externally.
The traffic inside can use the large set; the traffic outside, the small set."
(4.a) What is indirect packet delivery? Discuss about network specific and host specific
packet forwarding techniques.(4)

An indirect delivery where the packet goes from router to router until it reaches the one


connected to the same physical network as its final destination."

4.b) Derive the routing table for the following Fig.


2. Also, show the forwarding process if a packet
arrives at R1 with the destination address
180.70.65.140 (5)
5.

4.c) Compare among the Internet, WWW, and HTTP.(3)


S.No.INTERNET WWW
Internet is a global network of WWW stands for World wide
1 networks. Web.

Internet is a means of
connecting a computer to any World Wide Web which is a
other computer anywhere in the collection of information which
2 world. is accessed via the Internet.

WWW is service on top of that


3 Internet is infrastructure. infrastructure.

Web can be viewed as


Internet can be viewed as a big collection of books on that
4 book-store. store.

English scientist Tim Berners-


It is originated sometimes in late Lee invented the World Wide
7 1960s. Web in 1989.

The first version of the Internet In the beginning WWW was


9 was known as ARPANET. known as NSFNET.

10 Internet uses IP address. WWW uses HTTP.

HTTP is the standard ‘language’ used to communicate between web browsers and
website servers.

WWW stands for World Wide Web, and it’s used mostly as a prefix. However, it does
indicate that a given website uses HTTP to communicate.

The main difference between WWW and HTTP is that they refer to different concepts.
Simply put, HTTP is the protocol that enables communication online, transferring data
from one machine to another. WWW is the set of linked hypertext documents that can
be viewed on web browsers (such as Firefox, Google Chrome, and more).

A major similarity, though, is that both HTTP and WWW are used in website URLs.
5.a) Why should we use routing protocol? What is the difference between Link-state
and Distance Vector routing? The network given below (Fig. 3) uses Link-state
routing, What will be the routing table of router A?(5)

A routed protocol is used to deliver application traffic. It provides appropriate


addressing information in its internet layer or network layer to allow a packet
to be forwarded from one network to another. 

Distance vector:

 It is a dynamic routing algorithm in which each router computes a distance


between itself and each possible destination i.e. its immediate neighbors.
 The router shares its knowledge about the whole network to its neighbors
and accordingly updates the table based on its neighbors.
 The sharing of information with the neighbors takes place at regular
intervals.
 It makes use of Bellman-Ford Algorithm for making routing tables.
 Problems – Count to infinity problem which can be solved by splitting
horizon. 
– Good news spread fast and bad news spread slowly. 
– Persistent looping problem i.e. loop will be there forever.
Link State Routing  – 
 It is a dynamic routing algorithm in which each router shares knowledge of
its neighbors with every other router in the network.
 A router sends its information about its neighbors only to all the routers
through flooding.
 Information sharing takes place only whenever there is a change.
 It makes use of Dijkstra’s Algorithm for making routing tables.
 Problems – Heavy traffic due to flooding of packets. 
– Flooding can result in infinite looping which can be solved by using
the Time to live (TTL) field. 
Comparison between Distance Vector Routing and Link State Routing: 
 
What are the policies of congestion control in
5.b)
TCP? Explain any of them with necessary
diagram. (5)
Congestion control refers to the techniques used to control or prevent
congestion. Congestion control techniques can be broadly classified into two
categories: 
 

 
Open Loop Congestion Control
Open loop congestion control policies are applied to prevent congestion before
it happens. The congestion control is handled either by the source or the
destination. 
Policies adopted by open loop congestion control – 
 
1. Retransmission Policy : 
It is the policy in which retransmission of the packets are taken care of. If the
sender feels that a sent packet is lost or corrupted, the packet needs to be
retransmitted. This transmission may increase the congestion in the
network. 
To prevent congestion, retransmission timers must be designed to prevent
congestion and also able to optimize efficiency. 
 
2. Window Policy : 
The type of window at the sender’s side may also affect the congestion.
Several packets in the Go-back-n window are re-sent, although some
packets may be received successfully at the receiver side. This duplication
may increase the congestion in the network and make it worse. 
Therefore, Selective repeat window should be adopted as it sends the
specific packet that may have been lost. 
 
3. Discarding Policy : 
A good discarding policy adopted by the routers is that the routers may
prevent congestion and at the same time partially discard the corrupted or
less sensitive packages and also be able to maintain the quality of a
message. 
In case of audio file transmission, routers can discard less sensitive packets
to prevent congestion and also maintain the quality of the audio file. 
 
4. Acknowledgment Policy : 
Since acknowledgements are also the part of the load in the network, the
acknowledgment policy imposed by the receiver may also affect congestion.
Several approaches can be used to prevent congestion related to
acknowledgment. 
The receiver should send acknowledgement for N packets rather than
sending acknowledgement for a single packet. The receiver should send an
acknowledgment only if it has to send a packet or a timer expires. 
 
5. Admission Policy : 
In admission policy a mechanism should be used to prevent congestion.
Switches in a flow should first check the resource requirement of a network
flow before transmitting it further. If there is a chance of a congestion or
there is a congestion in the network, router should deny establishing a virtual
network connection to prevent further congestion.
All the above policies are adopted to prevent congestion before it happens in
the network. 
 
Closed Loop Congestion Control
Closed loop congestion control techniques are used to treat or alleviate
congestion after it happens. Several techniques are used by different protocols;
some of them are: 
 
1. Backpressure : 
Backpressure is a technique in which a congested node stops receiving
packets from upstream node. This may cause the upstream node or nodes
to become congested and reject receiving data from above nodes.
Backpressure is a node-to-node congestion control technique that propagate
in the opposite direction of data flow. The backpressure technique can be
applied only to virtual circuit where each node has information of its above
upstream node. 
 
1. In above diagram the 3rd node is congested and stops receiving packets as
a result 2nd node may be get congested due to slowing down of the output
data flow. Similarly 1st node may get congested and inform the source to
slow down. 
 
2. Choke Packet Technique : 
Choke packet technique is applicable to both virtual networks as well as
datagram subnets. A choke packet is a packet sent by a node to the source
to inform it of congestion. Each router monitors its resources and the
utilization at each of its output lines. Whenever the resource utilization
exceeds the threshold value which is set by the administrator, the router
directly sends a choke packet to the source giving it a feedback to reduce
the traffic. The intermediate nodes through which the packets has traveled
are not warned about congestion. 
 

5.c) Write a short note on Address Resolution Protocol (ARP).(2)

ARP stands for Address Resolution Protocol.


o ARP is a network layer protocol which is used to find the physical address(MAC) from the
IP address(IP).
o The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical address of the device, it
broadcasts the ARP request to the network.
o ARP reply: Every device attached to the network will accept the ARP request and
process the request, but only recipient recognize the IP address and sends back
its physical address in the form of ARP reply. The recipient adds the physical
address both to its cache memory and to the datagram header

6 .a) Use the Caesar cipher with k = 10 to encrypt the


plaintext "exam". Then decrypt the message to get the
original plaintext.(3)
6.b) In the Go-Back-N protocol, the size of the send
window can be 2m - 1, while the size of the receive
window is only 1. How can flow control be
accomplished when there is a big difference between
the size of the send and receive windows? Briefly
Explain.(5)
Go-Back-N ARQ (Go-Back-N automatic repeat request) is a flow control protocol(Read
about Stop & Wait and Stop & Wait ARQ Flow Control Protocols) where the sender
continues to send several frames specified by a window size even without receiving
feedback from the receiver node. It can be said that it's a special case of the general
sliding window protocol where the transmitter or sender window size is N and the
receiver's window size is 1, which means that it can transmit N frames to the receiving
node before waiting for a feedback.

Now the receiver's duty is to keep the track of the sequence number of the next frame it
expects to receive and sends the feedback after every data packet it receives. Once the
sender has sent all the frames in its window, it makes sure that it has then received all
the feedbacks of the transmitted data packets, if in any case, it hasn't received a
feedback of any data packet and the time out timer expires, it then resends all the data
packets again, starting from the lost data packet to the final data packet.

 We can say that the Stop-and-Wait ARQ Protocol is actually a Go-Back-N ARQ in which
there are only two sequence numbers and the send window size is 1.

 In other words, m = 1, 2m - 1 = 1. In Go-Back-N ARQ, we said that the addition is modulo-2 m;
in Stop-and-Wait ARQ it is 2, which is the same as 2m when m = 1.

 Stop-and-Wait ARQ is a special case of Go-Back-N ARQ in which the size of the send
window is 1.
 In Go back N mechanism the receiving window size is small equal to 1. Therefore even though
the sender sends many packets the receiver buffer is small to accommodate the packets
resulting in congestion over the network.

c) Do the MAC addresses used in an 802.3 (Wired Ethernet) and the MAC addresses used
in an 802.11 (Wireless Ethernet) belong to two different address spaces?(2)

Yes, network interface cards would have to be changed to switch between Wired Ethernet and
Wireless Ethernet.

6. d) Since UDP is unreliable, why is it used in transport layer?(2)

o User Datagram Protocol (UDP)


o It provides connectionless service and end-to-end delivery of
transmission.
o It is an unreliable protocol as it discovers the errors but not specify the
error.
o User Datagram Protocol discovers the error, and ICMP protocol reports the
error to the sender that user datagram has been damaged.
o UDP consists of the following fields:
Source port address: The source port address is the address of the
application program that has created the message.
Destination port address: The destination port address is the address of
the application program that receives the message.
Total length: It defines the total number of bytes of the user datagram in
bytes.
Checksum: The checksum is a 16-bit field used in error detection.
o UDP does not specify which packet is lost. UDP contains only checksum; it
does not contain any ID of a data segment.

Alice wants to send message a to


7.a) What is RSA algorithm?
Bob. Then Bob need to select keys. Suppose, Bob
chosen p = 11 and q = 5 in the RSA algorithm. Now,
find the value of d. Also, encrypt the message
"GOOD" using Bob's public key so that he can only
decrypt. For simplicity, do the encryption and
decryption character by character.(5)
RSA algorithm is asymmetric cryptography algorithm. Asymmetric
actually means that it works on two different keys i.e. Public
Key and Private Key. 

The RSA algorithm is an asymmetric cryptography algorithm; this


means that it uses a public key and a private key (i.e two different,
mathematically linked keys). 
Define the type of attack in each of the following
7. b)
cases(3)
i) A student breaks into a professor's office to obtain a
copy of the next test
ii) A student gives a check for $10 to buy a used book.
Later the student finds out that the check was cashed
for $100
iii) A student sends hundreds of e-mails per day to the
school using a phony return email address.

7.c) What is digital signature? How authentication is provided using digital signature?(4)

The following points explain the entire process in detail −


 Each person adopting this scheme has a public-private key pair.
 Generally, the key pairs used for encryption/decryption and signing/verifying are
different. The private key used for signing is referred to as the signature key and
the public key as the verification key.
 Signer feeds data to the hash function and generates hash of data.
 Hash value and signature key are then fed to the signature algorithm which
produces the digital signature on given hash. Signature is appended to the data
and then both are sent to the verifier.
 Verifier feeds the digital signature and the verification key into the verification
algorithm. The verification algorithm gives some value as output.
 Verifier also runs same hash function on received data to generate hash value.
 For verification, this hash value and output of verification algorithm are
compared. Based on the comparison result, verifier decides whether the digital
signature is valid.
 Since digital signature is created by ‘private’ key of signer and no one else can
have this key; the signer cannot repudiate signing the data in future.

8.a) How message authentication code (MAC) works? Explain. Does it provide message
integrity? (5)

MAC algorithm is a symmetric key cryptographic technique to provide message


authentication. For establishing MAC process, the sender and receiver share a
symmetric key K.
Essentially, a MAC is an encrypted checksum generated on the underlying message
that is sent along with a message to ensure message authentication.
The process of using MAC for authentication is depicted in the following illustration −

Let us now try to understand the entire process in detail −


 The sender uses some publicly known MAC algorithm, inputs the message and
the secret key K and produces a MAC value.
 Similar to hash, MAC function also compresses an arbitrary long input into a
fixed length output. The major difference between hash and MAC is that MAC
uses secret key during the compression.
 The sender forwards the message along with the MAC. Here, we assume that
the message is sent in the clear, as we are concerned of providing message
origin authentication, not confidentiality. If confidentiality is required then the
message needs encryption.
 On receipt of the message and the MAC, the receiver feeds the received
message and the shared secret key K into the MAC algorithm and re-computes
the MAC value.
 The receiver now checks equality of freshly computed MAC with the MAC
received from the sender. If they match, then the receiver accepts the message
and assures himself that the message has been sent by the intended sender.
 If the computed MAC does not match the MAC sent by the sender, the receiver
cannot determine whether it is the message that has been altered or it is the
origin that has been falsified. As a bottom-line, a receiver safely assumes that
the message is not the genuine.

A message authentication code (MAC) is a cryptographic checksum on data


that uses a session key to detect both accidental and intentional modifications
of the data.

A MAC requires two inputs: a message and a secret key known only to the
originator of the message and its intended recipient(s). This allows the
recipient of the message to verify the integrity of the message and
authenticate that the messege's sender has the shared secret key. If a sender
doesn’t know the secret key, the hash value would then be different, which
would tell the recipient that the message was not from the original sender. 

8.b) Alice and Bob exchange confidential messages.


They share a
very large number as the encryption
and decryption key in both directions. Is this an
example of symmetric-key or asymmetric-key
cryptography? Explain.(b)
It is symmetric key.
1. Symmetric key technique: symmetric key is a single key that is used for both
encryption and decryption in both directions.
2. Asymmetric key technique: asymmetric key is two keys, where one key is used for
the encryption and another key for decryption in both directions. It is also known as
public key cryptography.
c) When Diffie-Hellman algorithm is effective
compared with RSA in public-key cryptography?
While the Diffie-Hellman key exchange may seem complex, it
is
fundamental to security exchanging data online. As long as
it is implemented alongside an appropriate authentication method and the
numbers have been appropriately selected, it is not considered vulnerable to
attack. The DH  key exchange was an innovative method for helping two
unknown parties communicate safely when it was developed in 1976

Let's assume that, Alice wants to establish a shared


secret with Bob and they agree on a prime number, p
and a base, g in advance. For our example, let's
assume that p= 13 and g 9. Now, calculate the shared
secret using Diffie-Hellman algorithm.(5)

You might also like