Anda di halaman 1dari 63

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Computer networks
Name: K.SUDHA
Designation: Lecturer
Department: Electrical and Electronics Engineering
Subject code: CS2361
Year: III
Unit: I
Title: Introduction to computer networks

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Computer Networks
Computer network connects
two or more autonomous
computers.

The computers
geographically
anywhere.

can be
located
www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

LAN, MAN & WAN


Network in small geographical Area (Room, Building or a
Campus) is called LAN (Local Area Network)

Network in a City is call MAN (Metropolitan Area Network)

Network spread geographically (Country or across Globe) is


called WAN (Wide Area Network)

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Applications of Networks
Resource Sharing
Hardware (computing resources, disks, printers)
Software (application software)

Information Sharing
Easy accessibility from anywhere (files, databases)
Search Capability (WWW)
Communication
Email
Message broadcast
Remote computing
Distributed processingwww.chennaiuniversity.net
(GRID Computing)
Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Network Topology
The network topology
defines the way in which
computers, printers, and
other
devices
are
connected. A network
topology describes the
layout of the wire and
devices as well as the
paths used by data
transmissions.

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Bus Topology
Commonly referred to as a
linear bus, all the devices
on a bus topology are
connected by one single
cable.

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Star & Tree Topology


The star topology is the most
commonly used architecture in
Ethernet LANs.
When installed, the star topology
resembles spokes in a bicycle
wheel.
Larger networks use the extended
star topology also called tree
topology. When used with network
devices that filter frames or packets,
like bridges, switches, and routers,
this topology significantly reduces
the traffic on the wires by sending
packets only to the wires of the
destination host.
www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Ring Topology
A frame travels around the ring,
stopping at each node. If a node wants
to transmit data, it adds the data as
well as the destination address to the
frame.
The frame then continues around the
ring until it finds the destination node,
which takes the data out of the frame.

Single ring All the devices on the


network share a single cable
Dual ring The dual ring topology
allows data to be sent in both
directions.
www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Mesh Topology
The
mesh
topology
connects
all
devices
(nodes) to each other for
redundancy and fault
tolerance.
It is used in WANs to
interconnect LANs and for
mission critical networks
like those used by banks
and financial institutions.

Implementing the mesh


topology is expensive and
difficult.
www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Network Components
Physical Media

Interconnecting Devices
Computers
Networking Software

Applications

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Networking Media
Networking media can be
defined simply as the
means by which signals
(data) are sent from one
computer
to
another
(either by cable or wireless
means).

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Networking Devices
HUB,
Switches,
Wireless
Access
Modems etc.

Routers,
Points,

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Computers: Clients and Servers


In a client/server network
arrangement,
network
services are located in a
dedicated computer whose
only function is to respond
to the requests of clients.
The server contains the
file, print, application,
security, and other services
in a central computer that
is continuously available to
respond to client requests.

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Networking Protocol: TCP/IP

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

Introduction to Computer Networks


www.chennaiuniversity.net

Applications
E-mail
Searchable Data (Web Sites)
E-Commerce
News Groups
Internet Telephony (VoIP)
Video Conferencing
Chat Groups
Instant Messengers
Internet Radio

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Network Architecture
Provides a general, effective, fair, and robust connectivity of
computers
Provides a blueprint
Types
OSI Architecture
Internet Architecture

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

OSI ARCHITECTURE

Open Systems Interconnection (OSI) model is a reference model developed


by ISO (International Organization for Standardization) in 1984
OSI model defines the communications process into Layers
Provides a standards for communication in the
network

Primary architectural model for inter-computing and Inter networking


communications.
network communication protocols have a structure based on OSI Model

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

OSI Architecture

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Direct Links: Outline


Physical Layer
Link technologies
Encoding

Link Layer

Framing
Error Detection
Reliable Transmission (ARQ protocols)
Medium Access Control:

Existing protocols: Ethernet, Token Rings, Wireless

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Link Technologies
Cables:

Cat 5 twisted pair, 10-100Mbps, 100m


Thin-net coax, 10-100Mbps, 200m
Thick-net coax, 10-100Mbps, 500m
Fiber, 100Mbps-2.4Gbps, 2-40km

Leased Lines:
Copper based: T1 (1.544Mbps), T3 (44.736Mbps)
Optical fiber: STS-1 (51.84Mbps), STS-N (N*51.84Mbps)

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Link Technologies
Last-Mile Links:
POTS (56Kbps), ISDN (2*64Kbps)
xDSL: ADSL (16-640Kbps, 1.554-8.448Mbps), VDSL (12.96Mbps55.2Mbps)
CATV: 40Mbps downstream, 20Mbps upstream
Wireless Links: Cellular, Satellite, Wireless Local Loop

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

FRAMING
An efficient data transmission technique

It is a message forwarding system in which data packets, called


