3unitCOMPUTER NETWORK
3unitCOMPUTER NETWORK
Data communication
Data communications are the exchange of data between two devices via some transmission
medium.
Simplex
The communication is unidirectional as a one-way street, one device always, other can always
receive. E.g. radio, mouse. The simplex mode can use the entire capacity of the channel to send data in
one direction.
Half duplex
Each station can both transmit and receive, but not at the same time. E.g. like a one lane road,
walkie-talkie etc.When one device is sending, the other can only receive, and vice versa.
In a half-duplex transmission, the entire capacity of a channel is taken over by whichever of the
two devices is transmitting at the time.
Walkie-talkies
Full duplex
Both stations can transmit and receive at the same time. Actually, it is two half duplex
connections.
Telephone network is an example of full-duplex mode, when two people are communicating by
a telephone line, both can talk and listen at the same time.
The capacity of the channel, must be divided between the two directions.
NETWORKS
A network is a set of devices (often referred to as nodes) connected by communication links. A node can
be a computer, printer, or any other device capable of sending and/or receiving data generated by other
nodes on the network. “Computer network’’ to mean a collection of autonomous computers
interconnected by a single technology. Two computers are said to be interconnected if they are able to
exchange information. The connection need not be via a copper wire; fiber optics, microwaves, infrared,
and communication satellites can also be used. Networks come in many sizes, shapes and forms, as we
will see later. They are usually connected together to make larger networks, with the Internet being the
most well-known example of a network of networks. There is considerable confusion in the literature
between a computer network and a distributed system. The key distinction is that in a distributed
system, a collection of independent computers appears to its users as a single coherent system. Usually,
it has a single model or paradigm that it presents to the users. Often a layer of software on top of the
operating system, called middleware, is responsible for implementing this model. A well-known example
of a distributed system is the World Wide Web. It runs on top of the Internet and presents a model in
which everything looks like a document (Web page).
LAN (Local Area Network) Group of interconnected computers within a small area. (room, building,
campus) Two or more pc's can from a LAN to share files, folders, printers, applications and other
devices. Coaxial or CAT 5 cables are normally used for connections. Due to short distances, errors and
noise are minimum. Data transfer rate is 10 to 100 mbps. Example: A computer lab in a school.
MAN (Metropolitan Area Network) Design to extend over a large area. Connecting number of LAN's to
form larger network, so that resources can be shared. Networks can be up to 5 to 50 km. Owned by
organization or individual. Data transfer rate is low compare to LAN. Example: Organization with
different branches located in the city.
WAN (Wide Area Network) Are country and worldwide network. Contains multiple LAN's and MAN's.
Distinguished in terms of geographical range. Uses satellites and microwave relays. Data transfer rate
depends upon the ISP provider and varies over the location. Best example is the internet.
Physical topology
Refers to the way in which a network is laid out physically. Topology of a network is the
geometric representation of the relationship of all the links and linking devices to one another.
The term physical topology refers to the way in which a network is laid out physically. Two or more
devices connect to a link; two or more links form a topology. The topology of a network is the geometric
representation of the relationship of all the links and linking devices (usually called nodes) to one
another. There are four basic topologies possible: mesh, star, bus, and ring
MESH:
A mesh topology is the one where every node is connected to every other node in the network. A mesh
topology can be a full mesh topology or a partially connected mesh topology. In a full mesh topology,
every computer in the network has a connection to each of the other computers in that network.
The number of connections in this network can be calculated using the following formula (n is the
number of computers in the network): n(n-1)/2 In a partially connected mesh topology, at least two of
the computers in the network have connections to multiple other computers in that network. It is an
inexpensive way to implement redundancy in a network.
In the event that one of the primary computers or connections in the network fails, the rest of the
network continues to operate normally.
Can handle high amounts of traffic, because multiple devices can transmit data simultaneously.
A failure of one device does not cause a break in the network or transmission of data.
Adding additional devices does not disrupt data transmission between other devices.
The cost to implement is higher than other network topologies, making it a less desirable option.
Building and maintaining the topology is difficult and time consuming.
The chance of redundant connections is high, which adds to the high costs and potential for reduced
efficiency.
STAR:
A star network, star topology is one of the most common network setups. In this configuration, every
node connects to a central network device, like a hub, switch, or computer. The central network device
acts as a server and the peripheral devices act as clients. Depending on the type of network card used in
each computer of the star topology, a coaxial cable or a RJ-45 network cable is used to connect
computers together.
•Nodes are connected to the bus cable by drop lines and taps.
•A drop line is a connection running between the device and the main cable.
•A tap is a connector that either splices into the main cable or punctures the sheathing of a
cable to create a contact with the metallic core.
a line topology, a bus topology is a network setup in which each computer and network device
are connected to a single cable or backbone.
OSI stands for Open Systems TCP/IP stands for Transmission Control
Full Form
Interconnection. Protocol/Internet Protocol.
Replacement of tools and changes can Replacing the tools is not easy as it is in
Replacement
easily be done in this model. OSI Model.
Reliability It is less reliable than TCP/IP Model. It is more reliable than OSI Model.
Repeater
Repeaters boost the strength of a signal as it travels through a communication channel, like a
telephone line or a radio frequency, to help it cover longer distances.
In situations where signals lose power due to resistance or distance, a repeater amplifies the
signal before sending it further.
In computer networking, repeaters operate on the physical layer of the OSI model, as they only
work with the actual signal and don't interpret data.
Repeaters are used to extend transmissions so that the signal can cover longer distances or be received
on the other side of an obstruction.
In computer networking, because repeaters work with the actual physical signal, and do not attempt to
interpret the data being transmitted, they operate on the physical layer, the first layer of theOSI model.
Guided Media:
Guided media, which are those that provide a medium from one device to
another, include twisted-pair cable, coaxial cable, and fiber-optic cable.
Twisted-Pair Cable: A twisted pair consists of two conductors (normally copper),
each with its own plastic insulation, twisted together. One of the wires is used to
carry signals to the receiver, and the other is used only as a ground reference.
Unshielded Versus Shielded Twisted-Pair Cable
The most common twisted-pair cable used in communications is referred to as
unshielded twisted-pair (UTP). STP cable has a metal foil or braided mesh covering
that encases each pair of insulated conductors. Although metal casing improves
the quality of cable by preventing the penetration of noise or crosstalk, it is
bulkier and more expensive.
Applications Twisted-pair cables are used in telephone lines to provide voice and
data channels. Local-area networks, such as l0Base-T and l00Base-T, also use
twisted-pair cables.
Coaxial Cable Coaxial cable (or coax) carries signals of higher frequency ranges
than those in twisted pair cable. coax has a central core conductor of solid or
stranded wire (usuallycopper) enclosed in an insulating sheath, which is, in turn,
encased in an outer conductor of metal foil, braid, or a combination of the two.
The outer metallic wrapping serves both as a shield against noise and as the
second conductor, which completes the circuit.This outer conductor is also
enclosed in an insulating sheath, and the whole cable is protected by a plastic
cover.
Applications Coaxial cable was widely used in analog telephone networks,digital telephone networks
Cable TV networks also use coaxial cables. Another common application of coaxial cable is in traditional
Ethernet LANs
Fiber-Optic Cable A fiber-optic cable is made of glass or plastic and transmits
signals in the form of light. Light travels in a straight line as long as it is moving
through a single uniform substance. If a ray of light traveling through one
substance suddenly enters another substance(of a different density), the ray
changes direction. Bending of light ray.
UNGUIDED MEDIA: WIRELESS
Unguided media transport electromagnetic waves without using a physical
conductor. This type of communication is often referred to as wireless
communication. Radio Waves Microwaves Infrared
Radio Waves Electromagnetic waves ranging in frequencies between 3 kHz and 1
GHz are normally called radio waves. Radio waves are omni directional. When an
antenna transmits radio waves, they are propagated in all directions. This means
that the sending and receiving antennas do not have to be aligned. A sending
antenna sends waves that can be received by any receiving antenna. The omni
directional property has a disadvantage, too. The radio waves transmitted by one
antenna are susceptible to interference by another antenna that may send signals
using the same frequency or band. Omni directional Antenna Radio waves use
omnidirectional antennas that send out signals in all directions. Based on the
wavelength, strength, and the purpose of transmission, we can have several types
of antennas. Figure shows an omnidirectional antenna.
Applications
The Omni directional characteristics of radio waves make them useful for
multicasting, in which there is one sender but many receivers. AM and FM radio,
television, maritime radio, cordless phones, and paging are examples of
multicasting.
Errors
When bits are transmitted over the computer network, they are subject to get
corrupted due to interference and network problems. The corrupted bits leads to
spurious data being received by the destination and are called errors.
Types of Errors
Errors can be of three types, namely single bit errors, multiple bit errors, and
burst errors.
Single bit error − In the received frame, only one bit has been corrupted, i.e. either changed
from 0 to 1 or from 1 to 0.
Multiple bits error − In the received frame, more than one bits are corrupted.
Burst error − In the received frame, more than one consecutive bits are
corrupted.
LRC (longitudinal redundancy check ) is also known as 2-D parity check. In this
method, data which the user want to send is organised into tables of rows and
columns. A block of bit is divided into table or matrix of rows and columns. In
order to detect an error, a redundant bit is added to the whole block and this
block is transmitted to receiver. The receiver uses this redundant row to detect
error. After checking the data for errors, receiver accepts the data and discards
the redundant row of bits.
Examples :
If a block of 32 bits is to be transmitted, it is divided into matrix of four rows and
eight columns which as shown in the following figure :
In this matrix of bits, a parity bit (odd or even) is calculated for each column. It
means 32 bits data plus 8 redundant bits are transmitted to receiver. Whenever
data reaches at the destination, receiver uses LRC to detect error in data.
Advantage :
LRC is used to detect burst errors.
Example : Suppose 32 bit data plus LRC that was being transmitted is hit by a
burst error of length 5 and some bits are corrupted as shown in the following
figure :
The LRC received by the destination does not match with newly corrupted LRC.
The destination comes to know that the data is erroneous, so it discards the
data.
Disadvantage :
The main problem with LRC is that, it is not able to detect error if two bits in a
data unit are damaged and two bits in exactly the same position in other data
unit are also damaged.
Example : If data 110011 010101 is changed to 010010110100.
Two bits at same bit position damaged in 2 data units.
In this example 1st and 6th bit in one data unit is changed . Also the 1st and 6th
bit in second unit is changed.
Vertical Redundancy Check is also known as Parity Check. In this method, a
redundant bit also called parity bit is added to each data unit. This method
includes even parity and odd parity. Even parity means the total number of 1s in
data is to be even and odd parity means the total number of 1s in data is to be
odd. Example – If the source wants to transmit data unit 1100111 using even
parity to the destination. The source will have to pass through Even Parity
Generator.
Disadvantages :
The major disadvantage of using this method for error detection is that it is
not able to detect burst error if the number of bits changed is even, i.e. 2, 4,
6, 8, …….etc.
Example – If the original data is 1100111. After adding VRC, data unit that
will be transmitted is 11001111. Suppose on the way 2 bits are 01011111.
When this data will reach the destination, parity checker will count number of
1s in data and that comes out to be even i.e. 8. So, in this case, parity is not
changed, it is still even. Destination will assume that there is no error in data
even though data is erroneous.
VRC is not capable of correcting errors, only detecting them. This means
that it can identify errors, but it cannot fix them.
VRC is not suitable for applications that require high levels of error detection
and correction, such as mission-critical systems or safety-critical
applications.
VRC is limited in its ability to detect and correct errors in large blocks of
data, as the probability of errors increases with the size of the data block.
Difference between VRC and LRC :
As soon as the sender device receives this ARP reply message, it updates
its ARP cache with the new information (Receiver’s MAC address). Now the
MAC address of the receiver is present in the ARP cache of the sender. The
sender can send and receive data without any problem.
Message Format of ARP Protocol
All the fields given in ARP message format are being explained in detail below:-
Hardware Type: The size of this field is 2 bytes. This field defines what type
of Hardware is used to transmit the message. The most common Hardware
type is Ethernet. The value of Ethernet is 1.
Protocol Type: This field tells which protocol has been used to transmit the
message. substantially the value of this field is 2048 which indicates IPv4.
Hardware Address Length: It shows the length of the tackle address in
bytes. The size of Ethernet MAC address is 6 bytes.
Protocol Address Length: It shows the size of the IP address in bytes. The
size of IP address is 4 bytes.
OP law: This field tells the type of message. If the value of this field is 1 also
it’s a request message and if the value of this field is 2 also it’s a reply
message.
Sender Hardware Address: This field contains the MAC address of the
device transferring the message.
Sender Protocol Address: This field contains the IP address of the device
transferring the message.
Target Hardware Address: This field is empty in the request message. This
field contains the MAC address of the entering device.
Target Protocol Address: This field contains the IP address of the entering
device.
What is RARP
The Reverse Address Resolution Protocol (RARP) is a networking protocol
that is used to map a physical (MAC) address to an Internet Protocol (IP)
address. It is the reverse of the more commonly used Address Resolution
Protocol (ARP), which maps an IP address to a MAC address.
Difference between ARP and RARP that are as follows:
ARP RARP
Client broadcasts its IP address and Client broadcasts its MAC address and
requests a MAC address, and the requests an IP address, and the server
server responds with the responds with the corresponding IP
corresponding MAC address address
ARP stands for Address Resolution Whereas RARP stands for Reverse
Protocol. Address Resolution Protocol.
In ARP, ARP table uses ARP reply While in RARP, RARP table uses RARP
for its updation. reply for configuration of IP addresses .
ARP is used in sender’s side to map RARP is used in receiver’s side to map
the receiver’s MAC address. the sender’s IP.
In message switching, no
Congestion occurs per minute in
9. congestion or very little congestion
circuit switching.
occurs.
Components of DHCP
The main components of DHCP include:
DHCP Server: DHCP Server is basically a server that holds IP Addresses and
other information related to configuration.
DHCP Client: It is basically a device that receives configuration information
from the server. It can be a mobile, laptop, computer, or any other electronic
device that requires a connection.
DHCP Relay: DHCP relays basically work as a communication channel
between DHCP Client and Server.
IP Address Pool: It is the pool or container of IP Addresses possessed by
the DHCP Server. It has a range of addresses that can be allocated to devices.
Subnets: Subnets are smaller portions of the IP network partitioned to keep
networks under control.
Lease: It is simply the time that how long the information received from the
server is valid, in case of expiration of the lease, the tenant must have to re-
assign the lease.
DNS Servers: DHCP servers can also provide DNS (Domain Name System)
server information to DHCP clients, allowing them to resolve domain names
to IP addresses.
Default Gateway: DHCP servers can also provide information about the
default gateway, which is the device that packets are sent to when the
destination is outside the local network.
Options: DHCP servers can provide additional configuration options to
clients, such as the subnet mask, domain name, and time server information.
Renewal: DHCP clients can request to renew their lease before it expires to
ensure that they continue to have a valid IP address and configuration
information.
Failover: DHCP servers can be configured for failover, where two servers
work together to provide redundancy and ensure that clients can always obtain
an IP address and configuration information, even if one server goes down.
Dynamic Updates: DHCP servers can also be configured to dynamically
update DNS records with the IP address of DHCP clients, allowing for easier
management of network resources.
Audit Logging: DHCP servers can keep audit logs of all DHCP transactions,
providing administrators with visibility into which devices are using which IP
addresses and when leases are being assigned or renewed.
Advantages of DHCP
The advantages of using DHCP include:
Centralized management of IP addresses.
Centralized and automated TCP/IP configuration.
Ease of adding new clients to a network.
Reuse of IP addresses reduces the total number of IP addresses that are
required.
The efficient handling of IP address changes for clients that must be updated
frequently, such as those for portable devices that move to different locations
on a wireless network.
Simple reconfiguration of the IP address space on the DHCP server without
needing to reconfigure each client.
The DHCP protocol gives the network administrator a method to configure the
network from a centralized area.
With the help of DHCP, easy handling of new users and the reuse of IP
addresses can be achieved.
The BOOTP protocol is a networking protocol, the main goal of BOOTP is to find
IP addresses from a server. It was developed to replace the RARP. BOOTP was
designed to let systems discover what they need to function correctly after
booting up. It uses a relay agent which listens to port 68 of UDP, which lets the
local network transfer the packets by using standard IP routing, allowing only a
single BOOTP server to assist hosts on several subnets. Later on, BOOTP was
succeeded by a more advanced and effective protocol known as DHCP, which
has more flexibility and additional options.
During the bootstrap process, it is used to create a network connection. Initially,
BOOTP uses floppy disks, but it was soon integrated into network adapters and
motherboards, so that no external drive is required and also for launching the
initial network connection, later the process was added into the BIOS of
motherboards and NICs to allow direct network booting.
It is a broadcast protocol as it needs to send messages in order to get resources
or answers from hosts present in the network. BOOTP was planned for diskless
systems because they needed a protocol that could communicate to a server to
get its network address and some other information like which OS to use. The
computer then downloads the OS through TFTP.
Working of BOOTP
A BOOTP client does not know its IP address nor does it know the IP address of
the BOOTP server when it starts, so it broadcasts a message that carries its MAC
address in the network. This general broadcast message is known as a
“BOOTREQUEST” and this request is sent to the broadcast address. It is then
picked up by the server listening on port 67 of UDP, after receiving the request it
processes it by assigning an IP address to the MAC address of the client. The
request that it replies to the client with is known as “BOOTREPLY” which include
network information and is sent back to the client through broadcast and has the
following information:
The client’s IP address (ciaddr and yiaddr), default gateway address (giaddr),
and subnet mask.
The hostname and IP address of the BOOTP server (siaddr).
The IP address of the server containing the boot image.
After obtaining the data from the BOOTP server, it initializes the TCP/IP stack
and configures it, and after that, it connects to the server containing the boot
image. Finally, the client loads the image and uses the data to load and launch
its OS.
BOOTP Message Format:
Bits Description
0–7 Opcode
8 – 15 Hardware type
16 – 23 Hardware address length
24 – 31 Hop count
32 – 63 Transaction ID
64 – 79 secs
80 – 95 Flags
96 – 127 Client IP
128 – 159 Your IP
160 – 191 Server IP
192 – 223 Gateway IP
224 – 351 Client hardware address (16 bytes)
352 – 863 Server hostname (64 bytes)
864 – 1887 Boot filename (128 bytes)
1888 – 2400 Manufacturer-specific information (64 bytes)
Difference between BOOTP and DHCP:
BOOTP stands for Bootstrap While DHCP stands for Dynamic host
1.
Protocol. configuration protocol.
BOOTP can have errors due Whereas in DHCP errors do not occur
6.
to manual-configuration. mostly due to auto-configuration.
S.No Intradomain Routing Interdomain Routing
Routing algorithm works only Routing algorithm works within
1. within domains. and between domains.
It need to know only about It need to know only about other
other routers within their routers within and between their
2. domain. domain.
Protocols used in intradomain Protocols used in interdomain
routing are known as Interior- routing are known as Exterior-
3. gateway protocols. gateway protocols.
In this Routing, routing takes In this Routing, routing takes
place within an autonomous place between the autonomous
4. network. networks.
Interdomain routing protocol
assumes that the internet
Intradomain routing protocols contains the collection of
ignores the internet outside the interconnected AS(autonomous
5. AS(autonomous system). systems).
Some Popular Protocols of this Popular Protocols of this routing
routing are RIP(routing is BGP(Border Gateway Protocol)
information protocol) and used to connect two or more
6. OSPF(open shortest path first). AS(autonomous system).
Link state routing is a technique in which each router shares the knowledge of
its neighborhood with every other router i.e. the internet work. The three keys to
understand the link state routing algorithm.
1. Knowledge about the neighborhood: Instead of sending its routing table, a
router sends the information about its neighborhood only. A router broadcast
its identities and cost of the directly attached links to other routers.
2. Flooding: Each router sends the information to every other router on the
internetwork except its neighbors. This process is known as flooding. Every
router that receives the packet sends the copies to all the neighbors. Finally
each and every router receives a copy of the same information.
3. Information Sharing: A router send the information to every other router
only when the change occurs in the information.
A distance-vector routing protocol in data networks determines the best route for data packets
based on distance. Distance-vector routing protocols measure the distance by the number
of routers a packet has to pass; one router counts as one hop. Some distance-vector protocols also
take into account network latency and other factors that influence traffic on a given route. To
determine the best route across a network, routers using a distance-vector protocol exchange
information with one another, usually routing tables plus hop counts for destination networks and
possibly other traffic information. Distance-vector routing protocols also require that a router inform
its neighbours of network topology changes periodically.
Distance-vector routing protocols use the Bellman–Ford algorithm to calculate the best route.
Another way of calculating the best route across a network is based on link cost, and is implemented
through link-state routing protocols.
The term distance vector refers to the fact that the protocol manipulates vectors (arrays) of distances
to other nodes in the network. The distance vector algorithm was the original ARPANET routing
algorithm and was implemented more widely in local area networks with the Routing Information
Protocol (RIP).