Download Lecture 5 - Lyle School of Engineering

Document related concepts

SIP extensions for the IP Multimedia Subsystem wikipedia , lookup

CAN bus wikipedia , lookup

Net neutrality law wikipedia , lookup

Backpressure routing wikipedia , lookup

Distributed firewall wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Peering wikipedia , lookup

AppleTalk wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

Internet protocol suite wikipedia , lookup

Network tap wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

TCP congestion control wikipedia , lookup

Net bias wikipedia , lookup

Serial digital interface wikipedia , lookup

Airborne Networking wikipedia , lookup

Computer network wikipedia , lookup

RapidIO wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Deep packet inspection wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Wake-on-LAN wikipedia , lookup

IEEE 1355 wikipedia , lookup

Routing wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Transcript
Spring 2006
EE 5304/EETS 7304 Internet Protocols
Lecture 5
Routing protocols
Tom Oh
Dept of Electrical Engineering
[email protected]
TO 2-14-06 p. 1
Administrative Issues
 Here are some useful books for learning OPNET.

Computer Networks – A Systems Approach--Third Edition
by Larry L. Peterson & Bruce S. Davie
•

TO 2-14-06 p. 2
Network Simulation Experiments Manual (The Morgan
Kaufmann Series in Networking) by Emad Aboelela
Modeling and Simulating Communications Networks: A
Hands-on Approach Using OPNET (Textbook Binding) by
Irene Katzela
Administrative Issues (cont)

Data and Computer Communications, Seventh Edition
Computer Networking with Internet Protocols, Fourth
Edition
by William Stalling
•
Data and Computer Communications and Computer
Networking with internet Protocols and Technology: Opnet
Lab Manual to Accompany the seventh edition and fourth
edition (Paperback)
 I have posted the second homework solution today.
TO 2-14-06 p. 3
Outline
 Distance-vector routing

(Comer: Pg. 213-215)
Examples: RIP( Comer: Pg. 408-410), IGRP
 Link-state routing( Comer: Pg. 216)

TO 2-14-06 p. 4
Example: OSPF (Comer: Pg. 410-412), IS-IS
Distance-Vector Routing
Packet to
dest. X
Neighbor
router B
Dest. X
Should router
A forward packet
to neighbor B
or C?
Neighbor
router C
TO 2-14-06 p. 5
Distance-Vector Routing (cont)
Packet to
dest. X
Neighbor
router B
4
5
Dest. X
Choose router
B because
5+4 < 2+9
2
9
Neighbor
router C
Bellman-Ford’s idea: if routers B and C know their least-cost routes to X, then
router A’s least-cost choice is the neighbor offering the least-cost route to X
TO 2-14-06 p. 6
Distance-Vector Routing (cont)
Router B
advertises part of
its routing table
Packet to
dest. X
Dest.
Next hop
Cost
X
router F
4
Y
router G
8
Z
router H
5
4
5
Dest. X
How does router A
learn that router B
2
has route with
cost 4?
9
Neighbor
router C
TO 2-14-06 p. 7
Distance-Vector Routing (cont)
How does router B
set up its routing
table?
Packet to
dest. X
From routing
advertisements
from its neighbors
4
5
Dest. X
Dest.
Next hop
Cost
X
router B
9
Y
router B
13
Z
router C
15
Router A’s
routing table
TO 2-14-06 p. 8
2
9
Neighbor
router C
Distance-Vector Routing (cont)
Packet to
dest. X
Originally router X
advertised cost of
0 to itself...
Dest. X
5
2
Neighbor
router C
TO 2-14-06 p. 9
Distance-Vector Routing (cont)
Packet to
dest. X
...Until all routers
learn their leastcost routes to X
Each neighbor updates
its routing table, then
advertises its cost, and
so on...
Dest. X
5
2
Neighbor
router C
TO 2-14-06 p. 10
Distance-Vector Routing (cont)
Basic operation
Dest.
Next hop
Cost
Dest.
Next hop
Cost
X
:
:
X
:
:
Y
:
:
Y
:
:
Z
:
:
Z
:
:
Routers take turns to
advertise their vectors of
reachable destinations
and costs...
TO 2-14-06 p. 11
...Routers update their
routing tables from
advertisements received
from neighbors
Example
Advertisement from neighbor J
Existing routing table at router K
Destination
Net 1
Net 2
Net 4
Net 17
Net 24
Net 30
Net 42
Distance
0
0
8
5
6
2
2
Route
direct
direct
router L
router M
router J
router Q
router J
Destination
Net 1
Net 4
Net 17
Net 21
Net 24
Net 30
Net 42
Updated routing table at router K
Destination
Net 1
Net 2
Net 4
Net 17
Net 21
Net 24
Net 30
Net 42
TO 2-14-06 p. 12
Distance
0
0
4
5
5
6
2
4
Route
direct
direct
router J
router M
router J
router J
router Q
router J
Distance
2
3
6
4
5
10
3
Changes
routing
table
for K
Vector-Distance Routing Protocol: RIP
 Early interior gateway protocol [RFC 1058]
 Each router maintains a table where each
