Computer Networking

Published on March 2017 | Categories: Documents | Downloads: 52 | Comments: 0 | Views: 372
of 150
Download PDF   Embed   Report

Comments

Content

Computer networks

Subject code: EC2352
Year: III
Unit: I
Title: Introduction to computer networks
CODED BY: M.KASI RAJAN AP / CSE

Introduction to Computer Networks

Computer Networks
Computer network connects
two or more autonomous
computers.

The computers
geographically
anywhere.

can be
located

Introduction to Computer Networks

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)

Introduction to Computer Networks

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 processing (GRID Computing)

Introduction to Computer Networks

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.

Introduction to Computer Networks

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

Introduction to Computer Networks

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.

Introduction to Computer Networks

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.

Introduction to Computer Networks

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.

Introduction to Computer Networks

Network Components
Physical Media
Interconnecting Devices
Computers
Networking Software
Applications

Introduction to Computer Networks

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).

Introduction to Computer Networks

Networking Devices
HUB,
Switches,
Wireless
Access
Modems etc.

Routers,
Points,

Introduction to Computer Networks

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.

Introduction to Computer Networks

Networking Protocol: TCP/IP

Introduction to Computer Networks

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

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

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

OSI Architecture

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

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)

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

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

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

•Bit oriented Protocol(HDLC)
•Clock based Framing(SONET)

Byte oriented Protocol(PPP)
BISYNC FRAME FORMAT
SYH

SYH

SOH

Header

STX

ETX
Body

PPP Frame Format
Flag

Address

Control

Protocol

Payload

Flag

CRC

DDCMP Frame Format

SYN

SYN

Class

Count

Header

Body

CRC

Bit Oriented Protocol(HDLC)

• Collection of Bits
1.HDLC
High-Level Data Link Control
2.Closed Based Framing(SONET)
Synchronous Optical Network

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

Ending
sequence

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

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

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

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.

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.

Reliable Transmission
Deliver Frames Reliably
Accomplished by Acknowledgements and Timeouts
ARQ-Automatic Repeat Request

Mechanism:
Stop and Wait
Sliding Window
Concurrent Logical Channels

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 station’s 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

Acknowledgements & Timeouts
Sender

Receiver

Sender

Timeout

Timeout

Fram
e

ACK

ACK

Timeout

Fram
e

(a)

Sender

Receiver

Sender

Receiver

Fram
e
Timeout

Timeout

ACK

(c)

Fram
e

ACK

Fram
e

Timeout

Fram
e
Timeout

Time

Fram
e

Receiver

ACK

ACK

(b)

(d)

Stop & wait sequence numbers
Receiver

Sender

Receiver

Sender

Receiver

Timeout
imeout

Timeout
imeout

Timeout

Timeout
imeout

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

Stop And Wait

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.

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

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

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

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

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

IEEE 802.5 Format

Frame Format IEEE 802.5

IEEE 802.3 MAC Data Frame Format

Wireless
• The process by which the radio waves are propagated through air
and transmits data
• Wireless technologies are differentiated by :
• Protocol
• Connection type—Point-to-Point (P2P)
• Spectrum—Licensed or unlicensed

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.

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

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

Star Topology

Source Routing
0 Switch 1
3

0

1
2 Switch 2
2

3 0 1

3

3

1

1
2

1 3 0
0

Host A
0 1 3

1

0 Switch 3
3
2

Host B

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

3

2
5





Analogy: phone
call
Each switch
maintains a VC
table

3
11

2 Switch 2
1
0

Host A
7
1

0 Switch 3
3
4
2

Host B

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

3

2 Switch 2
1
0

Host A

Host G
1

0 Switch 3 Host B
3
2

Host H

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.

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.

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

B

C
Port 1
Bridge
Port 2

• Ethernet Switch = Bridge on Steroids

X

Y

Z

Spanning Tree Algorithm
• Problem: loops

A
B
B3
C

B5
D

B2

B7

E

K
F

