Sunteți pe pagina 1din 109

Advanced Computer Networks

EE/CS 6713

Internetworking I
Simple Internetworking (IP)
Dr. Amir Qayyum

The Big Picture


Midterm exam (estimated)

You are here


2

Internetworking
Outline
Best Effort Service Model Global Addressing Scheme

What we understand
Concepts of networking and network programming
Elements of networks: nodes and links Building a packet abstraction on a link

Transmission, and units of communication data


How to detect transmission errors in a frame after encoding and framing it How to simulate a reliable channel (sliding window) How to arbitrate access to shared media in any network

Design issues of direct link networks


Functionality of network adaptors
4

We also understand
How switches may provide indirect connectivity
Different ways to move through a network (forwarding) Bridge approach to extending LAN concept Example of a real virtual circuit network (ATM) How switches are built and contention within switches

Next: lets different networks work

Internetworking
Outline Best Effort Service Model Global Addressing Scheme

Internetworking
Reading: Peterson and Davie, Ch. 4 Basics of Internetworking Heterogeneity
The IP protocol, address resolution, control messages

Dealing with simple heterogeneity issues


Defining a service model Defining a global namespace Structuring the namespace to simplify forwarding Hiding variations in frame size limits
7

Internetworking
Routing moving forward with IP
Building forwarding information

Dealing with global internets - scale


Virtual geography and addresses Hierarchical routing Name translation and lookup: translating between global and local (physical) names Multicast traffic

Future internetworking: IPv6


8

Basics of Internetworking
What is an internetwork?
Illusion of a single (direct link) network Built on a set of distributed, heterogeneous networks Abstraction typically supported by software

Properties
Supports heterogeneity: independent of architecture, operating system, network type and topology Scales to global connectivity

The Internet:
Specific global internetwork that grew out of ARPANET
9

Internet Protocol (IP)


Network protocol for the Internet Operates on all hosts and routers (routers connect distinct networks into the Internet)
FTP HTTP NV TFTP

TCP

UDP

IP

FDDI

Ethernet

ATM
10

Internet Protocol (IP)


Service model Overview of message transmission Host addressing and address translation Datagram forwarding Fragmentation and reassembly Error reporting/control messages Dynamic configuration Protocol extensions through tunneling Note: congestion control not handled by IP
11

IP Service Model
Provided to transport layer (TCP, UDP)
Global name space Host-to-host connectivity (connectionless) Best effort packet delivery (datagram-based)

No delivery guarantees on bandwidth, delay, etc.


Packet delayed for very long time Packet lost Packet delivered more than once Packets delivered out of order
12

Simplest model: ability of IP to run over anything

Internetworks
Large scalable heterogeneous network of networks with efficient routing Collection of networks providing host-to-host packet delivery service A logical network built out of the physical networks connected by routers Internet Protocol (IP) runs on all nodes to make them function as a single logical internetwork
13

Internetwork
Concatenation of networks
H1 H6 R3 Network 2 Point -topoint R2 H4 H7

Network 11 Network Ethernet Ethernet


H2 H3

R1

Network 33 Network FDDI FDDI


H5

Network 44 Network Ethernet Ethernet


H8

Protocol stack
H1 TCP IP ETH ETH IP PPP PPP R1 IP FDDI FDDI R2 IP ETH R3 H8 TCP IP ETH

14

Global Addresses
Properties
32 bit long hierarchical addresses: network + host Globally unique, maps to interfaces rather than hosts Exception is service request splitting, as is done with large web servers, for example

Traditional 3-class model; out of 4 billion addresses


1/2 are class A 1/4 are class B 1/8 are class C

Often written using dot notation


10.3.2.4, 128.96.33.81
15

IP Addresses
7 bits (126 nets) Class A: 0 Network 14 bits (16k nets) Class B: 1 0 Network 21 bits (2 million nets) Class C: 1 1 0 Network 24 bits (16 million hosts) Host 16 bits (64K hosts) Host 8 bits (256) Host

18.10.5.22 130.126.143.254 192.12.70.111

host in class A network (MIT) host in class B network (UIUC) host in class C network

More recent classes