destination address is represented by a pair (i,j)


TO 2-14-06 p. 13
i = next hop (node) along shortest route to that destination
j = distance (number of hops) to that destination going
through node i
RIP (cont)
 Each router broadcasts its routing table of
destinations and distances to its neighbors every
30 sec ("vector-distance" refers to these vectors of
distances)
 Each router updates its routing table after receiving
updates from its neighbors

TO 2-14-06 p. 14
If a shorter route to a destination is found, that entry in
routing table will be updated
RIP (cont)
 Advantage is simplicity: routers need to talk only to
neighbors:
 Disadvantages:


TO 2-14-06 p. 15
Eventually changes are propagated through network but
convergence could be slow
Problem of inconsistency because each router is trusting
the information advertised by its neighbor, which is relying
on their neighbors, and so on
”Count to infinity" problem
Network A
Network A
link
failure
TO 2-14-06 p. 16
distance
d=1
distance
d=2
Router
1
Router
2
distance
d=1
distance
d=2
Router
1
Router
2
updates to
d=3
Network A
Router
1
advertises
d=3
Network A
TO 2-14-06 p. 17
Router
1
advertises
d=2
Router
2
updates to
d=4
Router
2
RIP (cont)
 Also not scalable to larger networks:


TO 2-14-06 p. 18
More routers → longer to propagate changes through
network
Each update message (vectors) becomes longer because
more destinations in larger networks
RIP Message Format
4 bytes
command
version
all zero
family of network 1
all zero
address of network 1
distance to network 1
family of network 2
all zero
address of network 2
distance to network 2
:
TO 2-14-06 p. 19
distance
vectors
RIP Message Format (cont)
 Command (1 byte): eg, request for information,
response to request
 Version (1 byte): 1 (a new version 2, RIP-2 [RFC
1723] is the same protocol but fills in the zero-fields
of the version 1 message with additional
information)
 Family of network (2 bytes): identifies protocol
family related to address format, eg, 2 for IP
addresses
 Address of network (4 bytes): each destination
address
 Distance to network (4 bytes): integer distance in
number of hops (max 15 to prevent routing loops)
TO 2-14-06 p. 20
Vector-Distance Routing Protocol: IGRP
 Interior Gateway Routing Protocol developed by
Cisco in mid-1980s (after RIP)

RIP limited hop counts to 15 → limited network size

RIP uses simple hop count
 IGRP uses composite metric calculated by
factoring weighted values for delay, bandwidth,
reliability, load

Network administrators can adjust weights
 Multipath routing is allowed

TO 2-14-06 p. 21
Single traffic stream can be split among multiple paths by
round robin
Enhanced IGRP
 Enhanced IGRP (EIGRP) evolved from IGRP
 Integrates capabilities of link-state routing with
distance-vector routing
 Partial updates (when route metrics change)
instead of periodic updates
 Supports multiple network protocols (IP, Appletalk,
Novell NetWare,...)
 Capabilities for routers to detect routing loops and
find alternate routes without waiting for updates
from other routers
TO 2-14-06 p. 22
Link-State Routing
 Link-state routing is also known as link-status
routing or shortest path routing
 Each router maintains a complete view of network
topology (graph)


Graph is constructed from “link-state advertisements”
broadcast by routers to all other routers
Updates consists of status of router’s links
 Whenever router receives an update, it modifies its
graph and recomputes least-cost paths by
Dijkstra’s algorithm
TO 2-14-06 p. 23
OSPF (cont)
 Advantages:



Routing decisions should be consistent among all routers
Each router performs its own computations on same
network map, therefore is not dependent on
trustworthiness of neighbor’s data
Changes are propagated faster than distance-vector
routing
 Disadvantage: flooding of link-state advertisements
increases with size of network, but ways to limit
TO 2-14-06 p. 24
OSPF (cont)
 Disadvantage: flooding of link-state advertisements
increases with size of network, but ways to limit



TO 2-14-06 p. 25
Messages are constant length - depends on number of
links per router, but does not depend on network size
Routing updates are sent only for significant changes
OSPF allows hierarchical routing - network is divided into
areas, which reduces routing traffic
Link-State Routing Protocol: OSPF
 Open Shortest Path First proposed by IETF in late
