You are on page 1of 81

Computer Network

Md. Kawsar Ahmed


Lecturer
Dept. of CSE, RPSU.
Recommended BOOKS
Text
 Computer Networks, Tanenbaum; Wetherall, 5th edition, Pearson

References

 Computer Networks A top-down approach, Forouzan; Firouz Mosharraf,


Mc GrawHill.

 Computer Networking A top down approach, Kurose; Ross, Pearson

Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, © Pearson Education-Prentice Hall, 2011
Computer
A computer networkNetworks
is a system that connects two or more
computing devices for transmitting and sharing information.
Computing devices include everything from a mobile phone to
a server. These devices are connected using physical wires such
as fiber optics, but they can also be wireless.

The old model of a single computer serving all of the


organizational (computer center) needs has been replaced by
one in which a large number of separate (autonomous) but
interconnected computers do the job. These systems are called
computer networks.

Networks come in many sizes, shapes and forms. They are


usually connected together to make large networks called
Internet- network of the networks.
Key Components of a Computer Network
Network Devices
Network devices or nodes are computing devices that need to be linked in
the network. Some network devices include:
• Computers, mobiles, and other consumer devices: These are end devices that
users directly and frequently access. For example, an email originates from the
mailing application on a laptop or mobile phone.
• Servers: These are application or storage servers where the main computation
and data storage occur. All requests for specific tasks or data come to the
servers.
• Routers: Routing is the process of selecting the network path through which
the data packets traverse. Routers are devices that forward these packets
between networks to ultimately reach the destination. They add efficiency to
large networks.
• Switches: Repeaters are to networks what transformers are to electricity grids
—they are electronic devices that receive network signals and clean or
strengthen them.
• Gateways: Gateways are hardware devices that act as ‘gates’ between two
distinct networks. They can be firewalls, routers, or servers.
Links
Links are the transmission media which can be of two types:
• Wired: Examples of wired technologies used in networks include
coaxial cables, phone lines, twisted-pair cabling, and optical fibers.
Optical fibers carry pulses of light to represent data.
• Wireless: Network connections can also be established through radio
or other electromagnetic signals. This kind of transmission is called
‘wireless’. The most common examples of wireless links include
communication satellites, cellular networks, and radio and
technology spread spectrums. Wireless LANs use spectrum
technology to establish connections within a small area.
Communication protocols
A communication protocol is a set of rules followed by all
nodes involved in the information transfer. Some common
protocols include the internet protocol suite (TCP/IP), IEEE
802, Ethernet, wireless LAN, and cellular standards.
Network Defense
While nodes, links, and protocols form the foundation of a
network, a modern network cannot exist without its defenses.
Security is critical when unprecedented amounts of data are
generated, moved, and processed across networks. A few
examples of network defense tools include firewall, intrusion
detection systems (IDS), intrusion prevention systems (IPS),
network access control (NAC), content filters, proxy servers,
anti-DDoS devices, and load balancers.
Internet structure: network of networks

A Tier 1 network is an Internet Protocol network that can reach every other
network on the Internet solely via settlement-free interconnection. Tier 1
networks can exchange traffic with other Tier 1 networks without paying any
fees for the exchange of traffic in either direction.
Tier 1 ISPs own and manage their operating infrastructure, including the routers
and other intermediate devices (e.g., switches) that make up the Internet
backbone. Key Tier 1 ISPs include AT&T, Verizon, Sprint, NTT, Singtel, PCCW,
Telstra, Deutsche Telekom and British Telecom.
Tier-1 providers
interconnect (peer) Tier 1 ISP
privately

Tier 1 ISP Tier 1 ISP


Internet structure: network of networks

A Tier 2 ISP is a service provider that utilizes a combination of paid transit


via Tier 1 ISPs and peering with other Tier 2 ISPs to deliver Internet traffic
to end customers through Tier 3 ISPs. Tier 2 ISPs are typically regional or
national providers.
Tier-2 ISPs
also peer
Tier-2 ISP pays tier-1 ISP Tier-2 ISP Tier-2 ISP privately with
for connectivity to rest of
Internet Tier 1 ISP each other.

