Computer Networks
Q1. What is a
Network?
A1. A network is a set of devices connected to each other
using a physical transmission medium. In a network, nodes are used to connect
two or more networks.
Q2. What is a node?
A2. Two or more computers directly by an optical fiber or
any other cable. A node is a point where a connection established. It is a
network component which is used to send, receive and forward the electronic
information. A device connected to a network is also termed as node.
Q3. What is Network
Topology?
A3. Network topology is a physical layout of the computer
network and it defines how the computers, devices, cables, etc. are connected
to each other.
Q4. What are routers?
A4. The router is a network device which connects two or
more network segments. The router is used to transfer information from the
source to destination. Routers send the information in terms of data packets
and when these data packets are forwarded from one router to another router
then the router reads the network address in the packets and identifies the
destination network.
Q5. What is OSI
reference model?
A5. Open System Interconnection, the name itself suggest
that it is a reference model which defines how applications can communicate
with each other over a networking system. It also helps to understand the
relationship between networks and defines the process of communication in a
network.
Q6. What are the
layers in OSI reference Models? Describe each layer briefly?
A6. 1. Physical
Layer: Physical Layer converts data bits into electrical impulse or radio
signals. Ex: Ethernet.
2. Data Link Layer:
At data link layer, data packets are encoded and decoded into bits and it
provides a node to node data transfer. Data link layer also detects the errors
occurred at layer1.
3. Network Layer:
Network Layer transfers variable length data sequence from one node to another
node in the same network. This variable length data sequence is also known as “Datagrams”.
4. Transport Layer:
It transfers data between nodes and also provides acknowledgement of successful
data transmission. It keeps track of transmission and sends the segments again
if the transmission fails.
5. Session Layer:
Session Layer manages and controls the connections between computers. It establishes,
coordinates, exchange and terminates the connections between local and the
remote applications.
6. Presentation
Layer: It is also called as “Syntax Layer”. It transforms the data into the
form in which the application layer accepts.
7. Application Layer:
This is the last layer of OSI reference Model and is the one which is close to
the end user. Both end user and application layer interacts with the software
application. This layer provides services for email, file transfer, etc.
Q7. What is the difference
between Hub, Switch and Router?
A7. 1. Hub is least
expensive, least intelligent and least complicated of the three. Switches work
similarly like Hubs but in a more efficient manner. The router is smartest and
most complicated out of these three.
2. It broadcast all data to every port which may cause
serious security and reliability concern. Switches create connections
dynamically and provide information only to the requesting port. Routers are
similar like little computers dedicated for routing network traffic.
3. In a network, Hub is a common connection point for
devices connected to the network. Hub contains multiple ports and is used to
connect segments of LAN. Switch is a device in a network which forwards packets
in a network. Routers are located at gateway and forwards data packets.
Q8. Explain TCP/IP
Model?
A8. The most widely used and available protocol is TCP/IP
i.e. Transmission Control Protocol and Internet Protocol. TCP/IP specifies how
data should be packaged, transmitted and routed in their end to end data
communication. There are 4 layers in TCP/IP model.
1.
Application Layer: This is the top most layer in
TCP/IP model. It includes processes which use transport layer protocol to
transmit the data to their destination. There are different Application layer
protocols such as HTTP, FTP, SMTP, SNMP etc.
2.
Transport Layer: It receives the data from the
application layer which is above transport layer. It acts as a backbone between
the host’s system connected with each other and it mainly concerns about the
transmission of data. TCP and UDP are mainly used as a transport layer
protocols.
3.
Network or Internet Layer: This layer sends the
packets across the network. Packets mainly contain source and destination IP
addresses and actual data to be transmitted.
4.
Network Interface Layer: It is the lowest layer
of TCP/IP model. It transfers the packets between different hosts. It includes
encapsulation of IP packets into frames, mapping IP addresses to physical
hardware devices, etc.
Q9. What is HTTP and
what port does it use?
A9. HTTP is Hyper Text Transfer Protocol and it is
responsible for web content. Many web pages are using HTTP to transmit the web
content and allow the display and navigation of Hyper Text. The primary
protocol and port used here is TCP port 80.
Q10. What is HTTPS
and what port does it use?
A10. HTTPS is a Secure HTTP. HTTPS is used for secure
communication over a computer network. HTTPS provides authentication of
websites which prevents unwanted attacks. In a bi-directional communication,
HTTPS protocol encrypts the communication so that tampering of the data gets
avoided. With the help of a SSL certificate, it verifies if the requested
server connection is s valid connection or not. HTTPS uses TCP with port 443.
Q11. What are TCP and
UDP?
A11. TCP and UDP are the most widely used protocols that are
built on the top of IP protocol. Both protocols are used to send bits of data
over the Internet, which is also known as ‘packets’. When packets are transferred
using either TCP or UDP, it is sent to an IP address. These packets are traversed
through router to the destination.
1.
TCP stands for Transmission Control Protocol.
UDP stands for User Datagram Protocol.
2.
Once the connection is setup, data can be sent
bi-directional i.e. TCP is a connection oriented protocol. UDP is
connectionless, simple protocol. Using UDP, messages are sent as packets.
3.
The speed of TCP is slower than UDP.
4.
TCP is used for the application where time is
not critical part of data transmission. UDP is suitable for the applications
which require fast transmission of data and time is crucial in this case.
5.
TCP transmission occurs in a sequential manner.
UDP transmission does not occur in a sequential manner but it does not maintain
the same sequence when it reaches the destination.
6.
TCP is a heavy weight connection. UDP is a light
weight connection.
7.
TCP tracks the data sent to ensure no data loss
during data transmission. UDP does not ensure whether receiver receives packets
or not. If packets are misses then they are just lost.
Q12. What is
Stop-and-Wait protocol?
A12. In Stop-and-Wait protocol, a sender after sending a
frame waits for acknowledgement of the frame and sends the next frame only when
acknowledgement of the frame has received.
Q13. What is
piggybacking?
A13. Piggybacking is used in bi-directional data
transmission in the network layer (OSI model). The idea is to improve
efficiency piggy back acknowledgement of the received data on the data frame to
be sent instead of sending a separate frame.
Q14. What happens
when you type a URL in a web browser?
A14. A URL may contain request to HTML, image file or any
other type. If content of the typed URL is in cache and fresh, then display the
content. Else find IP address for the domain so that a TCP connection can be
setup. Browser does a DNS lookup. Browser needs to know IP address for a URL, so
that it can setup a TCP connection. This is why browser needs DNS service.
Browser first look for URL-IP mapping browser cache, then in OS cache. If all
caches are empty, then it makes a recursive query to the local DNS server. The
local DNS server provides the IP address. Browser sets up a TCP connection
using three way handshake. Browser sends a HTTP request. Server has a web
server like Apache, IIS running that handles incoming HTTP request and sends a
HTTP response. Browser receives the HTTP response and renders the content.
Q15.
What is DHCP, how does it work?
- The idea of DHCP (Dynamic Host Configuration Protocol) is to enable devices to get IP address without any manual configuration.
- The device sends a broadcast message saying “I am new here”
- The DHCP server sees the message and responds back to the device and typically allocates an IP address. All other devices on network ignore the message of new device as they are not DHCP server.
In Wi Fi networks, Access Points generally work as a DHCP server.
Q16.
What is subnet mask?
A subnet mask is combined with an IP address in order to identify two parts: the extended network address and the host address. Like an IP address, a subnet mask is made up of 32 bits.