Multicast (class D): starts with 1110 Future expansions (class E): starts with 1111
16

Datagram Format
0 Version 4 HLen Ident TTL Protocol SourceAddr DestinationAddr Options (variable) Data Pad (variable) 8 TOS Flags 16 19 Length Offset Checksum 31

4-bit version (4 for IPv4, 6 for IPv6) 4-bit header length (in words, minimum of 5) 8-bit type of service (TOS); more or less unused 16-bit datagram length (in bytes) 8-bit protocol (e.g., TCP=6 or UDP=17)
17

Datagram Format
0 Version 4 HLen Ident TTL Protocol SourceAddr DestinationAddr Options (variable) Data Pad (variable) 8 TOS Flags 16 19 Length Offset Checksum 31

Fragmentation support
16-bit packet ID (identifies packet fragments) 3-bit flags; one bit marks last fragment 13-bit fragment offset into packet (in 8-byte words)

8-bit time-to-live (TTL); a hop count until forced destruction of packet


18

Datagram Format
16-bit IP checksum on header 32-bit source IP address 32-bit destination IP address Options and padding (variable length)
Source-based routing (typically disabled) 0 4 8 16 Record route TOS Version HLen Several others Ident Flags
TTL Protocol SourceAddr DestinationAddr Options (variable) Data Pad (variable) 19 Length Offset Checksum 31

19

Fragmentation and Reassembly


Different physical layers provide different limits on frame length (maximum transfer unit - MTU) Source host cannot know minimum value along dynamic route (no signaling) Avoid restricting datagram size to a small value Solution: when necessary, split IP packet into fragments before sending over physical link Questions
Where should reassembly occur ? What happens when a fragment is damaged/lost ?
20

Fragmentation and Reassembly


Strategy used with IP
Fragments are self-contained IP datagrams Avoid fragmentation at source host Transport layer passes small enough packets to fit into MTU of local network MTU on ATM based on CS-PDU (not cells) Re-fragmentation along the path is possible Reassemble at destination to minimize re-fragmentation Drop packet if one or more fragments lost (based on timeout); do not recover from lost fragments
21

Fragmentation and Reassembly Example


H1 R1 R2 R3 H8
Start of header Ident= x 1 Rest of header Offset= 0

ETH IP (1400)

FDDI IP (1400)

PPP IP (512) PPP IP (512) PPP IP (376)

ETH IP (512) ETH IP (512) ETH IP (376)


Ident= x

512 data bytes Start of header 1 Offset= 64 Rest of header 512 data bytes

Start of header Ident= x 0 Rest of header 1400 data bytes Offset= 0 Ident= x Start of header 0 Offset= 128 Rest of header 376 data bytes

22

Datagram Forwarding
Hosts and routers maintain forwarding tables Forwarding table maps network number to next hop
List of (network/host, next hop) pairs

Table often ends with default router


Recall hierarchical routing notion of handing unknown addresses up to the next level

Very simple (and static) table on hosts Complex (and dynamic) table on routers Network Number Next Hop Example (R2)
1 R3 2 R1 3 interface 1 4 interface 0
23

Datagram Forwarding
Network # 18.0.0.0 128.32.0.0 0.0.0.0
dest: 18.26.10.0 dest: 128.16.14.0

Netmask 255.0.0.0 255.255.0.0 0.0.0.0


mask with 255.0.0.0

Nest hop / port 1 2 3


matched! send to port 1

not matched mask with 255.0.0.0 mask with 255.255.0.0 not matched matched! send to port 3 mask with 0.0.0.0
24

Datagram Forwarding
Every datagram contains destinations address Network portion of address is compared with pairs in the forwarding table If directly connected to destination network, then forward to host If not directly connected to destination network, then forward to some (default) router In both the cases (sending directly or indirectly to host), use ARP to pass to physical layer
25

Address Translation
IP route can cross many physical networks Delivers to destinations physical network Hosts listen for packets marked with physical interface names
Each (next) hop along route Destination host

Translate IP addresses to physical addresses


How ?
26

Address Translation Approaches


Hardcoded
Physical address encoded in IP address Not possible for many networks (e.g., Ethernet)

