CH 5
CH 5
Congestion occurs when there is more data being transmitted through a network than it can
handle efficiently, leading to packet loss, increased latency, and decreased network
performance.
4. Stability: Congestion control mechanisms should ensure that the network remains
stable even under varying conditions, such as changes in traffic patterns, link failures,
or fluctuations in network capacity.
There are various congestion control algorithms and techniques employed at different layers
of the network protocol stack, including:
Traffic Shaping and Policing: These techniques control the rate of data transmission
into the network, preventing bursts of traffic that could lead to congestion.
Congestion control and flow control are both mechanisms used in computer
networking, but they serve different purposes and operate at different layers of the
network stack.
1. Congestion Control:
2. Flow Control:
Flow control manages the transmission of data between individual nodes (e.g.,
between a sender and receiver) to ensure that the sender does not overwhelm
the receiver with data faster than it can process.
It regulates the rate of data transmission at the data link layer or transport layer
to prevent buffer overflow at the receiver and to maintain reliable
communication between sender and receiver.
1. Traffic Shaping:
Traffic shaping regulates the flow of data into the network by smoothing out
bursts of traffic and ensuring a more consistent transmission rate.
2. Load Balancing:
QoS mechanisms prioritize certain types of traffic over others based on their
importance or requirements.
Endpoints can then react to ECN signals by reducing their transmission rates
or taking other appropriate actions to alleviate congestion without waiting for
packet loss to occur.
6. Capacity Planning:
Q. 2 ) Differentiate between static routing and dynamic routing. Also Explain Working Of
RIP , Problems And Solution Of RIP in detail.
Routing Information Protocol (RIP) is a distance vector protocol which is used for updating
the routing tables.
- The routing, updates are exchanged between the neighbouring routers after every 30
seconds with the help of the RIP response message.
- These messages are sent by the routers. or hosts. They contain a list of multiple destinations
within an Autonomous System (AS).
RIP is a very simple intra domain or interior routing protocol which works inside an
Autonomous System (AS).
1. Width restriction: RIP uses a 4-bit metric to count router hops to the destination. For RIP
infinity is defined as 16 which corresponds to 15 hops.
No direct subnet support: RIP came into existence prior to subnetting and has no direct
support for it. We can use it in the subnetted environment with some restrictions.
3. Bandwidth consumptive: An RIP router will broadcast lists of networks and subnets it can
reach after every 30 seconds. This will consume a large amount of bandwidth.
4. Difficult to diagnos fault: Like any other distance vector routing protocols, RIP also is
difficult to debug.
5. Weak security: RIP does not have any security features of its own.
6.Looping problem: Being based on distance vector principle the RIP faces the looping
(routing loop) problem.
Remedies :
- Some of the above mentioned problems are overcome with RIP2 while the looping problem
can be overcome by using either a link state routing protocol like OSPF or a newer distance
vector routing protocol like BGP.
Q.3 ) Differentiate between connection oriented and connectionless services.
Q.4 ) What is traffic shaping ? Explain Leaky Bucket algorithm for traffic shaping.
Traffie shaping is defined as a mechanism to control the amount and rate of the traffic sent to
the network.
The two popularly used traffic shaping techniques are :
1.Leaky bucket
2. Token bucket.
2. If "n" is greater than the packet size, then send the packet and decrement the counter by
the packet size.
3. Repeat step 2 until "n" becomes smaller than the packet size.
Remote procedure call (RPC) is when a computer program causes a procedure (subroutine)
to execute in a different address space (commonly on another computer on a shared network),
which is written as if it were a normal (local) procedure call, without the programmer
explicitly writing the details for the remote interaction.
That is, the programmer writes essentially the same code whether the subroutine is local to
the executing program, or remote.
Remote calls are usually orders of magnitude slower and less reliable than local calls, so
distinguishing them is important.
Step 1: Client calls the client stub. This is a local
procedure call and the parameters are pushed on to the stack in the normal way.
Step 2: Client stub encapsulates the parameters into a message and makes a system call and
sends the message. Packing the parameters into a message is called as marshaling.
Step 4: The received packet by the server is passed to the server stub.
Step 5: Server stub calls the server procedure with the unmarshaled parameters.
Q. 6 ) Draw and explain TCP segment header format in detail. Explain TCP connection
establishment And Closing Mechanism.
The TCP segment without data are used for sending the acknowledgements and control
messages.
Source port:
- A 16-bit number identifying the application the TCP segment originated from within the
sending host.
- The port numbers are divided into three ranges, well-known ports (0 through 1023),
registered ports (1024 through 49,151) and private ports (49,152 through 65,535).
Destination port:
Destination ports use the same port number assignments as those set aside for source ports.
Sequence number:
- A 32-bit number identifying the current position of the first data byte in the segment within
the entire byte stream for the TCP connection.
- After reaching 232 - 1, this number will wrap around to 0.
Acknowledgement number :
- A 32-bit number identifying the next data byte the .. sender expects from the receiver.
- Therefore, the number will be one greater than the most recently received data byte.
- This field is only used when the ACK control bit is turned on.
- Without options, a TCP header is always 20 bytes in length. The largest a TCP header may
be is 60 bytes.
- This field is required because the size of the options field(s) cannot be determined in
advance.
Reserved :
- This mechanism also guarantees that both sides are ready to transmit data and know that the
other side is ready to transmit as well.
- This is necessary so that packets are not transmitted or re-transmitted during session
establishment or after session termination.
Each host randomly chooses a sequence number used to track bytes within the stream it is
sending and receiving.
The requesting end (HOST A) sends a SYN segment specifying the port number of the server
that the client wants to get connected to, and the client's initial sequence number (x).
- The server (HOST B) responds with its own SYN segment containing the server's initial
sequence number (y).
- The server also acknowledges the client's SYN by acknowledging the client's SYN plus one
(x + 1). A SYN consumes one sequence number.
- The client must acknowledge this SYN from the server by acknowledging the server's SYN
plus one.
Since a TCP connection is full-duplex (that is, data flows in each direction independently of
the other direction), the connection should be terminated in both the directions independently.
The rule is that either side can send a FIN when it has finished sending data (FIN indicates
finished).
When a TCP program on a host receives a FIN, it informs the application that the other end
has determinated the data flow.
The receipt of a FIN only means there will be no more data flowing in that direction. A TCP
can still send data after receiving a FIN.
The end that first issues the close (e.g., sends the first FIN) performs the active close and the
other end (that receives this FIN) performs the passive close.
When the server receives the FIN it sends back an ACK of the received sequence number
plus one.
At this point the server's TCP also delivers an end-of-file to the application (the discard
server).The server then closes its connection and its TCP sends a FIN to the client.
The client's TCP informs the application and sends an ACK to server by incrementing the
received sequence number by one.
Connections are normally initiated by the client, with the first SYN going from the client to
the server.
A client or server can actively close the connection (i.e. send the first FIN).
But in practice generally the client determines when the connection should be terminated,
since client processes are often driven by an interactive user, who enters something like quit
to terminate.