frames, are passed from one or many start-points to one

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Approaches
Byte oriented Protocol(PPP)
BISYNC
Binary Synchronous Communication
DDCMP
Digital Data Communication Message Protocol

Bit oriented Protocol(HDLC)


Clock based Framing(SONET)

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Byte oriented Protocol(PPP)


BISYNC FRAME FORMAT

SYH

SYH

SOH

Header

STX

Body

ETX

PPP Frame Format


Flag

Address

Control

Protocol

Payload

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Flag

CRC

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

DDCMP Frame Format

SYN

SYN

Class

Count

Header

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Body

CRC

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Bit Oriented Protocol(HDLC)

Collection of Bits
1.HDLC
High-Level Data Link Control

2.Closed Based Framing(SONET)


Synchronous Optical Network

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

HDLC Frame Format


Beginning
sequence

Header

Body

CRC

Bit Stufffing
After 5 consecutive 1s insert 0

Next bit is 0 stuffed removed


Next bit is 1 end of frame or erorr

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Ending
sequence

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Closed Based Framing(SONET)


STS-1 Frame
9 rows of 90 byte each
First 3 byte for overhead rest contains data
Payload bytes scrambled- exclusive OR
Supports Multiplexing
Payloads

9 rows

90 columuns
www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

ERROR DETECTION
Detecting Errors In Transmission
Electrical Interference, thermal noise
Approaches
Two Dimensional Parity
Internet Checksum Algorithm
Cyclic Redundancy Check

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Two Dimensional Parity


7 bits of data

8 bits including parity

Number of 1s

even

odd

0000000 (0)

00000000

100000000

1010001 (3)

11010001

01010001

1101001 (4)

01101001

11101001

1111111 (7)

11111111

01111111

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Transmission sent using even parity:


A wants to transmit: 1001
A computes parity bit value: 1^0^0^1 = 0

A adds parity bit and sends: 10010

B receives: 10010 B computes parity: 1^0^0^1^0 = 0


B reports correct transmission after observing expected even result.

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Transmission sent using odd parity:

A wants to transmit: 1001


A computes parity bit value: ~(1^0^0^1) = 1
A adds parity bit and sends: 10011
B receives: 10011
B computes overall parity: 1^0^0^1^1 = 1
B reports correct transmission after observing expected odd result.

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Reliable Transmission
Deliver Frames Reliably

Accomplished by Acknowledgements and Timeouts


ARQ-Automatic Repeat Request

Mechanism:
Stop and Wait

Sliding Window
Concurrent Logical Channels
www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Stop And Wait ARQ


The source station transmits a single frame and then waits for an
acknowledgement (ACK).
Data frames cannot be sent until the destination stations reply
arrives at the source station.

It discards the frame and sends a negative acknowledgement (NAK)


back to the sender
causes the source to retransmit the damaged frame in case of error

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Acknowledgements & Timeouts


Sender

Receiv er

Sender

Timeout

ACK

Timeout

Timeout

Fram
e

(a)

AC K
Fram
e

ACK

(c)

Timeout

Fram
e

Fram
e

Sender

Timeout

Receiv er

Timeout

Sender

Timeout

Time

Fram
e

Receiv er

Receiv er
Fram
e

ACK
Fram
e

AC K

AC K

(b)

www.chennaiuniversity.net (d)

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Stop & wait sequence numbers


Receiver

Sender

Receiver

Sender

Receiver

Timeout

Timeout

Timeout

Timeout

Sender

(c)

(d)

(e)

Simple sequence numbers enable the client to discard


duplicate copies of the same frame
Stop & wait allows one outstanding frame, requires two
distinct sequence numbers
www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Stop And Wait

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Sliding Window

bi-directional data transmission protocol used in the data link layer


(OSI model) as well as in TCP

It is used to keep a record of the frame sequences sent

respective acknowledgements received by both the users.

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Sliding Window: Sender

Assign sequence number to each frame (SeqNum)


Maintain three state variables:
send window size (SWS)
last acknowledgment received (LAR)
last frame sent (LFS)

Maintain invariant: LFS - LAR <= SWS


Advance LAR when ACK arrives
SWS
Buffer up to SWS frames

LAR

LFS

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Sequence Number Space

SeqNum field is finite; sequence numbers wrap around


Sequence number space must be larger then number of outstanding frames
SWS <= MaxSeqNum-1 is not sufficient

suppose 3-bit SeqNum field (0..7)


SWS=RWS=7
sender transmit frames 0..6
arrive successfully, but ACKs lost
sender retransmits 0..6
receiver expecting 7, 0..5, but receives the original incarnation of 0..5

SWS < (MaxSeqNum+1)/2 is correct rule


Intuitively, SeqNum slides between two halves of sequence number space

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Sliding Window: Receiver


Maintain three state variables

receive window size (RWS)


