Computer Network IMP Que-Ans CN Assignment-1-Que-Ans
Computer Network IMP Que-Ans CN Assignment-1-Que-Ans
CN Assignment-1-Que-Ans
PAN is the most basic type of computer network. It is used for connecting the
personal computer devices.
LANs are the most frequently used networks. They connect computers through
a common communication path within a limited area (usually locally).
LANs cover areas up to 2 kilometers and it offer high transmission speeds, easy
maintenance, and low cost.
Government agencies use MAN to connect the citizens and private industries.
WANs use various technologies, including leased lines, satellites, and the
Internet.
OSI reference model describes that how transfer information from one
computer to the another computer using medium.
There are seven layers of OSI Model :- (1) Physical Layer (2) Data Link Layer (3)
Network Layer (4) Transport Layer (5) Session Layer (6) Presentation Layer (7)
Application Layer.
(1) Physical Layer :- Physical layer is the lowest level of the OSI model. It
consist various network devices such as connectors , receivers , plugs , modems ,
repeaters , cables , Hubs etc …
When the sender at one side for transmission of data and the reciever for
receive the data at another side at that time physical connection is established by
physical layer and it provides half-duplex and full-duplex transmission of data.
Physical layer provides the sequential delivery of data with error control
mechanism or flow control mechanism. If these mechanishm are not used by
physical layer then sometimes the database may be duplicated , lost or can be
altered.
(4) Service primitive :- The physical layer consists three types of primitive phases
that are the activation phase , the deactivation phase and the transfer phase.
The service names associated with each service primitives are given below:
1. Activation phase :-
2. Deactivation Phase :-
(5) Data Transparency :- The physical layer provides the trasparency of data
which means that the bit sequences can be transmitted over the transmission
channel without any restriction.
The data link layer provides one bit in serial transmission and “n” bits in a
parallel transmission to the physical layer.
(2) The Data Link Layer :- Data link layer is the second layer from bottom in
OSI reference model.
(1) Framing :- The data link layer receives packets from network layer it is known
as “Frame”.
DLL divides that packets into small frames then sends each frame bit-by-bit to
the physical layer.
At receiver side , DLL takes bits from the physical layer and organizes them into
frame and sends them to the network layer.
(2) Addressing :- The Data link layer adds a header to the frame that contains a
destination address. The addressing mechanism facilates communication beween
devices.
(3) Error Control :- Data can get corrupted due to various reasons like noise ,
attenuation etc … So , it is the responsibility of DLL , to detect the error in the
transmitted data and correct it using error detection and correction techniques.
DLL adds error detection bits into the frame’s header , so that receiver can
check received data is correct or not.
(4) Flow Control :- If the receiver’s receiving speed is lower than the sender’s
sending speed, then this can lead to an overflow in the receiver’s buffer and some
frames may get lost. So, it’s the responsibility of DLL to synchronize the sender’s
and receiver’s speeds and establish flow control between them.
(5) Access Control :- When multiple devices share the same communication
channel that time there is high probability of clashing.
So it is the responsibility to check which device has control over the channel
and clashing detection and clashing avoidance can be used to avoid the clashing
of communication channel.
(3) Network Layer :- The main job of network layer is to maintain the quality of
the data and pass it from source to destination.
(1) Assigning the logical address :- It is responsible for assigning logical addresses
to devices either sending or receiving data packets.
Network layer consist the IP Address for both receiver and sender.
IP Address has two part that are Host ID and Network ID. Using the Host ID :- It
can be confirmed that the packets were sent by the authorized sender. Using the
Network ID :- It can be confirmed that packets are received by the desired
receiver.
(2) Routing :- Routing is the process of identyfying the best path to transmit the
packets.
Numerous routers are used to findout best path to transit data packets using
routers.
There are multiple routers between the sender and receiver , so the data
packets are routed by using all the available routers.
Forwarding is the process in which the network layer transits or forwards the
data packets via routers.
Network layer ensures that packets are forwards from each router to the
another router until it reches the destination securely.
(4) Logical subnetting :- Network layer allows a bigger network to be divided into
smaller chunks known as Logical subnetting.
It helps the IP address to be used more efficiently and less amount of IP
address will be wasted.
(5) Error Handling :- Network layer uses varoius error detection techniques like
Cyclic Redundancy Check (CRC) , Checksum etc …
Network layer uses ACK messages to determine whether packets has been
succcessfully reached or not. If there is negative ACK then it means packets with
errors and receiver will ask to the sender to resend the packets.
(4) Transport Layer :- The transport layer is positioned between the network
and session layers in the OSI reference model.
(1) Service-Point Addressing :- The header with the address known as a service-
point address it is functioned by the transport layer.
In transport layer data is transmitted from one source to the destination with
connecting different service-point address.
(2) Data Reassembly :- The transport layer reassembles the message or data that
are based on sequence of numbers.
(3) Connection Control :- Transport layer has two types of connection control
services that are connection-oriented and connection-less services.
(4) Flow Control :- In transport layer it is possible for sender to transit data or
information at very fast rate and receiver can receive and process it.
(5) Error Control :- In Transport layer Error control ensures that data is received to
the destination without any error.
(5) Session Layer :- Session layer allows users on different machines to
establish active communication sessions between them.
(2) Synchronizing of data :- It is also responsible for synchronizing data from the
different sources.
(3) Fetching data :- This layer is fetching or receving data or information from
transport layer and send it to the presentation layer.
(4) Connections :- This layer control single or multiple connections for each-end
user application and directly communicates with presentation and transport
layer.
(5) Mechanishm :- This layer provides mechanishm for opening , closing and
managing a session between end-user application process.
(6) Presentation Layer :- It provides or define the data format and encryption.
It is also called as syntax layer and it is also responsible for maintaing the proper
syntax of the data.
(1) Data Efficiency :- This layer ensures that the data is sent that will understand
by the reciever efficiently and effectively.
(2) Encryption and Decryption :- This layer carries out the encryption for the
transmitter and decryption for the receiver.
(3) Data abstraction :- This layer manages the abstraction of data and allows high-
level data structure.
(4) Standardished data format :- This layer is responsible for integrating all the
formats into standardished data format for effective communication.
(5) Accurate Format of data :- This layer ensures that the data is to be the upper
layer as well as lower layer and accurate format.
(1) Storage Facility :- This layer provides data storage facility to the user.
(2) Files management :- This layer allows users to access , retrieve and manage
files in a remote computer.
(3) Access Network Services :- This layer serves application process to the end-
user for access network services.
(5) Interaction with OS :- This layer basically interact with operating system and
preserves the data in a suitable manner.
Q-3 :- Differentiate connection-oriented and connection-less services.
Ans :-
In year 1980 , ARPANET was handled over the different military network and
defense data network.
ARPANET’s software was split into two parts- a host and a subnet.
Advantages of ARPANET :-
Radio , Television and telecom signals are transmitted through radio waves.
The majority of radio waves are used for TV and mobile communication.
(2) Micro waves :- Microwaves are types of electromagnetic radiation that has a
frequency of few gigahertz (GHz).
Micro waves utilized short wave lengths and these waves are employed in
micro waves.
The green house effect caused by these rays and it is critical for main taining
global warming and average tempretures.
Infrared radiation is emitted by electronic devices and is commonly employed
in remote switches for a variety of household gadgets.
(4) Visible rays :- Visible rays can be seen and it is a comman type of
electromagnetic waves.
Visible rays are used in devices includes bulbs , lamps , candles , LEDs , tube
light etc …
(5) Ultraviolet rays :- The sun is the primary source of ultraviolet radiation on
Earth, the ozone layer absorbs the majority of UV energy before it reaches the
atmosphere.
UV rays are used :- (1) In medical :- For high precision LASIK or Laser-based eye
surgery. (2) In Water purifiers :- UV lamps are used in water purifiers to eliminate
micro-oraganisms that may be present in water. (3) In Welding arcs :- Welders are
used special goggles to protect their eyes from UV welding arcs.
(6) X-rays :- X-rays electromagnetic spectrum are generally used in mediacal field.
A doctor utilies x-ray scanner to scan teeth or bones. At the airport checkpoint,
security agents utilise it to search through passengers’ luggage. X-rays are also
emitted by the universe’s heated gases.
Multiplexing is done using a device multiplexer (MUX) that takes input lines “n”
to generate a single output. On other side , there is a device demultiplexer
(DEMUX) that takes input lines and generates ‘n’ output lines.
Types of multiplexing :-
In Time Division Multiplexing, all signals operate with the same frequency
(bandwidth) at different times.
Synchronous TDM is not efficient because if the input frame has no data to
send, a slot remains empty in the output frame.
(2) Statistical TDM :- Statistical TDM is a type of Time Division Multiplexing where
the output frame collects data from the input frame till it is full, not leaving an
empty slot like in Synchronous TDM.
In statistical TDM, we need to include the address of each particular data in the
slot that is being sent to the output frame.
WDM :- WDM stands for Wavelength Division Multiplexing.
In baseband transmission twisted pair cables , coaxial cables , and wire are
used as transfer medium.
There are four framing techniques :- (1) Byte Count (2) Flag bytes with byte
stuffing (3 Flag bits with bit stuffing (4) Physical layer coding violations.
Byte stuffing is the process that adds an extra byte to the data transmission
when flag byte (01111110) or 8-bits is found.
In this technique , the extra bytes are inserted after occurance of the flag byte
and after consider the main data , the extra bytes are removed at receiver end.
Whenever sender sends a bytes in the data that matches the flag byte and
inserts an ESC character.
At receiver end side , receiver is aware of the ESC mechanishm , it recognize
the ESC and removed extra bytes and interpreting the original bytes.
Disadvantages :- (1) It adds overhead to the data stream due to the extra byte
for every occurrence of the flag byte. (2) It is less efficient than bit stuffing ,due to
the addition of extra bytes.
Q-2 :- Describe hidden and exposed station problems. How RTS and
CTS help to resolve the problem ?
Ans :-
In the below shown diagram, RTS message from B reaches A but not C.
However, both B and C are within range of A. CTS message containing duration of
data transmission from B to A, reaches C. Thus C knows some hidden station is
using channel and does not transmit until that duration is over.
The above figure shows , the Bellman-Ford algorithm will converge for each
router, they will have entries for each other. B will know that it can get to C at a
cost of 1, and A will know that it can get to C via B at a cost of 2.
If the link between B and C is disconnected, then B will know that it can no
longer get to C via that link and will remove it from its table. Before it can send
any updates it’s possible that it will receive an update from A which will be
advertising that it can get to C at a cost of 2. B can get to A at a cost of 1, so it will
update a route to C via A at a cost of 3. A will then receive updates from B later
and update its cost to 4. They will then go on feeding each other wrong
information toward infinity which is called as “Count to Infinity problem”.
Split Horizon :- Split horizon with Poison reverse technique is used by Routing
Information Protocol (RIP) to reduce routing loops. Additionally, Holddown
timers can be used to avoid the formation of loops. The hold-down timer
immediately starts when the router is informed that the attached link is down. Till
this time, the router ignores all updates of the down route unless it receives an
update from the router of that downed link. During the timer, If the downlink is
reachable again, the routing table can be updated.
MAC sub layer :- Multiple Access control is a sublayer of data link layer that
provides control for accessing the transmission medium.
(1) Pure ALOHA :- Pure Aloha can be termed as the main Aloha or the original
Aloha.
In Pure ALOHA , there is only one channel to share data and communicate with
each other , therefore collision chance is high.
In the case of the pure aloha, the user transmits the frame and waits till the
receiver acknowledges it, if the receiver does not send the acknowledgment, the
sender will assume that it has not been received and sender resends the
acknowledgment.
In Pure ALOHA , each user waits a random amount of time for transmission.
In these , channels are divided into small and fixed-sized legth of time slots for
transmission.
In the case of Slotted ALOHA , When a user wants to transmit a frame, it waits
until the next time slot and then sends the frame. If the frame is received
successfully, the receiver sends an acknowledgment. If the acknowledgment is
not received within a time-out period, the sender assumes that the frame was not
received and retransmits the frame in the next time slot.
In slotted ALOHA , user can only allowed to transmit data at beginning of each
time slot , therefore Less chance for collision in Slotted ALOHA.
Q-5 :- Explain simplex stop and wait protocol for noise channel.
Ans :-
Simplex Stop and Wait Protocol :- The Stop and Wait protocol is a protocol
used for reliable data transmission over a noisy channel.
In this protocol, the sender only sends one frame at a time and waits for an
acknowledgment (ACK) from the receiver before sending the next frame.
This helps to ensure that the receiver receives the data correctly and
eliminates the retransmission in the case of errors caused by the noisy channel.
In this protocol , The sender continuously monitors the channel for errors, and
if an error is detected, it waits for the next ACK before resending the frame.
In this protocol , If an error is detected, the receiver sends a NACK signal to the
sender, requesting a retransmission of the frame.
Congestion Occurs in network layer when the message traffic is so heavy that it
slows network response time.
There are some approaches for congestion control over a network which are
usually applied on different time scales to either prevent congestion or react to it
once it has occurred.
There are following steps are below mentioned for the approaches of
congestion control :-
Step-1 :- The basic way to avoid congestion is to build a network that is well
matched to the traffic that it carries. If more traffic is directed but a low-
bandwidth link is available, definitely congestion occurs.
Step-2 :- 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.
Step-4 :- Some of local radio stations have helicopters flying around their cities
to report on road congestion to make it possible for their mobile listeners to
route their packets (cars) around hotspots. This is called “traffic aware routing”.
Step-6 :- when congestion is imminent the network can deliver feedback to the
sources whose traffic flows are responsible for the problem. The network can
request these sources to “throttle traffic”, or it can slow down the traffic itself.
Step-7 :- Routers can monitor the average load, queueing delay, or packet loss.
In all these cases, the rising number indicates growing congestion. The network is
forced to discard packets that it cannot deliver. The general name for this is “Load
shedding”. The better technique for choosing which packets to discard can help
to prevent congestion collapse.
Q-7 :- What is UDP ? Define Remote procedure call in detail.
Ans :-
UDP protocol allows the computer applications to send the messages in the
form of datagrams from one machine to another machine over the Internet
Protocol (IP) network.
(2) When the procedure finishes and produces its results, its results are
transferred back to the calling environment, where execution resumes as if
returning from a regular procedure call.
How RPC is Work ?
Step-1 :- The client, client stub, and RPC run time execute on the client
machine.
Step-2 :- A client starts a client stub process by passing parameters in the usual
way. The packing of the procedure parameters is called marshalling. The client
stub stores within the client's own address space, and it also asks the local RPC
Runtime to send back to the server stub.
Step-3 :- In this stage, the user can access RPC by making regular Local
Procedural Call. RPC Runtime manages the transmission of messages between the
network across client and server, and it also performs the job of retransmission,
acknowledgment, routing, and encryption.
Step-4 :- After completing the server procedure, it returns to the server stub,
which packs (marshalls) the return values into a message. The server stub then
sends a message back to the transport layer.
Step-5 :- In this step, the transport layer sends back the result message to the
client transport layer, which returns back a message to the client stub.
Step-6 :- In this stage, the client stub demarshalls (unpack) the return
parameters in the resulting packet, and the execution process returns to the
caller.
What is Bluetooth ?
A slave from one piconet can act as a master (or primary) in another piconet.
These bridge nodes receive messages from masters in one piconet and deliver
them to their slaves in another piconet.
CSMA is based on media access protocol to sense the traffic on a channel (idle
or busy) before transmitting the data.
It means that if the channel is idle, the station can send data to the channel.
Otherwise, it must wait until the channel becomes idle. Hence, it reduces the
chances of a collision on a transmission medium.
(1) 1-persistent :- If the channel is idle, it immediately sends the data. Else it must
wait for the channel to be idle.
The CSMA/CD protocol works with a medium access control layer. Therefore, it
first senses the shared channel before broadcasting the frames, and if the channel
is idle, it transmits a frame to check whether the transmission was successful. If
the frame is successfully received, the station sends another frame. If any collision
is detected in the CSMA/CD, the station sends a jam/ stop signal to the shared
channel to terminate data transmission. After that, it waits for a random time
before sending a frame to a channel.
CSMA/ CA :-
Multiplexing is done using a device multiplexer (MUX) that takes input lines “n”
to generate a single output. On other side , there is a device demultiplexer
(DEMUX) that takes input lines and generates ‘n’ output lines.
Multiplexing are commanly used in telecommunications , where it enables
multiple phone calls or internet connections to be transmitted over a single-
physical-line.
Types of multiplexing :-
In Time Division Multiplexing, all signals operate with the same frequency
(bandwidth) at different times.
Synchronous TDM is not efficient because if the input frame has no data to
send, a slot remains empty in the output frame.
(2) Statistical TDM :- Statistical TDM is a type of Time Division Multiplexing where
the output frame collects data from the input frame till it is full, not leaving an
empty slot like in Synchronous TDM.
In statistical TDM, we need to include the address of each particular data in the
slot that is being sent to the output frame.
In this technique, each frame has sent from the sequence number. The
sequence numbers are used to find the missing data in the receiver end. The
purpose of the sliding window technique is to avoid duplicate data, so it uses the
sequence number.
There are two types of Sliding window protocol :- (1) Go-Back-N ARQ
In this, if any frame is corrupted or lost, all subsequent frames have to be sent
again.
If the receiver receives a corrupted frame, it cancel it. The receiver does not
accept a corrupted frame. When the timer expires, the sender sends the correct
frame again.
Advantages :-
Dis-advantages :-
(2) Selective Repeat ARQ :- Selective Repeat ARQ is also known as “Selective
Repeat Automatic Repeat Request.” It is a data link layer protocol that uses a
sliding window method.
The Go-back-N ARQ protocol works well if it has fewer errors. But if there are
lot of errors in the frame, it may lots of bandwidth loss in sending the frames
again. So, we use the Selective Repeat ARQ protocol.
In this protocol, the size of the sender side window is always equal to the size
of the receiver side window and the size of the sliding window is always greater
than 1.
If the receiver receives a corrupt frame, it does not directly discard it. It sends a
negative acknowledgment to the sender. The sender sends that frame again as
soon as on the receiving negative acknowledgment. There is no waiting for any
time-out to send that frame.
Advantages :-
If any frame is corrupt then not all frames are sent again.
Dis-advantages :-
Sorting and searching both are required , therefore more storage required.
CN IMP Que-Ans
It can runs on the top of other layers of the network protocol stack.
HTTP is used to access the data on the WWW (World Wide Web).
HTTP Follows client-server model , where a client sends request to the server
(such as a web server) and recieves response in return.
The client send requests are such as GET , POST, PUT and DELETE.
In these protocol , both sender and receiver are always ready for data
processing and both have inifinite buffer space availible.
This protocol does not have any error control or flow control machanism.
This protocol does not have any mechanism for detecting errors in the
received data frames, as it assumes that the communication channel is error-free.
This protocol does not have multiple communication scenarios and it is not
suitable for complex transmission.
Coaxial cable :- Coaxial cable is an electrical cable with copper conductor and
insulator shielding around it that prevents signal interface and cross talk.
In Coaxial cable Signal transmission is working using inner and outer wire.
Fig :-
Ans :- Data link layer plays a crucial role in maintaining communication between
sender and reciever but there are some data link layer design issues for
communication that are as follows :-
The data link layer acts as a service interface to the network layer. The
Principle service is to transfer data from the sending machine to the network
layer on destination machine.
The source machine sends data in the form of blocks called frames to the
destination machine.
The starting and ending of each frame should be identified so that the frame
can be recognized by the destination machine.
Flow control prevents data frame at the receiver end. The source machine
does not send data frames faster than the destination machine can handle.
Flow control manage a balance between data transmission rates and receiver
capacity.
Each node in the DNS hierarchy has a domain name, and a full domain name is
a sequence of symbols separated by dots.
(3) Inverse Domains :- If we want to know any website domain name then DNS
provides the mapping to find out the IP Address of website. For Example :-
geeksforgeeks.org
DNS records (short for "Domain Name System records") are defines the datatypes
of data that are stored in the DNS database.
For example −
example.com. IN A 192.0.2.1
(2) CNAME records :- CNAME records consist of an alias and the domain name it
should resolve to.
For example −
(3) mx records :- MX records consist of a domain name, a priority value, and the
hostname of the mail server responsible for the domain.
For example −
example.com. IN MX 10 mail.example.com.
(4) NS records − NS records consist of a domain name and the hostname of the
name server responsible for the domain.
For example −
example.com. IN NS ns1.example.com.
(5) TXT records − TXT records consist of a domain name and the text value that
should be associated with the domain.
For example −
In Infrastructure mode , The client sends and receives its packet via Access
Point.
In Ad-hoc mode computers can directly sends the frames to each other.
In Ad hoc mode there is peer-to-peer mode with no central access point , and
it also allow internet between any two computers.
Most of IEEE 802.11 transmitter and receivers supports the ad hoc mode.
Ad hoc mode is generally , used in the milatry area for sharing the information
among soliders and it also most used in local area networks (LANs) for
communication among fixed group of people.
In the delayed duplicate problem, TCP segments traverse the network and are
delivered to the receiver even when the duplicates have already been
retransmitted.
In first step , the client wants to establish a connection with server , so it sends
a segments with SYN (Synchronize sequence number) , it informs the server that
client is likely start the communication with strat segments.
In second step , Server responds to the client request with SYN + ACK signal
bits set.
Where , ACK signifies the response of the segment is received and SYN signifies
sequence number with start segments.
Finally in last step , both sides client and servers have established a reliable
connection and ready for actual data transfer.
In Static channel allocation , once channels are assigned to cells , it can not
changed during any operation.
In static channel allocation , If all channels are occupied and a user makes a
call, the call is blocked.
Static channels allocated channels are remain with cells until , the call is
completed.
In Dynamic channel allocation , When a user makes a call request, the Base
Station sends the request to the Mobile Station Center for channel allocation.
Routing algorithm is helps to decide the optimal path based on factors such as
network topology , traffic load , and reliability.
For example let consider the networks in the figure , that having six routers
that are connected through transmission lines.
From above figure , Using flooding technique packes transmission are as
follows :-
(2) 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).
(3) Selective flooding :- Here, the routers don't transmit the incoming packets
only along those paths which are heading towards approximately in the right
direction, instead of every available paths.
In general, the network layer operates in an environment that uses store and
forward packet switching.
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.
A TSAP represents a specific endpoint in the transport layer of the OSI (Open
Systems Interconnection) model.
An NSAP address is an identifying label for a service access point (SAP) used in
OSI networking.
IPv4 was the primary version brought into action for production within the
ARPANET in 1983.
IP version four addresses are 32-bit integers which will be expressed in decimal
notation.
Example- 192.0.2.126 could be an IPv4 address.
IPv4 could be a numeric address, and its bits are separated by a dot.
IPv4 uses the Post Address Resolution Protocol to map to the MAC address.
Advantages of IPv4 :-
(2) IPV4 network allocation is significant and presently has quite 85000 practical
routers.
(3) It becomes easy to attach multiple devices across an outsized network while
not NAT.
Disadvantages of IPv4 :-
IPv4 IPv6
IPv4 has a 32-bit address length. IPv6 has a 128-bit address length.
It Supports Manual and DHCP address It supports Auto and renumbering
configuration. address configuration.
In IPv4 end to end, connection integrity In IPv6 end-to-end, connection integrity
is Unachievable. is Achievable.
The Security feature is dependent on IPSEC is an inbuilt security feature in
the application in ipv4. the IPv6 protocol.
In IPv4 Packet flow identification is not In IPv6 packet flow identification are
available. Available and uses the flow label field in
the header.
IPv4 has a header of 20-60 bytes. IPv6 has a header of 40 bytes fixed.
IPv4 consists of 4 fields which are IPv6 consists of 8 fields, which are
separated by addresses dot (.) separated by a colon (:)
IPv4’s IP addresses are divided into IPv6 does not have any classes of the IP
five different classes. Class A , Class B, address.
Class C, Class D , Class E.