Tier-2 ISP is customer of


tier-1 provider
Tier 1 ISP Tier 1 ISP Tier-2 ISP

Tier-2 ISP Tier-2 ISP


The Internet today

Peering
point Peering
point
Uses of Computer Networks

• Business Applications
• Home Applications
• Mobile Users
• Social Issues
Business Applications (1)
 Resource sharing
 Powerful communication medium-
e-mail, Telephone calls by comp networks(VoIP), Desktop sharing
 Business electronically (e-commerce)

For office information sharing

A network with two clients and one server


Business Applications (2)

For office information sharing

The client-server model involves requests and replies


Home Applications (1)

In a peer-to-peer system there are no fixed clients and servers.


Home Applications (2)

Some forms of e-commerce


Mobile Users

Combinations of wireless networks and mobile computing


Social Issues

• Network neutrality
• Digital Millennium Copyright Act
• Profiling users
• Phishing
Network Hardware (1)
Transmission technology- Broadcast links and Point-to-point links
Point-to-point links- 1 sender 1 receiver---- unicasting
Broadcast network- communication channel is shared by all machine on the
network, packets sent by any machine are received by all others. Wireless network
Multicast- subset of machines.

• Personal area networks


• Local area networks
• Metropolitan area networks
• Wide are networks
• The internet
Network Hardware (2)

Classification of interconnected processors by scale.


Personal Area Network

Bluetooth PAN configuration


Local Area Networks
Wireless LAN
Access Point(AP)/Wireless Wired LAN- better than Wireless LAN
router/Base station. Standard- Standard- IEEE802.3
IEEE 802.11(WiFi)

Wireless and wired LANs. (a) 802.11. (b) Switched Ethernet.


Metropolitan Area Networks

A metropolitan area network based on cable TV.


Wide Area Networks (1)

WAN that connects three branch offices in Australia


Wide Area Networks (2)

WAN using a virtual private network.


Wide Area Networks (3)

WAN using an ISP network.


Network Software
• Protocol hierarchies
• Design issues for the layers
• Connection-oriented versus connectionless
service
• Service primitives
• Relationship of services to protocols
Protocol Hierarchies (1)

Layers, protocols, and interfaces.


Protocol Hierarchies (3)

Example information flow supporting virtual


communication in layer 5.
OSI and TCP/IP Reference Models
The OSI model is shown in Figure below. The model is called the
ISO OSI (Open Systems Interconnection) Reference Model
because it deals with connecting open systems—that is, systems that
are open for communication with other systems. The OSI model has
seven layers.

30
The OSI Reference Model

End
to
End

Hop
To
Hop

The OSI reference model


The Physical Layer

32
The Physical Layer
The physical layer is concerned with transmitting raw bits over a
communication channel.
The design issues have to do with making sure that when one side
sends a 1 bit it is received by the other side as a 1 bit, not as a 0 bit.
Typical questions here are what electrical signals should be used to
represent a 1 and a 0, how many nanoseconds a bit lasts, whether
transmission may proceed simultaneously in both directions, how
the initial connection is established, how it is torn down when both
sides are finished, how many pins the network connector has, and
what each pin is used for.
These design issues largely deal with mechanical, electrical, and
timing interfaces, as well as the physical transmission medium,
which lies below the physical layer.

33
The Data Link Layer

34
The Data Link Layer
Responsibilities of the data link layer include the following:

Framing. The data link layer divides the stream of bits received
from the network layer into manageable data units called frames.

Physical addressing: If frames are to be distributed to different


systems on the network, the data link layer adds a header to the
frame to define the sender and/or receiver of the frame. If the frame
is intended for a system outside the sender's network, the receiver
address is the address of the device that connects the network to the
next one.

Flow control: If the rate at which the data are absorbed by the
receiver is less than the rate at which data are produced in the sender,
the data link layer imposes a flow control mechanism to avoid
overwhelming the receiver. 35
The Data Link Layer

