Top Banner
CS 164: Global Internet Slide Set -- 11
29

CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

CS 164: Global InternetSlide Set -- 11

Page 2: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

In this set ...

• More about subnets• Classless Inter Domain Routing (CIDR)

• Border Gateway Protocol (BGP)• Areas with OSPF

Page 3: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Forwarding on Subnets

• Resolution of subnet address: Bitwise ANDing Host IP address with Subnet Mask gives subnet number.

• When a host wants to send an IP packet:– Perform BITwise AND between subnet mask and destination IP address• If result == its subnet no. destination is on same subnet (Send ARP etc.).

– If not, send packet to default router R.

Page 4: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Router Forwarding Tables

• Table holds entries like <SubnetNumber, SubnetMask, NextHop>

• Router ANDs dest addr with subnet mask of each entry.

• Find the right entry (Match with subnet no.) and forward to Next hop.

Subnet mask: 255.255.255.128Subnet number: 128.96.34.0

128.96.34.15128.96.34.1

H1 R1

128.96.34.130 Subnet mask: 255.255.255.128Subnet number: 128.96.34.128

128.96.34.129128.96.34.139

R2H2

128.96.33.1128.96.33.14

Subnet mask: 255.255.255.0Subnet number: 128.96.33.0

H3

Subnet Number Subnet Mask Next Hop

128.96.34.0 255.255.255.128 Int 0

128.96.34.128 255.255.255.128 Int 1

128.96.33.0 255.255.255.0 R2Router R1’s table

2828

Page 5: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Other Issues

• Subnet Mask need not align with byte boundaries (e.g. 255.255.255.128) -- 7 zeroes.

• Non contiguous masks are possible -- 255.255.1.0 -- however, this makes administration difficult -- not recommended.

• One could have multiple subnets on the same physical network ! However, now, hosts on the same net would need to go through a router in order to talk to each other.

Page 6: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Outside View

• Routers outside a group of subnets see the group as a single network -- e.g. 128.96

• However, once packet arrives to the group, routers within the group need to forward the packets to the proper subnet.

Page 7: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Classless Interdomain Routing

• Abbreviated as CIDR.• If a network grows to more than 255 hosts, it

may want a Class B address.• One possible way of avoiding is to handle many

Class C routing addresses -- but then, for this one network, each router has to maintain multiple routing entries.

• CIDR is an attempt to balance the desire to minimize the number of routes that a router needs to know versus the need to hand out addresses efficiently.

• Key property: CIDR enables aggregation of routes !

Page 8: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Removing rigid boundaries

• The idea is to break the rigid boundaries between classes.

• As an example, if a network grows to about 16x255 hosts, assign a contiguous “block” of Class C addresses as opposed to a Class B address.– Example: 192.4.16 to 192.4.31

• Note -- 16 Class C addresses better than 1 Class B in terms of address efficiency.

• In the above example -- the top 20 bits are the same for all the addresses and so we have effectively created a 20 bit network number !

Page 9: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

The Prefix

• The 20 bit address in our previous example is called the “common prefix” for the set of addresses that are allocated.

• Observe -- what we did was that we allocated a block of Class C addresses that shared a common prefix.

• Now, with this new representation, the network numbers are represented by <length,value> -- the length represents the number of bits in the prefix.

Page 10: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Subnets vs CIDR• The concept is similar but:

– In a subnet, a single address is shared among multiple physical networks.

– With CIDR, we collapse multiple network addresses into a longer network address that is typically assigned to an AS (the single AS would have a network number or prefix that reflects the block of addresses).

• Thus, when we want to route to “any” of the networks or even subnets within the AS, we route to the AS.

Page 11: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Route Aggregation

• Specifying simply the prefix associated with an AS (as opposed to stating the subnet number explicitly) is called route aggregation.

• When sending route advertisements (we will see how), it suffices to simply advertise “common prefixes”.

• Note that for this, careful planning would be needed.

Page 12: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

An Example

• Border gateway advertises the common prefix only!

Border gateway(advertises path to11000000000001)

Regional network

Corporation X(11000000000001000001)

Corporation Y(11000000000001000000)

Page 13: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Longest Prefix Match• Prefixes may overlap:

– Example 171.69 and 171.69.10 may be found in the forwarding table of a single router.

– Now, if the destination is 179.69.10.7, both the prefixes match !

– Policy -- Choose the longest prefix. why ?• Choosing the longest prefix the right choice

since an organization may switch ISPs.

ISP 1: 223.1.1.0

223.1.1.240

ISP 2

ISP 2 would advertise 223.1.1.240 explicitly

Page 14: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Revisiting Autonomous Systems

• ASes provide an additional way of hierarchically aggregating routing information in the Internet.

• AS --> also called domains and can run their own protocols within their administrative regimes.