largest frame acceptable (LFA)
last frame received (LFR)
Maintain invariant: LFA - LFR
<= RWS
RWS

LFR

LFA

Frame SeqNum arrives:

if LFR < SeqNum < = LFA


accept
if SeqNum < = LFR or SeqNum > LFA
discarded
Send cumulative ACKs send ACK for largest frame such that all
frames less than this have been received

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Ehernet
local-area network (LAN) covered by the IEEE
802.3.
two modes of operation:
half-duplex
full-duplex modes.
.

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Three basic elements :


1. the physical medium used to carry Ethernet signals between
computers,
2. a set of medium access control rules embedded in each
Ethernet interface that allow multiple computers to fairly
arbitrate access to the shared Ethernet channel,
3. an Ethernet frame that consists of a standardized set of bits
used to carry data over the system

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

IEEE 802.5 Format

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Frame Format IEEE 802.5

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

IEEE 802.3 MAC Data Frame Format

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Wireless
The process by which the radio waves are propagated through air
and transmits data

Wireless technologies are differentiated by :


Protocol
Connection typePoint-to-Point (P2P)
SpectrumLicensed or unlicensed

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Types
Infrared Wireless Transmission

Tranmission of data signals using infrared-light


waves
Microwave Radio

sends data over long distances (regions, states,


countries) at up to 2 megabits per second (AM/FM
Radio)
Communications Satellites
microwave relay stations in orbit around the earth.

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

UNIT III Packet Switching

Is a network communications method


Groups all transmitted data, irrespective of content, type, or structure
into suitably-sized blocks, called packets.
Optimize utilization of available link capacity
Increase the robustness of communication.
When traversing network adapters, switches and other network nodes
packets are buffered and queued, resulting in variable delay and
throughput, depending on the traffic

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Types
Connectionless
each packet is labeled with a connection ID rather than
an address.
Example:Datagram packet switching

connection-oriented
each packet is labeled with a destination address
Example:X.25 vs. Frame Relay

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Star Topology

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Source Routing
0 Switch 1
3

1
2 Switch 2
2

3 0 1

1
2

1 3 0
0

Host A
0 1 3

0 Switch 3
3
2

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Host B

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Virtual Circuit Switching


Explicit connection setup (and tear-down) phase
Subsequence packets follow same circuit
Sometimes called connection-oriented model
0 Switch 1
1

2
5

Analogy: phone
call

3
11

2 Switch 2
1

Host A

Each switch
maintains a VC
table

0 Switch 3
3
4
2

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Host B

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Datagram Switching
No connection setup phase
Each packet forwarded independently
Sometimes called connectionless
model
Host D

Analogy: postal
system
Each switch
maintains a
forwarding
(routing) table

3
Host C

Host E

0 Switch 1
1
2

Host F

2 Switch 2
1
0

Host A

Host G
1

0 Switch 3 Host B
3

Host H

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Virtual Circuit Model


Typically wait full RTT for connection setup before sending first
data packet.
While the connection request contains the full address for
destination
each data packet contains only a small identifier, making the
per-packet header overhead small.

If a switch or a link in a connection fails, the connection is


broken and a new one needs to be established.
Connection setup provides an opportunity to reserve resources.
www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Datagram Model
There is no round trip delay waiting for connection setup; a
host can send data as soon as it is ready.
Source host has no way of knowing if the network is capable of
delivering a packet or if the destination host is even up.
Since packets are treated independently, it is possible to route
around link and node failures.

Since every packet must carry the full address of the


destination, the overhead per packet is higher than for the
connection-oriented model.

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Bridges and Extended LANs


LANs have physical limitations (e.g., 2500m)
Connect two or more LANs with a bridge
accept and forward strategy
level 2 connection (does not add packet header)
A

C
Port 1
Bridge
Port 2

Ethernet Switch = Bridge on Steroids

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Spanning Tree Algorithm


Problem: loops

B
B3
C

B5

B2

B7

K
F

B1
G

B6

B4

I
J

Bridges run a distributed spanning tree algorithm


select which bridges actively forward
developed by Radia Perlman
now IEEE 802.1 specification

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Algorithm Details
Bridges exchange configuration messages
id for bridge sending the message
id for what the sending bridge believes to be root bridge
distance (hops) from sending bridge to root bridge
Each bridge records current best configuration message for
each port
Initially, each bridge believes it is the root

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Algorithm Details
Bridges exchange configuration messages
id for bridge sending the message
id for what the sending bridge believes to be root bridge
distance (hops) from sending bridge to root bridge
Each bridge records current best configuration message for
each port
Initially, each bridge believes it is the root

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Find study materials,Notes,Ebooks online @

www.chennaiuniversity.net

Thank u

www.chennaiuniversity.net

Find study materials,Notes,Ebooks online !

Anda mungkin juga menyukai