Professional Documents
Culture Documents
Lecture 15
EE 493/593
Outline
IP Based Routing ID Centric Routing
Goals and Tasks Unicast routing in MANETs Energy efficiency & unicast routing Multi-/broadcast routing Geographical routing
Delivery of an IP datagram
View at the data link layer layer:
Internetwork is a collection of LANs or point-to-point links or switched networks that are connected by routers R1 R2
Point-to-point link
Point-to-point link
H2
Ethernet
IP
H1 R3
Token Ring LAN
R4
Ethernet
Delivery of an IP datagram
View at the IP layer:
An IP network is a logical entity with a network number We represent an IP network as a cloud The IP delivery service takes the view of clouds, and ignores the data link layer view
R1
10.2.1.0/24
R2
20.2.1.0/28
H2
IP
10.1.0.0/24
10.1.2.0/24
20.1.0.0/16
10.3.0.0/16
H1
R3
R4
2. 2.
3. 3.
The network prefix of an IP destination address must correspond to a The network prefix of an IP destination address must correspond to a unique data link layer network (=LAN or point-to-point link or unique data link layer network (=LAN or point-to-point link or switched network). switched network). (The reverse need not be true!) (The reverse need not be true!) Routers and hosts that have a common network prefix must be able Routers and hosts that have a common network prefix must be able to exchange IP dagrams using a data link protocol (e.g., Ethernet, to exchange IP dagrams using a data link protocol (e.g., Ethernet, PPP) PPP) Every data link layer network must be connected to at least one other Every data link layer network must be connected to at least one other data link layer network via a router. data link layer network via a router.
Routing tables
Each router and each host keeps a routing table which tells the router how to process an outgoing packet Main columns:
1. 2. 3.
Destination address: where is the IP datagram going to? Next hop: how to send the IP datagram? Interface: what is the output port?
Next hop and interface column can often be summarized as one column Routing tables are set so that datagrams gets closer to the its destination
Destination Next Hop direct direct R4 direct R4 R4 interface eth0 eth0 serial0 eth1 eth0 eth0
R1
10.2.1.0/24
R2
20.2.1.0/28
H2
10.1.2.0/24 20.1.0.0/16 20.2.1.2/28
to: 20.2.1.2
H1
Destination 10.1.0.0/24 10.1.2.0/24 10.2.1.0/24 10.3.1.0/24 20.1.0.0/16 20.2.1.0/28 Next Hop direct R3 R3 R3 R3 R3
10.1.0.0/24
10.3.1.0/16
R3
Destination 10.1.0.0/24 10.1.2.0/24 10.2.1.0/24 10.3.1.0/24 20.1.0.0/16 20.2.1.0/28 Next Hop direct direct R4 direct R4 R4
R4
Destination 10.1.0.0/24 10.1.2.0/24 10.2.1.0/24 10.3.1.0/24 20.1.0.0/16 20.2.1.0/28 Next Hop R3 R3 R2 direct direct R2
Delivery of IP datagrams
There are two distinct processes to delivering IP datagrams: 1. Forwarding: How to pass a packet from an input interface to the output interface? 2. Routing: How to find and setup the routing tables? Forwarding must be done as fast as possible:
on routers, is often done with support of hardware on PCs, is done in kernel of the operating system
Processing of an IP datagram in IP
Routing Protocol Static routing UDP TCP
Demultiplex Yes routing table Lookup next hop Yes IP forwarding enabled? No No Destination address local?
IP module
Send datagram
Discard
Input queue
Processing of an IP Datagram in IP
Processing of IP datagrams is very similar on an IP router and a host Main difference: IP forwarding is enabled on router and disabled on host IP forwarding enabled if a datagram is received, but it is not for the local system, the datagram will be sent to a different system IP forwarding disabled if a datagram is received, but it is not for the local system, the datagram will be dropped
IP header validation Process options in IP header Parsing the destination IP address Routing table lookup Decrement TTL Perform fragmentation (if necessary) Calculate checksum Transmit to next hop Send ICMP packet (if necessary)
Destination address network prefix or host IP address or loopback address or default route
Next hop/ interface IP address of next hop router or Name of a network interface
Default route
Loopback address
Next hop R1 R2 R3 R3 R4 R3 R5
Host route, loopback entry 32-bit prefix match Default route is represented as 0.0.0.0/0 0-bit prefix match
The longest prefix match for 128.143.71.21 is for 24 bits with entry 128.143.71.0/24 Datagram will be sent to R4
Route Aggregation
Longest prefix match algorithm permits to aggregate prefixes with identical next hop address to a single entry This contributes significantly to reducing the size of routing tables of Internet routers
Destination
10.1.0.0/24 10.1.2.0/24 10.2.1.0/24 10.3.1.0/24 20.2.0.0/16 30.1.1.0/28
Next Hop
R3 direct direct R3 R2 R2
Destination
10.1.0.0/24 10.1.2.0/24 10.2.1.0/24 10.3.1.0/24 20.0.0.0/8
Next Hop
R3 direct direct R3 R2
Destination
0.0.0.0/0
Next Hop/interface
10.0.2.1
Static configuration of network routes or host routes Update of routing tables through routing protocols ICMP messages
Internet Control Message Protocol
IP H eader
20 b ytes
IC M P m essage
8-bit code 16-bit checksum
8-bit type
R2
Ethernet
H1
Ethernet
H1
Goal: Derive a mechanism that allows a packet sent from an arbitrary node to arrive at some arbitrary destination node
The routing & forwarding problem Routing: Construct data structures (e.g., tables) that contain information how a given destination can be reached Forwarding: Consult these data structures to forward a given packet to its next hop
Challenges
Nodes may move around, neighborhood relations change Optimization metrics may be more complicated than smallest hop count e.g., energy efficiency
10
table-driven
11
Proactive Protocols
Idea: Start from a +/- standard routing protocol, adapt it Adapted distance vector: Destination Sequence
Based on distributed Bellman Ford procedure Add aging information to route information propagated by distance vector exchanges; helps to avoid routing loops Periodically send full route updates On topology change, send incremental route updates Unstable route updates are delayed + some smaller changes
12
Practically:
Each node maintains topology table of network (as in LS) Unlike LS: only distribute link state updates locally More frequent routing updates for nodes with smaller scope
13
Practically: Dynamic Source Routing (DSR) Use separate route request/route reply packets to discover route
Data packets only sent once route has been established Discovery packets smaller than data packets
2 7 5
[1,7]
6
7] [1,
7
[1,4]
1 2
[5,3,7,1]
, [1 2] 7,
[1,7,2]
5
4 6
[1,4,6]
4 6 3
[1,7,3]
Node 5 uses route information recorded in RREQ to send back, via source routing, a route reply
14
Promiscuous operation of radio devices nodes can learn about topology by listening to control messages Random delays for generating route replies
Many nodes might know an answer reply storms NOT necessary for medium access MAC should take care of it
Salvaging/local repair
When an error is detected, usually sender times out and constructs entire route anew Instead: try to locally change the source-designated route
15
16
4 3 A 1 2 3 D B 1 2 3 E 1 4 H
Example: Send data from node A to node H
2 1 C 2 4 2 F G 2
Seems trivial use proper link/path metrics (not hop count) and standard routing
2 2
4 3 A 1 2 3 D B 1 2 3 E 1 4 H 2 2 G 2 4 2 F 1 C 2 2
17
braided
Source
18
Mesh
Trees are only 1-connected ! use meshes to provide higher redundancy and thus robustness in mobile environments
total cost
Destination 1
19
Mesh
Single core
Multiple core
If local multicast is cheaper than repeated unicasts, then wireless multicast advantage is present
Can be assumed realistically
20
Idea: Use a minimum-spanning-tree-type construction (Prims algorithm) But: Once a node transmits at a given power level & reaches some neighbors, it becomes cheaper to reach additional neighbors From BIP to multicast incremental power (MIP):
Start with broadcast tree construction, then prune unnecessary edges out of the tree
21
BIP Algorithm
BIP Example
Round 1:A 5 S 10 D 1 C 3 1 7 Round 4:A 2 S (3) 7 D C (1) 6 D C (1) 3 B S (5) 10 7 D 1 C 3 B Round 2:A 4 S (1) 9 2 7 D Round 5: A 3 B 1 C 3 B S (3) 7 7 Round 3: A 2 3 B
22
Sink
Event
Geographic Routing
Routing tables contain information to which next hop a packet should be forwarded
Explicitly constructed
Geographic routing
Options
Send to any node in a given area geocasting Use position information to aid in routing position-based
routing
23
Directional routing
Choose next hop that is angularly closest to destination Choose next hop that is closest to the connecting line to destination Problem: Might result in loops!
24
GPSR Example
Route packet from node A to node Z
Leave face routing E I
K Z
D J G L
25
GeRaF
How to combine position knowledge with nodes turning on/off?
Goal: Transmit message over multiple hops to destination node; deal with topology constantly changing because of on/off node
26
GeRaF Example
A4 A3 A2 A1
1 D
D-1
Adaptive distances packet is forwarded by node u if node u is closer to destination zones center than predecessor node v (packet has made progress)
27
S D A
Remark: This also works for anycasting where destination nodes need not necessarily be neighbors
Packet is then delivered to some (not even necessarily closest) member of the group
28
Conclusion
Routing exploit various sources of information to find destination of a packet
Explicitly constructed routing tables Implicit topology/neighborhood information via positions
29