1980s to overcome disadvantages of RIP [RFC
1583]
TO 2-14-06 p. 26

Based largely on research done at BBN

Open means public standard

SPF refers to Dijkstra’s algorithm
OSPF Message Format
4 bytes
version
type
message length
source router address
area ID
checksum
OSPF
header
authentication type
authentication
authentication
number of link status advertisements
link status advertisement 1
link status advertisement 2
TO 2-14-06 p. 27
link status
updates
OSPF Message Format (cont)
 Version (1 byte): 1
 Type (1 byte): message type, eg, link status
request, link status update
 Message length (2 bytes): in bytes
 Source router address (4 bytes)
 Area ID (4 bytes): networks can divide itself into
areas which hide their topology from other areas
 Checksum (2 bytes): error detection
TO 2-14-06 p. 28
OSPF (cont)
 Authentication type (2 bytes): scheme for
authentication, eg, 0 = none, 1 = password
 Authentication (8 bytes): adds security against
malicious, false routing information
 Data in message depends on message type, eg, link
status update (header type = 4)
TO 2-14-06 p. 29

Number of link status advertisements (4 bytes)

Link status advertisements (4 bytes each)
Link-State Routing Protocol: IS-IS
 Intermediate System-to-Intermediate System
developed by ISO

Intermediate system = router

IS-IS routing protocol is for routers to determine routes
 Similar to OSPF, IS-IS is a link-state routing
protocol

TO 2-14-06 p. 30
Allows hierarchical routing
Spring 2006
EE 5304/EETS 7304 Internet Protocols
Network protocols and congestion control:
X.25, ATM
Tom Oh
Dept of Electrical Engineering
[email protected]
TO 2-14-06 p. 31
Outline
 X.25

Sliding window congestion control
 ATM (Comer: pg. 221-233)

TO 2-14-06 p. 32
Connection admission control
X.25
 ITU-T standard for public virtual circuit packetswitched networks (later basis for ISO standard
8208) popular in 1970s
X.25
X.25
Packet
switch
DTE
TO 2-14-06 p. 33
DCE
Packet
switch
X.25 (cont)
 DCE = data circuit-terminating equipment (packet
switch, node)
 DTE = data terminal equipment (host, station, user,
end system)
 X.25 covers only DCE-DTE interface



TO 2-14-06 p. 34
X.25 layer 1 is also called X.21
X.25 layer 2 is LAP-B (link access procedure- balanced), a
subset of HDLC
X.25 layer 3 describes packets and control across
interface to provide virtual circuit service
X.25 (cont)
 2 types of virtual circuits:


TO 2-14-06 p. 35
Permanent virtual circuits are set up and fixed by network
operator
Virtual calls require call set-up (or establishment) before
data transfer, and call disconnect (or clearing, termination)
afterwards, using control packets
[Stallings Fig 9.18]
TO 2-14-06 p. 36
X.25 (cont)
 Call setup is initiated by Call Request packet and
confirmed by Call Accepted packet
 Data packets can then be exchanged
 Either party can request termination by Clear
Request packet, acknowledged by Clear
Confirmation packet
 Clear Indication packet is forwarded to other party,
acknowledged by Clear Confirmation packet
TO 2-14-06 p. 37
X.25 (cont)
 Virtual circuits are identified uniquely by number
contained in packet header


Local significance only, translated at each node
Global VC numbers have disadvantages: limit number of
connections, and troublesome to find unused numbers
 2 types of packets: data and control packets
TO 2-14-06 p. 38
X.25 Data Packet
 3 byte header

TO 2-14-06 p. 39
Q (1 bit): qualified or unqualified data - use by higher layer
protocols to identify different packet types
X.25 Data Packet (cont)
 D (1 bit): indicates significance of Piggyback field


0 means ACK requested from local DCE and not dest.
DTE (does not guarantee delivery to dest. DTE)
1 means ACK from dest. DTE (guaranteed delivery)
 Modulo (2 bits):


TO 2-14-06 p. 40
01 = both Sequence and Piggyback fields are modulo 8
10 = they are modulo 128 and header is extended with
extra byte (Sequence and Piggyback fields are extended
to 7 bits each)
X.25 Data Packet (cont)
 Group (4 bits) + Channel (8 bits) = 12-bit virtual
circuit number

DTE can have up to 4096 VCs to other DTEs using one
physical link
 Piggyback (3 bits): modulo 8 acknowledgement
(next packet expected, P(R))
 More (1 bit): indicates a group of packets belong
together (eg, for higher layer protocol)
TO 2-14-06 p. 41
X.25 Data Packet (cont)
 Sequence (3 bits): modulo 8 sequence number
