Professional Documents
Culture Documents
. CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart)
When devices are linked together, they share resources without requiring separate server or server software. The peer to peer computing architecture contains nodes
that are equal participants in data sharing. All the tasks are equally divided between all the nodes. The nodes interact with each other as required as share resources.
The Client-server model is a distributed application structure that partitions task or workload between the providers of a resource or service, called servers, and
service requesters called clients. In the client-server architecture, when the client computer sends a request for data to the server through the internet, the server
accepts the requested process and deliver the data packets requested back to the client
Clients do not share any of their resources. Examples of Client-Server Model are Email, World Wide Web, etc.
Phishing :A technique for attempting to acquire sensitive data, such as bank account numbers, through a fraudulent solicitation in email or on a web site, in which
the perpetrator masquerades as a legitimate business or reputable person.
Profiling: Profiling is the practice of attempting to understand a person or group based on general characteristics or on past behaviors. analysis of a person's
psychological and behavioural characteristics
Point-to-Point Networks : Point-to-Point Networks or Point-to-Point Connection is type of private data connection that is connecting securely two or more
locations for private data services
Unicast: This type of information transfer is useful when there is a participation of a single sender and a single recipient. So, in short, you can term it as a one-to-one
transmission
Broadcast: Broadcast: from one source to all possible destinations i.e. One-to-All.
the subnet consists of two distinct components: transmission lines and switching elements. Transmission lines move bits between
machines. They can be made of copper wire, optical fiber, or even radio links.
Switching elements, or just switches, are specialized computers that connect two or more transmission lines
23. What are routing and forwarding algorithm?
A Router is a process of selecting path along which the data can be transferred from source to the destination
When a packet arrival each router makes the decision as to where to send a packet next is called the forwarding algorithm
Addressing : each layer needs a mechanism for identifying the sender and receiver.
Flow control: refers to set of procedures used to restrict the amount of data that the sender can send beforewaiting for acknowledgment
Connection-oriented Service gives the guarantee of reliability. Connection-less Service does not give a guarantee of reliability.
In connection-oriented Service, Packets follow the same route. In connection-less Service, Packets do not follow the
same route
Store-and-forward Switching is a technique that waits Cut-through Switching is a technique that checks the first 6 bytes following the
until the entire frame is received. preamble to identify the destination address.
When the intermediate nodes receive a message in full before sending it on to the next node, this is called store-and-forward switching. The alternative, in which the
onward transmission of a message at a node starts before it is completely received by the node, is called cut-through switching.
Listen
Connect
Receive
Send
Disconnect
Accept
28.What is service and protocol?
Protocol is defined as set of rules and regulations for data communication it determine hoe data is transmitted bw different devices in the same network.
Service: A service is a set of primitives (operations) that a layer provides to the layer above it. The service defines what operations the layer is prepared to perform on
behalf of its users,
Osi:
7 layer
Tcp/ip:
4 layer
````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````7. Explain
protocol hierarchies.
⮚ Networks are collection of layers
⮚ The number of layers, the name of each layer, the contents of each layer, and
⮚ The purpose of each layer is to offer certain services to the higher layers
Advantages :
1) error detection
• One mechanism for finding errors in received information uses codes for
error detection.
2) routing
• Another reliability issue is finding a working path through a network is
called routing
3) addressing
• Since there are many computers on the network, every layer needs a
mechanism for identifying the senders and receivers that are involved in a
1. Connection-oriented service is related to the telephone system. Connection-less service is related to the postal system
6. Connection-oriented Service gives the guarantee of reliability. Connection-less Service does not give a guarantee of reliability.
7. In connection-oriented Service, Packets follow the same route. In connection-less Service, Packets do not follow the same route.
9. Ex: TCP (Transmission Control Protocol) Ex: UDP (User Datagram Protocol)
10. Connection-oriented requires authentication. Connection-less Service does not require authentication.
Unit 2
2. Multimode: Designed to carry multiple modes of light at once and Used for comparatively shorter distance transmission of signals.
light pulses sent down a fiber spread out in length as they propagate. This spreading is called chromatic dispersion
pulses with a certain balance of nonlinear and dispersive effects. so it is possible to send pulses for thousands of kilometers without appreciable shape
distortion. These pulses are called solitons.
Sr.
No. Basis Fiber Optic Cable Copper Wire
Path loss (PL) refers to the loss or attenuation a propagating electromagnetic signal (or wave) encounters along its path from transmitter to the receiver..
At high frequencies, radio waves tend to travel in straight lines
The delayed waves may arrive out of phase with the direct wave and thus cancel the signal. This effect is called multipath fadingThe echoes can cancel or
reinforce each other, causing the received signal to fluctuate greatly. This phenomenon is called multipath fading,
It allows sharing of a single transmission medium like a copper cable or a fiber optic cable, among multiple independent signals generated by multiple
users.
FDM has been popularly used to multiplex calls in telephone networks. It can also be used in cellular networks, wireless networks and for satellite
communications.
Signal TDM works well with both analog as FDM works only with analog
well as digital signals. signal.
Circuit Switching.
Packet Switching.
Message Switching.
Wastage of resources is more in Circuit Switching Less wastage of resources as compared to Circuit Switching
Recording of packets is never possible in circuit switching. Recording of packets is possible in packet switching.
In-circuit switching each packet follows the same route. In packet switching packets can follow any route.
The circuit switching network is implemented at the physical layer. Packet switching is implemented at the datalink layer and network layer
Circuit switching requires simple protocols for delivery. Packet switching requires complex protocols for delivery.
The delay between data units in circuit switching is uniform. The delay between data units in packet switching is not uniform.
15. Write the various services offered by the data link layer to the network layer
The data link layer can be designed to offer various services. The actual ser- vices that are offered vary
from protocol to protocol. Three reasonable possibilities that we will consider in turn are:
1. Unacknowledged connectionless service.
2. Acknowledged connectionless service.
3. Acknowledged connection-oriented service.
Unacknowledged connectionless service:
• It consists of having the source machine send independent frames to the destination machine without
having the destination machine acknowledge them.
• If a frame is lost due to noise on the line, no attempt is made to detect the loss
• Ex: Ethernet
Acknowledged connectionless service.
• When this service is offered, there are still no logical connections used, but each frame sent is
individually acknowledged.
• In this way, the sender knows whether a frame has arrived correctly or been lost.
• Ex: Wi-Fi
Acknowledged connection-oriented service.
• The network layer can always send a packet and wait for it to be acknowledged by its peer on the remote
machine.
• If the acknowledgement is not forthcoming before the timer expires, the sender can just send the entire
message again.
• The trouble with this strategy is that it can be inefficient.
16.
PPP (Point-to-Point Protocol)
17.
Flow control is meant only for the transmission of data from sender to receiver.
For Flow control there are two approaches : Feedback-based Flow Control and Rate-based Flow Control.
This situation can occur when the sender is running on a fast, powerful computer and the
receiver is running on a slow, low-end machine. It prevents the loss of data and avoid over running of receive buffers.
This will generate waste frames on the network. Therefore, the receiving device must have some mechanism to inform the sender to send fewer frames or stop
transmission temporarily. In this way, flow control will control the rate of frame transmission to a value that can be handled by the receiver.
Example of Flow Control techniques are : Stop&Wait Protocol and Sliding Window Protocol.
In the first one, feedback-based flow control, the receiver sends back information to the sender
giving it permission to send more data, or at least telling the sender how the receiver is doing.
In the second one, rate-based flow control, the protocol has a built-in mechanism that limits the rate at
which senders may transmit data, without using feedback from the receiver.
the physical layer received an analog signal that was far from the expected value for a 0 or 1 and declared the bit to be lost. This situation is called an erasure
channel.
• Hamming codes.
• Reed-Solomon codes.
22.
LDPC (Low-Density Parity Check)
23. .List the different fields from which the frame is composed of.
. kind, seq, ack, and info
24. What is meant by event=cksum_err and event=frame_arrival ?
When a frame arrives at the receiver, the checksum is recomputed. If the checksum in the frame is incorrect (i.e., there was a transmission error), the data
link layer is so informed (event = cksum err). If the inbound frame arrived undamaged, the data link layer is also informed (event = frame arrival) so that it
can acquire the frame for inspection using from physical layer.
``````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
1.Write a note on the following
: i. Error control
The error control function of data link layer detects the errors in transmitted frames and re-transmit all the erroneous frames. Error control is meant for the
transmission of error free data from sender to receiver.
To detect error in data, the approaches are : Checksum, Cyclic Redundancy Check and Parity Checking.
To correct error in data, the approaches are : Hamming code, Binary Convolution codes, Reed-Solomon code, Low-Density Parity Check codes.
• The usual way to ensure reliable delivery is to provide the sender with some feedback about what is
happening at the other end of the line.
• Typically, the protocol calls for the receiver to send back special control frames bearing positive or
negative acknowledgements about the incoming frames.
• If the sender receives a positive acknowledgement about a frame, it knows the frame has arrived safely.
• On the other hand, a negative acknowledgement means that something has gone wrong and the frame
must be transmitted again.
Parity bits: Parity bits are used for error detection two tpyes:
Even parity: To check for even parity, if the total number of 1s is even, then the value of the parity bit is 0. If the total number of 1s occurrences is odd,
then the value of the parity bit is 1.
Odd Parity: To check for odd parity, if the total number of 1s is even, then the value of parity bit is 1. If the total number of 1s is odd, then the value of
parity bit is 0.
The number of redundant bits can be calculated using the following formula:
2^r ≥ m + r + 1
2^r>= 4+r+1
8>=8
Therefore, the value of r is 3 that satisfies the above relation. Thus, the number of redundant bits= 3Parity bits
A convolution code is decoded by finding the sequence of input bits that is most likely to have produced the
observed sequence of output bits (which includes any errors). Convolution codes have been popular in practice
because it is easy to factor the uncertainty of a bit being a 0 or a 1 into the decoding. Two types of decoding are :
each input bit on the left-hand side produces two output bits on the right-hand side that are XOR sums of the input and internal state. Since it deals with
bits and performs linear operations, this is a binary, linear convolutional code. Since 1 input bit produces 2 output bits, the code rate is 1/2. It is not
systematic since none of the output bits is simply the input bit
4. Reed-solomon codes
Like Hamming codes, Reed-Solomon codes are linear block codes, and they are often
systematic too. Unlike Hamming codes, which operate on individual bits, Reed-Solomon codes operate
on m bit symbols. Naturally, the mathematics are more involved, so we will describe their operation by
analogy
Reed-Solomon codes are based on the fact that every n degree polynomial is uniquely determined by n
1 points. For example, a line having the form ax bis determined by two points. Extra points on the
same line are redundant, which is helpful for error correction. Imagine that we have two data points that
represent a line and we send those two data points plus two check points chosen to lie on the same line.
If one of the points is received in error, we can still recover the data points by fitting a line to the
received points. Three of the points will lie on the line, and one point, the one in error, will not. By
finding the line we have corrected the error
Checksum
In checksum error detection scheme, the data is divided into k segments each of m bits.
In the sender’s end the segments are added using 1’s complement arithmetic to get the sum. The sum
is complemented to get the checksum.
The checksum segment is sent along with the data segments.
At the receiver’s end, all received segments are added using 1’s complement arithmetic to get the
sum. The sum is complemented.
If the result is zero, the received data is accepted; otherwise discarded.
8.Explain Cyclic Redundancy Checks of error-detecting code with an example.
Unlike checksum scheme, which is based on addition, CRC is based on binary division.
In CRC, a sequence of redundant bits, called cyclic redundancy check bits, are appended to the end of data unit so that the resulting data unit becomes
exactly divisible by a second, predetermined binary number.
At the destination, the incoming data unit is divided by the same number. If at this step there is no remainder, the data unit is assumed to be correct and is
therefore accepted.
A remainder indicates that the data unit has been damaged in transit and therefore must be rejected.
9.A bit stream 10011101 is transmitted using the standard CRC method described in the text. The
generator polynomial is x
3 + 1. Show the actual bit string transmitted. Suppose the third bit from the
left is inverted during transmission. Show that this error is detected at the receiver's end.
ans :
The frame is 10011101. The generator is 1001. The message after appending three zeros is
10011101000. The remainder on dividing 10011101000 by 1001 is 100. So, the actual bit string
transmitted is 10011101100. The received bit stream with an error in the third bit from the left is
10111101100. Dividing this by 1001 produces a remainder 100, which is different from zero. Thus,
the receiver detects the error and can ask for a retransmission
10. What is the remainder obtained by dividing x 7 + x 5 + 1 by the generator polynomial x 3 + 1? Svar: The remainder is -x 2 + x + 1
11. A message 1001 1100 1010 0011 is transmitted using the Internet Checksum (using 4-bit words). What is the value of the
checksum?
Answer: Adding the 4-bit words yields 1001 + 1100 + 1010 + 0011 = 100010. The carry is added to the LSBs: 0100. The
one’s complement value is then 1011, which is the checksum. And indeed, the check works out as expected. Adding the data
and the checksum yields 1001 + 1100 + 1010 + 0011 + 1011 = 101101, which gives 1111 (carry) and thus 0000 (negation).
0011 + 1010 = 1101
Simplest Protocol:
It is very simple. The sender sends a sequence of frames without even thinking about the receiver. Data are transmitted in one
direction only. Both sender & receiver always ready. Processing time can be ignored. Infinite buffer space is available. And
best of all, the communication channel between the data link layers never damages or loses frames. This thoroughly
unrealistic protocol, which we will nickname ‘‘Utopia,’’ .The utopia protocol is unrealistic because it does not handle either
flow control or error correction
NOISY CHANNELS:
Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless channels are
nonexistent. We can ignorethe error (as we sometimes do), or we need to add error control to ourprotocols. We discuss three
protocols in this section that use error control.
1 A stop-and-wait ARQ sender sends one frame at a time; it is a special case of the general sliding window protocol with
transmit and receive window sizes equal to one in both cases.
Stop and Wait for ARQ mainly implements the Sliding Window Protocol concept with Window Size
Go-Back-N protocol, also called Go-Back-N Automatic Repeat reQuest, is a data link layer protocol that uses a sliding
window method for reliable and sequential delivery of data frames. In this protocol we can send several frames before
receiving acknowledgments; we keep a copy of these frames until the acknowledgments arrive.
Suppose there are a sender and a receiver, and let's assume that there are 11 frames to be sent. These frames are represented as
0,1,2,3,4,5,6,7,8,9,10, and these are the sequence numbers of the frames. Mainly, the sequence number is decided by the
sender's window size. But, for the better understanding, we took the running sequence numbers, i.e., 0,1,2,3,4,5,6,7,8,9,10.
Let's consider the window size as 4, which means that the four frames can be sent at a time before expecting the
acknowledgment of the first frame
Step 1: Firstly, the sender will send the first four frames to the receiver, i.e., 0,1,2,3, and now the sender is expected to receive
the acknowledgment of the 0th frame.
Let's assume that the receiver has sent the acknowledgment for the 0 frame, and the receiver has successfully received it
The sender will then send the next frame, i.e., 4, and the window slides containing four frames (1,2,3,4).
The receiver will then send the acknowledgment for the frame no 1. After receiving the acknowledgment, the sender will send
the next frame, i.e., frame no 5, and the window will slide having four frames (2,3,4,5).
Now, let's assume that the receiver is not acknowledging the frame no 2, either the frame is lost, or the acknowledgment is
lost. Instead of sending the frame no 6, the sender Go-Back to 2, which is the first frame of the current window, retransmits all
the frames in the current window, i.e., 2,3,4,5.
o In Go-Back-N, N determines the sender's window size, and the size of the receiver's window is always 1.
o It does not consider the corrupted frames and simply discards them.
o It does not accept the frames which are out of order and discards them.
o If the sender does not receive the acknowledgment, it leads to the retransmission of all the current window frames.
Timers Although there can be a timer for each frame that is sent, in our protocol weuse only one. The reason is that
the timer for the first outstanding frame always expires first; we send all outstanding frames when thistimer expires.
Acknowledgment The receiver sends a positive acknowledgment if a frame has arrived safe andsound and in order.
If a frame is damaged or is received out of order, the receiver is silent and will discard all subsequent frames until it
receives the one it is expecting. The silence of the receiver causes the timer of the unacknowledged frame at the
sender side to expire. This, in turn, causes the sender to go back and resend all frames, beginning with the one with
the expired timer. The receiver does not have to acknowledge each frame received. It can send one cumulative
acknowledgment for several frames.Resending a Frame When the timer expires, the sender resends all outstanding
frames. For example, suppose the sender has already sent frame 6, but the timer forframe 3 expires. This means that
frame 3 has not been acknowledged; the sender goes back and sends frames 3,4,5, and 6 again. That is why the
protocol is called Go-Back-N ARQ. https://www.javatpoint.com/go-back-n-arq
The size of the sender's window is 2^(m-1), where m is the number of bits used in the header of the packet to express
the packet's sequence number. The window size of the receiver is the same as that of the sender i.e. 2^(m-1). The
sender's window size is represented using Ws and the receiver's window size is represented using Wr.
`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````
Unit 3
Store-and-forward switching is a method of switching data packets by the switching device that receives the data frame and
then checks for errors before forwarding the packets. It supports the efficient transmission of non-corrupted frames. It is
generally used in telecommunication networks.
In store-and-forward switching, the switching device waits to receive the entire frame and then stores the frame in the buffer
memory. Then the frame is checked for errors by using CRC(Cyclic Redundancy Check) if the error is found then the packet
is discarded else it is forwarded to the next device
in the above diagram, we can see that the Internet Service Provider (ISP) has six routers (A to F) connected by transmission
lines shown in blue lines. There are two hosts, host H1 is connected to router A, while host H2 is connected to router D.
Suppose that H1 wants to send a data packet to H2. H1 sends the packet to router A. The packet is stored in router A until it
has arrived fully. Router A verifies the checksum using CRC (cyclic redundancy check) code. If there is a CRC error, the
packet is discarded, otherwise it is transmitted to the next hop, here router F. The same process is followed by router F which
then transmits the packet to router D. Finally router D delivers the packet to host H2.
Advantage: Store − and forward packet switching ensures high quality data packet transmission. Since erroneous packets are
discarded at each router, bad packets or invalid packets in the network are mostly eliminated
2.Write the various services offered by the network layer to the transport layer.
The network layer provides services to the transport layer at the network layer/transport layer interface. The services need to
be carefully designed with the following goals in mind:
o The routing protocol is a routing algorithm that provides the best path from the source to the destination. The best
path is the path that has the "least-cost path" from source to the destination.
o Routing is the process of forwarding the packets from source to the destination but the best route to send the packets
is determined by the routing algorithm
properties are desirable in a routing algorithm correctness, simplicity, robustness, stability, fairness, optimality
In some applications, hosts need to send messages to many or all other hosts. Sending a packet to all destinations
simultaneously is called broadcasting and the routing used for this is called broadcast routing.
For example, a service distributing weather reports, stock market updates, or live radio programs might work best by sending
to all machines and letting those that are interested read the data.
We need a way to send messages to well-defined groups that are numerically large in size but small
compared to the network as a whole.
Sending a message to such a group is called multicasting, and the routing algorithm used is called
multicast routing
Multicast routing schemes build on the broadcast routing schemes
All multicasting schemes require some way to create and destroy groups and to identify which routers
are members of a group.
In anycast, a packet is delivered to the nearest member of a group. Schemes that find these paths are called anycast routing.
1. It provides faster connection by decreasing the number of hops and reducing latency.
2. Load balancing can be utilized easily.
8. What is Congestion?
A state occurring in network layer when the message traffic is so heavy that it slows down network response
time. Too many packets present in (a part of) the network causes packet delay and loss that degrades
performance. However, the most effective way to control congestion is to reduce the load that
the transport layer is placing on the network.
12. List the different options for Option field in IPv4 protocol.
Option Description
An IP address represents a unique address that distinguishes any device on the internet or any network from
another.An IP address is the identifier that enables your device to send or receive data packets across the internet. It holds
information related to your location and therefore making devices available for two-way communication.
Eg An IP address is represented by a series of numbers segregated by periods(.). They are expressed in the form of four pairs
- an example address might be 255.255.255.255 wherein each set can range from 0 to 255
the networks (such as Ethernet LANs) that result from dividing up a larger network are called subnets.
When a bigger network is divided into smaller networks, to maintain security, then that is known as Subnetting. So,
maintenance is easier for smaller networks.
combine multiple small prefixes into a single larger prefix. This process is called route aggregation. n Supernetting, multiple
networks are combined into a bigger network termed as a Supernetwork or Supernet
This host
nk
Address Resolution Protocol (ARP) is a protocol or procedure that connects an ever-changing Internet Protocol (IP) address
to a fixed physical machine address, also known as a media access control (MAC) address, in a local-area network (LAN).
24. Multiprotocol Label Switching (MPLS) is data forwarding technology that increases the speed and controls the flow of
network traffic. With MPLS, data is directed through a path via labels instead of requiring complex lookups in a routing table
at every stop. This feature helps in increasing the delivery rate of IP packets.
````````````````````````````````````````````````````````````````````````````````````````````````````````````````
If connectionless service is offered, packets are injected into the network individually and, routed independently of each
other. No advance setup is needed. In this context, the packets are frequently called datagrams (in analogy with telegrams)
and the network is called a datagram network.
A’s table (initially) A’s table (later) C’s Table E’s Table
Let us assume for this example that the message is four times longer than the maximum packet
size, so the network layer has to break it into four packets, 1, 2, 3, and 4, and send each of them
in turn to router A.
Every router has an internal table telling it where to send packets for each of the possible
destinations. Each table entry is a pair(destination and the outgoing line). Only directly connected
lines can be used.
A’s initial routing table is shown in the figure under the label ‘‘initially.’’
At A, packets 1, 2, and 3 are stored briefly, having arrived on the incoming link. Then each packet
is forwarded according to A’s table, onto the outgoing link to C within a new frame. Packet 1 is
then forwarded to E and then to F.
However, something different happens to packet 4. When it gets to A it is sent to router B, even
though it is also destined for F. For some reason (traffic jam along ACE path), A decided to send
packet 4 via a different route than that of the first three packets. Router A updated its routing
table, as shown under the label ‘‘later.’’
The algorithm that manages the tables and makes the routing decisions is called the routing
algorithm.
If connection-oriented service is used, a path from the source router all the way to the destination router must be established
before any data packets can be sent. This connection is called a VC (virtual circuit), and the network is called a virtual-circuit
network
When a connection is established, a route from the source machine to the destination machine is chosen as part o f the
connection setup and stored in tables inside the routers. That route is used for all traffic flowing over the connection, exactly
the same way that the telephone system works. When the connection is released, the virtual circuit is also terminated. With
connection-oriented service, each packet carries an identifier telling which virtual circuit it belongs to.
As an example, consider the situation shown in Figure. Here, host H1 has established connection 1 with host H2. This
connection is remembered as the first entry in each of the routing tables. The first line of A’s table says that if a packet
bearing connection identifier 1 comes in from H1, it is to be sent to router C and given connection identifier 1. Similarly, the
first entry at C routes the packet to E, also with connection identifier 1.
Now let us consider what happens if H3 also wants to establish a connection to H2. It chooses
connection identifier 1 (because it is initiating the connection and this is its only connection) and
tells the network to establish the virtual circuit.
This leads to the second row in the tables. Note that we have a conflict here because although A can easily distinguish
connection 1 packets from H1 from connection 1 packets from H3, C cannot do this. For this reason, A assigns a different
connection identifier to the outgoing traffic for the second connection. Avoiding conflicts of this kind is why routers need
the ability to replace connection identifiers in outgoing packets.
In some contexts, this process is called label switching. An example of a connection-oriented network service is MPLS (Multi
Protocol Label Switching)
Flooding is a non-adaptive routing technique following this simple method: when a data packet arrives at a router, it is sent
to all the outgoing links except the one it has arrived on
Types of Flooding
Uncontrolled flooding − Here, each router unconditionally transmits the incoming data packets to all its neighbours.
Controlled flooding − They use some methods to control the transmission of packets to the neighbouring nodes. The
two popular algorithms for controlled flooding are Sequence Number Controlled Flooding (SNCF) and Reverse Path
Forwarding (RPF).
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.
This is a main criteria in case of broadcast messages.
The shortest path is always chosen by flooding.
Limitations of Flooding
Flooding tends to create an infinite number of duplicate data packets, unless some measures are adopted to damp
packet generation.
It is wasteful if a single destination needs the packet, since it delivers the data packet to all nodes irrespective of the
destination.
The network may be clogged with unwanted and duplicate data packets. This may hamper delivery of other data
packets
For example, let us consider the network in the figure, having six routers that are connected through transmission lines
Using flooding technique −
In distance-vector routing (DVR), each router is required to inform the topology changes to its neighboring routers
periodically. Historically it is known as the old ARPNET routing algorithm or Bellman-Ford algorithm
In DVR, each router maintains a routing table. It contains only one entry for each router. It contains two parts − a
preferred outgoing line to use for that destination and an estimate of time (delay). Tables are updated by exchanging
the information with the neighbor’s nodes.
Each router knows the delay in reaching its neighbors (Ex − send echo request).
Routers periodically exchange routing tables with each of their neighbors.
It compares the delay in its local table with the delay in the neighbor’s table and the cost of reaching that neighbor.
If the path via the neighbor has a lower cost, then the router updates its local table to forward packets to the neighbor.
Example – Consider 3-routers X, Y and Z as shown in figure. Each router have their routing table. Every routing table will
contain distance to the destination nodes.
Consider router X , X will share it routing table to neighbors and neighbors will share it routing table to it to X and distance
from node X to destination will be calculated using bellmen- ford equation.
As we can see that distance will be less going from X to Z when Y is intermediate node(hop) so it will be update in routing
table X.
The settling of routes to best paths across the network is called convergence. Distance vector routing is useful as a simple
technique by which routers can collectively compute shortest paths, but it has a serious drawback in practice: although it
converges to the correct answer, it may do so slowly. In particular, it reacts rapidly to good news, but leisurely to bad
news.
Consider a router whose best route to destination X is long. If, on the next exchange, neighbor A suddenly reports a short
delay to X, the router just switches over to using the line to A to send traffic to X. In one vector exchange, the good news
is processed. To see how fast good news propagates, consider the five-node (linear) network of Fig. 5-10, where the delay
metric is the number of hops. Suppose A is down initially and all the other routers know this. In other words, they have
all recorded the delay to A as infinity
Creation of the states of the links by each node, called the link state packet (LSP).
Dissemination of LSPs to every other router, called flooding, in an efficient and reliable way.
Formation of a shortest path tree for each node.
Calculation of a routing table based on the shortest path tree
Creation of Link State Packet (LSP) A link state packet can carry a large amount of information. For the moment,
we assume that it carries a minimum amount of data: the node identity, the list of links, a sequence number, and age.
The first two, node identity and the list of links, are needed to make the topology. The third, sequence number,
facilitates flooding and distinguishes new LSPs from old ones. The fourth, age, prevents old LSPs from remaining
in the domain for a long time.
2.Flooding of LSPs: After a node has prepared an LSP, it must be disseminated to all othernodes, not only to its neighbors.
The process is called flooding and based on the following
The creating node sends a copy of the LSP out of each interface A node that receives an LSP compares it with the copy it
may already have. If the newly arrived LSP is older than the one it has (found by checking the sequence number),it discards
the LSP
A shortest path tree is a tree in which the path between the root and every other node is the shortest. The Dijkstra algorithm
creates a shortest path tree from a graph. The algorithm divides the nodes into two sets: tentative and permanent. It finds
the neighbors of a current node, makes them tentative, examines them, and if they pass the criteria, makes them permanent.
4.Calculation of a routing table
In hierarchical routing, the routers are divided into regions. Each router has complete details about how to route packets to
destinations within its own region. But it does not have any idea about the internal structure of other regions.
As we know, in both LS and DV algorithms, every router needs to save some information about other routers. When network
size is growing, the number of routers in the network will increase. Therefore, the size of routing table increases, then routers
cannot handle network traffic as efficiently. To overcome this problem we are using hierarchical routing.
In hierarchical routing, routers are classified in groups called regions. Each router has information about the routers in its
own region and it has no information about routers in other regions. So, routers save one record in their table for every other
region.
11.Explain the approaches to congestion control
The presence of congestion means that the load is greater than the
resources can handle
Two solutions come to mind: increase the resources or decrease the load
The most basic way to avoid congestion is to build a network that is
well matched to the traffic that it carries.
Sometimes resources can be added dynamically like routers and links when there is
serious congestion. This is called provisioning, and which happens on a timescale of
months, driven by long-term trends.
Splitting traffic across multiple paths is called traffic-aware routing.
In a virtual-circuit network, new connections can be refused if they
would cause the network to become congested. This is called admission
control.
In a virtual-circuit network, new connections can be refused if they would cause the network to become congested.
This is called admission control.
When all else fails, the network is forced to discard packets that it cannot deliver. The general name for this is load
shedding
Traffic-Aware Routing
The goal in taking load into account when computing routes is to shift traffic away from hotspots that will be the
first places in the network to experience congestion. The most direct way to do this is to set the link weight to
be a
function of the (fixed) link bandwidth and propagation delay plus the (variable)
measured load or average queuing delay
Admission Control
In a virtual-circuit network, new connections can be refused if they would cause the network
to become congested. This is called admission control. The idea is simple: do not set up a new
virtual circuit unless the network can carry the added traffic without becoming congested. Thus,
attempts to set up a virtual circuit may fail.
Traffic that varies while browsing the Web is more difficult to handle because the bursts of
Web traffic are more likely to congest routers in the network. A commonly used descriptor that
captures this effect is the leaky bucket or token bucket.
Suppose that a host attached to router A wants to set up a connection to a host attached
to router B. Normally, this connection would pass through one of the congested routers.
To avoid this situation, we can redraw the network as shown in Fig. 5-24(b), omitting
the congested routers and all of their lines. The dashed line shows a possible route for the virtual
circuit that avoids the congested routers.
10. List and explain the principles of network layer in the internet
1. Make sure it works. Do not finalize the design or standard until multiple prototypes have
successfully communicated with each other. All too often, designers first write a 1000-page
standard, get it approved, then discover it is deeply flawed and does not work. Then they write
version 1.1 of the standard. This is not the way to go.
2. Keep it simple. When in doubt, use the simplest solution. William of Occam stated this
principle (Occam’s razor) in the 14th century. Put in modern terms: fight features. If a feature
is not absolutely essential, leave it out, especially if the same effect can be achieved by
combining other features.
3. Make clear choices. If there are several ways of doing the same thing, choose one. Having
two or more ways to do the same thing is looking for trouble.
4. Exploit modularity. This principle leads directly to the idea of having protocol stacks, each
of whose layers is independent of all the other ones. In this way, if circumstances require one
module or layer to be changed, the other ones will not be affected.
6. Avoid static options and parameters. If parameters are unavoidable (e.g., maximum packet
size), it is best to have the sender and receiver negotiate a value rather than defining fixed
choices.
7. Look for a good design; it need not be perfect. Often, the designers have a good design but
it cannot handle some weird special case. Rather than messing up the design, the designers
should go with the good design and put the burden of working around it on the people with the
strange requirements.
8. Be strict when sending and tolerant when receiving. In other words, send only packets that
rigorously comply with the standards, but expect incoming packets that may not be fully
conformant and try to deal with them.
9. Think about scalability. If the system is to handle millions of hosts and billions of users
effectively, no centralized databases of any kind are tolerable and load must be spread as evenly
as possible over the available resources.
10. Consider performance and cost. If a network has poor performance or outrageous costs,
nobody will use it.
IPv4 is version 4 of IP. It is a current version and the most commonly used IP address. It is a
32-bit address written in four numbers separated by a dot (.), i.e., periods. This address is unique
for each device. For example, 66.94.29.13
Class A
In class A, the first 8 bits are for the network part of the address, and the remaining 24 bits are reserved for
the host part of the address. The leading first bit of the octet is fixed.
Class A IP addressing
We subtract two addresses from the network addresses since they are considered special addresses.
Class B
In class B, the first 16 bits are for the network part of the address, and the remaining 16 bits are reserved
for the host part of the address. The leading first two bits of the octet are fixed.
Class B IP addressing
Class C
In class C, the first 24 bits are for the network part of the address, and the remaining 8 bits are reserved for
the host part of the address. The leading first three bits of the octet are fixed.
Class C IP addressing
Class D
Class D is reserved for multicasting. Higher-order bits of the octet are set as 11101110.
IP address belonging to class D are reserved for multi-casting. The higher order bits of the first octet of IP
addresses belonging to class D are always set to 1110. The remaining bits are for the address that interested
hosts recognize.
Class E
Class E is reserved for experiment and research purposes. Higher-order bits of the octet are set
as11111111.
IP addresses belonging to class E are reserved for experimental and research purposes. IP
addresses of class E ranges from 240.0.0.0 – 255.255.255.254. This class doesn’t have any
sub-net mask. The higher order bits of first octet of class E are always set to 1111
The working of NAT begins with configuring the network router or NAT firewall, for the
network translation to take place. The network router has an interface that acts as a
connection between the inside (local) network, and the outside (global) network.
The inside network address has to go through the router for the translation process and gets
converted to an outside globally recognized IP address to access internet services and the
same translation process when moving from outside network to inside network.
Version: It is a four-bit field that defines the version number of the IP. IP6 version is
6, IP4 version is 4.
Priority: It is a 4-bit priority field that defines the priority of the packet with respect
to traffic congestion that a packet is to reject or not.
Flow Label: It is three bytes or 24-bit field designed to provide special handling for a
particular flow of data to speed flow on an already flowing packet path.
Payload Length: It is a two-byte payload length field that defines the total length of
the IP datagram, excluding the base header.
Next Header: It is an 8-bit field that defines the header that follows the base header
in the datagram. In IPV4, this field is called a protocol. Some of the values in this
field indicate options that are
source Address: This field is 16-byte which specifies the original source of the datagram
destination address. This is a 16-byte internet address that usually identifies the final
destination of the datagram.
Hop Limit (8-bits): Hop Limit field is the same as TTL in IPv4 packets. It indicates the
maximum number of intermediate nodes IPv6 packet is allowed to travel. Its value gets
decremented by one, by each node that forwards the packet and the packet is discarded if the
value decrements to 0. This is used to discard the packets that are stuck in an infinite loop
because of some routing error
Destination Address (128-bits): The destination Address field indicates the IPv6 address of
the final destination(in most cases). All the intermediate nodes can use this information in
order to correctly route the packet.
Extension Headers: In order to rectify the limitations of the IPv4 Option Field, Extension
Headers are introduced in IP version 6. The extension header mechanism is a very important
part of the IPv6 architecture. The next Header field of IPv6 fixed header points to the first
Extension Header and this first extension header points to the second extension header and so
on.
1.Explain Internet Control Message Protocol.
The ICMP stands for Internet Control Message Protocol. It is a network layer protocol. It is
used for error handling in the network layer, and it is primarily used on network devices such
as routers. As different types of errors can exist in the network layer, so ICMP can be used to
report these errors and to debug those errors.
For example, some sender wants to send the message to some destination, but the router
couldn't send the message to the destination. In this case, the router sends the message to the
sender that I could not send the message to that destination
Types of ICMP messages
Information Messages − In this message, the sender sends a query to the host or
router and expects an answer. For example, A host wants to know if a router is alive
or not.
Error-reporting message − This message report problems that a router or a host
(destination) may encounter when it processes an IP packet.
Query Message − It helps a router or a network manager to get specific information
from a router or another host
format
Proxy ARP - Proxy ARP is a method through which a Layer 3 devices may respond to ARP
requests for a target that is in a different network from the sender. The Proxy ARP configured
router responds to the ARP and map the MAC address of the router with the target IP address
and fool the sender that it is reached at its destination
Gratuitous ARP - Gratuitous ARP is an ARP request of the host that helps to identify the
duplicate IP address. It is a broadcast request for the IP address of the router
o The gratuitous ARP is used to update the ARP table of other devices.
o It also checks whether the host is using the original IP address or a duplicate one
Reverse ARP (RARP) - It is a networking protocol used by the client system in a local area
network (LAN) to request its IPv4 address from the ARP gateway router table. A table is
created by the network administrator in the gateway-router that is used to find out the MAC
address to the corresponding IP address.
Inverse ARP (InARP) - Inverse ARP is inverse of the ARP, and it is used to find the IP
addresses of the nodes from the data link layer addresses. These are mainly used for the
frame relays, and ATM networks, where Layer 2 virtual circuit addressing are often acquired
from Layer 2 signaling. When using these virtual circuits, the relevant Layer 3 addresses are
available
3 .Explain Dynamic Host Configuration Protocol.
Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to
dynamically assign an IP address to nay device, or node, on a network so they can
communicate using IP (Internet Protocol). DHCP automates and centrally manages these
configurations. There is no need to manually assign IP addresses to new devices. Therefore,
there is no requirement for any user configuration to connect to a DHCP based network.
Benefits of DHCP
There are following benefits of DHCP:
Centralized administration of IP configuration: DHCP IP configuration information can
be stored in a single location and enables that administrator to centrally manage all IP address
configuration information.
Dynamic host configuration: DHCP automates the host configuration process and
eliminates the need to manually configure individual host. When TCP/IP (Transmission
control protocol/Internet protocol) is first deployed or when IP infrastructure changes are
required.
Seamless IP host configuration: The use of DHCP ensures that DHCP clients get accurate
and timely IP configuration IP configuration parameter such as IP address, subnet mask,
default gateway, IP address of DND server and so on without user intervention.
Flexibility and scalability: Using DHCP gives the administrator increased flexibility,
allowing the administrator to move easily change IP configuration when the infrastructure
changes.
Components of DHCP
When working with DHCP, it is important to understand all of the components. Following
are the list of components:
o DHCP Server: DHCP server is a networked device running the DCHP service that
holds IP addresses and related configuration information. This is typically a server or
a router but could be anything that acts as a host, such as an SD-WAN appliance.
o DHCP client: DHCP client is the endpoint that receives configuration information
from a DHCP server. This can be any device like computer, laptop, IoT endpoint or
anything else that requires connectivity to the network. Most of the devices are
configured to receive DHCP information by default.
o IP address pool: IP address pool is the range of addresses that are available to DHCP
clients. IP addresses are typically handed out sequentially from lowest to the highest.
o Subnet: Subnet is the partitioned segments of the IP networks. Subnet is used to keep
networks manageable.
o Lease: Lease is the length of time for which a DHCP client holds the IP address
information. When a lease expires, the client has to renew it.
2.Explain OSPF -an interior gateway protocol.
The OSPF stands for Open Shortest Path First. It is a widely used and supported routing
protocol. It is an intradomain protocol, which means that it is used within an area or a
network. It is an interior gateway protocol that has been designed within a single autonomous
system. It is based on a link-state routing algorithm in which each router contains the
information of every domain, and based on this information, it determines the shortest path.
his method is easy on router's CPU but may cause the problem of duplicate packets received
from peer routers.
Reverse path forwarding is a technique, in which router knows in advance about its
predecessor from where it should receive broadcast. This technique is used to detect and
discard duplicates.
Multicast Routing
Multicast routing is special case of broadcast routing with significance difference and
challenges. In broadcast routing, packets are sent to all nodes even if they do not want it. But
in Multicast routing, the data is sent to only nodes which wants to receive the packets.
The router must know that there are nodes, which wish to receive multicast packets (or
stream) then only it should forward. Multicast routing works spanning tree protocol to avoid
looping.
Multicast routing also uses reverse path Forwarding technique, to detect and discard
duplicates and loops.
4. Anycast Routing
Anycast packet forwarding is a mechanism where multiple hosts can have same logical
address. When a packet destined to this logical address is received, it is sent to the host which
is nearest in routing topology
Anycast routing is done with help of DNS server. Whenever an Anycast packet is received it
is enquired with DNS to where to send it. DNS provides the IP address which is the nearest
IP configured on it
Checksum field The checksum field is available in IPv4. The checksum field is not
available in IPv6.
````````````````````````````````````````````````````````````````````````````````````````````````````````````````
Unit 4
o It is a connection-oriented protocol means the connection established between both the ends
of the transmission. For creating the connection, TCP generates a virtual circuit between
sender and receiver for the duration of a transmission
10. List the states used in TCP connection management finite state machine
State Description
UDP is preferred because it is fast and has low overhead. A DNS query is a single UDP request from
the DNS client followed by a single UDP reply from the server.
Name resolution is the process of associating names and IP addresses, and it's one of the most
essential services on a network. People understand descriptive names, but network
communications require difficult-to-remember addresses
: the user agents, which allow people to read and send email
the message transfer agents, which move the messages from the source to the destination.
A user agent is any software that retrieves, renders and facilitates end user interaction with Web
content, or whose user interface is implemented using Web technologies
3, List the different header fields related to message transport in RFC 5322.
Header Meaning
Keyword Description
8, What is Webmail?
web-based email system that allows you to access and use your email from almost anywhere
through an internet connection. it does not need software installation. It is a kind of service, which
is provided by certain companies and ISPs (Internet service providers).
. JSP(JavaServer Pages)
Expires Response Time and date when the page stops being valid
ELEMENTS OF TRANSPORTPROTOCOLS
The transport service is implemented by a transport protocol used between the two transport
entities.
Addressing
Connection Establishment
Connection Release
addressing
o According to the layered model, the transport layer interacts with the functions of the
session layer. Many protocols combine session, presentation, and application layer
protocols into a single layer known as the application layer. In these cases, delivery to the
session layer means the delivery to the application layer. Data generated by an application
on one machine must be transmitted to the correct application on another machine. In this
case, addressing is provided by the transport layer.
o The transport layer provides the user address which is specified as a station or port. The
port variable represents a particular TS user of a specified station known as a Transport
Service access point (TSAP). Each station has only one transport entity.
A possible scenario for a transport connection is as follows:
for an incoming call. How a process attaches itself to a TSAP is outside the networking model and
depends entirely on the local operating system. A call such as our LISTEN might be used, for example.
2. An application process on host 1 wants to send an email message, so it attaches itself to TSAP
1208 and issues a CONNECT request. Therequest specifies TSAP 1208 on host 1 as the source and
TSAP 1522on host 2 as the destination. This action ultimately results in a transport connection being
established between the application process and the server.
4. The mail server responds to say that it will deliver the message.
Handshake refers to the process to establish connection between the client and server. Handshake
is simply defined as the process to establish a communication link. To transmit a packet, TCP needs
a three way handshake before it starts sending data. The reliable communication in TCP is termed
as PAR (Positive Acknowledgement Re-transmission). When a sender sends the data to the receiver,
it requires a positive acknowledgement from the receiver confirming the arrival of data. If the
acknowledgement has not reached the sender, it needs to resend that data. The positive
acknowledgement from the receiver establishes a successful connection.
Step 1: SYN
SYN is a segment sent by the client to the server. It acts as a connection
request between the client and server. It informs the server that the client wants to
establish a connection. Synchronizing sequence numbers also helps synchronize
sequence numbers sent between any two devices, where the same SYN segment asks
for the sequence number with the connection request.
Step 2: SYN-ACK
It is an SYN-ACK segment or an SYN + ACK segment sent by the server. The ACK
segment informs the client that the server has received the connection request and it
is ready to build the connection. The SYN segment informs the sequence number with
which the server is ready to start with the segments.
Step 3: ACK
ACK (Acknowledgment) is the last step before establishing a successful TCP connection
between the client and server. The ACK segment is sent by the client as the response
of the received ACK and SN from the server. It results in the establishment of a reliable
data connection.
After these three steps, the client and server are ready for the data communication
process. TCP connection and termination are full-duplex, which means that the data
can travel in both the directions simultaneously.
Establishing a connection sounds easy, but it is actually surprisingly tricky. At first glance, it
would seem sufficient for one transport entity to just send a CONNECTION REQUEST
segment to the destination and wait for a CONNECTION ACCEPTED reply. The problem
occurs when the networkcan lose, delay, corrupt, and duplicate packets. This behavior causes
seriouscomplications.
In Fig.(b), the first segment is a delayed duplicate CONNECTION REQUEST from an old
connection. This segment arrives at host 2 without host 1’s knowledge. Host 2 reacts
to this segment by sending host 1 an ACK segment, in effect asking for verification
that host 1 was indeed trying to set up a new connection. When host 1 rejects host 2’s
attempt to establish a connection, host 2 realizes that it was tricked by a delayed
duplicate and abandons the connection. In this way, a delayed duplicate does no
damage
The worst case is when both a delayed CONNECTION REQUEST and an ACK are
floating around in the subnet. This case is shown in Fig. (c). As in the previous example,
host 2 gets a delayed CONNECTION REQUESTand replies to it. At this point, it is crucial
to realize that host 2 has proposed using y as the initial sequence number for host 2
to host 1 traffic, knowing full well that no segments containing sequence number y or
acknowledgements to y are still in existence. When the second delayed segment
arrives at host 2, the fact that z has been acknowledged rather than y tells host 2 that
this, too, is an old duplicate. The important thing to realize here is that there is no
combination of old segments that can cause the protocol to fail and have a connection
set up by accident when no one wants it.
There are two styles of terminating a connection: asymmetric release and symmetric release
Asymmetric release is the way the telephone system works: when one party hangs up, the
connection is broken. Symmetric release treats the connection as two separate unidirectional
connections and requires each one to be released separately
Asymmetric release is abrupt and may result in data loss. Consider the scenario of Fig. After
the connection is established, host 1 sends a segment that arrives properly at host 2. Then host
1 sends another segment. Unfortunately, host 2 issues a DISCONNECT before the second
segment arrives. The result is that the connection is released and data are lost
Clearly, a more sophisticated release protocol is needed to avoid data loss. One way is to use
symmetric release, in which each direction is released independently of the other one. Here, a
host can continue to receive data even after it has sent a DISCONNECT segment. Symmetric
release does the job when each process has a fixed amount of data to send and clearly knows
when it has sent it. One can envision a protocol in which host 1 says ‘‘I am done. Are you done
too?’’ If host 2 responds: ‘‘I am done too. Goodbye, the connection can be safely released.’’
In Fig. (a), we see the normal case in which one of the users sends a DR (DISCONNECTION
REQUEST) segment to initiate the connection release. When itarrives, the recipient sends back
a DR segment and starts a timer, just in case its DR is lost. When this DR arrives, the original
sender sends back an ACK segment and releases the connection. Finally, when the ACK
segment arrives, the receiver also releases the connection.
If the final ACK segment is lost, as shown in Fig.(b), the situationis saved by the timer. When
the timer expires, the connection is released anyway. Now consider the case of the second DR
being lost. The user initiating the disconnection will not receive the expected response, will
time out, and will start all over again.
In Fig.(c), we see how this works, assuming that the second time no segments are lost and all
segments are delivered correctlyand on time. Last scenario, Fig.(d), is the same as Fig. (c)
except that now we assume all the repeated attempts to retransmit the DR also fail due to lost
segments. After N retries, the sender just gives up and releases the connection.
While it creates three segments to establish a connection, it takes four segments to terminate a
connection. During a TCP connection is full-duplex (that is, data flows in each direction
independently of the other direction), each direction should be shut down alone.
The termination procedure for each host is shown in the figure. The rule is that either end can
share a FIN when it has finished sending data.
When a TCP receives a FIN, it should notify the application that the other end has terminated
that data flow direction. The sending of a FIN is usually the result of the application issuing a
close.
The receipt of a FIN only means that there will be no more data flowing in that
direction. A TCP can send data after receiving a FIN. The end that first issues the close
(example, send the first FIN) executes the active close. The other end (that receives this
FIN) manages the passive close.
The User Datagram Protocol (UDP) is simplest Transport Layer communication protocol
available of the TCP/IP protocol suite. It involves minimum amount of communication
mechanism. UDP is said to be an unreliable transport protocol but it uses IP services which
provides best effort delivery mechanism.
UDP Header –
UDP header is an 8-bytes fixed and simple header, while for TCP it may vary from 20
bytes to 60 bytes. The first 8 Bytes contains all necessary header information and the
remaining part consist of data. UDP port number fields are each 16 bits long, therefore
the range for port numbers is defined from 0 to 65535; port number 0 is reserved. Port
numbers help to distinguish different user requests or processes
1. Source Port: Source Port is a 2 Byte long field used to identify the
port number of the source.
2. Destination Port: It is a 2 Byte long field, used to identify the port
of the destined packet.
3. Length: Length is the length of UDP including the header and the
data. It is a 16-bits field.
4. Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s
complement of the one’s complement sum of the UDP header, the
pseudo-header of information from the IP header, and the data,
padded with zero octets at the end (if necessary) to make a multiple
of two octets.
Explain the technique of Remote Procedure Call
A remote procedure call is an interprocess communication technique that is used for client-
server based applications. It is also known as a subroutine call or a function call.
A client has a request message that the RPC translates and sends to the server. This request
may be a procedure or a function call to a remote server. When the server receives the request,
it sends the required response back to the client. The client is blocked while the server is
processing the call and only resumed execution after the server is finished.
The sequence of events in a remote procedure call are given as follows −
A protocol is designed to handle real-time traffic (like audio and video) of the Internet,
is known as Real Time Transport Protocol (RTP). RTP must be used with UDP. It does
not have any delivery mechanism like multicasting or port numbers. RTP supports
different formats of files like MPEG and MJPEG. It is very sensitive to packet delays and
less sensitive to packet loss.
The P bit indicates that the packet has been padded to a multiple of 4 bytes. The
last padding byte tells how many bytes were added
The CC field tells how many contributing sources are present, from 0 to 15 (see
below). The M bit is an application-specific marker bit
. The Payload type field tells which encoding algorithm has been used
The Sequence number is just a counter that is incremented on each RTP packet sent.
It is used to detect lost packets
. The Timestamp is produced by the stream’s source to note when the first sample in
the packet was made.
the Contributing source identifiers, if any, are used when mixers are present in the
studio. In that case, the mixer is the synchronizing source, and the streams being mixed
are listed here.
In TCP service, the sender and receiver needs to create endpoints called sockets. Each socket
has an address which is made up of two parts.
An IP address of the host.
A port number that is 16 bit local to host (source or destination)
Both are collectively called socket addresses. A port is the TCP name for TSAP (Transport
Service Access Point). It is essential to create a link between the sockets of the sender &
receiver. Connections are used as identifiers at both ends. It can use the same socket for greater
than one connection at a time.
We explain some of the sockets calls with their respectful meaning in the following table. It
also should know that TCP does not support multicasting & broadcasting.
Every TCP segment consists of a 20 byte fixed format header. Header options may
follow the fixed header. With a header so that it can tag up to 65535 data bytes
Source Port
It is a 16-bit source port number used by the receiver to reply.
Destination Port
It is a 16-bit destination port number.
Sequence Number
The sequence number of the first data byte in this segment. During the SYN Control bit is set,
and the sequence number is n, and the first data byte is n + 1.
Acknowledgement Number
If the ACK control bit is set, this field contains the next number that the receiver expects to
receive.
Data Offset
The several 32-bit words in the TCP header shows from where the user data begins.
Reserved (6 bit)
It is reserved for future use.
URG
It indicates an urgent pointer field that data type is urgent or not.
ACK
It indicates that the acknowledgement field in a segment is significant, as discussed early.
PUSH
The PUSH flag is set or reset according to a data type that is sent immediately or not.
Window
It is used in Acknowledgement segment. It specifies the number of data bytes, beginning with
the one indicated in the acknowledgement number field that the receiver is ready to accept.
Checksum
It is used for error detection.
Options
The IP datagram options provide additional punctuality. It can use several optional parameters
between a TCP sender and receiver. It depends on the options used. The length of the field
may vary in size, but it can't be larger than 40 bytes due to the header field's size, which is 4
bit.
TCP uses a sliding window, to handle flow control. The sliding window protocol used by 22
TCP, however, is something between the Go-Back-N andSelective Repeat sliding window. The
sliding window protocol in TCP looks like the Go-Back-N protocol because it does not use
NAKs;it looks like Selective Repeat because the receiver holds the out-of-order segments until
the missing ones arrive.
There are two big differences between this sliding window and the onewe used at the data link
layer.
1 the sliding window of TCP is byte-oriented; the one we discussed in thedata link layer is
frame-oriented.
2.the TCP's sliding window is of variable size; the one we discussed inthe data link layer was
of fixed size
The window is opened, closed, or shrunk. These three activities, as we willsee, are in the control
ofthe receiver (and depend on congestion in the network), not the sender.
The sender must obey the commands of the receiver in this matter. Opening a window means
moving the right wall to the right. This allowsmore new bytes in the buffer that are eligible for
sending.
Closing the window means moving the left wall to the right. This meansthat some bytes have
been acknowledged and the sender need not worry about them anymore. Shrinking the window
means moving the right wall to the left.
The size of the window at one end is determined by the lesser of two values: receiver window
(rwnd) or congestion window (cwnd).
The receiver window is the value advertised by the opposite end in a segment containing
acknowledgment. It is the number of bytes the other end can accept before its buffer overflows
and data are discarded. The congestion window is a value determined by the network to avoid
congestion
.Explain the architecture of Email system
Electronic Mail (e-mail) is one of most widely used services of Internet. This
service allows an Internet user to send a message in formatted manner (mail) to
the other Internet user in any part of world. Message in mail not only contain
text, but it also contains images, audio and videos data. The person who is
sending mail is called sender and person who receives mail is called recipient. It
is just like postal mail service.
1. User Agent (UA) : The UA is normally a program which is used to send and
receive mail. Sometimes, it is called as mail reader. It accepts variety of
commands for composing, receiving and replying to messages as well as
for manipulation of the mailboxes.
2. Message Transfer Agent (MTA) : MTA is actually responsible for transfer
of mail from one system to another. To send a mail, a system must have
client MTA and system MTA. It transfer mail to mailboxes of recipients if
they are connected in the same machine. It delivers mail to peer MTA if
destination mailbox is in another machine. The delivery from one MTA to
another MTA is done by Simple Mail Transfer Protocol.
Mailbox : It is a file on local hard drive to collect mails. Delivered mails are
present in this file. The user can read it delete it according to his/her requirement.
To use e-mail system each user must have a mailbox . Access to mailbox is only
to owner of mailbox.
Spool file : This file contains mails that are to be sent. User agent appends
outgoing mails in this file using SMTP. MTA extracts pending mail from spool
file for their delivery. E-mail allows one name, an alias, to represent several
different e-mail addresses. It is known as mailing list,
Electronic Mail (e-mail) is one of the most widely used services of the Internet.
This service allows an Internet user to send a message in a formatted manner
(mail) to other Internet users in any part of the world. Message in the mail not
only contain text, but it also contains images, audio and videos data. The person
who is sending mail is called sender and person who receives mail is called the
recipient. It is just like postal mail service.
. Header :
The header consists of a series of lines. Each header field consists of a single line
of ASCII text specifying field name, colon and value. The main header fields
related to message transport are :
Header Meaning
Note on mime
MIME stands for Multipurpose Internet Mail Extensions. It is used to extend the
capabilities of Internet e-mail protocols such as SMTP.MIME is a kind of add-on
or a supplementary protocol that allows non-ASCII data to be sent through
SMTP. It allows the users to exchange different kinds of data files on the Internet:
audio, video, images, application programs as well.
MIME Header
MIME adds five additional fields to the header portion of the actual e-mail to
extend the properties of the simple email protocol. These fields are as follows:
1. MIME Version
It defines the version of the MIME protocol. This header usually has a parameter value
1.0, indicating that the message is formatted using MIME.
2. Content Type
It describes the type and subtype of information to be sent in the message. These
messages can be of many types such as Text, Image, Audio, Video, and they also have
many subtypes such that the subtype of the image can be png or jpeg. Similarly, the
subtype of Video can be WEBM, MP4 etc.
In this field, it is told which method has been used to convert mail information into
ASCII or Binary number, such as 7-bit encoding, 8-bit encoding, etc.
4. Content Id
In this field, a unique "Content Id" number is appended to all email messages so that
they can be uniquely identified.
5. Content description
This field contains a brief description of the content within the email. This means that
information about whatever is being sent in the mail is clearly in the "Content
Description". This field also provides the information of name, creation date, and
modification date of the file.
SMTP
Working of SMTP
1. Composition of Mail: A user sends an e-mail by composing an electronic mail
message using a Mail User Agent (MUA). Mail User Agent is a program which is used
to send and receive mail. The message contains two parts: body and header. The body
is the main part of the message while the header includes information such as the
sender and recipient address. The header also includes descriptive information such as
the subject of the message. In this case, the message body is like a letter and header is
like an envelope that contains the recipient's address.
2. Submission of Mail: After composing an email, the mail client then submits the
completed e-mail to the SMTP server by using SMTP on TCP port 25.
3. Delivery of Mail: E-mail addresses contain two parts: username of the recipient and
domain name. For example, vivek@gmail.com, where "vivek" is the username of the
recipient and "gmail.com" is the domain name.
If the domain name of the recipient's email address is different from the sender's
domain name, then MSA will send the mail to the Mail Transfer Agent (MTA). To relay
the email, the MTA will find the target domain. It checks the MX record from Domain
Name System to obtain the target domain. The MX record contains the domain name
and IP address of the recipient's domain. Once the record is located, MTA connects to
the exchange server to relay the message.
4. Receipt and Processing of Mail: Once the incoming message is received, the
exchange server delivers it to the incoming server (Mail Delivery Agent) which stores
the e-mail where it waits for the user to retrieve it.
5. Access and Retrieval of Mail: The stored email in MDA can be retrieved by using MUA
(Mail User Agent). MUA can be accessed by using login and password
Advantages of SMTP:
If necessary, the users can have a dedicated server.
It allows for bulk mailing.
Low cost and wide coverage area.
Offer choices for email tracking.
reliable and prompt email delivery.
.Write a note on IMAP.
Features of IMAP :
Client (Browser):
Server:
Request method
1 GET
3 POST
4 PUT
5 DELETE
6 CONNECT
7 OPTIONS
8 TRACE
Expires Response Time and date when the page stops being valid
Refer 2m
Benefits of Caching
Summing up, we have listed the main benefits of caching below:
latency reduction;
bandwidth consumption reduction;
network traffic reduction;
website speed and performance increase.
Types of Caching
Browser cache - this storage is done in the browser. All browsers have a local storage, which
is usually used to retrieve previously accessed resources. This type of cache is private since
stored resources are not shared.
Proxy cache - this storage, also called intermediate caching, is done on the proxy server,
between the client and the origin server. This is a type of shared cache as it’s used by multiple
clients and is usually maintained by providers.
Gateway cache - also called reverse proxy, it’s a separate, independent layer, and this storage
is between the client and the application. It caches the requests made by the client and sends
them to the application and does the same with the responses, sending from the application to
the client. If a resource is requested again, the cache returns the response before reaching the
application. It’s also a shared cache, but by servers not users.
Application cache - this storage is done in the application. It allows the developer to specify
which files the browser should cache and make them available to users even when they are
offline.
Cache-Control
In the Cache-Control header, the following standard directives can be given for caching:
private
Content is considered private as only one user has access. In this case, private content can be
stored by the client’s browser but not by intermediate caches.
public
Content is considered public as more than one user can have access. Content can be stored by
the browser or in other caches between the client and server.
no-store
Content can’t be cached, so the request is always sent to the origin server. This format is
indicated when transmitting confidential data.
no-cache
The cached content must be revalidated in each new request, and this makes the content
immediately obsolete. In this case, the cache sends the request to the origin server for
validation before releasing the stored copy.
max-age
Defines the maximum amount of time content can be cached without being revalidated on the
origin server. The time is defined in seconds and the maximum is one year (31,536,000
seconds).
s-maxage
Indicates the amount of time content can be cached and is therefore very similar to max-age,
but the difference is that this option only applies to intermediate caches but not the browser.