Error control. The data link layer adds reliability to the physical layer
by adding mechanisms to detect and retransmit damaged or lost
frames. It also uses a mechanism to recognize duplicate frames. Error
control is normally achieved through a trailer added to the end of the
frame.

Access control. When two or more devices are connected to the same
link, data link layer protocols are necessary to determine which device
has control over the link at any given time.

36
The Data Link Layer

37
The Network Layer
The network layer controls the operation of the subnet. A key
design issue is determining how packets are routed from source to
destination.
If too many packets are present in the subnet at the same time, they
will get in one another’s way, forming bottlenecks. Handling
congestion is also a responsibility of the network layer, in
conjunction with higher layers that adapt the load they place on the
network.

38
The Network Layer

39
The Transport Layer

The transport layer is responsible for process-to-process delivery of


the entire message. A process is an application program running on
a host. Whereas the network layer oversees source-to-destination
delivery of individual packets, it does not recognize any relationship
between those packets. It treats each one independently, as though
each piece belonged to a separate message, whether or not it does.
The transport layer, on the other hand, ensures that the whole
message arrives intact and in order, overseeing both error control
and flow control at the source-to-destination level.

40
The Transport Layer

41
Reliable process-to-process delivery of a message

42
The Transport Layer
Other responsibilities of the transport layer include the following:

Service-point addressing. Computers often run several programs at the same time.
For this reason, source-to-destination delivery means delivery not only from one
computer to the next but also from a specific process (running program) on one
computer to a specific process (running program) on the other. The transport layer
header must therefore include a type of address called a service-point address (or
port address). The network layer gets each packet to the correct computer; the
transport layer gets the entire message to the correct process on that computer.

Segmentation and reassembly. A message is divided into transmittable segments,


with each segment containing a sequence number. These numbers enable the
transport layer to reassemble the message correctly upon arriving at the destination
and to identify and replace packets that were lost in transmission.

43
The Transport Layer
Connection control. The transport layer can be either connectionless or connection
oriented. A connectionless transport layer treats each segment as an independent
packet and delivers it to the transport layer at the destination machine. A connection
oriented transport layer makes a connection with the transport layer at the
destination machine first before delivering the packets. After all the data are
transferred, the connection is terminated.
Flow control. Like the data link layer, the transport layer is responsible for flow
control. However, flow control at this layer is performed end to end rather than
across a single link.
Error control. Like the data link layer, the transport layer is responsible for error
control. However, error control at this layer is performed process-to-process rather
than across a single link. The sending transport layer makes sure that the entire
message arrives at the receiving transport layer without error (damage, loss, or
duplication).

44
The Session Layer
The session layer allows users on different machines to establish sessions between
them. Sessions offer various services, including dialog control (keeping track of
whose turn it is to transmit) and synchronization (check pointing long
transmissions to allow them to pick up from where they left off in the event of a
crash and subsequent recovery).

45
The Session Layer

Dialog control. The session layer allows two systems to enter into a dialog. It
allows the communication between two processes to take place in either half
duplex (one way at a time) or full-duplex (two ways at a time) mode.
Synchronization. The session layer allows a process to add checkpoints, or
synchronization points, to a stream of data. For example, if a system is sending a
file of 2000 pages, it is advisable to insert checkpoints after every 100 pages to
ensure that each 100-page unit is received and acknowledged independently. In
this case, if a crash happens during the transmission of page 523, the only pages
that need to be resent after system recovery are pages 501 to 600. Pages previous
to 501 need not be resent.

46
The Presentation Layer
Unlike the lower layers, which are mostly concerned with moving bits around, the
presentation layer is concerned with the syntax and semantics of the information
transmitted.

Specific responsibilities of the presentation layer include the following:


Translation. The processes (running programs) in two systems are usually
exchanging information in the form of character strings, numbers, and so on. The
information must be changed to bit streams before being transmitted. Because
different computers use different encoding systems, the presentation layer is
responsible for interoperability between these different encoding methods. The
presentation layer at the sender changes the information from its sender-dependent
format into a common format. The presentation layer at the receiving machine
changes the common format into its receiver-dependent format.

