You are on page 1of 94

Internet Routing Protocols

Outline
Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF) Border Gateway Protocol (BGP)

Autonomous Systems
Global Internet viewed as collection of autonomous systems. Autonomous system (AS) is a set of routers or networks administered by a single organization Same routing protocol need not be run within the AS But, to the outside world, an AS should present a consistent picture of what ASs are reachable through it Stub AS: has only a single connection to the outside world. Multihomed AS: has multiple connections to the outside world, but refuses to carry transit traffic. It carries only local traffic Transit AS: has multiple connections to the outside world, and can carry transit and local traffic.

AS Number
For exterior routing, an AS needs a globally unique AS 16-bit integer number Currently, there are about 11,000 registered ASs in Internet (and growing) Stub AS, which is the most common type, does not need an AS number since the prefixes are placed at the providers routing table Transit AS needs an AS number Request an AS number from the ARIN, RIPE and APNIC

Inter and Intra Domain Routing


Interior Gateway Protocol (IGP): routing within AS and relies on IP address to construct path RIP, OSPF Exterior Gateway Protocol (EGP): routing between ASs and relies on AS numbers to construct AS paths BGPv4
R R IGP R EGP R R AS C R IGP R IGP R

AS A

AS B

Outline
Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF) Border Gateway Protocol (BGP)

Routing Information Protocol (RIP)


RIP based on routed, route d, distributed in BSD UNIX Uses the distance-vector algorithm Runs on top of UDP, port number 520 Metric: number of hops Max limited to 15 suitable for small networks (local area environments) value of 16 is reserved to represent infinity small number limits the count-to-infinity problem

RIP Operation
Router sends update message to neighbors every 30 sec A router expects to receive an update message from each of its neighbors within 180 seconds in the worst case If router does not receive update message from neighbor X within this limit, it assumes the link to X has failed and sets the corresponding minimum cost to 16 (infinity) If the router later receives a valid min cost to X from another neighbor, the router will replace infinity with the new min cost Uses split horizon with poisoned reverse to reduce routing loops Convergence speeded up by triggered updates neighbors notified immediately of changes in distance vector table

Request/Response 0 Command 2 for IP

RIP Message Format


1/2 8 Version 16 Zero Zero 31

Address family identifier IP address Zero Zero Metric

RIP entry

...
Up to 25 RIP entries per message

RIP Message Format


Command: request (value 1) or response (value 2) Version: v1 or v2 Address Family: identify the type of address, the value is 2 for IP IP Address: network or host address Metric: number of hops to destination, range from 1 to 15. The value of 16 indicates that the destination is unreachable

RIP Message Format


Each RIP entry is 20 bytes long and consists of an address family identifier, an IP address, a metric and some fields are set to zero The limitations are
Limited metric use Protocol cannot take into account of network load conditions, the protocol cannot differentiate between high and low bw links Slow convergence although split horizon helps speed up convergence, the protocol may perform poorly under certain types of failures

Allows the RIP packets to carry more info (Ex: subnet mask, next hop and routing domain) Provides a simple authentication procedure

Outline
Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF) Border Gateway Protocol (BGP)

OSPF
Fixes some of the deficiencies in RIP Enables each router to learn complete network topology Each router monitors the link state to each neighbor and floods the link-state information to other routers Called link-state protocol Each router builds an identical link-state database Allows router to build shortest path tree with router as root OSPF typically converges faster than RIP when there is a failure in the network The shortest path is computed by Dijkstras algorithm

OSPF Features
Multiple routes to a given destination, one per type of service Support for variable-length subnetting by including the subnet mask in the routing message More flexible link cost which can range from 1 to 65,535 Distribution of traffic over multiple paths of equal cost Authentication to ensure routers exchange information with trusted neighbors Multicast rather than broadcast of its messages to reduce the load on systems that do not understand OSPF Support host-specific routes as well as net-specific routes Designated router to minimize table maintenance overhead To improve scalability, OSPF introduces a two level hierarchy that allows an AS to be partitioned into groups called areas, that are connected by a central backbone area

Flooding
Used in OSPF to distribute link state (LS) information Forward incoming packet to all ports except where packet came in Packet eventually reaches destination as long as there is a path between the source and destination Generates exponential number of packet transmissions Approaches to limit # of transmissions: Use a TTL at each packet; wont flood if TTL is reached Each router adds its identifier to header of packet before it floods the packet; wont flood if its identifier is detected Each packet from a given source is identified with a unique sequence number; wont flood if sequence number is same

