Computer Networks(Routing)Frm Net
-
Upload
agarwalkritika03 -
Category
Documents
-
view
218 -
download
0
Transcript of Computer Networks(Routing)Frm Net
-
8/13/2019 Computer Networks(Routing)Frm Net
1/118
Computer Networks
Section1. Routing Algorithms andNetwork Layer Protocol
Presenter: Shu-Ping Lin
-
8/13/2019 Computer Networks(Routing)Frm Net
2/118
Outline
Routing Algorithms
The Network Layer in The Internet
-
8/13/2019 Computer Networks(Routing)Frm Net
3/118
Outline
Routing Algorithms
The Network Layer in The Internet
-
8/13/2019 Computer Networks(Routing)Frm Net
4/118
Store-and-Forward Packet Switching
-
8/13/2019 Computer Networks(Routing)Frm Net
5/118
Routing Algorithm
Routing algorithm
Datagram
Virtual circuit
Differences between routing and forwarding
Routing versus forwarding
-
8/13/2019 Computer Networks(Routing)Frm Net
6/118
Routing Algorithm (contd)
Requirement of routing algorithm
Correctness and Simplicity
Robustness
Stability
Fairness
Optimality
-
8/13/2019 Computer Networks(Routing)Frm Net
7/118
Datagram Routing
-
8/13/2019 Computer Networks(Routing)Frm Net
8/118
Virtual-Circuit Routing
-
8/13/2019 Computer Networks(Routing)Frm Net
9/118
Comparison
-
8/13/2019 Computer Networks(Routing)Frm Net
10/118
-
8/13/2019 Computer Networks(Routing)Frm Net
11/118
Optimality Principle
If routerJis on the optimal path from routerIto routerK, the the optimal path fromJto
Kalso falls along the same route. Sink tree
The set of optimal routes from all sources to agiven destination
The goal of all routing algorithms is todiscover and use the sink trees for allrouters.
-
8/13/2019 Computer Networks(Routing)Frm Net
12/118
Sink Tree
-
8/13/2019 Computer Networks(Routing)Frm Net
13/118
Shortest Path Routing
Link metric
Dijkstra algorithm
-
8/13/2019 Computer Networks(Routing)Frm Net
14/118
Flooding
Every incoming packet is sent out on everyoutgoing link except the one it arrived on.
Termination of flooding processHop counter
Record of packet which has been flooded
Applications of floodingMilitary application
Comparison
-
8/13/2019 Computer Networks(Routing)Frm Net
15/118
-
8/13/2019 Computer Networks(Routing)Frm Net
16/118
Distance Vector Routing (contd)
-
8/13/2019 Computer Networks(Routing)Frm Net
17/118
Distance Vector Routing (contd)
Converge to the correct answer, but do so
slowly.
It reacts rapidly to good news, but leisurelyto bad news.
The count-to-infinity problem
-
8/13/2019 Computer Networks(Routing)Frm Net
18/118
Count-to-Infinity Problem
-
8/13/2019 Computer Networks(Routing)Frm Net
19/118
Problem of DVR
Does not take line bandwidth into account.
Take too long to converge.
-
8/13/2019 Computer Networks(Routing)Frm Net
20/118
Link State Routing
Learning about the neighbors
Sending a special HELLO packet on each
point-to-point line
Measuring line cost to each of its neighbors
Round-trip time
Traffic loadLine bandwidth
-
8/13/2019 Computer Networks(Routing)Frm Net
21/118
Link State Routing (contd)
Building link state packet
-
8/13/2019 Computer Networks(Routing)Frm Net
22/118
Link State Routing (contd)
Distributing the link state packets
Flooding is used to distribute the link state
packet.Each packet contains a sequence number that is
incremented for each new packet sent.
Computing the new routes Dijkstras algorithm can be run locally to
construct the shortest path to all destinations.
-
8/13/2019 Computer Networks(Routing)Frm Net
23/118
Hierarchical Routing
As networks grow in size, the router routing
tables grow proportionally.
Each router has responsible for its regionand knows nothing about the internal
structure of other router.
-
8/13/2019 Computer Networks(Routing)Frm Net
24/118
Hierarchical Routing (contd)
-
8/13/2019 Computer Networks(Routing)Frm Net
25/118
Hierarchical Routing (contd)
Penalty of increased path length
The optimal number of levels for an N
router subnets is ln N.
-
8/13/2019 Computer Networks(Routing)Frm Net
26/118
Broadcasting Routing
The source simply send a distinct packet to
each destination.
Waste bandwidth
Have to know complete list of all destinations
Flooding
Generate too many packets
Consume too much bandwidth
-
8/13/2019 Computer Networks(Routing)Frm Net
27/118
Broadcasting Routing (contd)
Multidestination routing
Each packet contains a list of destinations.
The destination set is partitioned among theoutput lines.
Using spanning tree
Routers must know which of its lines belong tothe spanning tree in advance.
Copy an incoming packet onto all the spanninglines except the on it arrived on.
-
8/13/2019 Computer Networks(Routing)Frm Net
28/118
Broadcasting Routing (contd)
Reverse path forwarding
Router checks to see if the packet arrived on the
line that is normally used for sending packets tothe source of the broadcast.
-
8/13/2019 Computer Networks(Routing)Frm Net
29/118
Multicast Routing
Each router computes a spanning tree
covering all other routers.
When a process sends a multicast packet toa group
Examining the spanning tree of this group
Removing all lines that do not lead to hosts thatare members of group
-
8/13/2019 Computer Networks(Routing)Frm Net
30/118
Multicast Routing (contd)
-
8/13/2019 Computer Networks(Routing)Frm Net
31/118
Multicast Routing (contd)
Pruning spanning tree
Reverse path forwarding
Router with no hosts interested in a particulargroup sends a PRUNE message.
The subnet is recursively pruned.
-
8/13/2019 Computer Networks(Routing)Frm Net
32/118
Multicast Routing (contd)
Disadvantage of algorithm, suppose thatnetwork has ngroups, each with an average
of mmembers.For each group, mpruned spanning trees must
be stored
Total of mntrees
Core-based treeA host wanting to multicast sends packets to the
core, which does the multicast along thespanning tree.
-
8/13/2019 Computer Networks(Routing)Frm Net
33/118
Routing for Mobile Hosts
-
8/13/2019 Computer Networks(Routing)Frm Net
34/118
Routing for Mobile Hosts (contd)
Mobile host
Migratory hosts
Roaming hosts All hosts are assumed to have a permanent
home locationthat never changes.
Hosts also have a permanent home addressthat can be used to determine their homelocation.
-
8/13/2019 Computer Networks(Routing)Frm Net
35/118
Routing for Mobile Hosts (contd)
Each area has a home agentwhich keeps
track of hosts whose home is in the area, but
who are currently visiting another area. Each area has foreign agentwhich keeps
track of all mobile hosts visiting this area.
-
8/13/2019 Computer Networks(Routing)Frm Net
36/118
Routing for Mobile Hosts (contd)
Registration procedure
Foreign agent searching
Registration
Foreign agent contacts the mobile hosts home
agent.
Verification of mobile hosts home agent Acknowledgement from the mobile hosts
home agent
-
8/13/2019 Computer Networks(Routing)Frm Net
37/118
-
8/13/2019 Computer Networks(Routing)Frm Net
38/118
-
8/13/2019 Computer Networks(Routing)Frm Net
39/118
Routing in Ad Hoc Networks
AODV (Ad hoc On-demand Distance
Vector)
Distant relative of the Bellman-Ford distancevector algorithm
Considering the limited bandwidth and low
battery life
On-demand algorithm
-
8/13/2019 Computer Networks(Routing)Frm Net
40/118
Routing in Ad Hoc Networks (contd)
AODV algorithm maintains a table at each
node, keyed by destination and which
neighbor to send packets in order to reachdestination.
Route request packet
-
8/13/2019 Computer Networks(Routing)Frm Net
41/118
-
8/13/2019 Computer Networks(Routing)Frm Net
42/118
-
8/13/2019 Computer Networks(Routing)Frm Net
43/118
Routing in Ad Hoc Networks (contd)
Destination constructs a ROUTE REPLYpacket which follows the reverse path to
source. Each intermediate node enters this packet
into local routing table when
No route to destination is known.
Sequence number for destination in REPLY isgreater than the value in the routing table.
Sequence number is equal but the new route isshorter.
-
8/13/2019 Computer Networks(Routing)Frm Net
44/118
Routing in Ad Hoc Networks (contd)
Problem of mobility
Route maintenance
Periodically, each node broadcasts aHello
message.
If no response is returned, router prune this link.
Active neighbor
-
8/13/2019 Computer Networks(Routing)Frm Net
45/118
Routing in Ad Hoc Networks (contd)
-
8/13/2019 Computer Networks(Routing)Frm Net
46/118
Routing in Ad Hoc Networks (contd)
Critical difference between AODV and
DVR
Nodes do not send out periodic broadcastscontaining their entire routing table.
-
8/13/2019 Computer Networks(Routing)Frm Net
47/118
-
8/13/2019 Computer Networks(Routing)Frm Net
48/118
Node Lookup in Peer-to-Peer Networks
(contd) Finger table
Start field = k +2i(modulo 2m)
If keyfalls between kandsuccessort (k),thenthe node holding information about keyis
successor (k).
Otherwise, the entry whosestart field is the
closest predecessor of key is tried.
-
8/13/2019 Computer Networks(Routing)Frm Net
49/118
Node Lookup in Peer-to-Peer Networks
(contd)
-
8/13/2019 Computer Networks(Routing)Frm Net
50/118
Node Lookup in Peer-to-Peer Networks
(contd) Noderjoining
New node raskssuccessor (r) for its predecessor.
Insert rin between successor and predecessor. Successor should hand over those keys in the range
predecessor (r)-r, which now belong to r.
Every node runs a background process that
periodically recomputes each finger by callingsuccessor.
-
8/13/2019 Computer Networks(Routing)Frm Net
51/118
Outline
Routing Algorithm
The Network Layer in The Internet
-
8/13/2019 Computer Networks(Routing)Frm Net
52/118
The Network Layer in The Internet
Principles for network design
Make sure it works.
Keep it simple.Make clear choices.
Exploit modularity.
Expect heterogeneity.
Avoid static options and parameters.
Look for a good design; it need not be perfect.
-
8/13/2019 Computer Networks(Routing)Frm Net
53/118
The Network Layer in The Internet
(contd)Think about scalability.
Consider performance and cost.
Network layer provides best-efforts way totransport datagrams from source to
destination.
-
8/13/2019 Computer Networks(Routing)Frm Net
54/118
The IP Protocol
The IPv4 header
-
8/13/2019 Computer Networks(Routing)Frm Net
55/118
IP Address
IP address formats
-
8/13/2019 Computer Networks(Routing)Frm Net
56/118
IP Address (contd)
Special IP address
-
8/13/2019 Computer Networks(Routing)Frm Net
57/118
Subnet
Split a network into several parts for
internal use.
-
8/13/2019 Computer Networks(Routing)Frm Net
58/118
Subnet (contd)
Some bits are taken away from the hostnumber to create a subnet number.
For example, a university can use a 6-bitsubnet number and a 10-bit host number,allowing fro up to 64 subnets.
Outside the network, the subnet is notvisible, so allocating a new subnet does notrequire contacting ICANN.
-
8/13/2019 Computer Networks(Routing)Frm Net
59/118
Subnet (contd)
Subnet mask indicates the split between
network + subnet number and host.
-
8/13/2019 Computer Networks(Routing)Frm Net
60/118
-
8/13/2019 Computer Networks(Routing)Frm Net
61/118
Network Address Translation (contd)
-
8/13/2019 Computer Networks(Routing)Frm Net
62/118
Network Address Translation (contd)
Use TCP port to distinguish the traffic.
TCPsource portfield is replaced by an
index into the NAT boxs translation table.
Each entry contains original IP address and
original source port.
-
8/13/2019 Computer Networks(Routing)Frm Net
63/118
Network Address Translation (contd)
Violation of the architectural model of IP
Every IP address uniquely identifies a machine.
NAT changes the Internet from aconnectionless network to a kind ofconnection-oriented network.
Violation of protocol layering
layer kmay not make any assumptions aboutwhat layer k+1has put into the payload field.
-
8/13/2019 Computer Networks(Routing)Frm Net
64/118
Internet Control Protocols
Internet Control Message Protocol (ICMP)
-
8/13/2019 Computer Networks(Routing)Frm Net
65/118
Address Resolution Protocol
How do IP address get mapped onto data
link layer addresses, such as Ethernet?
Configuration file ARP
Broadcast a packet onto the Ethernet asking:
Who owns IP address xxx.xxx.xxx.xxx.Correspondent will reply with its Ethernet
address
-
8/13/2019 Computer Networks(Routing)Frm Net
66/118
Address Resolution Protocol (contd)
-
8/13/2019 Computer Networks(Routing)Frm Net
67/118
-
8/13/2019 Computer Networks(Routing)Frm Net
68/118
RARP, BOOTP, and DHCP
When a computer is booted how does it get
the IP address.
RARPBroadcast a packet to ask RARP server.
Packet cannot be forwarded by routers, so
RARP server is needed on each network.
-
8/13/2019 Computer Networks(Routing)Frm Net
69/118
-
8/13/2019 Computer Networks(Routing)Frm Net
70/118
RARP, BOOTP, and DHCP (contd)
DHCP
-
8/13/2019 Computer Networks(Routing)Frm Net
71/118
OSPFThe Interior Gateway Routing
Protocol
Routing algorithm within as autonomous
system (AS) is called an interior gateway
protocol. The original Internet interior gateway
protocol was distance vector protocol (RIP).
Link state protocol replaced RIP in 1979. OSPF began work in 1988.
-
8/13/2019 Computer Networks(Routing)Frm Net
72/118
OSPFThe Interior Gateway Routing
Protocol (contd)
Internet is made up of a large number ofautonomous systems.
Each AS is operated by a differentorganization and can use its own routingalgorithm.
Every AS has a backbonearea.
All areas are connected to the backbone andcan communicate each other via backbone.
-
8/13/2019 Computer Networks(Routing)Frm Net
73/118
-
8/13/2019 Computer Networks(Routing)Frm Net
74/118
OSPFThe Interior Gateway Routing
Protocol (contd)
Using flooding, each router informs all theother router in its area of its neighbors andcosts.
This information allows each router toconstruct the graph for its area and computethe shortest path.
Backbone routers accept information fromthe area border routers in order to computethe best route from each backbone router toevery other router.
-
8/13/2019 Computer Networks(Routing)Frm Net
75/118
BGPThe Exterior Gateway Routing
Protocol
All interior gateway protocol has to do is to move
packets as efficiently as possible without worrying
about politics.
Exterior gateway protocol routers have to worry
about politics.
No transit traffic through certain ASes.
Traffic starting or ending at IBM should not transitMicrosoft.
Policies are typically manually configured into
each BGP router and are not part of protocol.
-
8/13/2019 Computer Networks(Routing)Frm Net
76/118
BGPThe Exterior Gateway Routing
Protocol (contd)
Stub networks
Has only one connection to BGP graph andcannot be used for transit traffic.
Multiconnected networks
Could be used for transit traffic, except thatthey refuse
Transit networksWilling to handle third-party packet
-
8/13/2019 Computer Networks(Routing)Frm Net
77/118
BGPThe Exterior Gateway Routing
Protocol (contd)
Border Gateway Protocol (BGP)
Fundamentally a distance vector protocol, but
each BGP router keeps track of the path used.
-
8/13/2019 Computer Networks(Routing)Frm Net
78/118
Internet Multicasting
IP uses class D address to support multicast.
Two kinds of group address
Permanent address
Temporary address
-
8/13/2019 Computer Networks(Routing)Frm Net
79/118
Internet Multicasting (contd)
224.0.0.1 All systems on a LAN
224.0.0.2 All routers on a LAN
224.0.0.5 All OSPF routers on a LAN
224.0.0.6 All designated OSPF routers on a
LAN
Temporary groups must be created before
they can be used.
-
8/13/2019 Computer Networks(Routing)Frm Net
80/118
Internet Multicasting (contd)
Multicasting routing is done using spanning
tree.
Each multicast router exchangesinformation with its neighbors, using a
modified distance vector protocol.
-
8/13/2019 Computer Networks(Routing)Frm Net
81/118
Mobile IP
Increment of portable computers.
Major goals
Mobile host must be able to use its home IPaddress anywhere.
Changes to software and router are not
permitted.
No overhead should be incurred when a mobile
host is at home.
-
8/13/2019 Computer Networks(Routing)Frm Net
82/118
-
8/13/2019 Computer Networks(Routing)Frm Net
83/118
-
8/13/2019 Computer Networks(Routing)Frm Net
84/118
IPv6
While NAT may buy a few more yearstime, IP in its current form (IPv4) isnumbered.
IETF issued a call for proposal anddiscussion in RFC 1550.
IPv6 is not compatible with IPv4, but it is
compatible with other auxiliary Internetprotocol.
-
8/13/2019 Computer Networks(Routing)Frm Net
85/118
IPv6 (contd)
Main features
Longer addresses
Simplification of the headerBetter support for options
Security
Quality of service
-
8/13/2019 Computer Networks(Routing)Frm Net
86/118
IPv6 (contd)
The IPv6 fixed header
-
8/13/2019 Computer Networks(Routing)Frm Net
87/118
IPv6 (contd)
New notation of 16-byte address
8000:0000:0000:0000:0123:4567:89AB:CDEF
8000::123:4567:89AB:CDEF IPv4 can be written as ::192.168.20.46
Vanishment of IPv4 headers
IHL
Protocol
Checksum
-
8/13/2019 Computer Networks(Routing)Frm Net
88/118
IPv6 (contd)
Extension header is encoded as (Type,
Length, Value) tuple.
Type is a 1-byte field telling which option thisis.
Length is a 1-byte field telling how long the
value is.
Value is any information required.
-
8/13/2019 Computer Networks(Routing)Frm Net
89/118
IPv6 (contd)
IPv6 extension header
-
8/13/2019 Computer Networks(Routing)Frm Net
90/118
IPv6 (contd)
Controversies
Hop limit field length
Maximum packet sizeChecksum
Mobile issue
-
8/13/2019 Computer Networks(Routing)Frm Net
91/118
Section2. The Internet Transport Protocols:TCP
-
8/13/2019 Computer Networks(Routing)Frm Net
92/118
Introduction to TCP
Function of providing reliable end-to-end
byte stream over an unreliable internetwork.
Lack of IPNo guarantee that packets will be delivered
properly.
Packets may arrive in the wrong order.
-
8/13/2019 Computer Networks(Routing)Frm Net
93/118
TCP Service Model
TCP service is obtained by both sender and
receiver creating sockets.
Each socket has IP address and a 16-bitnumber called port.
Port number below 1024 are called well-
known portsand reserved for standardservice.
-
8/13/2019 Computer Networks(Routing)Frm Net
94/118
TCP Service Model (contd)
Well-Known Ports
-
8/13/2019 Computer Networks(Routing)Frm Net
95/118
TCP Service Model (contd)
Characteristics of TCP connections
Full duplex
Point-to-pointByte stream, not a message stream
-
8/13/2019 Computer Networks(Routing)Frm Net
96/118
TCP Service Model (contd)
A key feature of TCP is that every packet
on a TCP connection has its own 32-bit
sequence number. TCP segmentconsisting of fixed 20-byte
header is used for exchanging data between
sender and receiver.
-
8/13/2019 Computer Networks(Routing)Frm Net
97/118
TCP Service Model (contd)
Segment size issue
Fit in the 65515-byte IP paylo.ad
Cant exceed maximum transfer unit (MTU).
MTU is generally 1500 bytes.
The basic protocol used by TCP is thesliding window protocol.
Timer
Acknowledgement number
-
8/13/2019 Computer Networks(Routing)Frm Net
98/118
TCP Segment Header
-
8/13/2019 Computer Networks(Routing)Frm Net
99/118
TCP Connection Establishment
Three-way handshake.
-
8/13/2019 Computer Networks(Routing)Frm Net
100/118
TCP Connection Release
To release a connection , either party can
send a TCP segment with theFINbit set. When the FINis acknowledged, that
direction is shut down for new data.
Normally, four TCP segments are required
to release a connection.
-
8/13/2019 Computer Networks(Routing)Frm Net
101/118
-
8/13/2019 Computer Networks(Routing)Frm Net
102/118
TCP Transmission Policy
-
8/13/2019 Computer Networks(Routing)Frm Net
103/118
TCP Transmission Policy (contd)
When the window size is 0, the sender stop
sending data to receiver except
Urgent data may be sent.Send a 1-byte segment to make the receiver
reannounce the next byte expected and window
size.
-
8/13/2019 Computer Networks(Routing)Frm Net
104/118
TCP Transmission Policy (contd)
Consider the worst case in performance
issue.
For receiversDelay acknowledgements and window updates
for 500 msec in the hope of acquiring some
data.
For senders
Nagles algorithm
-
8/13/2019 Computer Networks(Routing)Frm Net
105/118
TCP Transmission Policy (contd)
Silly window syndrome
Data are passed to the sending TCP entity in
large blocks, but an interactive application onthe receiving side reads data 1 byte at a time.
-
8/13/2019 Computer Networks(Routing)Frm Net
106/118
TCP Transmission Policy (contd)
Clarks algorithm
It forces window update to wait until it has a
decent amount of space available. Combination of Nagles and Clarks
algorithm.
-
8/13/2019 Computer Networks(Routing)Frm Net
107/118
TCP Congestion Control
When the load offered to any network ismore than it can handle, congestion buildsup.
TCP achieves congestion control bydynamically manipulating the window size.
First step of congestion control: detection.
All the Internet TCP algorithms assume thattimeouts are caused by congestion.
-
8/13/2019 Computer Networks(Routing)Frm Net
108/118
TCP Congestion Control (contd)
-
8/13/2019 Computer Networks(Routing)Frm Net
109/118
TCP Congestion Control (contd)
Two potential problemsnetwork capacity
and receiver capacity.
Each sender maintains two windowsreceiver window and congestion window.
The number of bytes that may be sent is the
minimum of the two windows.
-
8/13/2019 Computer Networks(Routing)Frm Net
110/118
TCP Congestion Control (contd)
Slow start
-
8/13/2019 Computer Networks(Routing)Frm Net
111/118
TCP Timer Management
Retransmission timer
Difficulties of setting retransmission timer
-
8/13/2019 Computer Networks(Routing)Frm Net
112/118
-
8/13/2019 Computer Networks(Routing)Frm Net
113/118
TCP Timer Management (contd)
Jacobson proposed proposed to use mean
deviationas a cheap estimator of the
standard deviation. ||)1( MRTTDD
DRTTTimeout 4
-
8/13/2019 Computer Networks(Routing)Frm Net
114/118
TCP Timer Management (contd)
Potential problem
When the ack of retransmission packet comes
in, it is unclear whether the ack refers to thefirst transmission or a later one.
Karns algorithm
Persistence timer is design to prevent the
deadlock.
Keepalive timer.
-
8/13/2019 Computer Networks(Routing)Frm Net
115/118
Wireless TCP and UDP
Problem due to congestion control.
TCP assumes that timeouts are caused by
congestion, not by lost packets. A packet is lost on a wired network, the
sender should slow down.
When one is lost on a wireless network, thesender should try harder.
-
8/13/2019 Computer Networks(Routing)Frm Net
116/118
Wireless TCP and UDP (contd)
Bakne and Badrinath propose indirect TCP
which split the TCP connection into two
separate connections.
-
8/13/2019 Computer Networks(Routing)Frm Net
117/118
Wireless TCP and UDP (contd)
The advantage of this scheme is that
bothconnections are now homogeneous.
Timeouts on the first connection can slowthe sender down, whereas timeouts on the
second one can speed it up.z
The disadvantage of the scheme is that itviolates the semantics of TCP.
-
8/13/2019 Computer Networks(Routing)Frm Net
118/118
Transactional TCP
Efficiency problem of TCP