47
The Presentation Layer
Encryption. To carry sensitive information, a system must be able to ensure
privacy. Encryption means that the sender transforms the original information to
another form and sends the resulting message out over the network. Decryption
reverses the original process to transform the message back to its original form.

Compression. Data compression reduces the number of bits contained in the


information. Data compression becomes particularly important in the transmission
of multimedia such as text, audio, and video.

48
The Application Layer

The application layer enables the user, whether human or software,


to access the network. It provides user interfaces and support for
services such as electronic mail, remote file access and transfer,
shared database management, and other types of distributed
information services.

49
The Layers

50
TCP/IP PROTOCOL SUITE
The layers in the TCP/IP protocol suite do not exactly match those in the OSI
model. The original TCP/IP protocol suite was defined as having four layers: host-
to-network, internet, transport, and application. However, when TCP/IP is
compared to OSI, we can say that the TCP/IP protocol suite is made of five layers:
physical, data link, network, transport, and application

51
TCP/IP PROTOCOL SUITE

52
Physical layer and Data Link layer

At the physical and data link layers, TCPIIP does not define any
specific protocol. It supports all the standard and proprietary
protocols. A network in a TCPIIP internetwork can be a local-area
network or a wide-area network.

53
Network layer
The internet layer is the linchpin that holds the whole architecture together. Its
job is to permit hosts to inject packets into any network and have them travel
independently to the destination (potentially on a different network). They may
even arrive in a completely 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), plus a companion protocol called ICMP (Internet Control
Message Protocol) that helps it function. The job of the internet layer is to deliver
IP packets where they are supposed to go. Packet routing is clearly a major issue
here, as is congestion (though IP has not proven effective at avoiding congestion).

54
Transport layer
The layer above the internet layer in the TCP/IP model is called the transport
layer. It is designed to allow peer entities on the source and destination hosts to
carry on a conversation, just as in the OSI transport layer.

Two end-to-end transport protocols have been defined here. The first one, TCP
(Transmission Control Protocol), is a reliable connection-oriented protocol that
allows a byte stream originating on one machine to be delivered without error on
any other machine in the internet. It segments the incoming byte stream into
discrete messages and passes each one on to the internet layer. At the destination,
the receiving TCP process reassembles the received messages into the output
stream. TCP also handles flow control to make sure a fast sender cannot swamp a
slow receiver with more messages than it can handle.

55
Transport layer Cont.

The second protocol in this layer, UDP (User Datagram Protocol), is unreliable,
connectionless protocols for applications that do not want TCP’s sequencing or
flow control and wish to provide their own. It is also widely used for one-shot,
client-server-type request-reply queries and applications in which prompt delivery
is more important than accurate delivery, such as transmitting speech or video.

56
Application layer Cont.
The TCP/IP model does not have session or presentation layers. No need for them
was perceived. Instead, applications simply include any session and presentation
functions that they require. Experience with the OSI model has proven this view
correct: these layers are of little use to most applications.

On top of the transport layer is the application layer. It contains all the higher-
level protocols. The early ones included virtual terminal (TELNET), file transfer
(FTP), and electronic mail (SMTP). Many other protocols have been added to these
over the years. Some important ones include the Domain Name System (DNS), for
mapping host names onto their network addresses, HTTP, the protocol for fetching
pages on the World Wide Web, and RTP, the protocol for delivering real-time media
such as voice or movies.

57
Connection-Oriented Versus Connectionless Service

Ethernet does not provide reliable communication.


Connection-Oriented Versus Connectionless Service
Service Primitives (1)
A Service is formally specified by a set of primitives (operations) available to user
processes to access the service.
These primitives tell the service to perform some action or report on an action taken
by a peer entity.

Six service primitives that provide a simple


connection-oriented service
Service Primitives (2)

A simple client-server interaction using


acknowledged datagrams.
The Relationship of Services to Protocols
A Service is a set of primitives that a layer provides to the layer above it (on
behalf of user). But it says nothing at all about how these operations are
implemented. A service relates to an interface between two layers