OSPF Network
To improve scalability, AS may be partitioned into areas Area is identified by 32-bit Area ID Router in area only knows complete topology inside area & limits the flooding of link-state information to area Area border routers summarize info from other areas, that have connections to multiple areas Each area must be connected to backbone area (0.0.0.0) Distributes routing info between areas

OSPF Network
Four types of routers are defined Internal router has all links to nets within the same area Area border router has links to more than one area backbone router has links connected to the backbone Autonomous system boundary router (ASBR) has links to another autonomous system ASBRs learn about routes outside the AS through an exterior gateway protocol such as BGP

OSPF Areas
To another AS
N1 R1 N4

N5
R3 R6 R7 N6 R5

N2 R2

R4 N3

Area 0.0.0.1

R8

Area 0.0.0.0

Area 0.0.0.2

ASBR: 4 ABR: 3,6,8 IR: 1,2,7 BBR: 3,4,5,6,8

N7

R = router N = network Area 0.0.0.3

Neighbor, Adjacent & Designated Routers


Neighbor routers: two routers that have interfaces to a common network Neighbors are discovered dynamically by Hello protocol Adjacent router: neighbor routers become adjacent when they synchronize topology databases by exchange of link state information Neighbors on point-to-point links become adjacent Routers on multiaccess nets become adjacent only to designated & backup designated routers Reduces size of topological database & routing traffic A multiaccess network is a set of routers that can communicate directly with each other Uses a designated routers on multiaccess network

Designated Routers
Reduces number of adjacencies Elected by each multiaccess network after neighbor discovery by hello protocol Generates link advertisements that list routers attached to a multi-access network Backup prepared to take over if designated router fails

OSPF Operation
OSPF packets transmitted directly on IP OSPF packets sent to multicast address 224.0.0.5 OSPF packets sent on specific IP addresses on non-broadcast nets Five OSPF packet types: Hello Database description Link state request Link state update Link state ack

OSPF Header
0 Version 8 Type Router ID 16 Packet length 31

Area ID

OSPF
common

Checksum

Authentication type

header

Authentication

Authentication
OSPF

Data

packet body

OSPF Header
Version: current version is 2 Type: specifies the type of OSPF packet (Hello, Database description, Link state request, Link state update, Link state acknowledgements) Packet Length: specifies the length of OSPF packet in bytes, including the OSPF header Router ID: identifies the sending router, set to the IP address of one of its interfaces Area ID: identifies the area this packet belongs to. The area ID of 0.0.0.0 is reserved for backbone Authentication Type and Authentication: used to authenticate OSPF packets

OSPF Stages
1. Discover neighbors by sending Hello packets (every 10 sec) and designated router elected in multiaccess networks Adjacencies are established & link state databases are synchronized Link state advertisements (LSAs) are exchanged by adjacent routers to allow topological databases to be maintained and to advertise interarea and interAS routes The routers use the info in the database to generate routing table

2. 3.

4.

We elaborate on OSPF stages in following

Stage 1: OSPF Hello Packet


Each router broadcasts a Hello packet periodically onto its network When a router receives a Hello packet, it replies with a Hello packet containing the router ID of each neighbor it has seen When a router receives a Hello packet containing its router ID in one of the neighbor fields, the router is assured that communication to the sender is bidirectional Designated routers are elected in each multiaccess network after neighbor discovery The election is based on the highest value of the priority and ID fields

Stage 1: OSPF Hello Packet

Send Hello packets to discover, establish & maintain neighbor relationship

Stage 1: OSPF Hello Packet


Network Mask: is associated with the interface the packet is sent on Hello interval: number of seconds between Hello packets Options: optional capabilities that are supported by the routers Priority: specifies the priority of the routers, used to elect designated router & backup Dead interval: # sec before declaring a non-responding neighbor down Designated router: identifies the designated router for this network. This field is set to 0.0.0.0 if there is no DR Backup DR: same as DR Neighbor: the Router ID of each neighbor from whom Hello packets have recently been received

Stage 2: OSPF Database Description


Involves establishing adjacencies between a subset of the routers in AS Once two neighboring routers establish the connectivity between them, they exchange database description packets to synchronize their link state databases The database description packet may contain multiple LSA headers The routers send only their LSA headers instead of sending their entire database

