Viva Networklab
Viva Networklab
______________________________________________________________________
2. Explain TCP/IP Reference Model.
Ans: 4 layers of TCP/IP Model
1. Host-to-Network Layer /Network access layer
2. Internet Layer
3. Transport Layer
4. Application Layer
________________________________________________________________________
3. Differences between ISO-OSI model and TCP/IP model
4. List the various Transmission Modes in Computer Networks
Ans: The way in which data is transmitted from one device to another device is known as
transmission mode/communication mode.
a. Simplex mode : The communication is unidirectional
b. Half-Duplex Mode: each station can both transmit and receive, but not at the same time.
Example: Walkie-talkie
c. Full-Duplex Mode : The communication is bi-directional, i.e., the data flow in both the
directions. Both stations can transmit and receive simultaneously.
__________________________________________________________________
8.
____________________________________________________________________________
9. Explain Framing in datalink layer
Ans: Framing is the major function of datalink layer. Data-link layer takes the packets from the
Network Layer and encapsulates them into frames.
Methods of variable Framing
●1. Character count.
●2. Flag bytes with byte stuffing.
●3. Starting and ending flags, with bit stuffing.
_____________________________________________________________
10. Explain Flag bytes with byte stuffing.
Ans : insert a special escape byte (ESC) just before each ''accidental'' flag byte in the data.
This technique is called byte stuffing or character stuffing.
Thus, a framing flag byte can be distinguished from one in the data by the absence or presence
of an escape byte before it.
___________________________________________________
11. The original data : A B ESC C ESC FLAG FLAG D is given. What is the output after stuffing?
ANS:
After stuffing, we get A B ESC ESC C ESC ESC ESC FLAG ESC FLAG D
______________________________________________
_______________________________________________
15. Difference between switch and bridge
Ans:
__________________________________________________
19. List the Properties of Routing algorithms
Ans:
• Optimality – capability of routing algorithm to select the best route
• Simplicity and low overhead -With increasing complexity of the routing algorithms the
overhead also increases
• Robustness – means they should perform correctly in the face of unusual circumstances such
as hardware failure
• Stability -The routing algorithms should be stable under all possible circumstances.
• Flexibility – they should quickly & accurately adapt to a variety of network circumstances
• Fairness - Every node connected to the network should get a fair chance of transmitting their
packets.
_____________________________________________________
20. State the Optimality Principle in routing.
Ans: The optimality principle states that if router J is on the optimal path from router I to router K,
then the optimal path from J to K also falls along the same route.
______________________________________
21. Explain Flooding
Ans: Flooding is the static routing algorithm.
In this algorithm, every incoming packet is sent on all outgoing lines except the line on
which it has arrived
Advantages of Flooding
• It is very simple to setup and implement, since a router may know only its neighbours.
• It is extremely robust. Even in case of malfunctioning of a large number routers, the packets
find a way to reach the destination.
• All nodes which are directly or indirectly connected are visited. So, there are no chances for
any node to be left out.
• The shortest path is always chosen by flooding.
Limitations of Flooding
• Flooding tends to create an infinite number of duplicate data packets
• The network may be clogged with unwanted and duplicate data packets.
• It is wasteful if a single destination needs the packet, since it delivers the data packet to all
nodes irrespective of the destination.
__________________________________________________
22. Comparison between Distance Vector Routing and Link State Routing
Ans:
__________________________________________
23. Explain Congestion control
Ans: It refers to techniques and mechanisms that can either prevent congestion, before it happens,
or remove congestion, after it has happened.
24. What is the difference between open-loop and closed loop congestion control
Ans: In open-loop congestion control, policies are applied to prevent congestion before it happens.
Closed-loop congestion control mechanisms try to alleviate congestion after it happens.
______________________________
Ans:
1. Backpressure
Node 3 in the figure has more input data than it can handle. It drops some packets in its input buffer
and informs node 2 to slow down.
Node 2, in turn, may be congested because it is slowing down the output flow of data. If node 2 is
congested, it informs node 1 to slow down, which in turn may create congestion in node 1.
If so, node 1 informs the source of data to slow down. This, in time, alleviates the congestion.
The pressure on node 3 is moved backward to the source to remove the congestion.
2. Choke Packet
In backpressure, the warning is from one node to its upstream node, although the warning may
eventually reach the source station.
In the choke packet method, the warning is from the router, which has encountered congestion,
to the source station directly.
The intermediate nodes through which the packet has travelled are not warned.
26. List the techniques for achieving good quality of service in a network
ans:
• Scheduling
◦ FIFO
◦ Priority scheduling
◦ Weighted Fair Queuing
• Traffic shaping
◦ Leaky bucket
◦ token bucket
• Resource reservation
• Admission control
________________________________________________
Ans: Internetworking protocol (lP) does not have an inbuilt mechanism for sending error and control
messages. Ie, The IP protocol has no error-reporting or error-correcting mechanism. The IP
protocol also lacks a mechanism for host and management queries.
Eg: Destination unreachable : The destination unreachable error occurs when the packet does not
reach the destination. Suppose the sender sends the message, but the message does not reach the
destination, then the intermediate router reports to the sender that the destination is unreachable.
Echo-request and echo-reply message :
●A router or a host can send an echo-request message.
●It is used to ping a message to another host that "Are you alive".
●If the other host is alive, then it sends the echo-reply message.
____________________________________________
29. Differentiate ARP and RARP
___________________________
30.Explain the purpose of Dynamic Host Configuration Protocol (DHCP)
Ans: it is a network management protocol used to ‘dynamically’ assign an IP address to any device,
or node, on a network, so they can communicate using IP (Internet Protocol).
Working of DHCP
____________________________________________________
31. What is the maximum number of IP addresses that can be assigned to hosts on a local subnet
that uses the 255.255.255.192 subnet mask?
Ans:
Given subnet mask=255.255.255.192
Ie, 11111111 11111111 11111111 11000000
Thus, maximum no.of IP addresses that can be assigned to hosts = 2 no.ofhostbits – 2 =26 - 2 = 64-2 = 62
_______________________________________
32. Purpose of subnetting.
Ans: Subnetting is a process of dividing a single large network into multiple sub networks.
Uses of Subnetting
● Maintenance is easier for smaller networks. For example, if we consider a class A address, the
possible number of hosts is 224 for each network, it is obvious that it is difficult to maintain such a
huge number of hosts, but it would be quite easier to maintain if we divide the network into small
parts.
● Subnetting helps in organizing the network in an efficient way which helps in expanding the
technology for large firms and companies.
● Reduces traffic and maintain order and efficiency.
● Reduces network complexity
● Subnetting enhances the network's overall performance by removing redundant traffic.
● Increases network security .
● Simplified management
___________________________________
33. Classes of IPv4 Address
_______________________________
34. Find the class of each address
a. 00000010 10000010 01010100 01010101 : First bit is 0. Thus, class A
b. 252.5.15.111 : class E
c. 172.15.165.2 : class B
35. Differentiate IPV4 and IPV6
IPV4 IPV6
Header size : 20-60 bytes Header size : 40bytes
Address length :32 bits Address length :128 bits
Checksum field included No Checksum field included
Version 4 Version 6
Address representation is in decimal format Address representation is in hexadecimal format
Address consist of 4 fields separated by dot Address consist of 8 fields separated by colon
Addresses divided into 5 classes, A B C D E No classes
Eg : 128.90.12.1 2001:1A90:2123:1B23:2C13:1001:2123:3DEF
__________________________________________
36. List applications of UDP and TCP
Ans: TCP : Text Communication, file transfer, email sending etc
UDP : Online gaming, Real-time multimedia streaming
_____________________________________
37. List advantages and disadvantages of TCP
Ans:
Advantages of TCP
It is a reliable protocol.
It makes sure that the data reaches the proper destination in the exact order that it was sent.
Disadvantages of TCP
TCP is slower than UDP especially at the beginning of a file transfer. TCP’s congestion control can
also slow down data transfer to avoid n/w congestion
Additional expense to create and maintain connections since it is a connection oriented protocol.
TCP’s use of ACKs and retransmissions can add latency which can affect real-time applications
TCP uses more bandwidth than UDP, especially when establishing a connection,sending ACKs and
retransmitting data
__________________________________________________________
38. List advantages and disadvantages of UDP
Ans:
Advantages of UDP
Speed: UDP is faster than TCP because it does not have the overhead of establishing a connection
and ensuring reliable data delivery.
Lower latency: Since there is no connection establishment, there is lower latency and faster
response time.
Simplicity: UDP has a simpler protocol design than TCP, making it easier to implement and
manage.
Broadcast support: UDP supports broadcasting to multiple recipients, making it useful for
applications such as video streaming and online gaming.
UDP uses smaller packet sizes than TCP, which can reduce network congestion and improve overall
network performance.
Disadvantages of UDP
No reliability: UDP does not guarantee delivery of packets or order of delivery, which can lead to
missing or duplicate data.
No congestion control: UDP does not have congestion control, which means that it can send packets
at a rate that can cause network congestion.
Limited use cases: UDP is not suitable for applications that require reliable data delivery, such as
email or file transfers, and is better suited for applications that can tolerate some data loss, such as
video streaming or online gaming.
Not suitable for critical data : Not ideal for transferring important data where accuracy and
completeness matters, such as financial transactions
STEP 1
The client sends the first segment (SYN segment) in which only the SYN flag is set. This segment
is for synchronization of sequence Numbers.
STEP 2
The server sends the second segment, a SYN + ACK segment with two flag bits set as: SYN and
ACK.
STEP 3
The client sends the third segment. This is just an ACK segment.
It acknowledges the receipt of the second segment with the ACK flag and acknowledgment number
field.
40. List any 6 differences between TCP and UDP
Ans:
TCP UDP
Connection oriented Connection less
Reliable as it guarentees the delivery of packet Not reliable as it guarentees the delivery of
at receiver packet at receiver
Slower Faster
Retransmission of lost packets done No retransmission of lost packets
TCP used by HTTP, FTP,SMTP etc Used by DNS, DHCP, SNMP etc
Used where trustworthy communication is Used where quick communication is necessary
needed such as file transferring like live streaming
________________
41. Explain the architecture of FTP
Ans: It is an application layer protocol. Used for transferring a file from one host to another
____________________________________
42. Explain the purpose of DNS (Domain Name System).
Ans: It helps you find websites by translating easy-to-remember names (like www.example.com)
into the numerical IP addresses (like 192.0.2.1) that computers use to locate each other on the
internet.
_____________
1. recursive resolution
The client(resolver) can ask for a recursive answer from a name server.
This means that the resolver expects the name server to supply the final answer.
If the server is the authority for the domain name, it checks its database and responds.
If the server is not the authority, it sends the request to another server (the parent usually) and waits
for the response.
If the parent is the authority, it responds.otherwise it sends the query to yet another server.
When the query is finally resolved, the response travels back until it finally reaches the requesting
client. This is called recursive resolution
2. Iterative resolution
If the client doesnt ask for a recursive answer, the mapping can be done iteratively
If the server is the authority for the name, it sends an answer.
If it is not , it returns to the client, the IP address of the server that it thinks can resolve the query.
The client is responsible for repeating the query to this second server.
If the newly addressed server can resolve the problem, it answers the query with the IP address
Otherwise it returns the IP address of a new server to the client.
Now the client must repeat the query to the third server.
This process is called iterative resolution because the client repeats the same query to multiple
servers.
44. Working of Email.
46. Explain the functions of each layer in OSI model (most important)
Ans:
1) Physical layer
• transmit the individual bits from one node to another node.
• Bit synchronisation
• Line Configuration: It defines the way how two or more devices can be connected
physically.
• Data transmission : It defines the transmission mode whether it is simplex, half-duplex or
full-duplex mode between the two devices on the network.
• Topology : It defines the way how network devices are arranged.
• Signals: It determines the type of the signal used for transmitting the information.
2) Data-Link Layer
• Framing: The data link layer translates the physical's raw bit stream into packets known as
Frames.
• Physical Addressing
• Flow Control
• Error Control : error-free transfer of data frames.
• Access Control
3).Network Layer:
• Logical addressing
• Routing
• Packetising : A Network Layer receives the data from the upper layer and converts them into
packets
4) Transport Layer
• Service-point addressing: Computers run several programs simultaneously. Due to this
reason, the transmission of data from source to the destination not only from one computer
to another computer but also from one process to another process. The transport layer adds
the header that contains the address known as a service-point address or port address.
• Segmentation and reassembly: When the transport layer receives the message from the
upper layer, it divides the message into multiple segments, and each segment is assigned
with a sequence number that uniquely identifies each segment. When the message has
arrived at the destination, then the transport layer reassembles the message based on their
sequence numbers.
• Flow control
• Error control
5) Session Layer
• Dialog control: Session layer acts as a dialog controller that creates a dialog between two
processes or we can say that it allows the communication between two processes which can
be either half-duplex or full-duplex.
• Synchronization: Session layer adds some checkpoints when transmitting the data in a
sequence. If some error occurs in the middle of the transmission of data, then the
transmission will take place again from the checkpoint. This process is known as
Synchronization and recovery.
6) Presentation Layer
• Translation: It converts the data from sender-dependent format into a common format and
changes the common format into receiver-dependent format at the receiving end.
• Encryption: converting the sender-transmitted information into another form and sends the
resulting message over the network.
• Compression: it reduces the number of bits to be transmitted. Data compression is very
important in multimedia such as text, audio, video.
7) Application Layer
• An application layer serves as a window for users and application processes to access
network service.
• This layer provides the network services to the end-users.
• An application layer allows a user to access the files in a remote computer, to retrieve the
files from a computer and to manage the files in a remote computer.
• Mail services: An application layer provides the facility for email forwarding and storage.