Entities use protocols to implement their service definitions. Protocols relates


to the packets sent between peer entities on different machines.

A service is like an object in oop, protocols relates to the


implementation.
Service Primitives
Each protocol which communicates in a layered architecture (e.g. based on
the OSI Reference Model) communicates in a peer-to-peer manner with its
remote protocol entity. Communication between adjacent protocol layers (i.e.
within the same communications node) are managed by calling functions,
called primitives, between the layers. There are various types of actions that
may be performed by primitives. Examples of primitives include: Connect ,
Data, Flow Control, and Disconnect.

Primitives for communications between peer protocol entities


Why layering/Principles of protocol layering?
 1st principle dictates that if we want bidirectional communication, we
need to make each layer so that it is able to perform two opposite
tasks, one in each direction. Say 3rd layer task is to listen (in one
direction) and talk (in other direction).
 2nd principle, two objects under each layer at both sites should be
identical.

Dealing with complex systems:


explicit structure allows identification, relationship of complex
system’s pieces
 layered reference model for discussion
modularization eases maintenance, updating of system
 change of implementation of layer’s service transparent to rest of
system
 e.g., change in gate procedure doesn’t affect rest of system
layering considered harmful?
Logical connection between layers of the TCP/IP protocol suite

source host---------------- LAN1-------- Router--------LAN2-----------Destination host


Communication through an internet
Logical connections between layers in TCP/IP

Logical connections
Identical objects in the TCP/IP protocol suite

Identical objects (messages)

Identical objects (segment or user datagram)

Identical objects (datagram) Identical objects (datagram)

Identical objects (frame) Identical objects (frame)

Identical objects (bits) Identical objects (bits)


Encapsulation / Decapsulation
Addressing in the TCP/IP protocol suite

Packet
Multiplexing and demultiplexing
Internet protocol stack

 application: supporting network


applications application
 FTP, SMTP, HTTP
 transport: process-process data transfer transport
 TCP, UDP
 network: routing of datagrams from network
source to destination
 IP, routing protocols link
 link: data transfer between neighboring
network elements physical
 PPP, Ethernet
 physical: bits “on the wire”
ISO/OSI reference model

 presentation: allow applications to


interpret meaning of data, e.g., application
encryption, compression, machine-
presentation
specific conventions
 session: synchronization, session
checkpointing, recovery of data transport
exchange
network
 Internet stack “missing” these layers!
link physical
 these services, if needed, must be
implemented in application
 needed?
The TCP/IP Reference Model (2)

The TCP/IP reference model with some protocols we will study


The Model Used in this Book

The reference model used in this book.


Comparison of the OSI and
TCP/IP Reference Models

Concepts central to OSI model


• Services
• Interfaces
• Protocols
Critique of the OSI Model and Protocols

• Bad timing.
• Bad technology.
• Bad implementations.
• Bad politics.
Network Standardization

• Who’s Who in telecommunications


• Who’s Who in international standards
• Who’s Who in internet standards
Who’s Who in International Standards (1)

The 802 working groups. The important ones are marked with *.
The ones marked with  are hibernating. The one marked with †
gave up and disbanded itself.
Who’s Who in International Standards (2)

The 802 working groups. The important ones are marked with *.
The ones marked with  are hibernating. The one marked with †
gave up and disbanded itself.
Baseband vs Broadband Transmission

Broadband Transmission is a transmission


Baseband Transmission is a transmission
technique that many signals with multiple
technique that one signal requires the entire
frequencies transmit data through a single
bandwidth of the channel to send data.
channel simultaneously.

Type of Signals
Uses digital signals Uses analog signals
Number of Signals
Sends one signal at a time Sends multiple signals simultaneously
Signal Range
Signals travel a long distance without much
Signals travel a short distance
attenuation
Transmission Type
Bidirectional Unidirectional
Multiplexing
Uses Time Division Multiplexing Uses Frequency Division Multiplexing
Examples
Cable TV, Wi-Fi, and Power Line
Ethernet is an example
communication are some examples

You might also like