UNIT-I Introduction of Computer Networs
UNIT-I Introduction of Computer Networs
UNIT-I
‘ INTRODUCTION ’
FACULTY:
SREENU BANOTH
ASSISTANT PROFESSOR ,
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING,
IIMT COLLEGE OF ENGINEERING,GREATER NOIDA-201308.
COMPUTER NETWORKS SYLLABUS
UNIT-I
Introductory Concepts: Goals and applications of networks, Categories of networks,
Organization of the Internet, ISP, Network structure and architecture (layering principles,
services, protocols and standards), The OSI reference model, TCP/IP protocol suite,
Network devices and components.
Physical Layer:
Network topology design, Types of connections, Transmission media, Signal
transmission and encoding, Network performance and transmission impairments,
Switching techniques and multiplexing.
UNIT-II
Link layer: Framing, Error Detection and Correction, Flow control (Elementary Data
Link Protocols, Sliding Window protocols).Medium Access Control and Local Area
Networks: Channel allocation, Multiple access protocols, LAN standards, Link layer
switches & bridges (learning bridge and spanning tree algorithms).
UNIT-III
Network Layer: Point-to-point networks, Logical addressing, Basic internetworking (IP,
CIDR, ARP, RARP, DHCP, ICMP), Routing, forwarding and delivery, Static and
dynamic routing, Routing algorithms and protocols, Congestion control algorithms, IPv6
UNIT-IV
Transport Layer: Process-to-process delivery, Transport layer protocols (UDP and TCP),
Multiplexing, Connection management, Flow control and retransmission, Window
management, TCP Congestion control, Quality of service.
UNIT-V
Application Layer: Domain Name System, World Wide Web and Hyper Text Transfer
Protocol, Electronic mail, File Transfer Protocol, Remote login, Network management,
Data compression, Cryptography – basic concepts.
TEXT BOOKS: 1. Andrew S. Tanenbaum, “Computer Networks”, 2012, Pearson
Education,
REFERENCE BOOKS:
1. P. Green - Computer Network Architectures and Protocols, Plenum Press, 1982.
2. Harry Katzan - An Introduction to “Distributed Data Processing”, A Petrocelli
Book, New York / Princeton.
3. Tittel - Theory and Problems of Computer Networking, Schaum’s outline series,
TMH.
4. Godbole - Data Communication & Networking,TMH.
5. Leon Garcia - Communication N etworks: Fundamental Concepts & Key
Architecture,TMH.
INTRODUCTION
Two computers are said to be interconnected if they are able to exchange information.
A
Capture of physical lines – short message. Routing.Channel utilization
(flow control).
Who say first?
Masking the details.
B
C
Networking Elements :
The computer network includes the following networking elements:
1.At least two computers
2.Transmission medium either wired or wireless
3.Protocols or rules that govern the communication
4.Network software such as Network Operating System
Network Goals :
The main goals of network as follows.
1.Cost reduction by sharing hardware & software resources.
2.High reliability by having multiple sources of supply.
3.Greater flexibility because of possibility to connect devices.
4.Increase productivity by making it easier to access data by the several users.
5.Another goal is to increase the systems performance, as the work load increases, by just adding more
processors.
6.Computer networks provide a powerful communication medium.
USE OF COMPUTER NETWORKS
Computer networks have become invaluable to organizations as well as individuals.
Some of its main uses are as follows −
Information and Resource Sharing − Computer networks allow organizations having units
which are placed apart from each other, to share information in a very effective manner. Programs and
software in any computer can be accessed by other computers linked to the network. It also allows
sharing of hardware equipment,like printers and scanners among varied users.
Retrieving Remote Information − Through computer networks, users can retrieve remote
information on a variety of topics.The information is stored in remote databases to which the user
gains access through information systems like theWorldWideWeb.
Speedy Interpersonal Communication − Computer networks have increased the speed and
volume of communication like never before. Electronic Mail (email) is extensively used for
sending texts, documents, images, and videos across the globe. Online communications have
increased by manifold times through social networking services.
E-Commerce − Computer networks have paved way for a variety of business and commercial
transactions online, popularly called e-commerce. Users and organizations can pool funds, buy or
sell items, pay bills, manage bank accounts, pay taxes, transfer funds and handle investments
electronically.
Highly Reliable Systems − Computer networks allow systems to be distributed in nature, by the
virtue of which data is stored in multiple sources. This makes the system highly reliable. If a failure
occurs in one source, then the system will still continue to function and data will still be available from
the other sources.
Cost–Effective Systems − Computer networks have reduced the cost of establishment of computer
systems in organizations. Previously, it was imperative for organizations to set up expensive
mainframes for computation and storage. With the advent of networks, it is sufficient to set up
interconnected personal computers (PCs) for the same purpose.
Point-to-point
A point-to-point connection provides a dedicated link between two devices.
The entire capacity of the link is reserved for transmission between those two devices.
Most point-to-point connections use an actual length of wire or cable to connect the
two ends, but other options, such as microwave or satellite links, are also possible.
When we change television channels by infrared remote control, we are establishing a
point-to-point connection between the remote control and the television's control
system.
Multipoint
A multipoint (also called multidrop) connection is one in which more than two specific
devices share a single link.
Internet
Personal Area Network (PAN)
The smallest and most basic type of network, a PAN is made up of a wireless modem, a
computer or two, phones, printers, tablets, etc., and revolves around one person in one
building.
These types of networks are typically found in small offices or residences and are managed
by one person or organization from a single device.
Eg : wireless computers ,keyboard &Mouse, Bluetooth ,embedded headphones
•
LAN: local area network
Local area networks, generally called LANs, are privately-owned networks within a single
building or campus of up to afew kilometers in size.
LANs may use a transmission technology consisting of a cable to which all the machines are
attached.
Traditional LANs run atspeeds of 10 Mbps to 1000 Mbps, havelow delay (microseconds
or nanoseconds), and make very few errors.
Various topologies are
possible for broadcast
LANs.
Subnet, typically owned and operated by atelephone company or Internet service provider (ISP).
The subnet consists of two distinct components: transmission lines and switching elements.
Transmission lines move bits between machines. Switching elements (routers) are specialized
computers that connect three or more transmission lines.
WA N and Internet
Wireless LANs: for moderate range, becomes more and more common today
(<100m).
network used for cellular telephones: distances involved are much greater and the bit rates
much lower (above 1km).
NETWORK SOFTWARE
Protocol Hierarchies
Design Issues for the Layers
Connection-Oriented and Connectionless Services
Service Primitives
The Relationship of Services to Protocols
Protocol Hierarchies
To reduce their design complexity,most networks are organized as a stack of layers or
levels, each one built upon the one below it.
The purpose of each layer is to offer certain services to the higher layers, shielding those layers from
the details of how the offered services are actually implemented.
Layers; Protocol;
Protocol stack: A list of protocols used by a certain system, one protocol per layer, is called a
protocol stack.
An example network protocol stack
Message is generated by the application of the source machine.
Message “M” is transferred from layer 5 to layer 4, with a header containing control information, such
as sequence numbers, which helps layer4 maintainthe message order.
Layer 3 break the message from layer4 into two pieces to fitthe transmission
restrictions, while adding another header to tell layer 2 where the dest. is.
Layer 2 adds the messages from layer 3 with another header, telling the actual (physical) address of the
dest, and atrailer, which is the checksum of the message for correction assertion.
At the receiving machine the message moves upward, from layer to layer, with
headers being stripped off as it progresses. Message is sent to the dest. machine.
DESIGN ISSUES FOR THE LAYERS
Every layer needs a mechanism for identifying senders and receivers. (who to talk with)
The protocol must also determine how many logical channels the connection corresponds to
and what their priorities are. (simplex or duplex? single or multiple channel?)
Error control is an important issue because physical communication circuits are not perfect.
Message ordering is important ‘cause Not all communication channels preserve the order of
messages sent on them.
An issue that occurs at every level is how to keep a fast sender from swamping a slow receiver
with data.
Inability of all processes to accept arbitrarily long messages. (fragmentation and reassembling the
messages)
CONNECTION-ORIENTED A N D CONNECTIONLESS
SERVICES?
Connection-Oriented Service: the service user first establishes a connection, uses the
connection, and then releases the connection. (e.g.,the telephone, tube)
Connectionless Service: Each message carries the full destination address, and each one is routed
through the system independent of all the others. (e.g., the postal system) Usually, connectionless
service can not guarantee the order of messages.
However, some applications prefer fast speed than the reliability. For example, the digitized
voice traffic, video conference.
Six different types of service
Common Primitives
➢ In bus topology all the computers are connected to a long cable called a bus.
➢ A node that wants to send data puts the data on the bus which carries it to the destination node.
➢ In this topology any computer can data over the bus at any time. Since, the bus is shared among all
the computers.
➢ When two or more computers to send data at the same time, an arbitration mechanism is needed to
prevent simultaneous access to the bus.
2. Ring Topology:
In ring topology, the computers are connected in the form of a ring.
Each node has exactly two adjacent neighbors. To send data to a
distant node on a ring it passes through many intermediate nodes to
reach to its ultimate destination.
The frame then continues around the ring until it finds the
destination node, which takes the data out of the frame.
• Tree topology is a hierarchy of various hubs. The entire nodes are connected to one hub or
the other.
• There is a central hub to which only a few nodes are connected directly.
• The central hub, also called active hub, looks at the incoming bits and regenerates them
so that they can traverse over longer distances.
• The secondary hubs in tree topology may be active hubs or passive hubs. The failure of a
transmission line separates a node from the network.
5. Mesh Topology:
A mesh topology is also called complete topology. In this topology, each node is connected
directly to every oilier node in the network. That is if there are n nodes then there would be n(n
— 1)/2 physical links in the network.
The topology does not have congestion problems. Further it does not need a special Media
Access Control (MAC) protocol to prevent simultaneous access to the transmission media since
links are dedicated, not shared. The topology also provides data security.
The network can continue to function even in the failure of one of the links. Fault identification
is also easy. The main disadvantage of mesh topology is the complexity of the network and the
cost associated with the cable length. The mesh topology is not useful for medium to large
networks.
6. Hybrid Topology:
Hybrid topology is formed by connecting two or more topologies together. For example,
hybrid topology can be created by using the bus, star and ring topologies,
PROTOCOL LAYERING
In data communication and networking, a protocol defines the rules that both the sender and
receiver and all intermediate devices need to follow to be able to communicate effectively.
When communication is simple, we may need only one simple protocol; when the
communication is complex, we may need to divide the task between different layers, in which
case we need a protocol at each layer, or protocol layering.
Scenarios
Let us develop two simple scenarios to better understand the need for protocol layering.
First Scenario
In the first scenario, communication is so simple that it can occur in only one layer. Assume
Maria and Ann are neighbors with a lot of common ideas. Communication between Maria and
Ann takes place in one layer, face to face, in the same language
Second Scenario
In the second scenario, we assume that Ann is offered a higher-level position in her company,
but needs to move to another branch located in a city very far from Maria. The two friends still
want to continue their communication and exchange ideas because they have come up with an
innovative project to start a new business when they both retire. They decide to continue their
conversation using regular mail through the post office.
After following the above two principles, we can think about logical connection between each
layer as shown in below figure. This means that we have layer-to-layer communication. Maria
and Ann can think that there is a logical (imaginary) connection at each layer through which
they can send the object created from that layer. We will see that the concept of logical
connection will help us better understand the task of layering. We encounter in data
communication and networking.
REFERENCE MODELS
OSI reference model
It is rarely used today, while it is actually quite general and still valid, and the features discussed at each layer are
still very important.
OSI model itself is not anetwork architecture because it does not specify the exact services
and protocols to be used in each layer.
developed byARPANET
Typical questions here are how many volts should be used to represent a 1 and how many
for a 0, how many nanoseconds a bit lasts, whether transmission may proceed
simultaneously in both directions, how the initial connection is established and how it is
torn down when both sides are finished, and how many pins the network connector has
and what each pin is used for.
Physical Layer: Duties
The physical layer coordinates the functions required to carry a bit stream over a physical
medium.
Representation of bits—To be transmitted, bits must be encoded into signals, electrical or
optical. The physical layer defines the type of encoding.
Data rate—It defines the transmission rate (number of bits sent per second).
Line configuration—The physical layer is concerned with the connection of devices to the
media (point-to-point or multipoint configuration).
Physical topology—It defines how devices are connected (mesh, star, ring, bus or hybrid) to
make a network.
Transmission mode—The physical layer also defines the direction of transmission between
two devices: simplex, half-duplex, or full-duplex
The Data Link Layer
The main task of the data link layer is to transform a raw transmission facility into a line that
appears free of undetected transmission errors to the network layer.
having the sender break up the input data into data frames and transmit the frames
sequentially
The data link layer is responsible for moving frames from one hop (node) to the next
The data link layer transforms a raw transmission facility to a reliable link.
Framing—The data link layer divides the stream of bits received into manageable data units
called frames.
Physical addressing—The data link layer adds a header to the frame to define the sender
and/or receiver of the frame.
Flow control—If the receiving rate is less than the transmission rate, the data link layer
imposes a flow control mechanism to avoid overwhelming the receiver.
Error control—The data link layer adds reliability to the physical layer by adding a trailer to
detect and retransmit damaged/lost frames and to recognize duplicate frames.
Access control—When two or more devices are connected to the same link, data link layer
protocols determines which device has control over the link at any given time.
The Network Layer
The network layercontrols the operation of the subnet (routing).
Congestion control, QOS (quality of service)
The network layer is responsible for the delivery of packets from the source host to the
destination host
The network layer is responsible for the source-to-destination delivery of a data unit called
packet.
Logical addressing—The packet is identified across the network using the logical addressing
system provided by network layer and is used to identify the end systems.
Routing—The connecting devices (routers or switches) prepare routing table to send packets
to their destination.
Network Layer: Duties
• Logical addressing and routing
The TransportLayer
The transport layer is responsible for delivery of a message from one process to
another
The basic function of the transport layer is to accept data from above, split it up into smaller units
if need be, pass these to the network layer, and ensure that the pieces all arrive correctly at the other
end.
The transport layer is atrue end-to-end layer,allthe way from the source to the destination.
07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address.
Logical (IP) Address
The physical addresses will change from hop to hop, but the logical addresses usually
remain the same
Port Address
The physical addresses change from host to host, but the logical and port addresses usually
remain the same
Specific Address
Some application have user-friendly addresses that are designed for that specific address
• Example 1: e-mail address: [email protected]
– Defines the recipient of an e-mail
• Example 2: URL (Universal Resource Locator, now it is renamed as Uniform Resource
Locator) : www.nitj.ac.in
– Used to find a document on the WWW
Comparison of the OSI and TCP/IP ReferenceModels
Similarities
Both are based on the concept of a stack of independent protocols.
Both of them have transport layer to provide an end-to-end, network-independent transport
service
Differences
In OSI, a layer's service definition tells what the layer does, and a layer's interface tells the
processes above it how to access it,without explaining how the layers works inside.
The TCP/IP model did not clearly distinguish between service, interface of the layers.
As a consequence, the protocols in the OSI model are better hidden than in the TCP/IP model
and can
be replaced relatively easily as the technology changes.
OSI model strives to describe the general model of network protocols, while TCP/IP model is
specific as it is defined after the real implementations. So TCP/IP model is not useful to describe
other protocols.
The hybrid reference model to be used in this book.
EXAMPLE NETWORKS — THE INTERNET 1
Take care of “B” and “b”,“B” means byte, while “b” stands bit.
E.g.,1 KB/s = 8 Kb/s.B/s = Bps, b/s = bps.
• Magnetic Media
• Twisted Pair
• Coaxial Cable
• Fiber Optics
Magnetic Media
• One of the common way to transport data from one computer to another is to write them
on to magnetic tape or removable media (DVD) physically transport the tape or DVD to
the destination machine and read them.
• The tape densities are increasing.
• It is not suitable in applications, where on-line connection is needed
Twisted Pair
• Oldest transmission media
• A twisted pair consists of two insulated copper wires typically about 1mm thick. The wires
are twisted together in a helical form.
• Twisting reduces interference (two parallel wires constitute a simple antenna; a twisted pair
does not.)
• Cheap medium
• Commonly used for communications within buildings and in telephone networks
• For longer distance repeaters are needed.
• Twisted pairs can be used for transmitting either analog or digital signals.
• Produced in unshielded (UTP) and shielded (STP) forms, and in different performance
categories.
• Cables may hold hundreds of pairs. Neighbor pairs typically have different twist lengths to
reduce crosstalk.
• Category 5 has more twists per centimeter.
Twisted Pair
Two kinds of light sources are typically used to do the signaling. Electrical signals are
converted into light.
• LED ( Light Emitting Diode)
• semiconductor lasers Light Detector
• Photo diode: it gives an electrical pulse when struck by light.
Fiber optics can be used for LANs as well as for long transmission.
Two types of interfaces are used.
1) passive interface 2) active interface
Fiber Cables
(a) In the VLF, LF, and MF bands, radio waves follow the curvature of the earth.
(b) In the HF band, they bounce off the ionosphere.
Wireless transmission
• Radio waves are used for multicast communications, such as radio and television, and
paging systems.
• Microwaves are used for uni-cast communication such as cellular telephones, satellite
networks and wireless LANs.
• Infrared signals can be used for short-range communication in a closed area using line-of
sight propagation.
2. Microwave transmission
In microwave transmission, the range of frequency of electromagnetic waves lies somewhere between 1-
300GHz. Microwave transmission is of two types:
•Terrestrial Type Microwave Transmission
•Satellite Type Microwave Transmission
Terrestrial Type Microwave Transmission
In this type of microwave transmission, both the sender and receiver antennas are in direct sight with
each other.
1.Frequency range: The frequency range of terrestrial microwave ranges from 4 to 6GHz.
2.Bandwidth: It supports the bandwidth from 1 to 10 Mbps.
3.Cost: If used in short distance communication, the implementation cost is cheap as we do not need
relay towers. However when terrestrial type microwave transmission is used for long distances, the
implementation cost goes high as we need relay towers to extend the signals.
4.Attenuation: Attenuation means loss of signal. In terrestrial type microwave transmission, attenuation
mainly depends on frequency and signal strength.
5.Implementation: Implementation is difficult as the tower needs to be line of sight and the signal
requirement makes it even more difficult to implement.
Advantages of Terrestrial type microwave transmission:
1.It is cheaper than cable transmission
2.Possible to implement in areas where cable transmission is difficult to implement such as
hill areas.
Disadvantages of Terrestrial type microwave transmission:
1.Not secure, susceptible to eavesdropping.
2.Weather condition can affect the transmission.
3.Limited bandwidth.
Satellite type microwave transmission
This type of communication uses the satellite antenna for communication. The sender antenna
sends the signal to the satellite antenna which is revolving around the earth at a known height.
The satellite antenna then amplifies the received signal and sends it to the receiver antenna.
Advantages of Satellite type transmission:
1.The transmission can be done to the longer distances.
2.Unlike terrestrial transmission where the implementation cost goes higher based on the
transmission distance, the satellite communication is unaffected by the distance of the data
transmission.
3.Easy to install compared to terrestrial type.
Disadvantages of Satellite type transmission:
1.Installation of satellite is extremely tough.
2.Installation cost is high and development requires more time.
3. Infrared Transmission
1.Infrared waves are highest frequency waves, frequency ranges from 300GHz to 400 THz.
2.Suitable for short distance communication.
3.Bandwidth is high so data transmit rate is high compared to other mediums.
4.These waves cannot penetrate walls, thus they are ideal for isolated communications.
Advantages of Infrared Transmission:
1.Secure
2.High speed
3.High frequency signals
4.High data transfer rate
5.low interference
Disadvantages of Infrared Transmission:
1.Sun rays interfere with the infrared rays so not ideal for outdoor communication.
2.Suitable for short distance communication only.
3.Cannot penetrate walls so difficult to establish a communication between two different rooms.
Multiplexing in Computer Network
Multiplexing is a technique used to combine multiple signals and transmit the combined
signal over a transmission medium.
Multiplexer and Demultiplexer
Multiplexer (MUX): Multiplexer is a combinational circuit that has 2n input signal lines and
a single output line. For example 4 X 1 multiplexer has 4 input data lines and 1 output line
and 8 X 1 multiplexer has 8 input data lines and 1 output line. Multiplexer is used for
multiplexing technique as it is combining multiple signals and producing single output
signal.
Demultiplexer (DEMUX): Demultiplexer does exactly opposite of Multiplexing, it receives
a single input signal and generates 2n output signals. Multiplexer is used at the source to
combine the multiple input signals while Demultiplexer is used at the receiving side to
generate the multiple signals from the received signal. For example 1 X 4 Demultiplexer is
used to generate 4 output signals from a single signal.
Why we use multiplexing?
1.Multiplexing reduces the number of physical connections or wireless channels to transmit
the multiple signals as it combines the signals and send it over a single transmission medium.
2.Reduces the cost of transmission services.
3.Bandwidth is utilized in effective manner.
Real world example of multiplexing are: Cable tv receives all the channels using a single
cable only because of multiplexing only.