B1
G

H

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

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

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

Thank U
CODED BY: M.KASI RAJAN AP / CSE

Computer networks

Subject code: EC2352
Year: III
Unit: II
Title: Introduction to network layers
CODED BY: M.KASI RAJAN AP / CSE

Internetworking
• An internetwork is a collection of individual networks, connected by
intermediate networking devices, that functions as a single large
network.
• different kinds of network technologies that can be interconnected
by routers and other networking devices to create an internetwork

Types
• Local-area networks (LANs)enabled multiple users in a relatively small
geographical area to exchange files and messages, as well as access
shared resources such as file servers and printers.
• Wide-area networks (WANs) interconnect LANs with geographically
dispersed users to create connectivity.
• technologies used for connecting LANs include T1, T3, ATM, ISDN,
ADSL, Frame Relay, radio links, and others.

ETH

IPV4 Packet Header
Version HLen

TOS

Ident
TTL

Protocol

Length
Flags
Offset
Checksum

SourceAddr
Destination Addr
Options(variable)

Pad(variable)
Data

Datagram Delivery

Packet Format

IPV4 Packet header

Fragmentation and Reassembly

Fragmentation and Reassembly

Fragmentation and Reassembly

(RARP)Reverse Address Resolution
Protocol
• (RARP) is a Link layer networking protocol
• RARP is described in internet EngineeringTask ForceETF) publication
RFC 903
• It has been rendered obsolete by the Bootstrap Protocol (BOOTP) and
the modern Dynamic Host Configuration Protocol(DHCP)
• BOOTP configuration server assigns an IP address to each client from a
pool of addresses.
• BOOTP uses the User Datagram Protocol (UDP)

Routing

Router
A router is a device that determines the next network point
to which a packet should be forwarded toward its
destination
Allow different networks to communicate with each other
A router creates and maintain a table of the available
routes and their conditions and uses this information to
determine the best route for a given packet.
A packet will travel through a number of network points
with routers before arriving at its destination.
There can be multiple routes defined. The route with a
lower weight/metric will be tried first.

Routing

Routing

Routing