Stage 2: OSPF Database Description

Stage 2: OSPF Database Description


Interface MTU: specifies the maximum transmission unit of the associated interface Options: optional capabilities that are supported by the router I bit: the Init bit is set to 1 if this packet is the first packet in the sequence of the database description packets M bit: the more bit is set to 1 if more database description packets follow MS bit: the master/slave bit indicates that the router is the master. Otherwise it is the slave. The router with the highest router ID is the master Database description sequence number: identifies the packet number sequentially so that the receiver can detect missing packet. The master sets the sequence number LSA header: the state of the router or network. Each LSA header contains enough information to uniquely identify an entry in the LSA (type, ID, & advertising router)

LSA Header
0 16 24 31

Link-state age

Options

Link-state type

Link-state ID

Advertising router

Link-state sequence number

Link-state checksum

Length

LSA Header
Link state age : describes how long ago the LSA was originated. Options : Optional capabilities that are supported by the router. Link-state type : specifies the type of LSA . The possible types are: router, network, summary( for IP network), summary (for ASB routers), and AS-external. In a network of routers connected by point-to-point links, OSPF uses only router LSAs. Link-state ID : this field identifies the piece of the routing domain that is being described by the LSA. The contents of this field depend on the link-state type.

LSA Header
Advertising router : identifies the router ID of the router that originated the LSA. Link-state sequence number : numbers the LSAs sequentially & can be used to detect old or duplicate LSAs. Link-state checksum: the checksum includes the entire contents of the LSA except the link-state age. Length: specifies the length in bytes of the LSA including this header

LSA Header
There are several link state types
Router link advertisement: generated by all OSPF routers and is flooded within the area only Network link advertisement: generated by all Designated routers and is flooded within the area only Summary link advertisement: generated by all area border routers, it gives routes to destinations in other areas and routes to ASBRs AS External link advertisement: generated by all ASBRs routers, describes routes to destinations outside the OSPF network and is flooded in all areas in the OSPF network

Stage 3: OSPF Link State Request


0 Link-state type Link-state ID Advertising router 31

...

Router sends a LS request (type 3) packet to neighbor to update part of its link-state database Each LSA request is specified by the link state type, link state ID, and the advertising router.

OSPF Link State Update


0 Number of LSAs 31

LSA 1

...
LSA n

In response to LS request or router finds the link state has changed, the router will send new LS info using the LS update message (type 4) Contents are composed of link state advertisements (LSAs) LS update message is acknowledged using LS ack pkt to ensure that the flooding algorithm is reliable; Link state acknowledgement packets consist of a list of LSA headers.

OSPF Link State Update


0 Number of LSAs 31

LSA 1

...
LSA n

When the link state database is updated, the router needs to recompute the shortest path algo and modify the RT according to the updated info

Example of an OSPF link state update packet

Outline
Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF) Border Gateway Protocol (BGP)

Exterior Gateway Protocols


The Internet is woven into a coherent whole by Exterior Gateway Protocols (EGPs) that operate between ASs EGP enables two ASs to exchange routing information about: IP traffic can flow across the AS border EGP path selection guided by policy issues (regarding the type of info that can cross a border) rather than path optimality The BGP is an interAS or interdomain routing protocol BGP used to exchange network reachability info among BGP routers or BGP speakers

Interdomain Routing with BGP


Only EGP routers are shown

R2 AS2 R1

R3

N1 reachable through AS3 R4


N1 AS3

AS1

R4 advertises that network N1 can be reached through AS3


R3 examines announcement & applies policy to decide whether it wants to forward its packets to N1 through R4 If yes, routing table updated in R3 to indicate R4 as next hop to N1

Interdomain Routing with BGP

N1 reachable through AS2

R2 AS2

R3

R1 AS1

R4
N1 AS3

Suppose AS2 willing to carry transit packets from AS1 to N1


R2 advertises to AS1 the reachability of N1 through AS2 R1 applies its policy to decide whether to send to N1 via AS2

BGP Router
Each BGP router establishes a TCP connection with one or more BGP routers A pair of BGP routers exchange BGP messages to set up a BGP session Exchanges info about new routes that are active or about old routes that have become inactive and to report error that lead to termination of the TCP connection The network reachability info contains a sequence of Ass that packets must traverse to reach a destination network or a group of networks

A graph of AS connectivity from AS1 to other ASs


