Unit2 - Basic of Computer Network
Unit2 - Basic of Computer Network
Rajan Sharma
UNIT 2: Basic of Computer Network
Networking Components
• Computer networks components comprise both
Hardware parts as well as the software parts
required for installing computer networks, both
at organizations and at home.
• The hardware components are the server, client,
peer, transmission medium, and connecting
devices.
• The software components are operating system
and protocols
NETWORK CONNECTING DEVICES : HUB,
SWITCH, BRIDGE, ROUTER, GATEWAY
They are passive devices, they don’t have any They are active devices, equipped with
software associated with it. network software.
Bridge
• A bridge in a computer network is a device used to connect
multiple LANs together to make a larger Local Area Network
(LAN).
• The mechanism of network aggregation is known as bridging.
The bridge is a physical or hardware device but operates at the
OSI model’s data link layer.
• It is used for interconnecting two LANs on same Protocol
Bridge
• A bridge in a computer network is a device used to connect
multiple LANs together to make a larger Local Area Network
(LAN).
• The mechanism of network aggregation is known as bridging.
The bridge is a physical or hardware device but operates at the
OSI model’s data link layer.
• It is used for interconnecting two LANs on same Protocol
•
Working of Bridge
Bridge accepts all the packets and
forwards all of them to the other
side. The bridges are intelligent
devices that allow the passing of
only selective packets from them. A
bridge only passes those packets
addressed from a node in one
network to another node in the other
network.
• A bridge performs in the following
aspect −
• A bridge receives all the packets or
frame from both LAN (segment) A and
B.
• A bridge builds a table of addresses
from which it can identify that the
packets are sent from which LAN (or
Uses of Bridges
• Bridges are used to divide large busy
networks into multiple smaller and
interconnected networks to improve
performance.
• Bridges also can increase the physical
size of a network.
Types of Bridge
• There are three types of bridges in
computer networks
1.Transparent bridge
2.Source routing bridge
3.Translational bridge
Advantages of Bridge
• Bridges can be used as a network extension like they can
connect two network topologies together.
• It has a separate collision domain
• Highly reliable and maintainable. The network can be divided
into multiple LAN segments.
• Simple installation, no requirement of any extra hardware or
software except the bridge itself.
• Protocol transparency is higher as compared to other
protocols.
Limitations of Bridge
• Expensive as compared to hubs and repeaters.
• Poor performance as additional processing is required
to view the MAC address of the device on the
network.
• As the traffic received is in bulk or is broadcasted
traffic, individual filtering of data is not possible.
• During the broadcasting of data, the network has high
broadcast traffic and broadcast storms can be
formed.
Repeater
• A repeater is a network device that retransmits a
received signal with more power and to an extended
geographical or topological network boundary
• It expand the coverage area of the network, re
propagate a weak or broken signal and or service
remote nodes.
• Repeaters amplify the received/input signal so that it
is reusable, scalable.
Working of Repeater
• When an electrical signal is transmitted via a channel, it gets
attenuated depending upon the nature of the channel or the
technology. This poses a limitation upon the length of the LAN or
coverage area of cellular networks. This problem is alleviated by
installing repeaters at certain intervals.
• Repeaters amplifies the attenuated signal and then
retransmits it.
• Digital repeaters can even reconstruct signals distorted by
transmission loss. So, repeaters are popularly incorporated to
connect between two LANs thus forming a large single LAN
Router
• Routers are networking devices operating at layer 3 or
a network layer of the OSI model.
• They are responsible for receiving, analysing, and forwarding
data packets among the connected computer networks.
• When a data packet arrives, the router inspects the destination
address, consults its routing tables to decide the optimal route
and then transfers the packet along this route.
Routers
• A router is a layer 3 or network layer device.
• It connects different networks together and sends data packets
from one network to another.
• A router can be used both in LANs (Local Area Networks) and
WANs (Wide Area Networks).
• It transfers data in the form of IP packets. In order to transmit
data, it uses IP address mentioned in the destination field of
the IP packet.
• Routers have a routing table in it that is refreshed periodically
according to the changes in the network. In order to transmit
data packets, it consults the table and uses a routing protocol.
• Some of the popular Routers are manufactured by
o Cisco, D-Link,HP,3Com,Juniper,Nortel
Working of Routers
Working of Routers
• A router determines a packet’s future path by examining the
destination IP address of the header and comparing it to the
routing database.
• The list of routing tables outlines how to send the data to a
specific network location. They use a set of rules to determine
the most effective way to transmit the data to the specified IP
address.
• A routing table primarily specifies the router’s default path.
• Static and dynamic tables come in two varieties in the router.
The dynamic routing tables are automatically updated by
dynamic routers based on network activity, whereas the static
routing tables are configured manually.
Types of Routers
• There are several types of routers. Some of them are
mentioned below:
1. Broadband Routers: Used to connect to the internet.
2. Wireless routers: These routers are used to create a
wireless signal in your office or home.
3. Wired Routers: Wired Router is used to connects
multiple wired devices using a Ethernet cable,
4. Edge Routers: As the name indicates, these are
located at the edges usually connected to an Internet
Service Provider
Functions of Router
1. Forwarding: The router receives the packets from its input
ports, checks its header, and then looks up to the routing table
to find the appropriate output port to dump the packets onto,
and forwards the packets onto that output port.
2. Routing: Routing is the process by which the router ascertains
what is the best path for the packet to reach the destination, It
maintains a routing table that is made using
different algorithms by the router only.
3. Network Address Translation (NAT): Routers use NAT to
translate between different IP address ranges. This allows
devices on a private network to access the internet using a
single public IP address.
Functions of Router
4. Security: Routers can be configured with firewalls and other
security features to protect the network from unauthorized
access, malware, and other threats.
5. Quality of Service (QoS): Routers can prioritize network
traffic based on the type of data being transmitted. This ensures
that critical applications and services receive adequate bandwidth
and are not affected by lower-priority traffic.
6. Virtual Private Network (VPN) connectivity: Routers can be
configured to allow remote users to connect securely to the
network using a VPN.
Functions of Router
7. Bandwidth management: Routers can be used to manage
network bandwidth by controlling the amount of data that is
allowed to flow through the network. This can prevent network
congestion and ensure that critical applications and services
receive adequate bandwidth.
8. Monitoring and diagnostics: Routers can be configured to
monitor network traffic and provide diagnostics information in
the event of network failures or other issues. This allows network
administrators to quickly identify and resolve problems.
Gateway
• A gateway is a networking
device or software application
that acts as an entry
pointbetween two different
networks, allowing them to
communicate and exchange data
• The network gateway operates
at layer 3, i.e. network layer of
the OSI model.
• It acts as the entry – exit point
for a network since all traffic
that flows across the networks
should pass through the
gateway.
Gateway
• A network gateway is a device
that connects different networks
by translating messages from
one protocol into another
protocol.
• The gateway monitors and
controls all the incoming and
outgoing network traffic.
• Gateways are also known as
protocol converters because they
play an important role in
converting protocols supported
by traffic on different networks.
• As a result, it allows smooth
communication between two
networks.
Features of Gateway
• Gateway is located at the boundary of a network and
manages all data that inflows or outflows from that
network.
• It forms a passage between two different networks
operating with different transmission protocols.
• It also stores information about the routing paths of the
communicating networks.
• When used in enterprise scenario, a gateway node may
be supplemented as proxy server or firewall.
Functions of Gateway
• LAN to WAN connections- It can be used to connect a group
of personal computers i.e. LAN(Local Area Network) to the
Internet i.e. WAN(Wide Area Network).
• Controls incoming and outgoing data– It is located on the
boundary of any network, so it controls incoming and outgoing
data packets from/to any network.
• Works as a Protocol Converter- It makes sure that the data
packet from another network is compatible with this network.
So it converts their protocols into supported protocols and
other stuff of the data packets before it enters into the network.
• Routing of data packets- It is responsible for routing data
packets to different networks because it knows about the
routing path of different networks that are in communication
with its own network.
BROUTER
• A brouter, also known as a bridge-router, is a
network device that combines the
functionality of a bridge and a router.
• It operates at both the data link layer (Layer 2)
and the network layer (Layer 3) of the OSI
model, allowing it to perform bridging and
routing functions simultaneously.
Function of Brouter
1. Bridging Function:
• Like a bridge, a brouter forwards frames between
different network segments based on MAC
addresses.
• It operates at the data link layer (Layer 2) of the
OSI model and uses MAC address tables to make
forwarding decisions.
• Bridging is typically used to connect segments of
the same network (e.g., Ethernet segments) and
reduce collision domains.
Function of Brouter
2.Routing Function:
• Similar to a router, a brouter routes packets
between different IP networks based on IP
addresses.
• It operates at the network layer (Layer 3) of the
OSI model and uses routing tables to make
forwarding decisions.
• Routing allows communication between devices
on different networks and enables traffic
segmentation and network optimization.
Function of Brouter
3.Hybrid Operation:
• A brouter combines bridging and routing functionalities
within the same device.
• It can selectively forward traffic based on MAC addresses
(bridging) or IP addresses (routing), depending on the
destination network.
Benefits of Brouter
• Flexibility: A brouter offers flexibility by supporting both
bridging and routing functionalities in a single device.
• Traffic Segmentation: It allows for the segmentation of traffic
between different network segments, improving network
performance and security.
• Interoperability: A brouter can seamlessly connect devices
and networks using different protocols, such as Ethernet and
IP.
• Simplified Network Management: By integrating bridging and
routing capabilities, a brouter simplifies network management
and reduces the need for separate bridging and routing
devices.
Addressing
• Addressing is a fundamental aspect of data
communication and computer networks, enabling
devices to uniquely identify and communicate with
each other across interconnected networks.
Importance of Addressing
1. Device Identification:
– Addresses uniquely identify devices on a network, allowing
them to be distinguished from one another.
– This enables accurate routing and delivery of data packets
to their intended destinations.
2. Communication:
– Devices use addresses to specify the source and
destination of data, enabling effective communication
across networks.
3. Routing:
– Routers and switches use addresses to determine the
most efficient path for packet transmission.
Importance of Addressing
4. Network Management:
• Addresses are essential for network management tasks such
as monitoring, troubleshooting, and configuration.
5. Resource Allocation:
• Addresses help manage the allocation of network resources
such as bandwidth, storage, and processing power. By
assigning addresses to devices and applications,
6. Security:
• Secure communication protocols use addresses to
authenticate and authorize devices, preventing unauthorized
access and protecting sensitive data from interception or
tampering.
Types of Addressing
• 1.Physical Address
• 2. Logical Address
• 3. Port Address
• 4. Specific Address
Types of Addressing
a, b c, j, k are the Port Addresser
A and P are the IP Addresses
MAC Addresses are included in H2 (Header of Data Link Layer)
1. Physical Address
• Physical Address is the lowest level of
addressing
• The physical address is usually included in the
frame and is used at the data link layer.
• MAC is a type of physical address that is 6 byte
(48 bit) in size and is imprinted on the Network
Interface Card (NIC) of the device.
2. Logical Address
• Logical Addresses are used for universal
communication.
• Most of the times the data has to pass through different
networks;
• since physical addresses are local to the network,
physical addresses are inadequate for source to
destination delivery of data in an internetwork
environment.
• Logical Address is also called as IP Address (Internet
Protocol address).
• At the network layer, device i.e. computers and routers
are identified universally by their IP Address.
Logical Address
• Currently there are two versions of IP
addresses being used:
– a. IPv4: 32 bit address, capable of
supporting 232 nodes
– b. IPv6: 128 bit address, capable of
supporting 2128 nodes
3. Port Address
• A logical address facilitates the transmission of data from
source to destination device.
• But the source and the destination both may be having
multiple processes communicating with each other.
• In other words, data needs to be delivered not only on
the correct device but also on the correct process on the
correct device.
• A Port Address is the name or label given to a process. It
is a 16 bit address.
• Eg. TELNET uses port address 23, HTTP uses port
address 80
3. Port Address
• Eg. Users A & B are chatting with each other using
Google Talk,
• Users B & C are exchanging emails using yahoo
messenger.
• The IP address will enable transmitting data from A to B,
but still the data needs to be delivered to the correct
process.
• The data from A cannot be given to B on yahoo
messenger since A & B are communicating using
Google Talk.
4. Specific Address
• Port addresses address facilitates the transmission of
data from process to process but still there may be a
problem with data delivery.
• For Eg: Consider users A, B & C chatting with each other
using Google Talk.
• Every user has two windows open, user A has two chat
windows for B & C, user B has two chat windows for A &
C and so on for user C
• Now a port address will enable delivery of data from user
A to the correct process ( in this case Google Talk) on
user B but now there are two windows of Google Talk for
user A & C available on B where the data can be
delivered.
4. Specific Address
• Again the responsibility of the port address is over here
and there is a need of addressing that helps identify the
different instances of the same process.
• Such address are are called specific addresses.
• Other Examples: Multiple Tabs or windows of a web
browser work under the same process that is HTTP but
are identified using Uniform Resource Locators (URL)
a, b c, j, k are the Port Addresser
A and P are the IP Addresses
MAC Addresses are included in H2 (Header of Data Link Layer)
MAC Address
• A MAC address, or Media Access Control address, is a
unique identifier assigned to a network interface
controller (NIC) for communications at the data link layer
of a network segment.
• It serves as a hardware address that distinguishes one
device from another on a local network.
• MAC Address is the physical Address or hardware
address
MAC Address:Features
• Uniqueness:
– Each MAC address is globally unique, meaning no
two devices should have the same MAC address.
• Address Format:
– A MAC address is typically represented as a 48-bit (6-
byte) hexadecimal number, often formatted as six
pairs of two hexadecimal digits separated by colons
or hyphens.
– For example, 00:1A:2B:3C:4D:5E.
MAC Address:Features
• Structure:
– The MAC address is divided into two parts: the
Organizationally Unique Identifier (OUI) and the
Device Identifier (also known as the NIC-specific
part).
– The first 24 bits (the first 3 bytes) represent the OUI,
which identifies the manufacturer or vendor of the
NIC.
– The remaining 24 bits (the last 3 bytes) represent the
unique identifier assigned by the manufacturer to the
NIC.
MAC Address:Features
• Assignment:
– MAC addresses are typically assigned by the
manufacturer of the network interface card (NIC)
when it is produced.
– The IEEE (Institute of Electrical and Electronics
Engineers) manages MAC address assignments and
assigns unique OUIs to manufacturers.
• MAC addresses are usually hardcoded into the hardware
of the network interface card (NIC) and remain constant
throughout the lifetime of the device.
Logical Addressing with IP (IPV4),
Classful Addressing
• Network addresses are always logical and are
implemented via IP addresses
IP Address
• When a router forwards the datagram, then it forwards the
packet to one of the links. The boundary between the router
and link is known as an interface.
• Each interface is capable of sending and receiving the IP
packets, so IP requires each interface to have an address.
• Every host and router on the Internet has an IP address, which
encodes its network number and host number.
• An IPv4 address is 32 bits long
• They are used in the Source address and Destination address
fields of IP packets.
•
Address Space
• An address space is the total number of addresses
used by the protocol.
• If a protocol uses N bits to define an address, the
address space is 2N because each bit can have two
different values (0 or 1) and N bits can have 2N
values.
• IPv4 uses 32-bit addresses, which means that the
address space is 232 or 4,294,967,296 (more than 4
billion).
IPV4 Notations
• 1.Binary notation
• The IPv4 address is displayed as 32 bits.
• eg. 11000000.10101000.00000001.00000001
• 2.Dotted decimal notation
• To make the IPv4 address easier to read, Internet
addresses are usually written in decimal form with a
decimal point (dot) separating the bytes.
• Each byte (octet) is 8 bits hence each number in dotted-
decimal notation is a value ranging from 0 to 255.
• Eg. 192.168.1.1
Classful Addressing
• An IP address is 32-bit (4 Byte) long . An
IP address is divided into sub-classes:
o Class A
o Class B
o Class C
o Class D
o Class E
• In Class B, the higher order bits of the first octet is always set
to 10, and the remaining14 bits determine the network ID.
The other 16 bits determine the Host ID.
o The total number of networks in Class B = 214 = 16384
network address
o The total number of hosts in Class B = 216 - 2 = 65534 host
address
Class C
• In Class C, an IP address is assigned to only small-sized
networks.
o The Network ID is 24 bits long.
o The host ID is 8 bits long.
• In Class C, the higher order bits of the first octet is
always set to 110, and the remaining 21 bits determine
the network ID. The 8 bits of the host ID determine the
host in a network.
o The total number of networks = 221 = 2097152
network address
o The total number of hosts = 28 - 2 = 254 host
address
Class D
• In Class D, an IP address is reserved for multicast
addresses.
• The higher order bits of the first octet is always set to
1110, and the remaining bits determines the host ID in
any network.
Class E
• In Class E, an IP address is used for the future use or for
the research and development purposes. It does not
possess any subnetting.
• The higher order bits of the first octet is always set to
1111, and the remaining bits determines the host ID in
any network.
Port Addressing: Port and Sockets
Port Addressing
• Addressing in Transport Layer is the port Address
• A logical address facilitates the transmission of data from
source to destination device. But the source and the destination
both may be having multiple processes communicating with
each other.
• In other words, data needs to be delivered not only on the
correct device but also on the correct process on the correct
device.
• 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.
Port and Socket
• 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).
• The transport layer protocols need to know which
upper-layer protocols are communicating.
• The combination of IP address and Port Address is
called Socket Address
• A Port Address is the name or label given to a process. It is a 16 bit
address.
• Ex. TELNET uses port address 23, HTTP uses port address 80
Port numbers
Socket
• Two processes that are running on a computer or running on
two different systems can communicate via a socket.
• A socket works as an inter-process communicator and seen as
the endpoint of the process communication. For
communication, the socket uses a file descriptor and is mainly
employed in client-server applications.
• A socket consists of the IP address of a system and the port
number of a program within the system. The IP address
corresponds to the system and the port number corresponds
to the program where the data needs to be sent:
Socket
Port Vs Socket
Protocols Operating at Network Layer :
ARP, RARP , ICMP
ARP
• ARP stands for Address Resolution Protocol, which is used
to find the MAC address of the device from its known IP
address.
• This means, the source device already knows the IP address
but not the MAC address of the destination device.
• The MAC address of the device is required because you
cannot communicate with a device in a local area network
(Ethernet) without knowing its MAC address. So, the Address
Resolution Protocol helps to obtain the MAC address of the
destination device.
ARP
• Most computer programs/applications use logical addresses (IP
Addresses) to send/receive messages. However, the actual
communication happens over the Physical Address (MAC
Address) that is from layer 2 of the OSI model. ARP translate
IP addresses to Physical Addresses.
• In order to send the data to destination, having IP address is
necessary but not sufficient; we also need the physical address
of the destination machine. ARP is used to get the physical
address (MAC address) of destination machine.
Working of ARP
• Before sending the IP packet, the MAC address of destination
must be known.
• If not so, then sender broadcasts the ARP-discovery packet
requesting the MAC address of intended destination.
• Since ARP-discovery is broadcast, every host inside that network
will get this message but the packet will be discarded by
everyone except that intended receiver host whose IP is
associated.
• The destination host that finds the matching IP address sends an
ARP reply to the source Now, this receiver will send a unicast
packet with its MAC address (ARP-reply) to the sender of ARP-
discovery packet. After the original sender receives the ARP-
reply, it updates ARP-cache and start sending unicast message to
the destination.
Working of ARP
RARP: Reverse Address Resolution Protocol
Presentation Presentation
Transport Transport
Network Network
Physical Physical
Data Communication between two hosts
Data Data
Physical Layer
Function of Physical Layer
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.
• Examples: Ethernet cables, optical fibers, wireless
transmission.
Data Link Layer
Thank You.