Example Supernetting

201 downloads 1808 Views 426KB Size Report
128.96.33.14. Subnet mask: 255.255.255.0. Subnet number: 128.96.33.0. H3. Spring 2004. EE4272. Supernetting – Classless Interdomain Routing (CIDR). ▫.
Example

Routing with subnetting

Start of header Ident = x

Offset = 0

0 Rest of header

„

The host want to send a packet to a certain IP address …

1400 data bytes

… …

„

Start of header Ident = x

1

1). Bitwise AND between its own subnet mask & the destination IP address 2). If the same subnet number is obtained, direct delivery over that subnet 3). If not, it send s the packet to its default router

The job of a router changes when introduce subnetting

Offset = 0

…

the entries of ->

…

the router ANDs the destination address with the Subnet Mask for each



Rest of header 512 data bytes

entry, the matched one is the entry to be use

Start of header Ident = x

1

Offset =64

„

Note: Subnets is not visible from the rest of the Internet

Rest of header

Note: Offset field counts 8-byte units of data, not individual bytes (the change has been made w/ red)

Start of header Ident = x

0

Subnet mask: 255.255.255.128 Subnet number: 128.96.34.0

Forwarding table at router R1

512 data bytes

Offset =128

Rest of header 376 data bytes

Subnet Number 128.96.34.0 128.96.34.128 128.96.33.0

Subnet Mask 255.255.255.128 255.255.255.128 255.255.255.0

128.96.34.15

Next Hop interface 0 interface 1 R2

128.96.34.1 H1 R1

Spring 2004

EE4272

Supernetting – Classless Interdomain Routing (CIDR) „

R2

H3

Two scaling concerns in the Internet to be addressed … address assignment efficiency (especially class B IP address) … the growth of backbone routing table

„

Classless Interdomain Routing (CIDR) … try to balance the desire of minimizing the routing table of the routers involved and the desire of handing out IP address efficiently by aggregating the routes (e.g. …) …

Assign block of contiguous network numbers to nearby networks, the common parts of the network numbers -> single network prefix (used in forwarding table)

…

Restrict block sizes to powers of 2

…

Handout blocks of class C address that share a common prefix

Need a routing protocol can deal with these “classless” address with any length of the network number part (e.g. BGP)

EE4272

128.96.33.1

Subnet mask: 255.255.255.0 Subnet number: 128.96.33.0

Problem: if a single AS has n class C network numbers assigned, every backbone router needs n entries in its routing table for that AS

„

„

H2

Supernetting

The IP address structure (w/ class A, B, C) forces to hand out network address space in fixed size chunks of 3 very different size … Unlike subnetting, supernetting gives appropriate # of class C address to cover the expected number of host (address utilization >50%) „

Spring 2004

128.96.34.139

128.96.34.129

128.96.33.14

EE4272

Subnet mask: 255.255.255.128 Subnet number: 128.96.34.128

128.96.34.130

Spring 2004

„

Assign a portion of address space to the ISP, and let ISP assign addresses to its customer

„

It can advise a single route to both customer by just advertising the common 19-bits prefix they share

EE4272

Spring 2004

1

Interdomain Routing

Supernetting „

Essences: … “subnetting” allows a class B kind of IP address be shared by multiple physical networks … “supnetting” aims to collapse the multiple class C kind of IP addresses that would be assigned to a single AS general, it is possible to apply the principle (network prefixes) of CIDR in the Internet service provider network “repeatedly” if addresses are assigned carefully

„

The idea behind ASs (domain) is to provide an additional way to hierarchically aggregate routing information in a large internet, thus improving scalability Intradomain routing (w/ in a single AS): finding “optimal” paths based on the link metrics … Interdomain routing (between ASs) : concerning more on reachability of packets among ASs …

„

Interdomain Routing : a hard problem …

… In

…

„

BGP: finding any loop-free path to the intended destination … …

… CIDR

means prefixes may be of variable length, in case of some addresses may matches more than one prefix, follow the principle of “longest match”

EE4272

… … …

Spring 2004

Exterior Gateway Protocol (EGP): limited to treelike topology(early Internet) Border Gateway Protocol (BGP): flexible to an arbitrarily interconnected set of ASs matter of scale: 140,000 prefix impossible to calculate meaningful path costs cross multiple ASs “BGP speaker” exchange reachability infor. among ASs BGP advertises “complete path” to achieve loop-free No. of nodes involving in BGP is on the order of ASs

Spring 2004

EE4272

BGP Example „

Beside BGP speaker, AS has border gateways which are responsible of forwarding packets between ASs

„

Speaker for AS2 advertises reachability to P and Q …

network 128.96, 192.4.153, 192.4.32, and 192.4.3, can be reached directly from AS2

Regional provider A (AS 2) Backbone network (AS 1) Regional provider B (AS 3)

„

Spring 2004

128.96 192.4.153

Customer Q (AS 5)

192.4.32 192.4.3

Customer R (AS 6)

192.12.69

Customer S (AS 7)

192.4.54 192.4.23

Speaker for backbone advertises …

EE4272

Customer P (AS 4)

networks 128.96, 192.4.153, 192.4.32, and 192.4.3 can be reached along the path (AS1, AS2)

„

To prevent loop, the complete AS path should be carried in the message

„

Speaker can cancel previously advertised paths, in case of failure

„

Note: A “stub AS” has a single connection to one other AS A “transit AS” has connections to more than one other ASs EE4272

Spring 2004

2

IP Version 6 „

… 128-bit addresses (classless) … real-time service … authentication and security … autoconfiguration … end-to-end fragmentation … protocol extensions … multicast

„

Internet Multicast

Features

„

… class

D addresses … demonstrated with MBone … uses tunneling

Header … 40-byte

“base” header headers (fixed order, mostly fixed length)

… extension „ „ „ „

EE4272

fragmentation source routing authentication and security other options Spring 2004

Link-State Multicast „

Each host on a LAN periodically announces the groups it belongs to by Internet Group Management Protocol (IGMP): reading assignment (P331-335)

„

Augment update message (link state packet-LSP) to include set of groups that have members on a particular LAN

„

Each router uses Dijkstra's algorithm to compute shortest-path spanning tree for each source/group pair

„

Each router computes and stores the cache of trees for currently active source/group pairs.

IPv4

„

Integral part of IPv6 … problem

is making it scale

EE4272

Spring 2004

Example

‰ Example shortest-path multicast trees ‰ Member of group G in color

EE4272

Spring 2004

EE4272

Spring 2004

3

Distance-Vector Multicast Reverse Path Broadcast (RPB) „ Each router already knows that shortest path to destination S goes through router N „

„

When receive multicast packet from S, forward on all outgoing links (except the one on which the packet arrived), iff packet arrived from N Eliminate duplicate broadcast packets by only letting “parent” for LAN (relative to S) forward … shortest

path to S (learn via distance vector) … smallest address to break ties EE4272

Spring 2004

Reverse Path Multicast (RPM) „

Goal: Prune networks that have no hosts in group G … Step

1: Determine of LAN is a leaf with no members in G „ leaf if parent is the only router on the LAN „ determine if any hosts are members of G using IGMP

… Step

2: Propagate “no members of G here” information augment update sent to neighbors with set of groups for which this network is interested in receiving multicast packets. „ only happens with multicast address becomes active. „

EE4272

Spring 2004

4