Fixed table
Centrally maintained Distributed to all hosts

Automatically generated table


Use Address Resolution Protocol (ARP) to build Time out entries periodically
27

Address Resolution Protocol (ARP)


Table of IP to physical address bindings To send a packet, check table for physical address If IP address not in table
Broadcast a query (ARP request) Wait for response

When query seen by target host


Refresh (reset timeout) on existing table entry Creates table entry for requester if necessary Responds with translation (its physical address)
28

ARP Details
Table entries are discarded if not refreshed; time out O(10) minutes Do not refresh table entries upon reference ARP packet format
HardwareType: type of physical network (e.g. ethernet) ProtocolType: type of higher layer protocol (e.g., IP) HLEN & PLEN: length of physical and protocol addresses Operation: request or response Source/Target-Physical/Protocol addresses
29

ARP Packet Format


0 8 Hardware type = 1 HLen = 48 PLen = 32 SourceHardwareAddr (bytes 0 SourceHardwareAddr (bytes 4 SourceProtocolAddr (bytes 2 16 Protocol Type = 0x0800 31

Operation 3) 1) 1)

5) SourceProtocolAddr (bytes 0 3) TargetHardwareAddr (bytes 0 5) 3)

TargetHardwareAddr (bytes 2 T argetProtocolAddr (bytes 0

30

ARP in ATM
LAN Emulation can be used to broadcast ARP messages
quite inefficient in large, wide area ATM network

ATMARP is a solution which uses ARP server


logical IP subnet (LIS) concept is used large ATM network in subdivided into small subnets each subnet has a different network number all nodes on the same subnet communicate directly
31

ARP in ATM
In LIS model, large number of hosts and routers can be connected to a big ATM network Each LIS has an ARP server and each node in the LIS has ATM address of the server Hosts on different subnets communicate via router
10.0.0.2 H1 10.0.0.1 LIS 10 LIS 12 R 12.0.0.3 12.0.0.5 H2

ATM network
32

Internet Control Message Protocol (ICMP)


IP companion protocol (not necessary) Handles error and control messages
FTP HTTP NV TFTP

TCP

UDP

IP

ICMP

FDDI

Ethernet

ATM
33

ICMP Message
Sent to the source when a node is unable to process IP datagram successfully Error messages
Destination unreachable (protocol, port, or host) Reassembly failed IP Checksum failed; or invalid header TTL exceeded (so datagrams dont cycle forever) Cannot fragment

Control messages
Echo (ping) request and reply Redirect (from router to source host, to change route)
34

Host Configuration
Unlike Ethernet addresses, IP addresses are not fixed by the manufacturer
no guarantee of global uniqueness flexibility to reconfigure IP addresses

IP can be configured manually on each node


problem of configuring all hosts in a large network very error-prone configuration process

35

Dynamic Configuration
Plug new host into network
How much information must be known ? What new information must be assigned ? How can process be automated ?

Some answers
Host needs an IP address (must know it) Host must also Send packets out of physical (direct) network Thus needs physical address of router
36

Configuration Protocols (old!)


Reverse Address Resolution Protocol (RARP)
Translate physical address to IP address Used to boot diskless machines Machine broadcasts request at boot RARP server tells it its IP address Use UDP packets for same purpose as RARP Allows boot requests to traverse routers IP address of BOOTP server must be known Also returns file server IP, subnet mask, and default router for host
37

Boot Protocol (BOOTP)

Dynamic Host Configuration Protocol- DHCP


DHCP server is required to provide configuration information to each host
Each host retrieve this information on bootup

DHCP server can be configured manually, or it may allocate addresses on-demand


Addresses are leased for some period of time

Each host is not configured for DHCP server, it performs a DHCP server discovery
A broadcast discovery message is sent by the host and a unicast reply is sent by the server
38

DHCP Operation
New machine sends request to DHCP server for assignment and information Server receives
Directly if new machine given servers IP address Through broadcast if on same physical network Via DHCP relay nodes that forward requests onto the servers physical network

Server assigns IP address and provides other info Can be made secure (present signed request or just a valid physical address)
39

DHCP Server
A DHCP server is not required in each network
A DHCP relay agent is used to relay the DHCP request to the server
Unicast to server

Broadcast

DHCP relay

Other networks

DHCP server

Host

40

Virtual Private Networks - VPN


Controlled connectivity
Restrict forwarding to authorized hosts

Controlled capacity
Change router drop and priority policies Provide guarantees on bandwidth, delay, etc.

Similar to LANE, but possibly across heterogeneous IP networks

41

Virtual Private Networks - VPN


Used where controlled connectivity is required Two sites of a company may be connected by a leased line to make a real private network Virtual network replaces leased lines with shared network, making logical point-to-point connection Unwanted connectivity is prevented on this logical link using IP tunnel

42

Virtual Private Networks - VPN


C Physical links A Corporation X private network K L B

M Corporation Y private network (a)

L Physical links

M Virtual circuits

(b)

43

IP Tunneling
Allows gradual extension
e.g., multicast Develop multicast-capable switches and routers Install on 5-10 university campuses Routers between universities do not support multicasttoo bad!

Solution: use a tunnel, a point-to-point link between nodes in an Internet


44

IP Tunneling
data IP data IP IP

IP multicast IP multicast
da ta IP IP

IPv4

IP multicast IP multicast

CASE

UET

IP multicast IP multicast GIK


45

IP Tunnel in VPNs
Virtual point-to-point link between a pair of nodes separated by many networks
Network 1 R1 Internetwork R2 10.0.0.1 IP header, Destination = 2.x IP payload IP header, Destination = 10.0.0.1 IP header, Destination = 2.x IP payload
46

Network 2

IP header, Destination = 2.x IP payload

IP Tunneling for Multicast


Set up a tunnel between each pair of universities Multicast packets
Received by tunnel entry node Encapsulated (another IP header added for tunnel exit) Travel through the Internet (the tunnel) Received by tunnel exit node Unwrapped and delivered to another multicast-capable university campus

47

Disadvantages of Tunneling
Increases packet size Adds processing delays (and requires processing power) Management overhead at tunnel entries and exits Of course
1 is attractive compared to 0 (not working) So lots of research extensions use tunneling

48

Routing
How do routers acquire information in their forwarding tables ?
Algorithms Scalability

Routing
Pir Wadhai Islamabad

Rawalpindi Faizabad Airport

Rawal Dam

A stranger appears and asks Airport ? Which way do you point ?


50

What is Routing ?
Definition: task of constructing and maintaining forwarding information (in hosts or in switches) Goals for routing
Capture notion of best routes Propagate changes effectively Require limited information exchange Admit efficient implementation

Important notion: graph representation of network


51

Forwarding vs Routing
Forwarding: to select an output port based on destination address and routing table Routing: process by which routing table is built Forwarding table: enough information to accomplish the forwarding function; optimized for forwarding Routing table: built by routing algorithms to build forwarding table; optimized for topology changes Routing Table: Network # (10) - Next hop (171.69.245.10) Forwarding Table: Network # (10) - interface (if0) - MAC (8:0:2b:e4:b:1:2) 52

Routing Overview
Hierarchical routing infrastructure defines routing domains
Where all routers are under same administrative control

Network as a Graph
Nodes are routers Edges are links Each link has a cost
3 4 C B 9

A 1 1 1 D E

6 2 F

Problem: Find lowest cost path between two nodes


Maintain information about each link Static: topology changes are not incorporated Dynamic (or distributed): complex algorithms

53

Ideal Approach to Routing


Maintain information about each link
For each direction: bandwidth, latency and queuing delay

Calculate fastest path between each directed pair


Function of packet size
3 4 C B 9 1 1 D A 1 E 6 2 F

54

Problem with Ideal Routing


Unbounded amount of information Queuing delay can change rapidly Graph connectivity changes, too Solution: Dynamic algorithm
Periodically recalculate routes Distributed algorithm
No single point-of-failure Reduced computation per node

Abstract distance metric


Combines many factors Heuristic
55

Routing Outline
Algorithms
Static shortest path algorithms Bellman-Fordall pairs shortest paths to destination Dijkstras algorithmsingle source shortest path Distributed, dynamic routing algorithms Distance vector routing (based on Bellman-Ford) Link state routing (Dijkstras algorithm at each node)

Metrics (from ARPANET, with informative names)


Original New Revised
56

Bellman-Ford Algorithm
Static, centralized algorithm, (local iterations/dest) Requires: directed graph with edge weights (costs) Calculates: shortest paths for all directed pairs Check use of each node as successor in all paths For every node N
for each directed pair (B,C) is the path B N C better than B .C ? is cost BNdest smaller than previously known ?

For N nodes
Uses an NxN matrix of (distance, successor) values
57

Bellman-Ford Algorithm
infinity infinity infinity 8 8

source 6
C C

infinity infinity 3 3 3

A 2
B B B

infinity 1 1 1 1

B
Dest Dest Dest Dest

1
infinity infinity 7 7 6

1 2
E E E infinity 5 5 4 4

1 destination
Dest Dest A A

E 5

After n iterations, nodes at distance n hops along the shortest path have correct information
58

Dijkstras Algorithm
Static, centralized algorithm, build tree from source Requires directed graph with edge weights (distances) Calculates: shortest paths from one node to all others Greedily grow set S of known minimum paths From node N
Start with S = {N} and one-hop paths from N Loop n-1 times add closest outside node M to S for each node P not in S
is the path N .....M .P better than N.... P ?
59

Dijkstras Algorithm
1 2 2 3 4 10 6 8
1 2 3 4 5 6 7 8 9

3 9 7 1 2

3 4 7 2 2 6

1 3

10 11 12 13 14 15
60

Distance Vector Routing


Distributed, dynamic version of Bellman-Ford Each node maintains distance vector: set of triples
(Destination, Cost, NextHop)

Edge weights starting at a node assumed known by that node

Exchange updates of distance vector (Destination, Cost) with directly connected neighbors (known as advertising the routes)
periodically (on the order of several seconds to minutes) whenever vector changes (called triggered update)
61

Distance Vector Routing


Update local table if receive a better route
Newly advertised route has smaller cost (shorter) Came from next-hop (successor advertising new one)

Refresh existing routes; delete if they time out Local failure detection
Control message not ACKd Time out on periodic route update

Used in original ARPANET (until 1979) Early Internet: Routing Information Protocol (RIP) Early versions of DECnet and Novell IPX
62

Distance Vector Routing Example


Information in routing table of each node: Iteration 1
At node A B C D E F G distance to reach node A B C D E F 0 1 1 x 1 1 1 0 1 x x x 1 1 0 1 x x x x 1 0 x x 1 x x x 0 x 1 x x x x 0 x x x 1 x 1 G x x x 1 x 1 0
B A C D E

63

Distance Vector Routing Example


Information in routing table of each node: Iteration 2
At node A B C D E F G distance to reach node A B C D E F G 0 1 1 2 1 1 2 1 0 1 2 2 2 x 1 1 0 1 2 2 2 2 2 1 0 x 2 1 1 2 2 x 0 2 x 1 2 2 2 2 0 1 2 x 2 1 x 1 0
B A C D E

64

Distance Vector Routing Example


Information in routing table of each node: Iteration 3
At node A B C D E F G distance to reach node A B C D E F G 0 1 1 2 1 1 2 1 0 1 2 2 2 3 1 1 0 1 2 2 2 2 2 1 0 3 2 1 1 2 2 3 0 2 3 1 2 2 2 2 0 1 2 3 2 1 3 1 0
B A C D E

65

Distance Vector Routing Table


Routing table at node B:
C D E

B A

Destination Cost NextHop A 1 A C 1 C D 2 C E 2 A F 2 A G 3 A

66

Distance Vector Routing: Link Failure


F detects that link to G has failed F sets distance to G to infinity and sends update to A A sets distance to G to infinity since it uses F to reach G A receives periodic update from C with 2-hop path to G A sets distance to G to 3 and sends update to F F decides it can reach G in 4 hops via A

B C A D E

67

Count to Infinity Problem


Link from A to E fails A advertises distance of infinity to E, but B and C advertise a distance of 2 to E ! B decides it can reach E in 3 hops; A advertises this to all A decides it can read E in 4 hops; F advertises this to all C decides that it can reach E in 5 hops We are counting to infinity

B C D E

68

Count to Infinity Problem


Node X notices that its link to Y is broken Other nodes believe that the route through X is still good Mutual deception !!! How to solve this problem ?

69

Heuristic Attempts at Solution


Limit infinity to network diameter +1
Small limit allows fast completion of counting to infinity Limits network size and growth!!!

Do not advertise routes to successors (Split Horizon)


If route to A goes to B, do not inform B about route to A Solve mutual deception problem

Split horizon with poison reverse


Advertise negative routes to node, learned from that node Poisoned the routes sent by the neighbors

Wait before advertising delays convergence


70

Split Horizon
Avoid counting to infinity by solving mutual deception problem When sending an update to node X, do not include destinations that you would route through X
If X thinks route is not through you, no effect If X thinks route is through you, X will timeout route
C:2:B

D D

Loop of > 2 nodes fails split horizon !!!

A A
C:2:B

B B
C:1:C C::-

C C
71

Split Horizon with Poison Reverse


When sending update to node X, include destinations that you would route through X with distance set to infinity Dont need to wait for X to timeout

72

Distance Vector Routing Problems


Information propagates slowly One period per hop for new routes Count to infinity for lost routes (mutual deception)

73

Link State Routing


Distributed, dynamic form of Dijkstras algorithm Strategy
Send to all nodes (not just neighbors) information about directly connected nodes (not entire route table) in LSP

Basic data structure: Link State Packet (LSP)


ID of the node that created the LSP Cost of link to each directly connected neighbor: vector of (distance, successor) values Sequence number (SEQNO) Time-to-live (TTL) for this packet
74

Link State Routing


Each node maintains a list of (ideally all) LSPs
Runs Dijkstras algorithm on list May discover its neighbors by Hello messages

Information acquisition via reliable flooding


Create new LSP periodically; send to 1-hop neighbors Increment SEQNO (start SEQNO at 0 when reboot) Store most recent (higher SEQNO) LSP from each node Forward new LSP to all nodes but the one that sent it Decrement TTL of each LSP; discard when TTL=0 Try to minimize routing traffic overhead
75

Reliable Flooding
X A X A

B (a)

B (b)

B (c)

B (d)

76

Link State Routing


TTL fixes sequence number problems
Wraparound, bit errors, host crashes

Used in
ARPANET: bad heuristics brought down network in 1981 Internet: Open Shortest Path First (OSPF) Intermediate System-Intermediate System (IS-IS)
Designed for DECnet Adopted by ISO for connectionless network layer protocol (CNLP) Used in NSFNET backbone (and others) some digital cellular systems Minor variant in Novell NetWare

77

Let

Route Calculation: Dijkstras Shortest Path Algorithm

N denotes set of nodes in the graph l (i, j) denotes non-negative cost (weight) for edge (i, j) s denotes this node M denotes the set of nodes incorporated so far C(n) denotes cost of the path from s to node n

M = {s} for each n in N - {s} C(n) = l(s, n) // calculate cost to each node while (M != N) M = M union {w} such that C(w) is the minimum for all w in (N - M) for each n in (N - M) C(n) = MIN(C(n), C (w) + l(w, n ))

78

Link State Routing


At each router, perform a forward search algorithm Router maintains two lists
Tentative Confirmed

Each list contains triplets


<destination, cost, nexthop>

79

Link State Algorithm


1. 2. 3. Initialize confirmed with entry for self (cost = 0) For newly added node (next), select its LSP For each neighbor of next, calculate cost to reach neighbor as the sum of cost from self to next and from next to neighbor
1. 2. If neighbor is currently in neither confirmed nor tentative, add <neighbor, cost, nexthop> to tentative, where nexthop is the direction to reach next If neighbor is currently in tentative and cost is less than current cost for neighbor , then replace current entry with <neighbor, cost, nexthop>, where nexthop is the direction to reach next

4.

If tentative is empty, stop. Otherwise pick entry from tentative with the lowest cost, move it to confirmed and return to step 2.
80

Route Calculation
At node D Confirmed list Tentative list 1. (D,0,-) 2. (D,0,-) (C,2,C), (B,11,B) 3. (D,0,-), (C,2,C) (B,11,B) 4. (D,0,-), (C,2,C) (B,5,C), (A,12,C) 5 5. (D,0,-), (C,2,C), (B,5,C) (A,12,C) 6. (D,0,-), (C,2,C), (B,5,C) (A,10,C) A 7. (D,0,-), (C,2,C), (B,5,C), (A,10,C)

B 3 10 11 D
81

C 2

OSPF Routing Protocol


Authentication of routing messages
Encrypted communication between routers

Additional hierarchy
Domains are split into areas Routers only need to know how to reach every node in a domain Routers need to know how to get to the right area Load balancing Allows traffic to be distributed over multiple routes
82

Link State Routing - Scalability


Stabilizes quickly, does not generates much traffic, responds to changes or node failures One LSP per router in Internet (one vector element for every link): stored information is large! Solution: hierarchical routing
Split hosts into domains Routing occurs in two ways Within domains (scales as size of domain) Between domains (scales as number of domains) Add more levels as necessary Organize names (IP addresses) by routing domains
83

Hierarchical Routing Drawbacks


Slightly inaccurate information Cannot distribute heavy loads

hierarcical path

shortest path

84

Comparison of Routing Approaches


Distance Vector
Communicate information to neighbors only Exchange information about entire network

Link State
Communicate information to entire network Exchange information about neighbors only

85

Link State Metrics


Capture a general notion of distance A heuristic combination of (among other factors)
Distance, Bandwidth Average traffic Queue length Measured delay

A few to discuss
Original ARPANET New ARPANET Revised ARPANET
86

Original ARPANET Metric


Uniform 56 kbps lines
Bandwidth equal on every line (hence irrelevant) Latency relatively unimportant

Use queue length as distance (number of packets waiting to use a link) Problems
Uniform bandwidth assumption became invalid Latency comparable to 1kB transmission delay on 1.544 Mbps link
87

New ARPANET Metric


Captured queuing delay, bandwidth, and latency Queue delay
Timestamp packet arrival time (AT) Also stamp departure time (DT) Only calculate when link level ACK received Average DT - AT over packets and time If timeout, reset DT to departure time for retransmission

Used fixed (per-link) measurements


Transmission time (bandwidth), Latency

Add three terms to find distance


Link cost = average delay over some time period
88

New ARPANET Metric


Worked well
Under light load Static factors dominated cost

Oscillated under heavy load


Heavily loaded link advertises high price All traffic moves off Link next advertises low price All traffic returns Repeat cycle
89

Range of values too large

Revised ARPANET Metric


Measure link utilization Feed measurement through function to restrict dynamic range Specific function chosen carefully based on bandwidth and latency Aspects of class of functions
Cost is constant at low to moderate utilizations Link cost no more than 3 times idle link cost Maximum cost no more than 7 times minimum High-bandwidth, high-latency link (e.g., satellite) better than low-bandwidth, low-latency link
90

How to Make Routing Scale


Flat versus Hierarchical Addresses Inefficient use of Hierarchical Address Space
class C with 2 hosts (2/255 = 0.78% efficient) class B with 256 hosts (256/65535 = 0.39% efficient)

Still Too Many Networks


routing tables do not scale route propagation protocols do not scale

91

Routing for Mobile Hosts

92

Routing for Mobile Hosts


Mobile hosts, fixed infrastructure
e.g. cellular networks
MN MN

Mobile hosts, dynamic infrastructure


Ad hoc networks
MN MN

MN

MN

MN
93

Routing for Mobile Hosts


How can mobility be supported in view of the fact that a portion of an IP address is a network address?
Host-specific information is out of the routers to make routing scalable If host changes the network, it would become unreachable

One solution is to acquire new address via DHCP If host changes the network frequently, keeping a single address would be beneficial
Avoids termination of connection while in move
94

Mobile IP
Mobile-IP is a solution that works without any changes to non-mobile hosts (typical of IETF)
Supports both mobility and geographic aggregation

A router known as home agent (HA) is required at the home network of the mobile host Mobile host (MH) uses permanent home address, and remains connected as it roams A router known as foreign agent (FA) is required at the network to which the mobile host attaches
95

Mobile IP
Home & foreign agents send advertisement messages Mobile host attaches to a nearby foreign agent
Mobile host communicates home agent address Foreign agent contacts home agent to communicate care-of-address
Sending host Home agent (10.0.0.3) (network 10) Home network Internetwork
IP tunnel

Foreign agent (12.0.0.6)

(10.0.0.9) Mobile host

96

Mobile IP - Features
Transparent routing of packets to a mobile host No modification of existing routers or non-mobility supporting hosts Mobile Host (MH) is assigned a unique home address within its home network Other hosts communicating with the MH always use MHs home address Foreign agent (FA) maintains a mapping of the MHs home address to its care-of-address
97

Mobile IP Home Agent (HA)


An agent on the MHs home network Maintains registry of MHs current location MHs location is care-of-address Mobility binding is the connection between the MHs home address and care-of-address Each time the MH establishes a new care-ofaddress, it must register with its HA

98

Mobile IP - Challenges
How does the MH get a local IP address ? How does the HA intercept a packet that is destined for the MH ? How does the HA then deliver the packet to the FA ? How does the FA deliver the packet to the MH ?

99

Mobile IP Assigning Care-of-address


MH discovers foreign agent (FA) using an agent discovery protocol MH registers with FA and FAs address becomes MHs care-of-address MH obtains a temporary IP address from FA or via DHCP-like procedures

100

Mobile IP
Home agent is required to intercept all packets for the mobile host
it sends a gratuitous ARP to use proxy-ARP when mobile host registers with foreign agent

Home agent uses tunneling (IP-in-IP) to forward packets of mobile host to foreign agent Foreign agent strips the extra IP header and forwards the packet to the mobile host Mobile host can behave as foreign agent, if absent
101

Mobile IP Routing Problems


Indirect (triangle) routing
Places unnecessary burden on the internet Significantly increases latency Route from sending node to mobile node can be significantly sub-optimal Both nodes on the same network, far from home agent

Handoff between FA
Causes connection to be rerouted through HA
102

Route Optimization in Mobile IP


Making sending node aware of the care-of-address Home agent sends a binding update to the source Source uses new address and records it in its binding cache Foreign agent sends binding warning if the source uses out of date binding cache (if mobile host is not FA) Security issue if someone announces itself as FA
103

Route Optimization in Mobile IP


Correspondent node caches MH location and careof-address
Sender FA MH

HA

104

Handoff Optimization in Mobile IP


MH informs old FA of new FA. Old FA forwards MHs packets through new FA
Sender FA1 MH

Home Agent

FA2

MH
105

Routing in Ad Hoc Networks


Collection of mobile nodes Form a temporary network In a distributed manner No server or access points Management protocols
Periodic polling (proactive) On-demand routing (reactive)

106

Proactive Routing Protocols


Driven by timer based mechanisms Protocols send periodic routing advertisements Link status detection is beacon-based (hellos) Concerns
Updates waste bandwidth and power (especially if nothing changes) Topology changes may be too dynamic/rapid to be captured by periodic updates Shortest path may not be best path (signal strength, energy consumption)
107

Reactive Routing Protocols


Driven by data packets requiring delivery Discover route only when needed
Soft-state routing table contains forward and reverse route Uni-directional links may foil routing

Detect link status when forwarding Concerns


Latency to set up route Overhead for route discovery/maintenance
108

Ad Hoc Routing Protocols


Proactive protocols
OLSR (Optimized Link State Routing) TBRPF (Topology Broadcast based on Reverse Path Forwarding)

Reactive protocols
DSR (Dynamic Source Routing) AODV (Ad hoc On-demand Distance Vector) Routing

IETFs MANET working group deals with them


www.ietf.org/html.charters/manet-charter.html
109

S-ar putea să vă placă și