Routing Protocols
Static Routing
Dynamic Routing
IGP (Interior Gateway Protocol): Route data within an Autonomous System
RIP (Routing Information Protocol)
RIP-2 (RIP Version 2)
OSPF (Open Shortest Path First)
IGRP (Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
IS-IS

EGP (Exterior Gateway Protocol): Route data between Autonomous
Systems
BGP (Border Gateway Protocol)

The Routing Algorithm
u

u

the shortest path tree is contained
in the routing table
Calculations are based on the
Bellman-Ford algorithm

Iskra Djonova-Popova

The Centralized Version of the
Algorithm
A

1

B

D

6
Cycle

A

C

2

B
4

3

4

3

1

2

5
D

E
Node

E

B

C

D

E

Initial

(., )

(., )

(., )

(., )

1

(1, 1)

(2, 2)

(3, 1)

(4, 2)

Iskra Djonova-Popova

C

The Distributed Version
A

Routing table for A

2

1

B

C

4

3

5
D

6

E

Example of simple network with 5 nodes (routers)
and 6 links (interfaces)
The cost of all links is assumed to be 1

Iskra Djonova-Popova

From A to
B
C
D
E

Link Cost
1
1
1
2
3
1
1
2

Advantages
•simple to implement
•low requirement in processing and memory
at the nodes
•suitable for small networks

Iskra Djonova-Popova

Disadvantages
•Slow convergence
•Bouncing effect
•Counting to infinity problem

Iskra Djonova-Popova

Slow Convergence
2
A

B

XXX

C

4

3

link 1 breaks
5

D

6

E

When a link breaks the routers are supposed to reestablish the routing tables

Iskra Djonova-Popova

The Bouncing Effect
1
A

B

C

XXX

4

3

5
D

6

E

link 2 breaks and A sends its routing
table to B before B sends it to A
Iskra Djonova-Popova

Counting to Infinity Problems
2
A

XXX

B

C

4

3

5
D

XXX

E

Links 1 and 6
break.

A sends its old routing table
before D sends the new routing table
Iskra Djonova-Popova

Subnets
• Each organization assigns IP addresses to
specific computers on its networks
• IP addresses are assigned so that all
computers on the same LAN have similar
addresses
• Each of these lans is known as a TCP/IP subnet
• Any portion of the IP address can be
designated as a subnet using a subnet mask*
* Subnet masks tell computers what part of an IP address is to be used to
determine whether a destination is on the same or a different subnet

Subnet Addressing

Figure 5-6

Subnet Addressing
Example 1
Suppose that the first two bytes are the subnet indicator with addresses
of the form 131.156.x.x
Then, 131.156.29.156 and 131.156.34.215 would be on the same
subnet.
The subnet mask would be 255.255.0.0, which corresponds to
11111111.11111111.00000000.00000000, where 1 indicates that
the position is part of the subnet address and a 0 indicates that it
is not.

Subnet Addressing
Example 2
Partial bytes can also be used as subnets.
For example, consider the subnet mask 255.255.255.128, which is
11111111.11111111.11111111.10000000.
Here, all computers with the same first three bytes and last byte from
128 to 254 would be on the same subnet.

Providing Addresses
•Providing addresses to networked
computers
– Static addressing
– Dynamic addressing

Static Addressing
• Each computer is given an address through a
configuration file
• Stored on individual computers
• Problems
– Moves, changes, adds and deletes
– Individuals could change their own IP address
– Network renumbered

• Companies do not have a good way of tracking
the addresses

Dynamic Addressing
• Server supplies a network layer address
automatically
– Each time user logs in
– For a specific lease period

• Two standards for dynamic addressing
– Bootstrap protocol (bootp) - developed in 1985
– Dynamic host control* protocol (DHCP), developed
in 1993
* some say C = configuration

Dynamic Addressing
•Bootp and DHCP
– Software installed on the client instructs the
client to contact the server using data link layer
addresses
– Message asks server to assign the client a
unique network layer address
– Server runs corresponding software that sends
the client its network address and subnet mask

Leasing
•Bootp or DHCP server can either:
– Assign the same network layer address to the
client each time the client requests it (bootp)
– Lease the network address from the next
available on a list of authorized addresses for
as long as the client is connected or for a
specified amount of time -- common with isps
and dial-up users (DHCP)

Address Resolution
•The process of:
– Translating an application layer address to a
network address (server name resolution)
– Translating the server name address to a data
link layer address (data link layer address
resolution)

Address Resolution
•Server name resolution
– Accomplished by the use of domain name
service (DNS)
– Computers called name servers provide these
DNS services
•Address data base includes: server names and their
corresponding IP address

Weber State University
DNS Response

DNS Request
Client
computer

DNS Server
sol.acs.unt.edu
137.90.2.122

LAN
DNS Request

DNS Response
Root DNS Server
for .EDU
domain

Internet
DNS Request

Northern Illinois University

DNS Server
netmgr.cso.niu.edu
131.156.1.11
LAN
DNS Response

Figure 5-7

Address Resolution
•Data link layer address resolution
– Broadcast message is sent to all computers in
its subnet
•“if your IP address is xxx.Yyy.Zzz.Ttt, please send
your data link layer address”
•Uses address resolution protocol (ARP)

Network Routing
•The process of determining the route a
message will take through the network
– Centralized
– Decentralized
•Static routing
•Dynamic routing
•Broadcast or multicast routing

– Connectionless
– Connection-oriented routing

Route and Route Table
C

B

G
A

F

D

E

Computer B
Destination
Route
A
C
D
E
F
G

A
C
A
E
E
C

Internet Routes
WSU

Canada
Other destinations

UEN

Asia

Europe
West Coast

WSU
Destination
Route
UEN
Utah
Oxford
Europe
U of Toronto
Canada
U of Singapore Asia
UC Stanford
West Coast
Other
Other

Types of Routing
•Centralized routing
•Static routing (decentralized)
•Dynamic routing (adaptive and
decentralized)
– Distance vector
– Link state

•Other types
– Broadcast routing
– Multicast routing

Centralized Routing
• All routing decisions are made by one computer
• Main routing for star and mesh topologies
• Routing tables located on each computer
– Central computer sends updated tables as needed
– Routing table tells the device where to send
messages

• Simplicity - no wasted resources
• Hardware failures or changing conditions cause
table to be out of sync

Decentralized Routing
• Each of the following types of routing fall under the
heading of decentralized routing
• Each device makes its own routing decisions with the use
of a formal routing protocol
• Routing protocols are self-adjusting
– Can automatically adapt to changes in the network configuration

• Drawbacks
– Slows down the network with status messages
– Requires more processing by each computer

Static Routing
•Routing table developed by the network
manager or some type of committee
– Initial table sent to each computer which then
updates the routing table as needed
– Reroutes as needed with down or removed
circuits
– Updated when new devices announce their
presence
– Used in relatively static networks that have few
routing options

Dynamic Routing (Adaptive)
• Routing messages over the fastest route
– Used when there are multiple routes in the
network
– Improves network performance by selecting the
fastest route to avoid bottlenecks or busy circuits
– Initial table developed by network manager
– Dynamically updated with changing conditions by
the devices themselves
– Monitors message transmission time or each
device reports how busy it is to avoid bottlenecks

• Disadvantages
– Requires more processing by each computer
– “Wastes” network capacity

Dynamic Routing (Adaptive)
• Distance vector dynamic routing
– The number of hops along a route
– Exchange information with the neighboring computers every few
minutes

• Link state dynamic routing
The number of hops along a route
The speed of the circuits on the route
How busy the route is
Exchanges information with other routing devices every 15-30
minutes
– Tries to determine the fastest route
– Converges reliable routing information more quickly





Routing Protocols
• RIP, IGP, OSPF, EGP, BGP
•Distance vector routing protocols (RIP,
Appletalk,IPX, IGRP)
– Routers inform neighboring routers of table
– Closest router is used to route packets

•Link State routing protocols (OSPF)
– Routers have at least a partial map of the network
– Changes are flooded throughout network
– Routes are recomputed

Interior and Exterior Routing
•Interior routing is within an autonomous
system (collection of routers under a single
administrative control)—RIP, OSPF
•Exterior routing occurs between autonomous
systems
•Network access protocols operate at Layer 2.
– Transport of IP datagrams
– IP over point-to-point connections is used by ISP
when you dial in

Routing Protocols
•Border Gateway Protocol
•Internet Control Message Protocol
•Routing Information Protocol
•Open Shortest Path First
•Enhanced Interior Gateway Routing
Protocol

Routing Protocols
• Internet protocols
– BGP (border gateway protocol)
•Exchanges information between autonomous systems
about the condition of the internet
•Complex, hard to administer, exterior routing protocol

– ICMP (internet control message protocol)
•Simple, interior routing protocol used with the internet
•Reports routing errors but is limited in the ability to
update

– RIP (routing information protocol)
•Dynamic distance vector interior routing protocol
•Counts the number of devices on each route
•Selects the route with the least number of devices

Routing Protocols
– OSPF (open shortest path first)
•Link state interior routing protocol used on the internet
•Counts number of computers, network traffic, network error
rates to select the best route
•Doesn’t broadcast to all devices just to routing devices
•Preferred TCP/IP, but also used by IPX/SPX

– EIGRP (enhanced interior gateway routing protocol)
•Link state interior routing protocol developed by CISCO
•Uses route transmission capacity, delay, reliability and load to
select best route
•Stores multiple routing tables

– SAP (service advertisement protocol)
•Netware servers send SAP advertisements
•Novell’s broadcast protocol

Broadcast Routing
•Sends the message to all computers on the
network
•Only computer with correct address
processes the message
•Used only in bus networks
•Wastes network bandwidth

Multicasting
– Similar to broadcasting
– Only works within one LAN or subnet
– Messages sent from one computer to another on the network
is called a unicast message
– Messages sent to a group of computers is called a multicast
message
– Targeting a specific work group
– IGMP (internet group management protocol)
• Sends an IGMP multicast request to the routing computer
• Assigned a special class D IP address to identify the group
• The routing computer sets the data link layer address
• All participating machines will process messages sent to this
address
• Sends a IGMP message notifying of end of session

Thank U
CODED BY: M.KASI RAJAN AP / CSE

Computer networks

Subject code: EC2352
Year: III
Unit: III
Title: Introduction to Transport layer
CODED BY: M.KASI RAJAN AP / CSE

TCP Overview

End to end issues

Segment format

Connection establishment

TCP sliding window

Stream control Transmission Protocol

Simple demultiplexor

TCP Congestion Control








Determines the network capacity
Adjust the number of packets that can have safely in transit
Acks to pace the transmission of packets
TCP is self clocking
Avoids congestion
Maxwindow=MIN(CongestionWindow,AdvertisedWindow)
EffectiveWindow=MaxWindow-(LastByteSent-LastByteAcked)

Caused By
• the shortage of buffer space.
• slow links.
• slow processors
• Possible solutions





End-to-end versus link-by-link control
Rate-Based versus Credit-Based control
The rate-based traffic-flow technique constantly
Integrated congestion control

• Integrated congestion control

Principles of Congestion Control
Congestion:
• informally: “too many sources sending too much data too fast
for network to handle”
• different from flow control!
• manifestations:
– lost packets (buffer overflow at routers)
– long delays (queueing in router buffers)
• a top-10 problem!

Scenario 1: Queuing Delays
Host A

• two senders, two
receivers
• one router, infinite
buffers
• no retransmission

Host B

lout

lin : original data

unlimited shared
output link buffers

• large delays when
congested
• maximum
achievable
throughput

Scenario 2: Retransmits
• one router, finite buffers
• sender retransmission of lost packet
Host A

Host B

lin : original
data
l'in : original data, plus
retransmitted data

finite shared output
link buffers

lout

Scenario 3: Congestion Near Receiver
• four senders
• multihop paths
• timeout/retransmit

Q: what happens as
and lincrease ?
in

Host A

lin : original data
l'in : original data, plus
retransmitted data

finite shared output
link buffers

Host B

lout

l

in

Approaches towards congestion control
Two broad approaches towards congestion control:
End-end congestion control:
• no explicit feedback from
network
• congestion inferred from endsystem observed loss, delay
• approach taken by TCP

Network-assisted congestion
control:
• routers provide feedback to end
systems
– single bit indicating
congestion (SNA, DECbit,
TCP/IP ECN, ATM)
– explicit rate sender should
send at

TCP Congestion Control
• end-end control (no network
assistance)
• sender limits transmission:
LastByteSent-LastByteAcked
 CongWin

• Roughly,
CongWin
Bytes/sec
• CongWin is dynamic,
RTT function of
rate =

perceived network congestion

How does sender perceive
congestion?
• loss event = timeout or 3
duplicate acks
• TCP sender reduces rate
(CongWin) after loss
event
three mechanisms:
– AIMD
– slow start
– conservative after timeout
events

TCP AIMD
multiplicative decrease: cut
CongWin in half after
loss event

additive increase: increase
CongWin by 1 MSS every
RTT in the absence of loss
events: probing

congestion
window
24 Kbytes

16 Kbytes

8 Kbytes

time

Long-lived TCP connection

TCP Slow Start
• When connection begins,
CongWin = 1 MSS
– Example: MSS = 500 bytes &
RTT = 200 msec
– initial rate = 20 kbps

• available bandwidth may be
>> MSS/RTT
– desirable to quickly ramp up
to respectable rate



When connection begins,
increase rate exponentially
fast until first loss event

TCP Slow Start (more)
Host A

Host B

RTT

• When connection begins,
increase rate exponentially until
first loss event:
– double CongWin every RTT
– done by incrementing
CongWin for every ACK
received
• Summary: initial rate is slow but
ramps up exponentially fast

time

Refinement (more)
Q: When should the
exponential increase
switch to linear?
A: When CongWin gets to
1/2 of its value before
timeout.

Implementation:
• Variable Threshold
• At loss event, Threshold is set to
1/2 of CongWin just before loss
event

TCP sender congestion control
Event

State

TCP Sender Action

Commentary

ACK receipt
for
previously
unacked
data

Slow Start
(SS)

CongWin = CongWin +
MSS,
If (CongWin > Threshold)
set state to “Congestion
Avoidance”

Resulting in a doubling
of CongWin every RTT

ACK receipt
for
previously
unacked
data

Congestio
n
Avoidance
(CA)

CongWin = CongWin+MSS
* (MSS/CongWin)

Additive increase,
resulting in increase of
CongWin by 1 MSS
every RTT

Loss event
detected by
triple
duplicate
ACK

SS or CA

Threshold = CongWin/2,
CongWin = Threshold,
Set state to “Congestion
Avoidance”

Fast recovery,
implementing
multiplicative decrease.
CongWin will not drop
below 1 MSS.

Timeout

SS or CA

Threshold = CongWin/2,
CongWin = 1 MSS,
Set state to “Slow Start”

Enter slow start

Duplicate
ACK

SS or CA

Increment duplicate ACK
count for segment being
acked

CongWin and Threshold
not changed

Congestion Avoidance Mechanisms
• Helps to avoid congestion
• Additional functionality into the router to assist in anticipation of
congestion
• to control congestion once it happens
• to repeatedly increase load in an effort to find the point at w
hich congestion occurs, and then back off

Mechanisms
• router-centric: DECbit and RED Gateways
• host-centric: TCP Vegas

DECbit



DECbit
• Add binary congestion bit to each packet header
• Router
– monitors average queue length over last busy+idle cycle
– set congestion bit if average queue length greater than 1 w
hen packet arrives
– attempts to balance throughput against delay


DECbit
• End Hosts
• destination echos bit back to source
• source records how many packets resulted in set bit
• if less than 50% of last window's worth had bit set, then increase C
ongestionWindow by 1 packet
• if 50% or more of last window's worth had bit set, then decrease C
ongestionWindow by 0.875 times

UDP—User Datagram Protocol
• An unreliable, connectionless transport layer protocol
• UDP format. See picture
• Two additional functions beyond IP:
– Demultiplexing: deliver to different upper layer entities such as
DNS, RTP, SNMP based on the destination port # in the header.
i.e., UDP can support multiple applications in the same end
systems.
– (Optionally) check the integrity of entire UDP. (recall IP only checks
the integrity of IP header.)
• If source does not want to compute checksum, fill checksum with all 0s.
• If compute checksum and the checksum happens to be 0s, then fill all 1s.
• UDP checksum computation is similar to IP checksum, with two more:
– Add extra 0s to entire datagram if not multiple of 16 bits.
– Add pseudoheader to the beginning of datagram. UDP pseudoheader

147

UDP datagram

0

16
Source Port

31
Destination Port

UDP Length

UDP Checksum
Data

Back to UDP—User Datagram Protocol
148

Figure 8.16

Back to UDP—User Datagram Protocol

UDP pseudoheader
0

8

16

31

Source IP Address
Destination IP Address
00000000

Protocol = 17

UDP Length

1.Pseudoheader is to ensure that the datagram has indeed
reached the correct destination host and port.
2. The padding of 0s and pseudoheader is only for the
computation of checksum and not be transmitted.

149

Figure 8.17

Thank U
CODED BY: M.KASI RAJAN AP / CSE

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close