AS2 AS1 AS3 AS6

AS5

AS4

AS7

BGP exchange network reachability information among BGP routers (also called BGP speakers) Network reachability info contains sequence of ASs that packets traverse to reach a destination network Info exchanged between BGP speakers allows a router to construct a graph of AS connectivity
Routing loops can be pruned Routing policy at AS level can be applied

BGP Features
BGP is path vector protocol: advertises sequence of AS numbers to the destination network Path vector info used to prevent routing loops BGP enforces policy through selection of different paths to a destination and by control of redistribution of routing information The BGP routing process begins with the application of import policies to accept, deny or set preferences on the route advertisements received from the neighbors The best routes are selected and the RT are set Export policies are applied to determine which routes should be advertised to neighbors Import policies can be used to filter out route info (unreliable)

BGP Speaker & AS Relationship


BGP speaker: a router running BGP Peers or neighbors: two speakers exchanging information on a connection BGP peers run over TCP to exchange messages (reliability) Initially, BGP peers exchange entire BGP routing table Incremental updates sent subsequently Reduces bandwidth usage and processing overhead Keepalive messages sent periodically (30 seconds) to ensure that the connection is alive and to detect a bad connection Notification msgs are sent in response to errors Internal BGP (iBPG) connections inside an AS External BGP (eBGP) connections across AS borders

iBGP & eBGP


R eBGP R iBGP R R eBGP iBGP R iBGP iBGP R iBGP eBGP R eBGP R

iBGP

eBGP to exchange reachability information in different ASs


eBGP peers directly connected

iBGP to ensure net reachability info is consistent among the BGP speakers in the same AS
usually not directly connected iBGP speakers exchange info learned from other iBGP speakers, and thus fully meshed (TCP connections)

Path Selection
Each BGP speaker Evaluates paths to a destination from an AS border router Selects the best that complies with policies Advertises that route to all BGP neighbors BGP assigns a preference order to each path & selects path with highest value; BGP does not keep a cost metric to any path When multiple paths to a destination exist, BGP maintains all of the paths, but only advertises the one with highest preference value

BGP Protocol
Opening & confirming of a BGP connection with a neighbor router Maintaining the BGP connection Sending reachability information Notification of error conditions

BGP Message Header Format

All BGP msgs begin with a fixed size header that identifies the msg type Marker: authenticates incoming BGP messages or detects loss of synchronization between a pair of BGP peers. Length: total length of the msg in octet, including header Type: the type of the msg, 4 msg types are
OPEN UPDATE NOTIFICATION KEEPALIVE

BGP Open Message

The first msg sent by a BGP router after the TCP connection is established Marker: authenticates incoming BGP messages or detects loss of synchronization between a pair of BGP peers Version: BGPv4 My autonomous system: AS number of the sending router

BGP Open Message

Hold time: this field is used by the sender, to propose the number of seconds between transmission of successive KEEPALIVE messages. The value 0 indicates that KEEPALIVE messages will not be exchanged at all BGP ID: identifies sending BGP router; value is determined by one of the IP local interface addresses of the BGP router; used to transmit the BGP msgs Optional parameters length: the total length of the optional parameters in octets, otherwise set to 0

BGP Open Message

Optional parameters: a list of optional parameters, encoded in TLV (parameter type, parameter length, parameter value) structure Currently, only authentication info (parameter type 1) is defined The parameter value contains an authentication code field (one octet) followed by an authentication data field, variable length The authentication code specifies the type of authentication mechanism used, the form and meaning of the authentication data, and the algo used for computing the value of the marker

BGP KeepAlive Message


0 16 24 31

Marker

Length

Type: KEEPALIVE

BGP speakers continuously monitor the reachability of the peers by exchanging the KEEPALIVE messages periodically KEEPALIVE message is BGP header with the type field set to 4 This msg are exchanged to prevent the hold timer from expiring

BGP Notification Message


0 8 16 24 31

Marker

Length Error subcode

Type: NOTIFICATION Data

Error code

When BGP speaker detects error or exception, it sends NOTIFICATION message and then closes TCP connection Error Code indicates the type of error condition The error subcode provides more specific info about the nature of the error The data field describes the reason for the notification

BGP Error codes & subcodes