• In each AS, the amount of routing information may be dramatically reduced by using a default router.

• If the corporate network is connected to the Internet by means of a single border router nodes simply send messages to this router.

Page 15: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Internet View Revisited

Backbone service provider

Peeringpoint

Peeringpoint

Large corporation

Large corporation

Smallcorporation

“Consumer” ISP

“Consumer” ISP

“Consumer” ISP

Multihomed -- no transit traffic.

Stub AS -- only local traffic

Service Provider Networks

Page 16: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Some notation

• Peering Point: Points where different providers interconnect.

• Local Traffic: Traffic that begins and terminates on nodes within an AS.

• Transit traffic -- passes through various Ases -- backbones carry transit traffic.

Page 17: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Exterior Gateway Protocol

• Abbreviated as EGP– Hierarchical routing– Reach higher level in the hierarchy

– Tree structure for routing topology.

– No peer-to-peer communications.

Page 18: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Border Gateway Protocol

• Abbreviated BGP -- currently version 4 and is in use.

• Rather complex.• Goals of BGP are modest:

– Any loop free path is to be found between the source and destination (not necessarily min cost or shortest).

Page 19: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Why the modest goal ?

• Each AS may have a different set of nodes, so it is unclear which route is the min-cost route!– Route aggregation also difficult

• Lots of routing information is required in order to guarantee optimality -- may be infeasible.

• Trust -- misconfiguration may not yield optimal.

Page 20: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

BGP Details• BGP supports flexibility -- paths could be chosen by a provider based on a policy.

• To configure BGP, each AS admin picks at least one node to be the “BGP” speaker -- a spokesperson node for the entire AS.– The BGP speaker establishes a BGP session with other BGP speakers in other ASes.

• In addition, there are border gateways using which packets enter/leave ASes.

• Source advertises complete paths (unlike distance vector or link state routing) -- thus loops are prevented.

Page 21: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

An Example

• AS 2 says 128.96, 192.4.15, 192.4.32, 192.4.3 can be reached via AS 2.

• AS 1 advertises that these networks can be reached via <AS1, AS2> --note full path description.

• Loops are avoided.

Regional provider A(AS 2)

Regional provider B(AS 3)

Customer P(AS 4)

Customer Q(AS 5)

Customer R(AS 6)

Customer S(AS 7)

128.96192.4.153

192.4.32192.4.3

192.12.69

192.4.54192.4.23

Backbone network(AS 1)

Page 22: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

AS Numbers

• Each AS is assigned a number -- 16 bits and is unique.– The uniqueness requirement has been relaxed to some extent --stub ASes do not need to be unique.

• One could have up to 65 K AS numbers.

Page 23: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

BGP Messages

• BGP has four types of messages– OPEN: Establish a connection with a BGP peer• Note: BGP connection is TCP based ! (Port no. 179).

– UPDATE -- advertise or withdraw routes to a destination• Note --BGP speaker needs to be able to cancel previously advertised paths if nodes or links fail. This form of negative advertisements are said to advertise “withdrawn routes”.

Page 24: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

BGP Messages (cont)

• KEEPALIVE: Inform a peer that the sender is still alive but has no information to send.

• NOTIFICATION: Notify that errors are detected.

Page 25: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

BGP Message Format

• 16 byte fields.• For more detail look at book.

• Important thing --- BGP updates are of the type prefix/length– 192.4.16/20

• Note that forwarding entries can also be similarly represented.

0 15

Unfeasible routeslength

Withdrawn routes(variable)

Total pathattribute length

Path attributes(variable)

Network layerreachability info

(variable)

Page 26: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Routing with BGP

• For stub AS -- border router injects a default route into the intra-domain routing protocol.

• If there are more than one border router, each injects specific routes that they have learned from outside the AS.

• IBGP or Interior BGP is used to distribute the information to all other routers in the domain (and the speaker).

Page 27: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Routing Areas• Especially used with OSPF.• Subdomains of larger

domains.• One special area called

backbone area. (Area 0).• Within each area -- link

state routing.• Link state advertisements

of non border routers do not leave area.

• Packet goes from non-backbone area to backbone area and crosses the backbone into the Internet.

Area 1Area 0

Area 3

Area 2

R9

R8

R7

R1

R5R6

R4

R3

R2

• A router that is a member of both the backbone and a non-backbone area (R1) is called a area router.

Page 28: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Areas (continued)• Border routers “summarize” routing information and make it available to other areas -- act like proxies --reflect costs to reach networks from an area.

• When there are many possible routes, routers choose cost info to forward packets.

• Trade-offs -- Optimality versus scalability -- All packet have to pass through the backbone area (may not be optimal).

Page 29: CS 164: Global Internet Slide Set -- 11. In this set... More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with.

Next Time

• IPv6• Introduction to the transport layer.