Professional Documents
Culture Documents
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.
2. What is the protocol data unit (PDU) employed at each lower layer?
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.
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.
IP Protocol: IP protocol is used in this layer, and it is the most significant part of the
entire TCP/IP suite.
RARP
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
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
IGMP
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?
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.
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
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.
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.
IPv4 has a 32-bit address length IPv6 has a 128-bit address length
The Security feature is dependent IPSEC is an inbuilt security feature in the IPv6
on application protocol
In IPv4 Packet flow identification is In IPv6 packet flow identification are Available
not available and uses the flow label field in the header
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
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.
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)
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.
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)
Distance vector:
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.
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.
7.c) What is digital signature? How authentication is provided using digital signature?(4)
8.a) How message authentication code (MAC) works? Explain. Does it provide message
integrity? (5)
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.