Message header error 1. connection not synchronized 2. Bad message length 3. Bad message type OPEN message error 1. unsupported version number 2. Bad peer AS 3. Bad BGP identifier 4. unsupported option parameter 5. Authentication failure 6. Unacceptable Hold Time UPDATE message error 1. Malformed attribute list 2. Unrecognized well-known attribute 3. missing well known Attribute 4. attributes flags error 5. attribute length error 6. invalid origin attribute 7. AS routing loop 8. invalid NEXT_HOP attribute 9. optional attribute error 10. invalid attribute error 11. Malformed AS_PATH Hold time expired Finite state machine error Cease

Unfeasible routes length (two octets)

Update Message

Withdrawn routes (variable)

Total path attribute length (two octets)


Path attributes (variable) Network layer reachability information (variable)

After connection established, BGP peers exchange routing information using the UPDATE messages UPDATE messages used to construct a graph of AS connectivity Info: Unfeasible Routes, Path Attributes; Network Layer Reachability Information (NLRI). UPDATE message can advertise single route &/or withdraw list of routes.

Route Advertisement
The withdrawn routes field provides a list of IP address prefixes for the routes that need to be withdrawn from BGP RT The unfeasible routes length field indicates the total length of the withdrawn routes field in octets
An UPDATE msg can withdraw multiple unfeasible routes from service

BGP router uses NLRI, Total Path Attributes Length, and Path Attributes, to advertise a route NLRI contains list of IP address prefixes that can be reached by the route Path Attributes describe characteristics of the route and is used to affect routing behavior

Route Advertisement
If the NLRI field is present, the total path attribute length field indicates the total length of the path attributes field in octets. Otherwise set to 0, that no route is being advertised UPDATE message has a variable length sequence of path attributes. Each path attribute is a triple <Attribute Type, Attribute Length, Attribute Value>

Attribute and Attribute Type


Attribute Type Attribute Length Attribute Value
O T P E 0 Attribute Type Code

O bit indicates whether the attribute is optional (O = 1) or required T bit indicates whether the attribute is transitive or nontransitive P bit indicates whether the info in optional transitive attribute is partial (P = 1) or complete E bit indicates whether the attribute length is one octet (E = 0) or two octets

Attributes
Attribute Codes ORIGIN: defines origin of NLRI. A value 0 indicates that the NLRI is interior to the originating AS A value 1 indicates that the NLRI is learned via BGP A value 2 indicates that the NLRI is learned when a static route is distributed to BGP and the origin of the route will be incomplete AS_PATH lists sequence of ASs that route has traversed to reach the destination (detects the loop) NEXT_HOP defines IP address of border router that should be used as the next hop to the destinations listed in the NLRI. For eBGP the next hop is the IP address of the BGP peers. For iBGP the next hop advertised by eBGP should be carried into iBGP

BGP NEXT_HOP
10.1.2.0/24 10.10.1.2

R4 AS2 R1
10.10.3.0/24

10.10.4.2

eBGP

iBGP

10.10.4.1

iBGP

iBGP R2
10.10.1.3

R3 10.10.1.1

Recursive Route Lookup

AS1

- Reach 10.1.2.0/24 via next hop 10.10.1.2 - Reach 10.10.3.0/24 via next hop 10.10.4.1

- Reach 10.1.2.0/24 via next hop 10.10.1.2 - Reach 10.10.3.0/24 via next hop 10.10.4.2

Attributes Codes
MULTI_EXIT_DISC: used to discriminate among multiple entry/exit points to neighboring AS and to hint about the preferred path. LOCAL_PREF: informs other BGP speakers within the same AS of its degree of preference for an advertised route and this attribute is exchanged only among the iBGP peers and should not be exchanged by the eBGP peers ATOMIC_AGGREGATE: informs other BGP speakers that it selected a less specific route without selecting a more specific one which is included in it. AGGREGATOR: specifies last AS number that formed the aggregate route followed by the IP address of the BGP speaker that formed the aggregate route

BGP MULTI_EXIT_DISC
Multi-Exist Discriminator used to give another AS a hint as to which route is preferred In example, AS2 uses weight values to indicate to AS1 that it prefers that route via R2 be used

10.1.1.0/24 with MED=100

R2

R1

AS2

AS1
10.1.1.0/24 with MED=200

R3

Example of BGP packet exchange and update message

Multicast Routing
Reverse path Broadcasting Internet Group Management Protocol Reverse path Multicasting

