Unit 1 Networking-1
Unit 1 Networking-1
Unit 1:
What is a Computer Network?
o Computer Network is a group of computers connected with each other
through wires, optical fibres or optical links so that various devices can interact
with each other through a network.
o The aim of the computer network is the sharing of resources among various
devices.
o In the case of computer network technology, there are several types of networks
that vary from simple to complex level .
There are two types of NIC: wireless NIC and wired NIC.
o Wireless NIC: All the modern laptops use the wireless NIC. In Wireless NIC, a connection is
made using the antenna that employs the radio wave technology.
o Wired NIC: Cables use the wired NIC to transfer the data over the medium.
2 CK
Hub
Hub is a central device that splits the network connection into multiple devices. When computer
requests for information from a computer, it sends the request to the Hub. Hub distributes this
request to all the interconnected computers.
Switches
Switch is a networking device that groups all the devices over the network to transfer the data to
another device. A switch is better than Hub as it does not broadcast the message over the network,
i.e., it sends the message to the device for which it belongs to. Therefore, we can say that switch
sends the message directly from source to the destination.
o Twisted pair cable: It is a high-speed cable that transmits the data over 1Gbps or more.
o Coaxial cable: Coaxial cable resembles like a TV installation cable. Coaxial cable is more
expensive than twisted pair cable, but it provides the high data transmission speed.
o Fibre optic cable: Fibre optic cable is a high-speed cable that transmits the data using light
beams. It provides high data transmission speed as compared to other cables. It is more
expensive as compared to other cables, so it is installed at the government level.
Router
Router is a device that connects the LAN to the internet. The router is mainly used to connect the
distinct networks or connect the internet to multiple computers.
Modem
Modem connects the computer to the internet over the existing telephone line. A modem is not
integrated with the computer motherboard. A modem is a separate part on the PC slot found on the
motherboard.
3 CK
• Computer networking refers to interconnected computing devices that can exchange data
and share resources with each other. These networked devices use a system of rules,
called communications protocols, to transmit information over physical or wireless
technologies.
High Reliability – If there are alternate sources of supply, all files could be replicated on
two or more machines. If one of them is not available, due to hardware failure, the other
copies could be used.
Flexible access – Files can be accessed from any computer in the network. The project can
be begun on one computer and finished on another.
Security– Computer networks must be secure to protect against unauthorized access, data
breaches, and other security threats.
Performance– Computer networks must provide high performance and low latency to
ensure that applications and services are responsive and available when needed. This
requires optimizing network infrastructure, bandwidth utilization, and traffic management.
4 CK
LAN
LAN (Local Area Network) is defined as a computer network that is responsible for
connecting local areas like schools, residents, universities, etc. The main function of
the local area networks is to link the computers, thereby providing access to the
printers, photocopies, and other services. LAN has client-server architecture.
MAN
• A MAN, also called the Metropolitan Area Network, is defined as the computer
network that joins the metropolitan areas. MAN works either through wires/ cables
or modem.
5 CK
WAN
A WAN, also called the Wide Area Network, is defined as a telecommunications
network that extends over a large area. The primary purpose of WAN is computer
networking. The networks are linked to communicate with one another.
Now, there are certain contrasting points between LAN, MAN, and WAN. So,
let us have a look at them.
2. The full form of the The full form of The full form of WAN is a
LAN is Local Area MAN is Wide Area Network.
Network. Metropolitan Area
Network.
Characteristics of LAN
1. It is a network owned by a private owner.
2. Personal computers, printers, etc., are connected through LAN.
3. LANs are very easy to design and troubleshoot.
4. A central database is used to connect the LAN networks.
7 CK
Characteristics of MAN
1. MAN is a larger network than LAN.
2. The geographical area covered is larger than LAN.
3. MAN generally covers a city. The television network is the prime example of
MAN.
4. Two or more computers are connected through this network.
Characteristics of WAN
1. The largest area, like a country, is covered by WAN.
2. Different metropolitan countries are linked through the telecommunications
network.
3. WAN may be interconnected in and around the world.
4. The connection between the networks is established through telephone lines or
satellites.
OSI Model
o OSI stands for Open System Interconnection is a reference model that describes how
information from a software application in one computer moves through a physical medium
to the software application in another computer.
o OSI consists of seven layers, and each layer performs a particular network function.
o OSI model was developed by the International Organization for Standardization (ISO) in 1984,
and it is now considered as an architectural model for the inter-computer communications.
o OSI model divides the whole task into seven smaller and manageable tasks. Each layer is
assigned a particular task.
o Each layer is self-contained, so that task assigned to each layer can be performed
independently.
8 CK
o The OSI model is divided into two layers: upper layers and lower layers.
o The upper layer of the OSI model mainly deals with the application related issues, and they
are implemented only in the software. The application layer is closest to the end user. Both
the end user and the application layer interact with the software applications. An upper layer
refers to the layer just above another layer.
o The lower layer of the OSI model deals with the data transport issues. The data link layer and
the physical layer are implemented in hardware and software. The physical layer is the lowest
layer of the OSI model and is closest to the physical medium. The physical layer is mainly
responsible for placing the information on the physical medium.
1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
9 CK
1) Physical layer
o The main functionality of the physical layer is to transmit the individual bits from one node
to another node.
o It is the lowest layer of the OSI model.
o It establishes, maintains and deactivates the physical connection.
o It specifies the mechanical, electrical and procedural network interface specifications.
o Line Configuration: It defines the way how two or more devices can be connected physically.
o Data Transmission: It defines the transmission mode whether it is simplex, half-duplex or
full-duplex mode between the two devices on the network.
o Topology: It defines the way how network devices are arranged.
o Signals: It determines the type of the signal used for transmitting the information.
2) Data-Link Layer
10 CK
o Framing: The data link layer translates the physical's raw bit stream into packets known as
Frames. The Data link layer adds the header and trailer to the frame. The header which is
added to the frame contains the hardware destination and source address.
o Physical Addressing: The Data link layer adds a header to the frame that contains a
destination address. The frame is transmitted to the destination address mentioned in the
header.
o Flow Control: Flow control is the main functionality of the Data-link layer. It is the technique
through which the constant data rate is maintained on both the sides so that no data get
corrupted. It ensures that the transmitting station such as a server with higher processing
speed does not exceed the receiving station, with lower processing speed.
o Error Control: Error control is achieved by adding a calculated value CRC (Cyclic Redundancy
Check) that is placed to the Data link layer's trailer which is added to the message frame
before it is sent to the physical layer. If any error seems to occurr, then the receiver sends the
acknowledgment for the retransmission of the corrupted frames.
o Access Control: When two or more devices are connected to the same communication
channel, then the data link layer protocols are used to determine which device has control
over the link at a given time.
11 CK
3) Network Layer
o It is a layer 3 that manages device addressing, tracks the location of devices on the network.
o It determines the best path to move data from source to the destination based on the network
conditions, the priority of service, and other factors.
o The Data link layer is responsible for routing and forwarding the packets.
o Routers are the layer 3 devices, they are specified in this layer and used to provide the routing
services within an internetwork.
o The protocols used to route the network traffic are known as Network layer protocols.
Examples of protocols are IP and Ipv6.
4) Transport Layer
12 CK
o The Transport layer is a Layer 4 ensures that messages are transmitted in the order in which
they are sent and there is no duplication of data.
o The main responsibility of the transport layer is to transfer the data completely.
o It receives the data from the upper layer and converts them into smaller units known as
segments.
o This layer can be termed as an end-to-end layer as it provides a point-to-point connection
between source and destination to deliver the data reliably.
and they all travel in different routes to reach the destination. A connection-oriented service
makes a connection with the transport layer at the destination machine before delivering the
packets. In connection-oriented service, all the packets travel in the single route.
o Flow control: The transport layer also responsible for flow control but it is performed end-
to-end rather than across a single link.
o Error control: The transport layer is also responsible for Error control. Error control is
performed end-to-end rather than across the single link. The sender transport layer ensures
that message reach at the destination without any error.
5) Session Layer
o Dialog control: Session layer acts as a dialog controller that creates a dialog between two
processes or we can say that it allows the communication between two processes which can
be either half-duplex or full-duplex.
o Synchronization: Session layer adds some checkpoints when transmitting the data in a
sequence. If some error occurs in the middle of the transmission of data, then the transmission
will take place again from the checkpoint. This process is known as Synchronization and
recovery.
6) Presentation Layer
14 CK
o A Presentation layer is mainly concerned with the syntax and semantics of the information
exchanged between the two systems.
o It acts as a data translator for a network.
o This layer is a part of the operating system that converts the data from one presentation
format to another format.
o The Presentation layer is also known as the syntax layer.
o Translation: The processes in two systems exchange the information in the form of character
strings, numbers and so on. Different computers use different encoding methods, the
presentation layer handles the interoperability between the different encoding methods. It
converts the data from sender-dependent format into a common format and changes the
common format into receiver-dependent format at the receiving end.
o Encryption: Encryption is needed to maintain privacy. Encryption is a process of converting
the sender-transmitted information into another form and sends the resulting message over
the network.
o Compression: Data compression is a process of compressing the data, i.e., it reduces the
number of bits to be transmitted. Data compression is very important in multimedia such as
text, audio, video.
7) Application Layer
o An application layer serves as a window for users and application processes to access network
service.
o It handles issues such as network transparency, resource allocation, etc.
o An application layer is not an application, but it performs the application layer functions.
o This layer provides the network services to the end-users.
15 CK
o File transfer, access, and management (FTAM): An application layer allows a user to access
the files in a remote computer, to retrieve the files from a computer and to manage the files
in a remote computer.
o Mail services: An application layer provides the facility for email forwarding and storage.
o Directory services: An application provides the distributed database sources and is used to
provide that global information about various objects.
TCP/IP model
o The TCP/IP model was developed prior to the OSI model.
o The TCP/IP model is not exactly similar to the OSI model.
o The TCP/IP model consists of five layers: the application layer, transport layer, network layer,
data link layer and physical layer.
o The first four layers provide physical standards, network interface, internetworking, and
transport functions that correspond to the first four layers of the OSI model and these four
layers are represented in TCP/IP model by a single layer called the application layer.
o TCP/IP is a hierarchical protocol made up of interactive modules, and each of them provides
specific functionality.
Here, hierarchical means that each upper-layer protocol is supported by two or more lower-level
protocols.
Internet Layer
IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP
suite.
o IP Addressing: This protocol implements logical host addresses known as IP addresses. The
IP addresses are used by the internet and higher layers to identify the device and to provide
internetwork routing.
o Host-to-host communication: It determines the path through which the data is to be
transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the transport
layer protocol. An IP protocol ensures that the data is sent and received securely, it
encapsulates the data into message known as IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by data
link layer protocol is known as Maximum Transmission unit (MTU). If the size of IP datagram
is greater than the MTU unit, then the IP protocol splits the datagram into smaller units so
that they can travel over the local network. Fragmentation can be done by the sender or
intermediate router. At the receiver side, all the fragments are reassembled to form an original
message.
17 CK
o Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN, it
is known as direct delivery. When source and destination are on the distant network, then the
IP datagram is sent indirectly. This can be accomplished by routing the IP datagram through
various devices such as routers.
ARP Protocol
ICMP Protocol
Transport Layer
The transport layer is responsible for the reliability, flow control, and correction of data which is
being sent over the network.
The two protocols used in the transport layer are User Datagram protocol and Transmission
control protocol.
o At the sending end, TCP divides the whole message into smaller units known as
segment, and each segment contains a sequence number which is required for
reordering the frames to form an original message.
o At the receiving end, TCP collects all the segments and reorders them based on
sequence numbers.
Application Layer
o HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access the data
over the world wide web. It transfers the data in the form of plain text, audio, video. It is
known as a Hypertext transfer protocol as it has the efficiency to use in a hypertext
environment where there are rapid jumps from one document to another.
o SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used for
managing the devices on the internet by using the TCP/IP protocol suite.
o SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports the
e-mail is known as a Simple mail transfer protocol. This protocol is used to send the data to
another e-mail address.
o DNS: DNS stands for Domain Name System. An IP address is used to identify the connection
of a host to the internet uniquely. But, people prefer to use the names instead of addresses.
Therefore, the system that maps the name to the address is known as Domain Name System.
o TELNET: It is an abbreviation for Terminal Network. It establishes the connection between
the local computer and remote computer in such a way that the local terminal appears to be
a terminal at the remote system.
o FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for
transmitting the files from one computer to another computer.
20 CK
TCP refers to Transmission Control Protocol. OSI refers to Open Systems Interconnection.
TCP/IP uses both the session and presentation layer OSI uses different session and presentation
in the application layer itself. layers.
TCP/IP OSI
The Transport layer in TCP/IP does not provide In the OSI model, the transport layer provides
assurance delivery of packets. assurance delivery of packets.
TCP/IP model network layer only provides Connectionless and connection-oriented services
connectionless (IP) services. The transport layer are provided by the network layer in the OSI
(TCP) provides connections. model.
Physical Layer: Deals with the physical connection between devices. It defines hardware
aspects such as cables, connectors, and signalling.
Data Link Layer: Responsible for the reliable transmission of data frames between directly
connected nodes. It handles issues like framing, addressing, and error detection.
Network Layer: Manages routing and forwarding of data packets between devices on
different networks. It deals with logical addressing and packet switching.
Transport Layer: Ensures end-to-end communication by providing error recovery, flow
control, and segmentation of data into smaller units. Examples include TCP (Transmission
Control Protocol) and UDP (User Datagram Protocol).
Session Layer: Manages sessions or connections between applications, establishing,
maintaining, and terminating connections.
Presentation Layer: Deals with data format translation, encryption, and compression to
ensure that data can be properly interpreted by the application layer.
Application Layer: Provides network services directly to end-users or applications. It includes
protocols for tasks like email, file transfer, and remote login.
22 CK
Service Models:
Service models describe how communication services are provided in a network. Two
commonly discussed service models are:
Connection-Oriented Service:
Connectionless Service:
Characteristics: Does not establish a dedicated connection before data transfer, and each
packet is treated independently.
Example Protocol: UDP (User Datagram Protocol).
OSI Model:
Physical Layer (Layer 1): Deals with the physical connection and transmission of raw binary
data over a physical medium. It includes specifications for cables, connectors, and physical
interfaces.
Data Link Layer (Layer 2): Responsible for reliable data transfer between directly connected
nodes. It handles framing, addressing, and error detection.
Network Layer (Layer 3): Manages logical addressing, routing, and packet switching to
enable communication between devices on different networks.
23 CK
Transport Layer (Layer 4): Ensures end-to-end communication, providing error recovery,
flow control, and segmentation of data. It includes protocols like TCP (connection-oriented)
and UDP (connectionless).
Session Layer (Layer 5): Manages sessions or connections between applications, establishing,
maintaining, and terminating connections.
Presentation Layer (Layer 6): Deals with data format translation, encryption, and
compression to ensure that data can be properly interpreted by the application layer.
Application Layer (Layer 7): Provides network services directly to end-users or applications.
It includes protocols for tasks like email, file transfer, and remote login.
QUESTIONS:
Q: What is the difference between host and route?
The HOSTS file lets you map a specific host name such as www.google.com to a specific IP
address. The route command lets you specify which gateway to use when trying to reach a
certain IP address (or more accurately, a certain network).
Router: A router is a machine that forwards packets from one network to another.
Q: What is ICANN?
The Internet Corporation for Assigned Names and Numbers
Q:What is ATM?
An automated teller machine (ATM) is an electronic banking outlet that allows customers to
complete basic transactions without the aid of a branch representative or teller.
Q: what is count to infinity?
Count to infinity problemThe core of the count-to-infinity problem is that if A tells B that it
has a path somewhere, there is no way for B to know if the path has B as a part of it.
Q: which class of ip address provides a maximum of only 254 host addresses per
network id
Class C network numbers
Class C network numbers are appropriate for networks with few hosts--the maximum being
254.
Q: which protocol uses both UDP and TCP? What is the purpose of that
protocol?
DNS Domain Name Server
Q: To test the IP stack on your local host, which IP address will you ping?
Therefore, to test the IP stack on your local host, you need to ping the loopback address
which is represented by the IP address 127.0. 0.1 or localhost.
Q: What is a Protocol?
In networking, a protocol is a set of rules for formatting and processing data.
Q: What is a datagram?
A datagram refers to a self-contained, independent unit of data that is transmitted over a
network.
Datagrams are used to send data between different nodes on a network, such as computers
or servers. A datagram typically consists of a header and a payload.
Q: Discuss the various types of address used in the different layers of TCP/IP
model?
Four levels of addresses are used in the TCP/IP protocol: physical address, logical address,
port address, and application-specific address as shown in Figure.
27 CK
Physical Addresses
• The physical address, also known as the link address, is the address of a node as defined
by its LAN or WAN.
• The size and format of these addresses vary depending on the network. For example,
Ethernet uses a 6-byte (48-bit) physical address.
• Physical addresses can be either unicast (one single recipient), multicast (a group of
recipients), or broadcast (to be received by all systems in the network.
• Example: Most local area networks use a 48-bit (6-byte) physical address written as 12
hexadecimal digits; every byte (2 hexadecimal digits) is separated by a colon, as shown
below: A 6-byte (12 hexadecimal digits) physical address 07:01:02:01:2C:4B
Logical Addresses
• Logical addresses are used by networking software to allow packets to be independent of
the physical connection of the network, that is, to work with different network topologies and
types of media.
• A logical address in the Internet is currently a 32-bit address that can uniquely define a host
connected to the Internet. An internet address in IPv4 in decimal numbers 132.24.75.9
• No two publicly addressed and visible hosts on the Internet can have the same IP address.
• The physical addresses will change from hop to hop, but the logical addresses remain the
same.
• The logical addresses can be either unicast (one single recipient), multicast (a group of
recipients), or broadcast (all systems in the network). There are limitations on broadcast
addresses.
Port Addresses
• There are many application running on the computer. Each application run with a port
no.(logically) on the computer.
• A port number is part of the addressing information used to identify the senders and
receivers of messages.
• Port numbers are most commonly used with TCP/IP connections.
• These port numbers allow different applications on the same computer to share network
resources simultaneously.
• The physical addresses change from hop to hop, but the logical and port addresses usually
remain the same.
• Example: a port address is a 16-bit address represented by one decimal number 753
28 CK
Application-Specific Addresses
• Some applications have user-friendly addresses that are designed for that specific
application.
• Examples include the e-mail address (for example, [email protected]) and the Universal
Resource Locator (URL) (for example, www.mhhe.com). The first defines the recipient of an
e-mail; the second is used to find a document on the World Wide Web.
As soon as a client requests a communication session with the server, a three-way handshake process
initiates TCP traffic by following three steps.
First, a connection between server and client is established, so the target server must have open ports that
can accept and initiate new connections. The client node sends a SYN (Synchronize Sequence Number) data
packet over an IP network to a server on the same or an external network.
This SYN packet is a random sequence number that the client wants to use for the communication (for
example, X). The objective of this packet is to ask/infer if the server is open for new connections.
Step 2: The server receives the SYN packet from the client node
When the server receives the SYN packet from the client node, it responds and returns a confirmation
receipt – the ACK (Acknowledgement Sequence Number) packet or SYN/ACK packet. This packet includes
two sequence numbers.
The first one is ACK one, which is set by the server to one more than the sequence number it received from
the client (e.g. X+1).
29 CK
The second one is the SYN sent by the server, which is another random sequence number (for example, Y).
This sequence indicates that the server correctly acknowledged the client’s packet, and that is sending its
own to be acknowledged as well.
Step 3: Client node receives the SYN/ACK from the server and responds
with an ACK packet
The client node receives the SYN/ACK from the server and responds with an ACK packet. Once again, each
side must acknowledge the sequence number received by incrementing it by one.
So now it’s the turn of the client to acknowledge the server’s packet by adding one to the sequence number
(in this case, Y+1), and resend it to the server.
Upon completion of this process, the connection is created and the host and server can communicate.
All these steps are necessary to verify the serial numbers originated by both sides, guaranteeing the stability
of the connection.
Since both hosts must acknowledge the connection parameters of the other side, a missing or out-of-order
segment can be quickly detected before the actual data transfer process is initiated.
It only requires a single key for both encryption It requires two keys, a public key and a private
and decryption. key, one to encrypt and the other one to decrypt.
The size of cipher text is the same or smaller than The size of cipher text is the same or larger than
the original plain text. the original plain text.
The length of key used is 128 or 256 bits The length of key used is 2048 or higher
It is efficient as it is used for handling large It is comparatively less efficient as it can handle
amount of data. a small amount of data.
Security is less as only one key is used for both It is more secure as two keys are used here- one
encryption and decryption purpose. for encryption and the other for decryption.