Unit 1 - Computer Networks
Unit 1 - Computer Networks
UNIT – I
INTRODUCTION
Contents :
Computer Network Introduction
o Computer Network Applications – Business, Home, Social and Mobile Applications
Network Hardware
o Transmission Technologies – Broad cast, point-to-point links
o Topologies – Mesh, Star, Bus and Ring
o Network Categories – LAN, MAN, WAN, Internet
o Transmission Modes – Simplex, Half Duplex, Full Duplex
Network Software
o Design Issues of Layers
o Connection Oriented Services
o Connection Less Services
o Selective Primitives
OSI Reference Model
TCP/IP Reference Model
Comparison of OSI and TCP/IP Reference Models
ARPANET
INTERNET
Transmission Media
o Twisted Pair
o Coaxial Cable
o Fiber Optical Cables
Wireless Transmission
o Electromagnetic Spectrum
o Radio wave transmission
o Microwave Transmission
o Infrared and millimeter waves
o Light wave Transmission
1. Business Applications :
A company may have separate computers to monitor production, keep track of inventories and do the payroll.
Initially, each of these computers may have worked in isolation from the others, but at some point, management may
have decided to connect them to be able to extract and correlate information about the entire company.
a) Resource sharing : A group of office workers share a common printer. This issue is termed as resource sharing
and the goal is to make all programs, equipment and especially data available to anyone on the network without
regard to the physical location of the resources and the user.
In larger companies, the computers and employees may be scattered over dozens of offices and plants in
many countries. A company’s information consisting of one or more databases and some number of employees need
to access them remotely. In this model, the data are stored on powerful computers called servers. Servers are
maintained by system administrator. The employees have simple machines called clients, with which they can access
remote data. This whole arrangement is called client-server model.
b) Communication medium : Second goal of computer network has to do with people rather than information or
even computers. A computer network can provide a powerful communication medium among employees through e-
mail (electronic mail) . E-mail is not the only form of improved communication made possible by computer networks, it
is even easy for two or more people who work far apart to write a report together.
c) Electronic Commerce : Third goal for increasing companies is doing business electronically with other companies
as well as doing business with consumers over the internet.
2. Home Applications :
a) Access to remote information : It comes in many forms. It can be surfing the WWW for information or just for fun.
Information available induces the arts, business, cooking, government, health, history, hobbies, recreation etc.
b) Person-to-person Communication : E-mail is already used on a daily basis by millions of people all over the
world and its use is growing rapidly. It already routinely contains audio and video as well as text and pictures. Instant
messaging is the facility which a group of people can type messages for all to see. This is done with an idea of chat
room. Another type of communication often goes by the name of peer-to-peer communication. The idea is fairly
simple. Members registered under the site had on their hard disks in a central database maintained on the server. If a
members want to access, he checked the database to see who had it and went directly there to get it.
c) Interactive Entertainment : It is easy to select a movie or program ever made, in any county and have it displayed
on your screen instantly.
d) Electronic commerce : Home shopping is already popular and enables users to inspect the online catalogs of
thousand of companies. Some of these catalogs will provide the ability to get an instant video on any product by just
clicking on products name. another area in which e-commerce is already happening is access to financial institutions.
3. Mobile Users
4. Social Issues
NETWORK HARDWARE
Transmission Technology : Based on transmission technology network hardware can be classified as
1. Broadcast links : Broadcast networks have a single communication channel that is shared by all the
machines on the network. Shot messages called packets in certain contexts, sent by any machine are
received by all the others. An address field within the packet specifies the intended recipient. Upon receiving a
packet, a machine checks the address field. If the packet is intended for the receiving machine, that machine
processes the packet; if the packet is intended for some other machine, it is just ignored.
When a packet with this code is transmitted, it is received and processed by every machine on the
network, this mode of operation called broadcasting. Some broadcasting systems also support transmission to
a subset of the machines, known as multicasting.
Broadcast networks can be further divided into static and dynamic, depending upon how the channel is allocated.
Static : In this allocation ,we would divide the time into discrete intervals and use a round-robin algorithm,
allowing each machine to broadcast only when its time slot comes up. This allocation wastes channel capacity
when a machine has nothing to say during its allocated slot.
2. Point – to – point networks : It consists of many connections between individual pairs of machines. As a
general rule, smaller localized networks make use of broadcasting where as larger networks are point-to-
point. The transmission with one sender and one receiver is sometimes called as unicasting.
Topology : The topology of a network is the geometric representation of the relation ship of all the links and linking
devices. There are four basic possible topologies. They are as follows
1. Mesh Topology : In mesh topology, every device has a dedicated point-to-point link to every other device.
The dedicated link carries traffic only between the two devices it connects. To accommodate n nodes we
require n(n-1)/2 links and n(n-1)/2 I/O ports.
Advantages
It guarantees each connection carry its own data load thus eliminating traffic problems.
It is robust. If one link becomes unusable, it does not incapacitate the entire system.
It provides privacy or security.
It makes fault identification and fault isolation easy.
Disadvantages
Installation and reconnection are difficult.
Bulk of wiring is required.
Hardware required to connect link is expensive.
Example
Connection of telephone regional office.
2. Star Topology : In star topology, each device has a dedicated point-to-point link only to a central controller
usually called hub. The devices are not directly linked to one another. No direct traffic between devices is
allowed. 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.
Hub
Advantages
It is less expensive.
Each device needs only one link and one I/O port to connect it to any number of others.
Easy to install and reconfigure.
Less cabling required.
Disadvantage
Dependency on a single point.
Example
High speed Local Area Networks
3. Bus Topology : In bus topology, one long cable acts as a backbone to link the devices in a network. Nodes
are connected to the bus cable by drop lines or taps. Only one device can transfer data at a time. The
allocation of bus channel may be centralized or distributed.
Advantages
Ease of installation.
Less cabling is required.
Redundancy is eliminated.
Disadvantages
Difficult reconnecition and fault isolation.
Signal reflection at connection points can cause degradation in quality.
Fault or break in bus cable stops all transmission.
Example
Ethernet
4. Ring Topology : In a ring network, each device has a dedicated point-to-point connection with only the two
devices on either side of it. Data is transmitted along the ring in one direction, from device to device until it
reaches its destination.
Advantages
Easy to install and reconfigure.
Add or delete a device requires changing only two connections.
Disadvantages
Traffic flow is unidirectional.
Break in ring can disable the entire network.
Example
Token Ring
Transmission Modes
Transmission mode is used to define the direction of signal flow between two linked devices. There are three types of
transmission modes. They are as follows
1. Simplex Communication
a. In this mode, data travels only in one direction.
b. Only one of the two stations on a link can transmit; the other can only receive. Eg. Cable TV network,
Keyboards, monitor etc
2. Half Duplex Communication
a. In this mode, data transmission is possible in both directions but not simultaneously.
b. When one device is sending, the other can only receive and vice versa. Eg. Walkie-talkies and CB
radios
3. Full Duplex Communication
a. In this mode, data transmission can be in both the directions even at the same time.
b. In this mode signals going in either direction share the capacity of the link.
c. The sharing occurs in two ways : either the link must contain two physically separate transmission
paths, one for sending and other for receiving, or the capacity of the channel is divided between
signals traveling in opposite directions. E.g. Telephone
Network Categories
Based on the size, the networks can be categorized into four categories. They are as follows:
1. Local Area Networks (LAN):
LANs are privately-owned networks within a single building or campus of up to few kilometers in size.
They are widely used to connect personal computers and workstations in company offices.
LANs are distinguished from other kind of networks by three characteristics
1) Size : LANs are restricted in size, which means the worst case transmission time is bounded and known
in advance.
2) Transmission technology : LANs may use a transmission technology consisting of a cable to which all
the machines are connected. LANs run at speed of 10Mbps to 100Mbps, have low delay, make few
errors. Newer LANs operate at up to 10Gbps.
3) Topology : Most commonly used topologies are bus, ring and star.
4. Internetworks
A collection of interconnected networks called an internetwork or internet.
Many networks exist in the world, often with different hardware and software.
People connected to one network often want to communicate with people attached to a different one.
The fulfillment of this desire requires that different and frequently incompatible networks, be connected,
sometimes by means of machines called gateways to make the connection and provide the necessary
translation, both in terms of hardware and software.
NETWORK SOFTWARE
The first computer networks were designed with the hardware as the main concern and the software as the
after thought. Network software is now highly structured.
To reduce their design complexity, most network are organized as a stack of layers or levels. The number of
layers, the name of the layer, the contents of each layer and the function of each layer differ from network to network.
The purpose of each layer is to offer certain services to the higher layers and receive services from the lower layers.
[Link] III Year I Semester CSE Page 8 NNRG
Computer Networks Unit - I Introduction
Layer n on one machine caries on conversation with layer n on another machine. The rules and conventions
used in this conversation are collectively known as the layer n protocol. A protocol is an agreement between the
communicating parties on how to communication is to proceed. In reality, no data are directly transferred from layer n
on one machine to layer n on another machine. Instead, each layer passes data and control information to the layer
immediate below it, until the lowest layer is reached. Below layer 1 there is a physical medium through which actual
communication occurs.
Between each pair of adjacent layer is an interface. The interface defines which primitive operations and
services the lower layer makes available to the upper one. A set of layers and protocols is called network
architecture. A list of protocols used by a certain system, one protocol per layer, is called a protocol stack.
A message M, is produced by an application process running in layer 5 and given to layer 4 for transmission.
Layer 4 puts a header in front of the message to identify the message and passes the result to layer 3.
The header includes control information, such as sequence numbers to allow layer 4 on the destination
machine to deliver messages in the right order if the lower layers do not maintain sequence.
In many networks, there is no limit to the size of the messages transmitted in the layer 4 protocol, but there is
nearly always a limit imposed by the layer 3 protocol.
So it break up the incoming messages into smaller units called packets prepending a layer 3 header to each
packet.
Layer 3 decides which of the outgoing lines to use and passes the packets to layer 2.
Layer 2 adds not only header to each piece, but also trailer and gives the resulting unit to layer 1 for physical
transmission.
At receiving machine the message moves upwards from layer to layer, with headers being stripped off as it
progresses.
It provides reliable message stream like sequence of pages, reliable byte stream used for purpose of remote
login , but provides unreliable connection in few cases like digitized voice.
Selective Primitives
A service is formally specified by a set of primitives (operations) available to a user process to access the
service.
Primitives will tell the service to perform some action or report on an action taken by a peer entity.
The set of primitives available depends on the nature of the service being provided.
The primitives for connection oriented service are different from connection less services.
Example primitives for implementing a simple connection oriented service is
Primitive Meaning
LISTEN Block waiting for an incoming connection
CONNECT Establish a connection with a waiting peer
RECEIVE Block waiting for an incoming message
SEND Send a message to the peer
DISCONNECT Terminate the connection
1. The server executes LISTEN to indicate that it is prepared to accept incoming connections.
2. The client process executes CONNECT to establish a connection with the server. The CONNECT call needs
to specify who to connect to, so it might have a parameter giving the server’s address.
3. The next step is for the server to execute RECEIVE to prepare to accept the first request.
4. Then the client executes SEND to transmit its request followed by the execution of RECEIVE to get the reply.
5. Server process the request, it uses SEND to return the answer to the client.
6. If it is done, the client can use DISCONNECT to terminate the connection.
7. Usually, an initial DISCONNECT is a blocking call, suspending the client and sending a packet to the server
saying that connection is no longer needed.
8. When the server gets the packet, it also issues a DISCONNECT of its own, acknowledging the client and
releasing the connection.
Physical Layer
Physical layer is concerned with transmitting raw bits over a communication channel.
The physical layer defines the characteristics of the interface between the devices and transmission medium.
It also defines the procedures and functions that physical devices and interfaces have to perform for
transmission to occur.
The physical layer data consist of stream of bits (sequence of 0’s and 1’s) without any interpretation.
To be transmitted, bits must be encoded into signals – electrical or optical. The physical layer defines the
types of encoding.
The transmission rate – number of bits sent each second – is also defined by phiscal layer.
The physical layer is concerned with the connection of devices to the medium.
The physical topology defines how devices are connected to make a network.
The layer also defines the direction of transmission between two devices : simplex, half duplex or full duplex.
Network Layer
Network layer controls the operation of the subnet.
It is responsible for the source to destination delivery of a packet possibly across multiple networks.
Routing is done by network layer to choose the best path among the available links from which packet is to be
routed.
It controls the congestion i.e. if too many packets are present in the subnet at the same time, it will get rid of
this situation.
It keeps track of accounting information about the data sent by each user.
It establishes connections with other heterogeneous networks.
The network adds a logical address in its header to distinguish the source and destination when a packet
passes the network boundary.
Transport Layer
Transport layer is responsible for end-to-end delivery of entire message.
Transport layer accepts data from the session layer, divide it into small pieces if necessary, pass these small
pieces to the network layer and make sure that the data reached the other end correctly.
It establishes and deletes connections across the network. It can be either connectionless or connection
oriented.
Transport layer regulates the flow of information and also responsible for error control.
It takes care of multiplexing data and establishing multiple connections when high throughput is in demand.
Session Layer
Session layer allows users on different machine to establish sessions.
It manages the dialogue control in situations like half-duplex communications.
The session layer prevents both sides from attempting the same operation at the same time by a service
called token management.
It provides synchronization by inserting checkpoints into the data stream so that after a crash, only the data
transferred after the last checkpoint have to be retransferred.
Presentation Layer
Presentation layer is mainly interested in the syntax and semantics of the information transmitted.
It converts the information between the representations used in individual computer and globally accepted
standards.
To carry sensitive information’s, it provide encryption process in which the original message is converted to
unreadable format and decryption process in which the unreadable message is converted to original format.
Presentation layers provides facility of compressing data like text, audio and video.
Application Layer
Application layer enables the user to access the network.
It provides user interfaces and support for services such as email, file access and transfer etc.
Application layer contains various protocols implemented for user interaction. Ex. HTTP
Since different file systems use their own representation for files names, file transfer between different file
systems is commonly implemented in application layer.
This layer provides distributed data base sources and access for global information about various objects and
services.
Host-to-Network Layer
The TCP/IP reference model does not really say much about what happens here.
This layer points out the host has to connect to the network using some protocol so that it can send IP packets
to the network.
This protocol is not defined and varies from host to host and network to network.
Internet Layer
Internet Layer is similar to the network layer in OSI model.
Its job is to permit hosts to inject packets into any network and have them travel independently to the
destination.
They may even arrive in a different order than they were sent, in which case it is the job of higher layers to
rearrange them, if in-order delivery is desired.
The internet layer defines an official packet format and protocol called IP (Internet Protocol).
Internet protocol(IP) is a connectionless protocol.
Packet routing is clearly the major issue here, as well as avoiding congestion also carried on.
Transport Layer
Two end-to-end protocols were defined in this layer which enables the source and destination peers to exchange data
with each other. They are
Transmission Control Protocol (TCP)
It is a reliable connection –orient protocol.
It enables error-free transmission
It fragments the incoming data stream into discrete messages at the sender and groups those messages
into the output data stream at the receiving end.
It handles flow-control also to synchronize the data transfers between fast senders and slow receivers.
User Datagram Protocol (UDP)
It is unreliable connectionless protocol.
It does not handle sequencing of messages and flow control.
It is generally used in application involving client-server interaction, speech or video.
Application Layer
All high level protocols are implemented in this layer. They include
o TELNET - Virtual Terminal
o FTP - File Transfer Protocol
o SMTP - Simple Mail Transfer Protocol
o DNS - Domain Name Space
The virtual terminal protocol allows a user on one machine to log onto a distant machine and work there.
The file transfer protocol provides a way to move data efficiently from one machine to another.
Electronic mail was originally just a kind of file transfer, but later a specialized protocol (SMTP) was developed
for it.
Domain Name System (DNS) for mapping host names onto their network addresses.
ARPANET
In mid-1960’s at the height of the Cold War, DoD wanted a command and control network that could survive a
nuclear war. Traditional circuit switched telephone networks were considered too vulnerable, since loss of one line or
switch would certainly terminate all conversations using them and might even partition the network.
To solve this problem, DoD turned to its research arm, ARPA (Advanced Research Projects Agency) was
created. ARPA decided that the network the DoD needed should be packet-switched network, consisting of a subnet
and host computers.
The subnet would consist of minicomputers called IMP’s (Interface Message Processors) connected by
transmission lines.
For high reliability, each IMP would be connected to at least two other IMP’s. The subnet was to be a
datagram subnet, so if some lines and IMP’s were destroyed, messages could be automatically rerouted
along alternative path.
Each node of the network was to consist of an IMP and a host, in the same room, connected by a wire.
A host could send messages of up to 8063 bits to its IMP, which would then break these up into packets of at
most 1008 bits and forward them independently toward the destination.
Each packet was received in its entirety before being forwarded, so the subnet was the first electronic store
and forward packet switching network.
The software was split into two parts : subnet and host.
The subnet software consisted of the IMP end of the host-IMP connection, the IMP – IMP protocol, and a
source IMP to destination IMP protocol to improve reliability.
Outside the subnet, software was also needed namely, the host of the host-IMP connection, the host-host
protocol, and the application software.
Later the IMP software was changed to allow terminals to connect directly to a special IMP, called a TIP
(Terminal Interface Processor).
Subsequent changes included having multiple hosts per IMP, host talking to multiple IMPs, and hosts and
IMPs separated by a large distance.
As the scale increased, finding hosts became increasingly expensive, so DNS (Domain Name System) was
created to organize machines into domains and map host names onto IP addresses.
INTERNET
Internet is a worldwide, publicly accessible network of interconnected computer networks that transmit data by
packet switching using the standard Internet protocol (IP).
Internet can be termed as network of networks. It consists of millions of smaller domestic, academic, business
and government networks which together carry various information and services such as e-mail, online chat, file
transfer and the interlinked web pages and other documents of the World Wide Web.
When two popular networks ARPANET and NSFNET were being used, the network uses increased
numerously. This lead to the development of internet. The word Internet is used as technical word for inter connection
of networks. The growth of Internet continued in the starting 1990s. By 1995 there were multiple backbones, hundreds
of mid-level networks, thousands of LANs, millions of hosts and tens of millions of users. The size approximately
grows every year.
The main things that support internet are the TCP/IP reference model and the TCP/IP protocol stack. A
machine can be part of Internet when it can run the TCP/IP protocol stack, has an IP address and also should have
the ability to send and receive IP packets from other machines on the Internet. The machines must have the ability to
call up an Internet service provider using a modem.
Traditionally (meaning 1970 to about 1990), the Internet and its predecessors had four main applications:
E-mail: The ability to compose, send, and receive electronic mail has been around since the early days of the
ARPANET and is enormously popular. E-mail programs are available on virtually every kind of computer
these days.
News: Newsgroups are specialized forums in which users with a common interest can exchange messages.
Thousands of newsgroups exist, devoted to technical and nontechnical topics, including computers, science,
recreation, and politics. Each newsgroup has its own etiquette, style, and customs, and woe betide anyone
violating them.
Remote login: Using the telnet, remote login, users anywhere on the Internet can log on to any other
machine on which they have an account.
File transfer: Using the FTP program, users can copy files from one machine on the Internet to another. Vast
numbers of articles, databases, and other information are available this way.
A part from traditional applications Internet now – a – days is used in many other applications like
World Wide Web : This application was invented by CERN physicist Tim Berners LEE. He just made the
underlying facilities easier for the users. WWW made it possible for a site to set up a number of pages of
information containing text, pictures, sound and even video with embedded links to other pages.
[Link] III Year I Semester CSE Page 18 NNRG
Computer Networks Unit - I Introduction
Streaming Video : The television and radio broadcasters provide Interned feedbacks to be given by the
viewers and the broadcasters live audio and video streams. They may also provide Internet time shift viewing
or listening such as preview, classic clips and listen again features.
Architecture of Internet
The internet provides a world wide interconnection of the networks using many components, algorithms and
protocols. The brief look of architecture is as shown below.
TRANSMISSION MEDIA
The purpose of physical layer is to transport a raw bit stream from one machine to another. Various physical
media can be used for the actual transmission. Each one has is own importance in terms or bandwidth, delay, cost
and ease of installation and maintenance. Media are roughly grouped as follows
1. Guided Media
Twisted Pair
Coaxial Cable
Fiber Optical Cable
2. Unguided Media (Wireless Media)
Radio Transmission
Microwave waves
Infrared waves
Light wave Transmission
1. Guided Media: It is also referred to as Wired or Bounded transmission media. Signals being
transmitted are directed and confined in a narrow pathway by using physical links.
Features:
High Speed
Secure
Used for comparatively shorter distances
There are 3 major types of Guided Media:
Advantages:
⇢ Least expensive
⇢ Easy to install
⇢ High-speed capacity
Disadvantages:
⇢ Susceptible to external interference
⇢ Lower capacity and performance in comparison to STP
⇢ Short distance transmission due to attenuation
Applications:
Used in telephone connections and LAN networks
Shielded Twisted Pair (STP):
This type of cable consists of a special jacket (a copper braid covering or a foil shield) to
block external interference. It is used in fast-data-rate Ethernet and in voice and data
channels of telephone lines.
Advantages:
⇢ Better performance at a higher data rate in comparison to UTP
⇢ Eliminates crosstalk
⇢ Comparatively faster
Disadvantages:
⇢ Comparatively difficult to install and manufacture
⇢ More expensive
⇢ Bulky
Applications:
The shielded twisted pair type of cable is most frequently used in extremely cold climates,
where the additional layer of outer covering makes it perfect for withstanding such
temperatures or for shielding the interior components.
Advantages:
High Bandwidth
Better noise Immunity
Easy to install and expand
Inexpensive
Disadvantages:
Single cable failure can disrupt the entire network
Applications:
Radio frequency signals are sent over coaxial wire. It can be used for cable television signal
distribution, digital audio (S/PDIF), computer network connections (like Ethernet), and feed
lines that connect radio transmitters and receivers to their antennas.
surrounded by a less dense glass or plastic covering called the cladding. It is used for the
transmission of large volumes of data.
The cable can be unidirectional or bidirectional. The WDM (Wavelength Division Multiplexer)
supports two modes, namely unidirectional and bidirectional mode.
Advantages:
Increased capacity and bandwidth
Lightweight
Less signal attenuation
Immunity to electromagnetic interference
Resistance to corrosive materials
Disadvantages:
Difficult to install and maintain
High cost
Fragile
Applications:
Medical Purpose: Used in several types of medical instruments.
Defence Purpose: Used in transmission of data in aerospace.
For Communication: This is largely used in formation of internet cables.
Industrial Purpose: Used for lighting purposes and safety measures in designing the
interior and exterior of automobiles.
2. Unguided Media:
It is also referred to as Wireless or Unbounded transmission media. No physical medium is
required for the transmission of electromagnetic signals.
Features:
The signal is broadcasted through air
Less Secure
Used for larger distances
There are 3 types of Signals transmitted through unguided media:
(ii) Microwaves –
It is a line of sight transmission i.e. the sending and receiving antennas need to be properly
aligned with each other. The distance covered by the signal is directly proportional to the
height of the antenna. Frequency Range:1GHz – 300GHz. These are majorly used for mobile
phone communication and television distribution.
Microwave Transmission
o A satellite is a physical object that revolves around the earth at a known height.
o Satellite communication is more reliable nowadays as it offers more flexibility than
cable and fibre optic systems.
o We can communicate with any point on the globe by using satellite communication.
(iii) Infrared –
Infrared waves are used for very short distance communication. They cannot penetrate through
obstacles. This prevents interference between systems. Frequency Range:300GHz – 400THz. It
is used in TV remotes, wireless mouse, keyboard, printer, etc.
It is used for short-range communication such as data transfer between two cell
phones, TV remote operation, data transfer between a computer and cell phone resides
in the same closed area.