Multicast Routing
Example: Teleconferencing (a source to multiple destination simultaneously) In unicast routing the source can send each copy of the packet separately to each destination An efficient method to minimize the no. of copies Each packet is transmitted once per link The bandwidth saving becomes more substantial as the no. of destination increases To generate multicast tree, the approach is MBONE Class D address

Multicast Tree Rooted at Source S

Source S sends packets to multicast group G1

Multicast Routing
Multicast routing useful when a source wants to transmits its packets to several destinations simultaneously Relying on unicast routing by transmitting each copy of packet separately works, but can be very inefficient if number of destination is large Typical applications is multi-party conferencing over the Internet Example: Multicast Backbone (MBONE) uses reverse path multicasting

Reverse-Path Broadcasting (RPB)


Fact: Set of shortest paths to the node S forms a tree that spans the network
Approach: Follow paths in reverse direction

Assume each router knows current shortest path to the node S


Upon receipt of a multicast packet, router records the packets source address and the port it arrives on If shortest path to source is through same port, router forwards the packet to all other ports except the one the packet arrived on Else, drops the packet The port over which the router expects to receive multicast packets from a given source is referred as parent port

Reverse-Path Broadcasting (RPB)


Loops are suppressed; each packet forwarded by a router exactly once Implicitly assume shortest path to source S is same as shortest path from source
If paths asymmetric, need to use link state info to compute shortest paths from S (if link state protocol is used)

Example: Router 1 Copies the Multicast Packets

Assume Source S transmits a multicast packet with group G1 and parent ports are shown in bold lines S sends a packet to node 1 Node 1 forwards to all ports, except parent port

Example: Routers 2, 3, 4 and 5 copy the packets

Nodes 2, 3, 4, and 5 broadcast, except on parent ports All nodes, not only G1, receive packets

Example: Routers 6, 7 and 8 copy the packets

BW is wasted regardless of the multicast group This problem can be solved by TRPB Truncated RPB : Leaf routers do not broadcast if none of its attached hosts belong to packets multicast group

Internet Group Management Protocol (IGMP)


Allows a host to signal its multicast group membership to its attached router Runs directly on IP using protocol type 2 Allows hosts to indicate their group members

IGMP Message Format

Internet Group Management Protocol (IGMP)


Version: identifies version number Type: identifies the message type. The type 1 indicates a query message sent by a router and type 2 indicates a report sent by a host Unused: set to 0 Checksum: contains a checksum for all eight bytes of the IGMP message Group Address: Class D address. This field set to 0 in a query message, and is set to a valid group address in the response

Internet Group Management Protocol (IGMP)


When a host wants to join a new multicast group, it sends an IGMP report specifying the group address to join The host does not issue a report if it wants to leave the group Each multicast router periodically sends an IGMP query message to check whether there are hosts belonging to multicast groups All hosts Multicast address (224.0.0.1) Hosts respond with list of multicast groups they belong to Hosts randomize response time; cancel response if other hosts reply with same membership Routers determine which multicast groups are associated with a certain port Routers only forward packets on ports that have hosts belonging to the multicast group

Reverse-Path Multicasting (RPM)


It is selective multicast routing It is an enhancement of TRPB Reverse Path Multicasting (RPM) relies on IGMP to identify multicast group membership Forwards a multicast packet only to a router that will lead to a leaf router with group members The first packet to a given (source, group), i.e. (S,G) is transmitted to all leaf routers using TRPB Each leaf router that has no hosts that belong to this group on any of its ports, sends a prune message to its upstream router to stop sending packets to (S, G)

Reverse-Path Multicasting (RPM)


Upstream routers that receive prune messages from all their downstream routers, send prune messages to its further upstream router Prune entries in each router have finite lifetime If a host requests to join a group, routers can cancel previous pruning with a graft message

Example: Pruning for G1

Routers 3, 4, and 6 send prune messages upstream

Example: RPM Multicast Tree

Graft

RPM multicast tree after pruning

Distance Vector Multicast Routing Protocol


DVMRP is the multicast routing algorithm Based on the combination of RIP and RPM Uses variation of RIP to determine the previous hop towards the source RPM and pruning are then used on the resulting sourcelevel tree Uses tunneling to traverse non-multicast networks Used in MBONE routers Not scalable (inability to operate in large network) 15 hop limit Not desirable to flood the entire Internets leaf routers with the first multicast packets for a particular (S,G)

DHCP, NAT, and Mobile IP

