Data Communication & Networking Basics
Data Communication & Networking Basics
KNSIT Page 1
18CS46 N C NETHRA
Asst. Prof. Csedept
4. Jitter. Jitter refers to the variation in the packet arrival time. It is the uneven delay in the
delivery of audio or video packets. For example, let us assume that video packets are sent every
30 ms. If some of the packets arrive with 30-ms delay and others with 40-ms delay, an uneven
quality in the video is the result.
1.1.1 Components
A data communications system has five components (see Figure 1.1).
KNSIT Page 2
18CS46 N C NETHRA
Asst. Prof. Csedept
• However, a code such as ASCII is not used to represent numbers; the number is directly
converted to a binary number to simplify mathematical operations.
• Images
• Images are also represented by bit patterns.
• In its simplest form, an image is composed of a matrix of pixels (picture elements), where
each pixel is a small dot.
• The size of the pixel depends on the resolution. For example, an image can be divided
into 1000 pixels or 10,000 pixels.
• In the second case, there is a better representation of the image.
• After an image is divided into pixels, each pixel is assigned a bit pattern.
• a 1-bit pattern is enough to represent a pixel(black and white).
• If an image is not made of pure white and pure black pixels, we can increase the size of
the bit pattern to include gray scale, we can use 2-bit patterns.
• A black pixel can be represented by 00, a dark gray pixel by 01, a light gray pixel by 10,
and a white pixel by 11.
• There are several methods to represent color images. One method is called RGB, so
called because each color is made of a combination of three primary colors: red, green,
and blue. The intensity of each color is measured, and a bit pattern is assigned to it.
• Another method is called YCM, in which a color is made of a combination of three other
primary colors: yellow, cyan, and magenta.
• Audio
• Audio refers to the recording or broadcasting of sound or music.
• Audio is by nature different from text, numbers, or images.
• It is continuous, not discrete. Even when we use a microphone to change voice or music
to an electric signal, we create a continuous signal(Chapter 26).
• Video
• Video refers to the recording or broadcasting of a picture or movie.
• Video can either be produced as a continuous entity (e.g., by a TV camera), or it can be a
combination of images, each a discrete entity, arranged to convey the idea of
motion(Chapter 26).
1.2 NETWORKS
• A network is the interconnection of a set of devices capable of communication.
• a device can be a host (or an end system as it is sometimes called) such as a large
computer, desktop, laptop, workstation, cellular phone, or security system.
• A device in this definition can also be a connecting device such as a router, which
connects the network to other networks, a switch, which connects devices together, a
modem (modulator-demodulator), which changes the form of data, and so on.
• These devices in a network are connected using wired or wireless transmission media
such as cable or air.
1.2.1 Network Criteria
• A network must be able to meet a certain number of criteria. The most important of these
are performance, reliability, and security.
• Performance
• Performance can be measured in many ways, including transit time and response time.
KNSIT Page 4
18CS46 N C NETHRA
Asst. Prof. Csedept
• Transit time is the amount of time required for a message to travel from one device to
another.
• Response time is the elapsed time between an inquiry and a response.
• The performance of a network depends on a number of factors, including the number of
users, the type of transmission medium, the capabilities of the connected hardware, and
the efficiency of the software.
• Performance is often evaluated by two networking metrics: throughput and delay.
• We often need more throughput and less delay. However, these two criteria are often
contradictory. If we try to send more data to the network, we may increase throughput but
we increase the delay because of traffic congestion in the network.
• Reliability
• In addition to accuracy of delivery, network reliability is measured by the frequency of
failure, the time it takes a link to recover from a failure, and the network’s robustness.
• Security
• Network security issues include protecting data from unauthorized access, protecting
data from damage and development, and implementing policies and procedures for
recovery from breaches and data losses.
• Multipoint
• A multipoint (also called multidrop) connection is one in which more than two
specific devices share a single link (see Figure 1.3b).
KNSIT Page 5
18CS46 N C NETHRA
Asst. Prof. Csedept
Physical Topology
• 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 Topology
• In a mesh topology, every device has a dedicated point-to-point link to every other
device.
• The term dedicated means that the link carries traffic only between the two devices it
connects.
• To find the number of physical links in a fully connected mesh network with n nodes, we
first consider that each node must be connected to every other node.
• Node 1 must be connected to n – 1 nodes, node 2 must be connected to n – 1 nodes, and
finally node n must be connected to n – 1 nodes.
• We need n (n – 1) physical links. However, if each physical link allows communication
in both directions (duplex mode), we can divide the number of links by 2.
• In other words, we can say that in a mesh topology, we need n (n – 1) / 2 duplex-mode
links.
• To accommodate that many links, every device on the network must have n – 1
input/output (I/O) ports (see Figure 1.4) to be connected to the other n – 1 stations.
• A mesh of advantages over other network topologies.
• First, the use of dedicated links guarantees that each connection can carry its own
data load, thus eliminating the traffic problems that can occur when links must be
shared by multiple devices.
• Second, a mesh topology is robust. If one link becomes unusable, it does not
incapacitate the entire system.
• Third, there is the advantage of privacy or security. When every message travels
along a dedicated line, only the intended recipient sees it.
KNSIT Page 6
18CS46 N C NETHRA
Asst. Prof. Csedept
• The main disadvantages of a mesh are related to the amount of cabling and the number
of I/O ports required.
• First, because every device must be connected to every other device, installation
and reconnection are difficult.
• Second, the sheer bulk of the wiring can be greater than the available space (in
walls, ceilings, or floors) can accommodate.
• Finally, the hardware required to connect each link (I/O ports and cable) can be
prohibitively expensive. For these reasons a mesh topology is usually
implemented in a limited fashion.
KNSIT Page 7
18CS46 N C NETHRA
Asst. Prof. Csedept
Example: Suppose we have three (3) computers and we want to configure these in Simplex
Configuration of Mesh Topology
Well in this case N will be 3 i.e. N = 3. So according to the equation formula:
Mesh Topology Number of Links = 3×(3–1) = 3 × 2 = 6
In this scenario, we will require a total of six (6) cables for configuring the Mesh Computer
Network.
Star Topology
• In a star topology, each device has a dedicated point-to-point link only to a central
controller, usually called a hub.
• The devices are not directly linked to one another.
• Unlike a mesh topology, a star topology does not allow direct traffic between devices.
• The controller acts as an exchange: If one device wants to send data to another, it sends
the data to the controller, which then relays the data to the other connected device (see
Figure 1.5) .
KNSIT Page 8
18CS46 N C NETHRA
Asst. Prof. Csedept
• Far less cabling needs to be housed, and additions, moves, and deletions involve only one
connection: between that device and the hub.
• If one link fails, only that link is affected. All other links remain active. This factor also
lends itself to easy fault identification and fault isolation.
• As long as the hub is working, it can be used to monitor link problems and bypass
defective links.
disadvantage of a star topology
• the dependency of the whole topology on one single point, the hub. If the hub goes down,
the whole system is dead.
• Although a star requires far less cable than a mesh, each node must be linked to a central
hub. For this reason, often more cabling is required in a star than in some other topologies
(such as ring or bus).
Examples
• The star topology is used in local-area networks (LANs)
• High-speed LANs often use a star topology with a central hub.
• You can find this Network Topology in different organizations including Banks, Schools,
Computer Labs, Libraries, Bus Terminals and Departmental Stores.
• Most of you have Internet connection at your home or offices. In most of the cases
today, we like to use it with the help of WiFi. Internet Service Providers (ISPs) provide
us with Wireless Modem. Due to this fact, we have Wireless Modem at our home or
office. When anybody wants to connect to the Internet there is no restriction on him/her
in terms of location. Moreover, a Wireless Modem can spread signals throughout a room
or group of rooms or even a building. So, we connect our laptops, tablet PCs and
Smartphones to the Wireless Modem for accessing the Internet. Hence, all our devices
connect to a single central device known as Hub.
Bus Topology
• point-to-point connections.
• A bus topology, on the other hand, is multipoint.
• One long cable acts as a backbone to link all the devices in a network (see Figure 1.6).
• 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.
• As a signal travels along the backbone, some of its energy is transformed into heat.
Therefore, it becomes weaker and weaker as it travels farther and farther.
• For this reason there is a limit on the number of taps a bus can support and on the
distance between those taps.
KNSIT Page 9
18CS46 N C NETHRA
Asst. Prof. Csedept
Disadvantages
• difficult reconnection and fault isolation.
• A bus is usually designed to be optimally efficient at installation. It can therefore be
difficult to add new devices.
• Signal reflection at the taps can cause degradation in quality. This degradation can be
controlled by limiting the number and spacing of devices connected to a given length of
cable.
• Adding new devices may therefore require modification or replacement of the backbone.
• In addition, a fault or break in the bus cable stops all transmission, even between devices
on the same side of the problem.
• The damaged area reflects signals back in the direction of origin, creating noise in both
directions.
• Bus topology was the one of the first topologies used in the design of early local area
networks. Traditional Ethernet LANs can use a bus topology.
Examples
A bus topology is a topology for a Local Area Network (LAN) in which all the nodes are
connected to a single cable. The cable to which the nodes connect is called a "backbone". If the
backbone is broken, the entire segment fails. Bus topologies are relatively easy to install and
don't require much cabling compared to the alternatives.
Bus topology
The bus topology is e.g. used by Ethernet networks.
KNSIT Page 10
18CS46 N C NETHRA
Asst. Prof. Csedept
Ring Topology
• In Ring Topology connects the Network Devices in a completely closed path. This closed
path can be in any form like circle, triangle, square or whatever else. You can easily
identify the closed path. A closed path starting point and ending point is always the same
• In a ring topology, each device has a dedicated point-to-point connection with only the
two devices on either side of it.
• A signal is passed along the ring in one direction, from device to device, until it reaches
its destination. Each device in the ring incorporates a repeater. When a device receives a
signal intended for another device, its repeater regenerates the bits and passes them along
(see Figure 1.7).
• Advantage
• A ring is relatively easy to install and reconfigure.
• Each device is linked to only its immediate neighbors (either physically or
logically).
• To add or delete a device requires changing only two connections.
• The only constraints are media and traffic considerations (maximum ring length
and number of devices). In addition, fault isolation is simplified.
• Generally, in a ring a signal is circulating at all times. If one device does not
receive a signal within a specified period, it can issue an alarm.
• The alarm alerts the network operator to the problem and its location.
• disadvantage
• However, unidirectional traffic can be a disadvantage.
• In a simple ring, a break in the ring (such as a disabled station) can disable the
entire network. This weakness can be solved by using a dual ring or a switch
capable of closing off the break.
• Ring topology was prevalent when IBM introduced its local-area network, Token
Ring.
• Examples
• one of the common example that still exists is SONET Rings. SONET stands
for Synchronous Optical Networking. It uses Fiber Optic Cables for heavy
load data transfers for long distances. Due to the use of Fiber Optic Cable, it
provides the best data transfer speeds. SONET is one of the most
popular Applications of Ring Topology.
KNSIT Page 11
18CS46 N C NETHRA
Asst. Prof. Csedept
KNSIT Page 12
18CS46 N C NETHRA
Asst. Prof. Csedept
• A typical Ethernet LAN consisting of an ethernet cable to which all the machines are
attached, like in our school labs, number of computers connected to each other through
the common ethernet cable.
• Topologies used in LANs:Bus topology,ing topology,tar topology
Advantages of LAN
• Resource Sharing: LAN provides resource sharing such as computer resources like
printers, scanners, modems, DVD-ROM drives, and hard disks can be shared within the
connected devices. This reduces cost and hardware purchases.
• Software Applications Sharing: In a Local Area Network, it is easy to use the same
software in a number of computers connected to a network instead of purchasing the
separately licensed software for each client a network.
• Easy and Cheap Communication: Data and messages can easily be shared with the other
computer connected to the network.
KNSIT Page 13
18CS46 N C NETHRA
Asst. Prof. Csedept
• Centralized Data: The data of all network users can be stored on a hard disk of the
central/server computer. This help users to use any computer in a network to access the
required data.
• Data Security: Since data is stored on the server computer, it will be easy to manage data
at only one place and the data will be more secure too.
• Internet Sharing: Local Area Network provides the facility to share a single internet
connection among all the LAN users. In school labs and internet Cafes, single internet
connection is used to provide internet to all connected computers.
Disadvantages of LAN
• High Setup Cost: The initial setup costs of installing Local Area Networks is high
because there is special software required to make a server. Also, communication devices
like an ethernet cable, switches, hubs, routers, cables are costly.
• Privacy Violations: The LAN administrator can see and check personal data files of each
and every LAN user. Moreover, he can view the computer and internet history of the
LAN user.
• Data Security Threat: Unauthorised users can access important data of an office or
campus if a server hard disk is not properly secured by the LAN administrator.
• LAN Maintenance Job: Local Area Network requires a LAN Administrator because there
are problems such as software installations, program faults or hardware failures or cable
disturbances in Local Area Network. A LAN Administrator is required to maintain these
issues.
• Covers Limited Area: LANs are restricted in size they cover a small area like a single
office, single building or a group of nearby buildings.
KNSIT Page 14
18CS46 N C NETHRA
Asst. Prof. Csedept
Switched WAN
• A switched WAN is a network with more than two ends. A switched WAN, as we willsee
shortly, is used in the backbone of global communication today.
• We can say that aswitched WAN is a combination of several point-to-point WANs that
are connected byswitches. Figure 1.10 shows an example of a switched WAN.
Internetwork
• Today, it is very rare to see a LAN or a WAN in isolation; they are connected to one
another.
• When two or more networks are connected, they make an internetwork, or internet.
• As an example, assume that an organization has two offices, one on the east coast and the
other on the west coast.
• Each office has a LAN that allows all employees in the office to communicate with each
other.
• To make the communication between employees at different offices possible, the
management leases a point-to-point dedicated WAN from a service provider, such as a
telephone company, and connects the two LANs.
• Now the company has an internetwork, or a private internet (with lowercase i).
• Communication between offices is now possible. Figure 1.11 shows this internet.
KNSIT Page 15
18CS46 N C NETHRA
Asst. Prof. Csedept
• When a host in the west coast office sends a message to another host in the same office,
the router blocks the message, but the switch directs the message to the destination.
• On the other hand, when a host on the west coast sends a message to a host on the east
coast, router R1 routes the packet to router R2, and the packet reaches the destination.
• Figure 1.12 (see next page) shows another internet with several LANs and WANs
connected. One of the WANs is a switched WAN with four switches.
KNSIT Page 16
18CS46 N C NETHRA
Asst. Prof. Csedept
Dedicated Connections
A dedicated connection is a communications medium or other facility dedicated to a
particular application such as telephony operation or internet service providing.
Switched Connections
There are two basic types of switched connections:
1. Circuit Switched Network. [Link] Switched Network
• Circuit Switched Networks − Circuit switched networks are connection-oriented
networks. Here, a dedicated route is established between the source and the destination
and the entire message is transferred through it.
• Packet Switched Networks − Packet switched networks are connectionless networks.
Here, the message is divided and grouped into a number of units called packets that are
individually routed from the source to the destination.
1.3.3 Switching
• An internet is a switched network in which a switch connects at least two links together.
• A switch needs to forward data from a network to another network when required.
• The two most common types of switched networks are circuit-switched and packet-
switched networks. We discuss both next.
Circuit-Switched Network
• In a circuit-switched network, a dedicated connection, called a circuit, is always
available between the two end systems; the switch can only make it active or inactive.
• Figure 1.13 shows a very simple switched network that connects four telephones to each
end.
• We have used telephone sets instead of computers as an end system because circuit
switching was very common in telephone networks in the past, although part of the
telephone network today is a packet-switched network.
• In Figure 1.13, the four telephones at each side are connected to a switch. The switch
connects a telephone set at one side to a telephone set at the other side.
• The thick line connecting two switches is a high-capacity communication line that can
handle four voice communications at the same time; the capacity can be shared between
all pairs of telephone sets. The switches used in this example have forwarding tasks but
no storing capability.
KNSIT Page 17
18CS46 N C NETHRA
Asst. Prof. Csedept
KNSIT Page 18
18CS46 N C NETHRA
Asst. Prof. Csedept
• A router in a packet-switched network has a queue that can store and forward the packet.
• Now assume that the capacity of the thick line is only twice the capacity of the data line
connecting the computers to the routers.
• If only two computers (one at each site) need to communicate with each other, there is no
waiting for the packets.
• However, if packets arrive at one router when the thick line is already working at its full
capacity, the packets should be stored and forwarded in the order they arrived.
• The two simple examples show that a packet-switched network is more efficient than a
circuitswitched network, but the packets may encounter some delays(discuss In Chapter
18).
Circuit – Switching Packet – Switching
1 It is a connection oriented network switching technique. It is a connectionless network
switching technique.
2 A dedicated path has to be established between
the source and the destination before transfer of data commences.
Once, the data is transmitted, the path is relinquished. There is no need to establish a
dedicated path from the source to
the destination.
3 It is inflexible in nature since data packets are routed
along the same dedicated path. Each packet is routed separately.
Consequently, it is flexible in
nature where the different data
packets follow different paths.
4 The entire message is received in the order sent by the source. The individual packets of the
message are received out of
order and so need to be
reassembled at the destination.
5 It is implemented at Physical Layer. It is implemented at Network
Layer.
6 It has two approaches −
Space division switching, and
Time division switching
It has two approaches − Datagram, and
Virtual Circuit
7 It is not a store and forward transmission. It is store and forward
transmission.
8 Data is processed and transmitted at the source only. Data is processed and
transmitted, not only at the source
but at each switching station.
KNSIT Page 19
18CS46 N C NETHRA
Asst. Prof. Csedept
• a point-to-point WAN.
• This can be done in two ways.
• The Battle of Internet Connections: Dial-Up vs. DSL
• Dial-up
This is the grandpappy of internet connections and just as slow. However, for the
most basic uses such as sending mails with small- to medium-sized files attached,
dial-up should do.
• The first solution is to add to the telephone line a modem that converts data to
voice. The software installed on the computer dials the ISP and imitates making a
telephone connection.
• very slow, and when the line is used for Internet connection, it cannot be used for
telephone (voice) connection.
• So It is only useful for small residences.
• DSL
• DSL stands for Digital Subscriber Line.
• It is a type of broadband connection and considerably much faster than dial-up.
• The DSL service also allows the line to be used simultaneously for voice and data
communication.
• A DSL connection will not tie up a phone line. It’s always available so there is no
need to dial an ISP.
• speed allows high volume data use, loads websites quickly and is quite efficient to
use with live chats, viewing videos in real time and playing online games.
KNSIT Page 20
18CS46 N C NETHRA
Asst. Prof. Csedept
• Satellite
a satellite to handle data transmissions.
• satellite internet allows for smoother, uninterrupted connections.
• It also allows even large files to download or upload much faster.
• In 1972, Vint Cerf and Bob Kahn, both of whom were part of the core ARPANET group,
collaborated on what they called the Internetting Project.
• There were many problems to overcome: diverse packet sizes, diverse interfaces, and
diverse transmission rates.
• Cerf and Kahn devised the idea of a device called a gateway to serve as the intermediary
hardware to transfer data from one network to another.
TCP/IP
• Cerf and Kahn’s landmark 1973 paper outlined the protocols to achieve end-to-end
delivery of data.
• This paper on transmission control protocol (TCP) included concepts such as
encapsulation, the datagram, and the functions of a gateway.
KNSIT Page 21
18CS46 N C NETHRA
Asst. Prof. Csedept
• A radical idea was the transfer of responsibility for error correction from the IMP to the
host machine.
• then, authorities made a decision to split TCP into two protocols:
• Transmission Control Protocol (TCP) and Internet Protocol (IP).
• IP would handle datagram routing
• while TCP would be responsible for higher level functions such as segmentation,
reassembly, and error detection.
• The new combination became known as TCP/IP.
• who wanted to use the Internet to access a computer on a different network had to
be running TCP/IP.
MILNET
• In 1983, ARPANET split into two networks: Military Network (MILNET) for military
users and ARPANET for nonmilitary users
CSNET
• Another milestone in Internet history was the creation of CSNET in 1981.
• Computer Science Network (CSNET) was a less expensive network; there were no
redundant links and the transmission rate was slower.
NSFNET
• With the success of CSNET, the NSF in 1986 sponsored the National Science
Foundation Network (NSFNET), a backbone that connected five supercomputer centers
located throughout the United States, with a 1.544-Mbps data rate, thus providing
connectivity throughout the United States.
• In 1990, ARPANET was officially retired and replaced by NSFNET.
ANSNET
• In 1991, the U.S. government decided that NSFNET was not capable of supporting the
rapidly increasing Internet traffic.
• Three companies, IBM, Merit, and Verizon, filled the build a new, high-speed Internet
backbone called Advanced Network Services Network (ANSNET).
KNSIT Page 22
18CS46 N C NETHRA
Asst. Prof. Csedept
Questions
Unicode
Unicode was created to allow more character sets than [Link] uses 16 bits to represent each character. This
means that Unicode is capable of representing 65,536 different characters and a much wider range of character sets.
KNSIT Page 23
18CS46 N C NETHRA
Asst. Prof. Csedept
12 A color image uses 16 bits to represent a pixel. What is the maximum number of different
colors that can be represented?
With 16 bits, we can represent up to 216different colors.
13 Assume six devices are arranged in a mesh topology. How many cables are needed? How
many ports are needed for each device?
Cable links: n(n– 1) / 2 = (6 ×5) / 2 = 15
Number of ports: (n– 1) = 5 ports needed per device.
For each of the following four networks, discuss the consequences If a connection fails.
a. Five devices arranged in a mesh topology
b. Five devices arranged in a star topology (not counting the hub)
c. Five devices arranged in a bus topology
d. Five devices arranged in a ring topology.
[Link] topology: If one connection fails, the other connections will still be working.
[Link] topology: The other devices will still be able to send data through the hub; there will
beno access to the device which has the failed connection to the hub.
[Link] Topology: All transmission stops if the failure is in the bus. If the dropline fails, only
thecorresponding device cannot operate.
1. For n devices in a network, what is the number of cable links required for a mesh, ring, bus, and star
topology?
Ans: n(n-1)/2 cable link are required for mesh, n for ring, n-1 cable link for bus, and n cable link for star
topology.
3. What are some of the factors that determine whether a communication system is a LAN or WAN?
Ans: Size and Coverage of area determine whether a communication system is LAN or WAN. A LAN
normally covers an area less than 2 mile, a WAN can be worldwide
KNSIT Page 24
18CS46 N C NETHRA
Asst. Prof. Csedept
8. Name the four basic network topologies, and cite advantage of each type.
Ans:
Bus Topology: Easy installation, less cabling, easy expandation etc.
Ring Topology: Less effort in adding or removing devices, simple fault isolation.
Star Topology: Less expensive than mesh, robustness etc.
Mesh Topology: Robustness, present of privacy and security.
11. What are the three criteria necessary for an effective and efficient network?
Ans: Performance, Reliability, Security.
Exercises
14. What is the maximum number of characters or symbols that can be represented by Unicode?
Ans: The code can define up to 2^(32) (4,294,967,296) characters or symbols.
15. A color image uses 16 bits to represent a pixel. What is the maximum number of different colors that can be
represented?
Ans: The number of different colors you can represent with 16 bits is 2 16, or about 65k colors.
16. Assume six devices are arranged in a mesh topology. How many cables are needed? How many ports are needed
for each device?
Ans: Cables needed (6*5)/2 = 15 and,
Each device needs to be connected to 5 other devices. So, each device needs to have 5 ports. Six devices times five
ports equals 30 total ports.
17. For each of the following four networks, discuss the consequences if a connection fails.
a. Five devices arranged in a mesh topology,
Ans: Mesh is high redundancy. Only one device would be disconnected if all the connections were to fail for that
device. You can have many connections to other devices thats why its less likely to fail. The only cause for failure at
this point is really the power and if you just don't have any. Even if one of the connections between two devices fail
there is no effect on network and they can still communicate through other channels.
KNSIT Page 25
18CS46 N C NETHRA
Asst. Prof. Csedept
18. You have two computers connected by an Ethernet hub at home. Is this a LAN, a MAN, or a WAN? Explain
your reason.
Ans: This is a LAN (Local Area Network). A WAN is a Wide Area Network that typically connects machines that
are geographically remote. A Man is a Metropolitan Area Network - that connects together all machines in an
enterprise, campus or town.
19. In the ring topology in Figure 1.8, what happens if one of the stations is unplugged?
Ans: The network would stop functioning because the token has to pass through each station in the ring.
20. In the bus topology in Figure 1.7, what happens if one of the stations is unplugged?
Ans: From that station rest all will stop functioning.
21. Draw a hybrid topology with a star backbone and three ring networks.
Ans: [Link]
22. Draw a hybrid topology with a ring backbone and two bus networks.
Ans: [Link]
23. Performance is inversely related to delay. When you use the Internet, which of the following applications are
more sensitive to delay?
a. Sending an e-mail
b. Copying a file
c. Surfing the Internet
Ans: It is true that performance is inversely proportional to delay.
Sending an email is more sensitive to delay than copying a file and surfing the [Link] E-mailing may be
interrupted due to high latency, but can always assume as soon as the server is performing again, without user
interaction.
Copying a file is less sensitive to delay than surfing the web and sending an e-mail.
Surfing the web is not so much affected by delay because due to effect of latency on surfing the net.
24. When a party makes a local telephone call to another party, is this a point-to-point or multipoint connection?
Explain your answer.
Ans: It is Point-to-Point connection because multipoint connection needs more than two end points.
25. Compare the telephone network and the Internet. What are the similarities? What are the differences?
Ans: Both are the ways of Communications, Both can be make by wires/wireless. Both are capable to two way
traffic of [Link] allows us to share our files with our Friends while telephone don't. Video chat is being
used by people who has the access to internet, but it isn't possible through telephone.
KNSIT Page 26
18CS46 N C NETHRA
Asst. Prof. Csedept
Chapter 2
Network Models
In this chapter, we first discuss the idea of network models in general and the TCP/IP
protocol suite in particular.
Two models have been devised to define computer network operations: the TCP/IP
protocol suite and the OSI model.
In this chapter, we first discuss a general subject, protocol layering, which is used in both
models. We then concentrate on the TCP/IP protocol suite, on which the book is based.
The OSI model is briefly discuss for comparison with the TCP/IP protocol suite.
Even in this simple scenario, we can see that a set of rules needs to be followed.
First, Maria and Ann know that they should greet each other when they meet.
Second, they know that they should confine their vocabulary to the level of their
friendship.
Third, each party knows that she should refrain from speaking when the other party is
speaking.
Fourth, each party knows that the conversation should be a dialog, not a monolog: both
should have the opportunity to talk about the issue.
Fifth, they should exchange some nice words when they leave.
We can see that the protocol used by Maria and Ann is different from the communication
between a professor and the students in a lecture hall.
KNSIT Page 27
18CS46 N C NETHRA
Asst. Prof. Csedept
The communication in the second case is mostly monolog; the professor talks most of the
time unless a student has a question, a situation in which the protocol dictates that she
should raise her hand and wait for permission to speak. In this case, the communication is
normally very formal and limited to the subject being taught.
KNSIT Page 28
18CS46 N C NETHRA
Asst. Prof. Csedept
KNSIT Page 29
18CS46 N C NETHRA
Asst. Prof. Csedept
Using logical connections makes it easier for us to think about the duty of each layer.
As the figure shows, the duty of the application, transport, and network layers is end-to-
end.
However, the duty of the data-link and physical layers is hop-to-hop, in which a hop is a
host or router.
KNSIT Page 30
18CS46 N C NETHRA
Asst. Prof. Csedept
In other words, the domain of duty of the top three layers is the internet, and the domain
of duty of the two lower layers is the link.
Another way of thinking of the logical connections is to think about the data unit created
from each layer.
In the top three layers, the data unit (packets) should not be changed by any router or
link-layer switch.
In the bottom two layers, the packet created by the host is changed only by the routers,
not by the link-layer switches. Figure 2.7 shows the second principle discussed
previously for protocol layering.
We show the identical objects below each layer related to each device.
Note that, although the logical connection at the network layer is between the two hosts,
we can only say that identical objects exist between two hops in this case because a router
may fragment the packet at the network layer and send more packets than received (see
fragmentation in Chapter 19). Note that the link between two hops does not change the
object.
Physical Layer
We can say that the physical layer is responsible for carrying individual bits in a frame
across the link.
Although the physical layer is the lowest level in the TCP/IP protocol suite, the
communication between two devices at the physical layer is still a logical communication
because there is another, hidden layer, the transmission media, under the physical layer.
Two devices are connected by a transmission medium (cable or air).
We need to know that the transmission medium does not carry bits; it carries electrical or
optical signals.
KNSIT Page 31
18CS46 N C NETHRA
Asst. Prof. Csedept
So the bits received in a frame from the data-link layer are transformed and sent through
the transmission media, but we can think that the logical unit between two physical layers
in two devices is a bit.
There are several protocols that transform a bit to a signal.
Data-link Layer
We have seen that an internet is made up of several links (LANs and WANs) connected
by routers.
There may be several overlapping sets of links that a datagram can travel from the host to
the destination.
The routers are responsible for choosing the best links.
However, when the next link to travel is determined by the router, the data-link layer is
responsible for taking the datagram and moving it across the link.
The link can be a wired LAN with a link-layer switch, a wireless LAN, a wired WAN, or
a wireless WAN.
In each case, the data-link layer is responsible for moving the packet through the link.
The data-link layer takes a datagram and encapsulates it in a packet called a frame.
Each link-layer protocol may provide a different service.
Some link-layer protocols provide complete error detection and correction, some
provide only error correction.
Network Layer
The network layer is responsible for creating a connection between the source computer
and the destination computer.
The communication at the network layer is host-to-host.
the routers in the path are responsible for choosing the best route for each packet.
We can say that the network layer is responsible for host-to-host communication and
routing the packet through possible routes.
The network layer in the Internet includes the main protocol, Internet Protocol (IP), that
defines the format of the packet, called a datagram at the network layer.
o IP also defines the format and the structure of addresses used in this layer.
o IP is also responsible for routing a packet from its source to its destination, which
is achieved by each router forwarding the datagram to the next router in its path.
o IP is a connectionless protocol that provides no flow control, no error control,
and no congestion control services. This means that if any of theses services is
required for an application, the application should rely only on the transport-layer
protocol.
The network layer also includes unicast (one-to-one) and multicast (one-to-many) routing
protocols.
A routing protocol does not take part in routing (it is the responsibility of IP), but it
creates forwarding tables for routers to help them in the routing process.
The Internet Control Message Protocol (ICMP) helps IP to report some problems when
routing a packet.
The Internet Group Management Protocol (IGMP) is another protocol that helps IP in
multitasking.
KNSIT Page 32
18CS46 N C NETHRA
Asst. Prof. Csedept
The Dynamic Host Configuration Protocol (DHCP) helps IP to get the network-layer
address for a host.
The Address Resolution Protocol (ARP) is a protocol that helps IP to find the link-layer
address of a host or a router when its network-layer address is given.
Transport Layer
The logical connection at the transport layer is also end-to-end.
The transport layer at the source host gets the message from the application layer,
encapsulates it in a transport layer packet (called a segment or a user datagram in
different protocols) and sends it, through the logical (imaginary) connection, to the
transport layer at the destination host.
In other words, the transport layer is responsible for giving services to the application
layer: to get a message from an application program running on the source host and
deliver it to the corresponding application program on the destination host.
There are a few transport-layer protocols in the Internet, each designed for some specific
task.
o Transmission Control Protocol (TCP),
is a connection-oriented protocol that first establishes a logical
connection between transport layers at two hosts before transferring data.
It creates a logical pipe between two TCPs for transferring a stream of
bytes.
TCP provides flow control (matching the sending data rate of the source
host with the receiving data rate of the destination host to prevent
overwhelming the destination),
error control (to guarantee that the segments arrive at the destination
without error and resending the corrupted ones), and
congestion control to reduce the loss of segments due to congestion in the
network.
KNSIT Page 33
18CS46 N C NETHRA
Asst. Prof. Csedept
Application Layer
As Figure 2.6 shows, the logical connection between the two application layers is end-to-
end.
The two application layers exchange messages between each other as though there were a
bridge between the two layers.
However, we should know that the communication is done through all the layers.
Communication at the application layer is between two processes (two programs running
at this layer).
To communicate, a process sends a request to the other process and receives a response.
Process-to-process communication is the duty of the application layer.
The application layer in the Internet includes many predefined protocols, but a user can
also create a pair of processes to be run at the two hosts.
The Hypertext Transfer Protocol (HTTP) is a vehicle for accessing the World Wide Web
(WWW).
The Simple Mail Transfer Protocol (SMTP) is the main protocol used in electronic mail
(e-mail) service.
The File Transfer Protocol (FTP) is used for transferring files from one host to another.
The Terminal Network (TELNET) and Secure Shell (SSH) are used for accessing a site
remotely.
The Simple Network Management Protocol (SNMP) is used by an administrator to
manage the Internet at global and local levels.
The Domain Name System (DNS) is used by other protocols to find the network-layer
address of a computer.
The Internet Group Management Protocol (IGMP) is used to collect membership in a
group. (discuss in Chapter 26 ).
KNSIT Page 34
18CS46 N C NETHRA
Asst. Prof. Csedept
2. The transport layer takes the message as the payload, the load that the transport layer
should take care of. It adds the transport layer header to the payload, which contains the
identifiers of the source and destination application programs that want to communicate
plus some more information that is needed for the end-to-end delivery of the message,
such as information needed for flow, error control, or congestion control. The result is the
transport-layer packet, which is called the segment (in TCP) and the user datagram (in
UDP). The transport layer then passes the packet to the network layer.
3. The network layer takes the transport-layer packet as data or payload and adds its own
header to the payload. The header contains the addresses of the source and destination
hosts and some more information used for error checking of the header, fragmentation
information, and so on. The result is the network-layer packet, called a datagram. The
network layer then passes the packet to the data-link layer.
4. The data-link layer takes the network-layer packet as data or payload and adds its own
header, which contains the link-layer addresses of the host or the next hop (the router).
The result is the link-layer packet, which is called a frame. The frame is passed to the
physical layer for transmission.
KNSIT Page 35
18CS46 N C NETHRA
Asst. Prof. Csedept
1. After the set of bits are delivered to the data-link layer, this layer decapsulates the
datagram from the frame and passes it to the network layer.
2. The network layer only inspects the source and destination addresses in the datagram
header and consults its forwarding table to find the next hop to which the datagram is to
be delivered. The contents of the datagram should not be changed by the network layer in
the router unless there is a need to fragment the datagram if it is too big to be passed
through the next link. The datagram is then passed to the data-link layer of the next link.
3. The data-link layer of the next link encapsulates the datagram in a frame and passes it to
the physical layer for transmission.
2.2.5 Addressing
Any communication that involves two parties needs two addresses: source address and
destination address. Although it looks as if we need five pairs of addresses, one pair per
layer, we normally have only four because the physical layer does not need addresses; the
unit of data exchange at the physical layer is a bit, which definitely cannot have an
address.
Figure 2.9 shows the addressing at each layer.
As the figure shows, there is a relationship between the layer, the address used in that
layer, and the packet name at that layer.
At the application layer, we normally use names to define the site that provides services,
such as [Link], or the e-mail address, such as somebody@[Link].
KNSIT Page 36
18CS46 N C NETHRA
Asst. Prof. Csedept
At the transport layer, addresses are called port numbers, and these define the
application-layer programs at the source and destination. Port numbers are local
addresses that distinguish between several programs running at the same time.
At the network-layer, the addresses are global, with the whole Internet as the scope. A
network-layer address uniquely defines the connection of a device to the Internet.
The link-layer addresses, sometimes called MAC addresses, are locally defined
addresses, each of which defines a specific host or router in a network (LAN or WAN).
To be able to multiplex and demultiplex, a protocol needs to have a field in its header to
identify to which protocol the encapsulated packets belong.
At the transport layer, either UDP or TCP can accept a message from several application-
layer protocols.
At the network layer, IP can accept a segment from TCP or a user datagram from UDP.
IP can also accept a packet from other protocols such as ICMP, IGMP, and so on.
At the data-link layer, a frame may carry the payload coming from IP or other protocols
such as ARP (see Chapter 9).
KNSIT Page 37
18CS46 N C NETHRA
Asst. Prof. Csedept
KNSIT Page 38
18CS46 N C NETHRA
Asst. Prof. Csedept
KNSIT Page 39
18CS46 N C NETHRA
Asst. Prof. Csedept
Protocol Stacks
It is possible to write a single protocol that takes data from one computer
application and sends it to an application on another computer.- A Single stack Protocol
The problem with this approach is that it very inflexible, as any changes require changing
the entire application and protocol software.
The approach used in networking is to create layered protocol stacks.
Each level of the stack performs a particular function and communicates with the
levels above and below it.
This layered arrangement is not confined to networking, and how it works is probably
best understood if you compare it to real life example.
Lets take an example of a parcel service between two offices.
The task is simple – send parcels between people in each office.
KNSIT Page 40
18CS46 N C NETHRA
Asst. Prof. Csedept
The question really is what is the advantage of splitting the task into different layers/tasks?
The answer is that any of the layers/tasks can be changed without affecting the other
layers.
So if for example, if we decide to use a train instead of a van to transport the messages
between the offices we could do so without affecting the mail man.
In fact the mail man doesn’t know, and doesn’t care, how the parcels are transported
between the offices, as all he does is collect them, and pass them to the delivery man.
Although this appears very simple, and maybe trivial, it does illustrate some very
important points that are crucial when it comes to understanding networking
protocols and how they are organised.
KNSIT Page 41
18CS46 N C NETHRA
Asst. Prof. Csedept
This article has a good overview of the OSI protocol layers and their functions
What is important to understand is that the interfaces between the interfaces are well
defined so that it is theoretically possible to replace a particular protocol with another one
that operates at that level.
For example you should theoretically be able to replace the IP networking protocol with
the IPX networking protocol without affecting how the application e.g. POP3 works.
Although this doesn’t always apply the application protocols like SMTP ,POP3 etc will
work Okay across different data link protocols like Ethernet,Token ring etc.
End to End Connections- Routers,Switches and OSI
When two computers communicate across a network the data must travel through various
items of networking equipment.
You will often hear the terms level 2 and level 3 equipment used. These terms refer to
the OSI levels of the protocol stack that the device operates at.
A router for example works at the networking layer and is a level 3 device.
A switch operates at the Ethernet level and is a level 2 device.
Because a router operates at the networking layer it doesn’t need to support the upper
layer application protocols like HTTP,FTP etc.
The router works on network address which are part of the networking protocol (IP or
IPX).
A router can route many different protocols at the same time, but it doesn’t do protocol
conversion.
An IP packet coming in will be an IP packet going out and an IPX packet coming in
will be an IPX packet going out.
To do protocol conversion you will need a Gateway.
Likewise a switch doesn’t have level 3,4,5,6 or 7 protocol stacks as it doesn’t need them,
and so it doesn’t care about the routing protocol IP,IPX etc or the
application FTP,HTTP etc that passes through it.
Because the switch operates at level 2 (data link layer) it only needs to understand
the MAC addresses that are part of the Ethernet protocol.
The TCP/IP Protocol Suite
The TCP/IP protocol suite consists of many protocols that operate at one of 4 layers.
The protocol suite is named after two of the most common protocols –
TCP (transmission Control Protocol) and IP (internet Protocol).
KNSIT Page 42
18CS46 N C NETHRA
Asst. Prof. Csedept
TCP/IP was designed to be independent of networking Hardware and should run across
any connection media.
The earliest use, and the most common use is over Ethernet networks.
Ethernet is a 2 layer protocol/standard covering the physical and data link layer,
shown in the diagram above.
Important Notes:
HTTP (hypertext transfer protocol) -This is the workhorse of the Web.
SMTP,POP3,IMap4 – These are email protocols
TCP (Transmission control protocol) is a connection orientated protocol and is used to
provides a reliable end to end connection.
UDP (used datagram protocol) is connection less protocol and doesn’t guarantee
delivery. See UDP vs TCP- what is the Difference?
Applications will choose which transmission protocol to use based on their
function. HTTP, POP3, IMAP4, SMTP and many more use TCP.
UDP is used more in utility applications like DNS, RIP (routing information
protocol), DHCP.
IP (Internet Protocol) – This is the main networking protocol. There are two version of
IP (IPv4 and IPV6).
ARP (address resolution Protocol) -Translates an IP address to a MAC or physical
address.(IP4 networks)
Summary
The TCP/IP protocol suite is a collection of protocols that are used on the Internet.
It is named after two of the main protocols (TCP and IP) and uses a 4 layer networking
model.
KNSIT Page 43