P(S)
 Control (1 bit): 0 = data packet, 1 = control packet
 Data (variable length) = max. 128 bytes unless
negotiated differently
TO 2-14-06 p. 42
X.25 Control Packet
 3 byte header


TO 2-14-06 p. 43
Same fields as data packet: Q, D, Group, Channel,
Modulo
Control bit = 1
X.25 Control Packet (cont)
 Packet Type (7 bits): indicates control function




TO 2-14-06 p. 44
eg, 0000101 = call request
eg, PPP0010 = receive not ready (ACK but closes
sender's window until RR)
eg, PPP0000 = receive ready (ACK when no reverse
packet is available for piggybacking, or ACK and opens
sender's window after RNR)
eg, PPP0100 = reject (dest. DTE was forced to discard
packet; use go-back-N to retransmit from packet PPP)
X.25 Control Packet (cont)
 Additional information (variable length)
TO 2-14-06 p. 45

eg, for call request:

length of calling address

length of called address

calling address

called address

facilities (requests for special features, eg, collect calls)

user data (eg, login, password)
X.25 Congestion Control
 Sliding window is used for flow and error control
 Default window size = 2 unless otherwise
negotiated up to max. 7 for 3-bit Sequence, and up
to max. 127 for 7-bit Sequence
 Error control is usually done by go-back-N ARQ


TO 2-14-06 p. 46
Negative ACK is REJ control packet
Sender will retransmit specified packet and all following
packets
Sliding Window Congestion Control
 Same concept as sliding window control in data
link layer
 Idea is to limit number of packets in transit in
network by window size W


Source can send up to W packets without waiting for ACK
(or credit, permit)
Source will slow down if ACKs are delayed (or credits run
out)
•
TO 2-14-06 p. 47
Congestion starts to increase → delays along a route
increase → ACKs are delayed → source will slow down
Sliding Window (cont)
 ACK may apply to single packet or multiple packets
or specific bytes
 ACKs are sent in special control packets or often
piggybacked on reverse data packets
 Window size may be static or dynamic
 Performance of window control

TO 2-14-06 p. 48
Assume transmission times for ACKs are negligible (ie,
ACKs are very short)
Sliding Window (cont)
 T = packet transmission time = packet length/link
rate
 W = window size (in packets)
 d = packet transmission time + roundtrip
propagation delay
TO 2-14-06 p. 49
Sliding Window (cont)
 Case 1: d > WT


TO 2-14-06 p. 50
d - WT = idle time
between windows,
maximum source
rate = W packets/d
time
T
WT
d
1
2
3
time
1
2
3
Sliding Window (cont)
 Case 2: d < WT


TO 2-14-06 p. 51
sender can transmit
continuously
max. source rate = 1
packet/T time
T
d
WT
1
2
3
1
2
3
time
Sliding Window (cont)
 Combining both cases:

source rate = min(W/d, 1/T)
1/T
W/d
Source
rate
WT
TO 2-14-06 p. 52
Roundtrip delay d
Sliding Window (cont)
 Source will slow down when congestion causes
long roundtrip delays
 Source will automatically stop within W packet
transmission times (if no ACKs returned)
 Trade-off between response time (want W small to
slow down a source quickly) and efficiency (want W
> d/T so source can transmit continuously)
TO 2-14-06 p. 53
OPNET
 Login into linux or solaris machine
 At prompt, type opnet
 The first time a user runs OPNET, two directories are
created:
<opnet_user_home>\op_admin
<opnet_user_home>\op_models
Under op_admin, OPNET creates the following
directories and files:
TO 2-14-06 p. 54
OPNET (cont)
Under op_admin, OPNET creates the following
directories and files:
(1) bk directory => stores a copy of the OPNET files opened through the
GUI. Default backup interval time is set to 15 minutes.
(2) tmp directory => stores intermediate files needed for compiling or
running a simulation
(3) err_log file => records errors (such as during a compile or simulation
run).
(4) session_log => records commands launched from the GUI; for
example, the command line used to start a simulation.
**Because these directories and files can grow to be very large (for example, up to 100 MB for an
err_log file), you may wish to occasionally clear these files. You can clear err_log and
session_log files using the Help -> xxx Log -> Clear menu item.
TO 2-14-06 p. 55
OPNET (mod_dirs)
 You can modify your preferences with the Edit /
Preferences menu item in the OPNET GUI.
 OPNET stores these user preferences in a file
located in the <opnet_user_home>\op_admin
directory.
In OPNET 11.5, the file is named "env_db11.5”
 Your env_db11.5 is the "mod_dirs" preference,
which stands for "model directories". When you
add model directories, you must add the new
directory in “mod_dirs” or env_db11.5.
TO 2-14-06 p. 56