Dynamic Host Configuration Protocol


DHCP automatically configures hosts that connect to a TCP/IP network BOOTP allows a diskless workstation to be remotely booted up in a network DHCP builds on the capability of BOOTP to allow servers to deliver configuration information to a host Uses BOOTPs well-known UDP ports, 67 (server) & 68 (client) Used extensively to assign temporary IP addresses to hosts Allows ISP to maximize usage of their limited IP addresses

DHCP Operation
When a host wishes to obtain an IP address, the host broadcasts DHCP Discover message on its physical network Server replies with Offer message (IP address + configuration information) Several servers may reply to the host, so the host selects one of the offers and broadcasts DHCP Request message The selected server then allocates the given IP address to the host and sends a DHCP ACK message assigning the IP address to the host for some period of lease time T

DHCP Operation
The msg also includes two threshold times T1 (=1/2 T) and T2 (=.875T) When time T1 expires the host attempts to extend the lease period by sending DHCP Request message to original server If the host gets the corresponding ACK msg, receives new values for T, T1 and T2 If no reply by T2, host broadcasts DHCP Request to any server If no reply by T, host must relinquich IP address and start from the beginning

Network Address Translation (NAT)


Specific ranges of IP addresses set aside for use in private networks Use restricted to private internets; routers in public Internet discard packets with these addresses These addresses are considered unregistered A ranges of addresses has been defined for each IP class Range 1: 10.0.0.0 to 10.255.255.255 Range 2: 172.16.0.0 to 172.31.255.255 Range 3: 192.168.0.0 to 192.168.255.255 Network Address Translation used to convert between private & global IP addresses

Network Address Translation (NAT)


NAT: method for mapping packets from hosts in private network into packets that can traverse the Internet NAT also transfers packets arriving from the Internet to the appropriate host in the private network A device (computer, router, firewall) acts as an agent between a private network and a public network A number of hosts can share a limited number of registered IP addresses Map unregistered addresses to registered addresses Maps multiple unregistered addresses into a single registered address (e.g. Home LAN)

NAT Operation (Overloading)


Address Translation Table: 192.168.0.10; x 128.100.10.15; y
192.168.0.13; w 128.100.10.15; z

192.168.0.10;x Private Network 192.168.0.13;w 128.100.10.15;y

NAT Device

Public Network 128.100.10.15; z

Hosts inside private networks generate packets with private IP address & TCP/UDP port #s NAT maps each private IP address & port # into shared global IP address & available port # Translation table allows packets to be routed unambiguously

Mobile IP
Proliferation of mobile devices: PDAs, laptops, cellphones, A simple IP solutions for mobile computers Mobile IP allows a portable devices called mobile hosts to roam from one area to another while maintaining the communication sessions MH must use its permanent IP address even as it roams to another area Problem: IP address specifies point-of-attachment to Internet Changing IP address involves terminating all connections & sessions Mobile IP: device can change point-of-attachment while retaining IP address and maintaining communications

Routing for Mobile Hosts

Home Agent (HA) keeps track of location of each Mobile Host (MH) in its network; HA periodically announces its presence If an MH is in home network, HA forwards packets directly to MH When an MH moves to a Foreign network, MH obtains a care-of-address from foreign agent (FA) and registers this new address with its HA The care-of-address reflects the MHs current location and is typically the address of the FA Once the HA knows the care-of-address of the MH, the HA can forward the registration packet to the MH via the FA

Routing for Mobile Hosts

Correspondent Host (CH) sends packets as usual (1) Packets are intercepted by HA which then forwards to Foreign Agent (FA) (2) FA forwards packets to the MH MH sends packet to CH as usual (3) How does HA send packets to MH in foreign network?

IP - to - IP Encapsulation

The problem is solved by providing a tunnel between the HA and FA Implemented by encapsulating each IP packet at the HA with an outer IP header has HAs address as source address and care-of-address as destination address The FA decapsulates the packet that produce the original packet with the CHs address as source address and the MHs address as dest address and the FA delivers the packet to MH

Route Optimization for Mobile IP

To improve the routing mechanism so that the CH may send packets directly to the care-of-address endpoint in subsequent changes When HA receives packet from CH (1), it tunnels using care-ofaddress (2a); HA also sends a binding message back to the CH containing the current care-of-address (2b) CH can then send packets directly to care-of-address (4)

You might also like