CS 164: Global Internet
1 / 29

CS 164: Global Internet Slide Set -- 11 - PowerPoint PPT Presentation

  • Uploaded on

CS 164: Global Internet Slide Set -- 11. In this set . More about subnets Classless Inter Domain Routing (CIDR) Border Gateway Protocol (BGP) Areas with OSPF. Forwarding on Subnets. Resolution of subnet address : Bitwise ANDing Host IP address with Subnet Mask gives subnet number.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'CS 164: Global Internet Slide Set -- 11' - Sophia

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Slide1 l.jpg

CS 164: Global Internet

Slide Set -- 11

In this set l.jpg
In this set ...

  • More about subnets

  • Classless Inter Domain Routing (CIDR)

  • Border Gateway Protocol (BGP)

  • Areas with OSPF

Forwarding on subnets l.jpg
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.

Router forwarding tables l.jpg
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.



Router R1’s table

Other issues l.jpg
Other Issues

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

  • Non contiguous masks are possible -- -- 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.

Outside view l.jpg
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.

Classless interdomain routing l.jpg
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 !

Removing rigid boundaries l.jpg
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 !

The prefix l.jpg
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.

Subnets vs cidr l.jpg
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.

Route aggregation l.jpg
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.

An example l.jpg
An Example

  • Border gateway advertises the common prefix only!

Longest prefix match l.jpg
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, 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:


ISP 2 would advertise explicitly

Revisiting autonomous systems l.jpg
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.

Internet view revisited l.jpg

Large corporation





Backbone service provider







Large corporation



Internet View Revisited

Multihomed -- no transit traffic.

Stub AS -- only local traffic

Service Provider Networks

Some notation l.jpg
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.

Exterior gateway protocol l.jpg
Exterior Gateway Protocol

  • Abbreviated as EGP

    • Hierarchical routing

    • Reach higher level in the hierarchy

    • Tree structure for routing topology.

    • No peer-to-peer communications.

Border gateway protocol l.jpg
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).

Why the modest goal l.jpg
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.

Bgp details l.jpg
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.

An example21 l.jpg
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.

As numbers l.jpg
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.

Bgp messages l.jpg
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”.

Bgp messages cont l.jpg
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.

Bgp message format l.jpg
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.

Routing with bgp l.jpg
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).

Routing areas l.jpg
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.

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

Areas continued l.jpg
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).

Next time l.jpg
Next Time

  • IPv6

  • Introduction to the transport layer.