Cns 2640 lecture 6 7 assembled by m ryan byrd
Download
1 / 134

CNS 2640 Lecture 6/7 Assembled by M. Ryan Byrd - PowerPoint PPT Presentation


  • 89 Views
  • Uploaded on

CNS 2640 Lecture 6/7 Assembled by M. Ryan Byrd. NSFNET Backbone. Stanford. ISU. BARNET. MidNet. Regional. Regional. Westnet. Regional. Berkeley. PARC. UNL. KU. UNM. NCAR. UA. Service Provided. Backbone. Stanford. ISU. BARNET. MidNet. Regional. Regional. Westnet.

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

PowerPoint Slideshow about ' CNS 2640 Lecture 6/7 Assembled by M. Ryan Byrd' - sheng


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
Cns 2640 lecture 6 7 assembled by m ryan byrd
CNS 2640 Lecture 6/7Assembled by M. Ryan Byrd


Internet structure

NSFNET Backbone

Stanford

ISU

BARNET

MidNet

Regional

Regional

Westnet

. . .

Regional

Berkeley

PARC

UNL

KU

UNM

NCAR

UA

Service Provided

Backbone

Stanford

ISU

BARNET

MidNet

Regional

Regional

Westnet

Regional

Berkeley

PARC

UNL

KU

UNM

NCAR

UA

Internet Structure

Recent Past

Today


Numbers
Numbers

  • www.icann.org Internet Corporation for Assigned Names and Numbers

  • www.arin.net is our authority and has more details

  • Names and numbers have been privatized. The US government used to allocate them






Popular interior gateway protocols
Popular Interior Gateway Protocols

  • RIP: Route Information Protocol

    • developed at Berkeley

    • distributed with Unix

    • distance-vector algorithm- neighbors

    • based on hop-count

  • OSPF: Open Shortest Path First

    • recent Internet standard

    • uses link-state algorithm-bcast

    • supports load balancing

    • supports authentication


Ip service model
IP Service Model

  • Packet Delivery Model

    • Best Effort

  • Global Addressing Scheme

    • IP Addresses


Packet delivery model
Packet Delivery Model

  • Connectionless (datagram-based)

  • Best-effort delivery (unreliable service)

    • packets are lost

    • packets are delivered out of order

    • duplicate copies of a packet are delivered

    • packets can be delayed for a long time



A partial internet trunk map showing isp access lines
A Partial Internet Trunk MapShowing ISP Access Lines




Ip datagram format
IP Datagram format

  • Version (4): currently 4

  • Hlen (4): number of 32-bit words in header

  • TOS (8): type of service (not widely used QoS)

  • Length (16): number of bytes in this datagram

  • Ident (16): different for each datagram

  • Flags/Offset (16): used by fragmentation

  • TTL (8): number of hops this datagram has travelled

  • Protocol (8): demux key (TCP=6, UDP=17)

  • Checksum (16): of the header only

  • DestAddr & SrcAddr (32)


Fragmentation and reassembly
Fragmentation and Reassembly

  • Each network has some MTU

  • Strategy

    • fragment when necessary (MTU < Datagram)

    • try to avoid fragmentation at source host

    • refragmentation is possible

    • fragments are self-contained datagrams

    • use CS-PDU (not cells) for ATM

    • delay reassembly until destination host

    • do not recover from lost fragments

    • Fragment on 8 byte boundaries

    • Drop the last 3 bits of the offset field



Datagram forwarding
Datagram Forwarding

  • Strategy

    • every datagram contains destination's address

    • if directly connected to destination network, then forward to host

    • if not directly connected to destination network, then forward to some router

    • forwarding table maps network number into next hop

    • each host has a default router

    • each router maintains a forwarding table



Error control overview
Error Control Overview

  • Errors occur due to

    • Noise or interference in the communication channel

    • Congestion in the network where packets musts be dropped

  • Error Control Strategies

    • Error Correcting codes (Forward Error Correction (FEC))

    • Error detection and retransmission Automatic Repeat Request (ARQ)


Cyclic redundancy check
Cyclic Redundancy Check

  • Add k bits of redundant data to an n-bit message.

  • Represent n-bit message as an n-1 degree polynomial; e.g., MSG=10011010 corresponds to M(x) = x7+ x4 + x3 + x1.

  • Let k be the degree of some divisor polynomial C(x); e.g., C(x) = x3+ x2 + 1.


CRC

  • Transmit polynomial P(x) that is evenly divisible by C(x), and receive polynomial P(x) + E(x); E(x)=0 implies no errors.

  • Recipient divides (P(x) + E(x)) by C(x); the remainder will be zero in only two cases: E(x) was zero (i.e. there was no error), or E(x) is exactly divisible by C(x). Choose C(x) to make second case extremely rare.


Example1
Example

  • Make all legal messages divisible by 3

  • If you want to send 10

    • First multiply by 4 to get 40

    • Now add 2 to make it divisible by 3 = 42

  • When the data is received ..

    • Divide by 3, if there is no remainder there is no error

    • If no error, divide by 4 to get sent message

  • If we receive 43, 44, 41, 40, then error

  • 45 would not be recognized as an error



Tcp congestion control1
TCP Congestion Control

  • Idea

    • assumes best-effort network

    • each source determines network capacity for itself

    • uses implicit feedback

    • ACKs pace transmission (self-clocking)


Algorithm
Algorithm:

  • increment CongestionWindow by one packet per RTT (linear increase)

  • divide CongestionWindow by two whenever a timeout occurs (multiplicative decrease)


Underlying best effort network
Underlying best-effort network

  • drops messages

  • re-orders messages

  • delivers duplicate copies of a given message

  • limits messages to some finite size

  • delivers messages after an arbitrarily long delay


Common end to end services
Common end-to-end services

  • guarantee message delivery

  • deliver messages in the same order they are sent

  • deliver at most one copy of each message

  • support arbitrarily large messages

  • support synchronization

  • allow the receiver to apply flow control to the sender

  • support multiple application processes on each host


Simple demultiplexor user datagram protocol udp
Simple Demultiplexor (User Datagram Protocol UDP)

  • Unreliable and unordered datagram service

  • Adds multiplexing

  • No flow control

  • Endpoints identified by ports

    • servers have well-known ports

    • see /etc/services on Unix

  • Optional checksum

    • pseudo header + udp header + data

  • Header format


Udp header

Bits 0 - 15

Bits 16 -31

Source Port

Destination Port

Length

Checksum

Data :::

UDP Header


Tcp header for contrast

0-15

16-31

Source Port

Destination Port

Sequence Number

Acknowledgment Number

Data Offset

reserved

ECN

Control Bits

Window

Checksum

Urgent Pointer

Options and padding :::

Data :::

TCP Header (for contrast)


Demux process value of port
Demux Process (value of “port”)

Application

Application

Application

process

process

process

Ports

Queues

Port 3100

Port 3000

Packets

Port 2000

demultiplexed

UDP

Packets arrive



Overview
Overview

  • Connection-oriented

  • Byte-stream

    • sending process writes some number of bytes

    • TCP breaks into segments and sends via IP

    • receiving process reads some number of bytes

    • Full duplex

  • Flow control: keep sender from overrunning receiver

  • Congestion control: keep sender from overrunning network

  • Read p 272-287 in Cisco book


Tcp segment format

Src Port

Dest Port

SequenceNum

Acknowledgement

0

HdrLen

Flags

Advertised

(4)

(6)

(6)

Window

CheckSum

UrgPtr

options

(variable)

data

TCP Segment Format

  • Each connection identified with 4-tuple:

    • <SrcPort, SrcIPAddr, DstPort, DstIPAddr>

  • Sliding window + flow control

    • Acknowledgment, SequenceNum, AdvertisedWindow

  • Flags: SYN, FIN, RESET, PUSH, URG, ACK

  • Checksum: pseudo header + tcp header + data


Tcp connection establishment and termination

Active Participant

Passive Participant

SYN, SequenceNum = x

SYN + ACK, SequenceNum = y,

Acknowledgement = x + 1

ACK, Acknowledgement = y + 1

TCP Connection Establishment and Termination

  • Three-Way Handshake-random number so that packets from consecutive sessions are unique


Sliding window revisited
Sliding Window Revisited

  • Each byte has a sequence number

  • ACKs are cumulative


Sliding window details
Sliding Window (details)

  • Sending side

    • LastByteAcked  LastByteSent

    • LastByteSent  LastByteWritten

    • bytes between LastByteAcked and LastByteWritten must be buffered

  • Receiving side

    • LastByteRead < NextByteExpected

    • bytes between NextByteRead and LastByteRcvd must be buffered



ARP

D ff.ff.ff.ff.ff.ff

SP 128.187.171.2

SH fe.34.56.32.d5.29

DP 128.187.174.10

DH 0.0.0.0.0.0

D ff.ff.ff.ff.ff.ff

SP 128.187.171.2

SH fe.34.56.32.d5.29

DP 128.187.174.10

DH 0.0.0.0.0.0

D 128.187.174.10

D 44.fe.34.56.32.d5

S 128.187.171.2

S fe.34.56.32.d5.29

D 128.187.174.10

D 44.fe.34.56.32.d5

S 128.187.171.2

S fe.34.56.32.d5.29

D ff.ff.ff.ff.ff.ff

SP 128.187.171.2

SH fe.34.56.32.d5.29

DP 128.187.174.10

DH 0.0.0.0.0.0

D ff.ff.ff.ff.ff.ff

SP 128.187.171.2

SH fe.34.56.32.d5.29

DP 128.187.174.10

DH 0.0.0.0.0.0

D fe.34.56.32.d5.29

SP 128.187.174.10

SH 44.fe.34.56.32.d5

DP 128.187.171.2

DH fe.34.56.32.d5.29

D fe.34.56.32.d5.29

SP 128.187.174.10

SH 44.fe.34.56.32.d5

DP 128.187.171.2

DH fe.34.56.32.d5.29

173

171

Switch

H1

H2

H3

H7

H8

H9

56.47.ef.c6.34.78

172

174

H4

H5

H6

H10

H11

H12

55.7e.c6.11.78.99

H10= IP 128.187.174.10, Ethernet 44.fe.34.56.32.d5


ARP

D ff.ff.ff.ff.ff.ff

SP 128.187.171.2

SH fe.34.56.32.d5.29

DP 128.187.174.10

DH 0.0.0.0.0.0

D 128.187.174.10

D 56.47.ef.c6.34.78

S 128.187.171.2

S fe.34.56.32.d5.29

D 128.187.174.10

D 44.fe.34.56.32.d5

S 128.187.171.2

S 55.7e.c6.11.78.99

D ff.ff.ff.ff.ff.ff

SP 128.187.171.2

SH 55.7e.c6.11.78.99

DP 128.187.174.10

DH 0.0.0.0.0.0

D 55.7e.c6.11.78.99

SP 128.187.174.10

SH 44.fe.34.56.32.d5

DP 128.187.171.2

DH 55.7e.c6.11.78.99

D fe.34.56.32.d5.29

SP 128.187.174.10

SH 56.47.ef.c6.34.78

DP 128.187.171.2

DH fe.34.56.32.d5.29

173

171

Router

H1

H2

H3

H7

H8

H9

56.47.ef.c6.34.78

172

174

H4

H5

H6

H10

H11

H12

55.7e.c6.11.78.99

H10= IP 128.187.174.10, Ethernet 44.fe.34.56.32.d5


Ip routing definitions and terminology
IP Routing Definitions and Terminology

  • Routers are Layer 3 (Network Layer) devices

  • Traditionally routers were called gateways

  • Routers are used for information exchange within a group of networks under the same administrative authority and control (Autonomous Systems)

  • Routing can be both dynamic and static

  • Routing involves the determination of routing paths and the transport of information groups (packets) through an internetwork




Rip packet fields description
RIP Packet Fields Description

  • Command:

    • Indicates that the packet is a request or a response. The request command requests the responding system to send all or part of its routing table. Destinations for which a response is requested are listed later in the packet. The response command represents a reply to a request or, more frequently, an unsolicited regular routing update. In the response packet, a responding system includes all or part of its routing table. Regular routing update messages include the entire routing table.

  • Version number:

    • Specifies the RIP version being implemented. With the potential for many RIP implementations in the Internet, this field can be used to signal different, potentially incompatible, implementations.


Rip packet fields description1
RIP Packet Fields Description

  • Address family identifier:

    • Follows a 16-bit field of all zeros and specifies the particular address family being used. On the Internet, this address family is typically IP (value = 2), but other network types may also be represented

  • Address:

    • Follows another 16-bit field of zeros. In Internet RIP implementations, this field typically contains an IP address

  • Metric:

    • Follows two more 32-bit fields of zeros and specifies the hop count. The hop count indicates how many internetwork hops (routers) must be traversed before the destination can be reached


Ospf open shortest path first
OSPF - Open Shortest Path First

  • OSPF is a relatively recent intra-domain, link state, hierarchical routing protocol developed for IP networks by the Internet Engineering Task Force (IETF)

  • OSPF was derived from an early version of OSI's IS-IS routing protocol


IGRP

  • IGRP is an intra-domain distance vector routing protocol developed in the mid-1980s by Cisco Systems, Inc. It is designed for use in large, complex IP networks.

  • IGRP uses a combination (vector) of metrics. Internetwork delay, bandwidth, reliability, MTU, and load are all factored into the routing decision.


What is a routing protocol
What is a routing protocol?

  • Delivers information about networks this router knows to other routers

  • Receives and records information about other networks from other routers

  • Used to construct a virtual path through a series of routers

  • Provide end to end connectivity for a set of nodes or hosts


What is a distance vector routing protocol
What is a distance vector routing protocol?

  • Based on the Bellman-Ford algorithm

  • Routes are advertised as a vector in the form (distance, direction)

    • Distance is a metric (Usually hop count)

    • Direction is the next-hop router

  • Relies upon information learned from neighbors

  • Common distance vector protocols include RIP, IPX RIP(Novell), IGRP, RTMP(Appletalk)


Review of rip
Review of RIP

  • RIP is an example of a DV routing protocol

  • Widely deployed in 1982, RFC’d in 1988

  • RIP uses hop count for its metric

  • Poor load balancing support

  • Not designed for unequally balanced bandwidth links

  • Lets look at an example…


Improved dv protocols
Improved DV Protocols

  • IGRP, EIGRP

  • Cisco Proprietary

  • Developed in the mid 1980s/mid 1990’s

  • Features an advanced metric system

  • Unequal cost load sharing


E igrp metrics
(E)IGRP Metrics

  • Bandwidth – How big the channel is

  • Delay – Knob to adjust channel use

  • Load – Percent utilization on the channel

  • Reliability – Percent time the channel has been up

  • Provides constants which can be modified to make one variable more important than another


Load balancing
Load Balancing

  • Balances over equal cost paths by default

  • Balances over unequal cost paths with minor configuration

  • You can specify the variance of unequal cost paths to distribute over


Routing protocol types
Routing Protocol Types

Distance Vector

  • Passes routes by next hop and path cost or metric.

  • Takes up little memory

  • Ease of implementation

    Link State

  • Each router meets all others and passes information about the links that attach it to the network

  • Each router contains complete information about the topology and from this information uses Dijkstra’s Algorithm to calculate forwarding decisions

  • Faster Convergence time

  • Uses more memory, complex to implement


DHCP

Dynamic Host Configuration Protocol uses the same frame format and transport mechanism as BOOTP. It is supposed to provide a complete set of parameters to a host that queries the server. The neat new capability that DHCP adds is that it can assign addresses and reuse them.

  • BOOTP : assigns a host an address it can use “forever”

  • DHCP : loans an address to a host and is available again if the host does not renew.


NAT

A Network Address Translator sits on a network and translates IP addresses of multiple stations into one address viewable by the outside world.


The translator
The Translator

The NAT has a set of one or more globally unique IP addresses that it can assign to nodes in the masked network.

If the NAT has a pool of globally unique IP addresses that is less than the number of nodes in the masked network, it can do Network Address Port Translation (NAPT). This translates between address and port pairs, allowing thousands of connections through the translator.

NAT and NAPT have helped delay the deployment of IPv6. These protocols can get ugly when encryption is used.


Autonomous systems
Autonomous Systems

An Autonomous System (or AS) is a set of routers under a single technical administration, like an internet service provider. The administration of an AS appears to other ASs to have a single coherent interior routing plan and presents a consistent picture of what destinations are reachable through its network.

Examples of an AS are Sprint, Qwest, and MCIWorldCom


Gateway protocols
Gateway Protocols

There are 2 types of Gateway Protocols

  • Interior Gateway Protocols are used within Autonomous Systems

  • Exterior Gateway Protocols are used between Autonomous Systems


A problem with distance vector protocols
A Problem with Distance Vector Protocols

Counting to infinity: the LONG convergence time.

Assume each link has a metric of one. A knows that its cost to get to C is 2, B knows that its cost to get to C is 1.

C Crashes!

B discards its distance vector from C and recalculates, using the advertisement of 2 from router A and incrementing it one. Router A receives a metric of 3 to C from router B and changes its distance vector to 4.

This Process continues until routers A and B determine that the metric to C is infinity.

This problem is called counting to infinity.


Solutions
Solutions

  • Hold Down: When a route that is in use goes down, the connected router advertises that path as infinity to the rest of the network. Once a period of time passes, the connected router finds an alternative path. The issue here is that it slows down convergence time and doesn’t always work.

  • Report the entire path: this is expensive and you might as well use a link state algorithm

  • Split Horizon: When Router C Crashes, Router B stops advertising a route to C to Router A. Problem solved…somewhat (next slide)


Split horizon
Split Horizon

Split Horizon still does not solve the count to infinity problem in the topology below if the link to router D goes down. Router B will stop advertising the route to D, but routers A and C will continue to advertise routes to D, counting to infinity.

Counting to infinity doesn’t break the protocol, it just slows network convergence time.


Poison reversal
Poison Reversal

Poison Reversal is used with Split Horizon. Instead of not advertising the route, the router advertises the route with a metric of infinity. This solves the counting to infinity problem.


Classful inter domain routing
“Classful” Inter Domain Routing

In the early days of the internet, the network masks were inferred from the class of IP address to the destination network. They were not passed around by the routing protocols. In this age network masks were not needed by routers, as they could implicitly determine the network mask by looking at the first byte of the IP address in question.

It was assumed that Class A netmasks were 255.0.0.0, Class B netmasks were 255.255.0.0 and Class C netmasks were 255.255.255.0.


Classless inter domain routing
Classless Inter Domain Routing

CIDR routing protocols pass subnet information with their routing information, eliminating the need to infer an address class.

Subnets are thus no longer limited to the classes. They could now be any arbitrary length that the network manager configured (within reason).


More on cidr
More on CIDR

  • The concept of address “classes” goes away. A 16 bit address block is the same as an old class B network.

  • Modern networks can be arbitrarily grouped (multiple class C sized networks, into a class B sized network), or divided (one class B sized network into any set of arbitrary smaller sized networks).

  • A single routing advertisement can cover a block of old style addresses. This makes the size of routing tables smaller.

  • Larger blocks of addresses can be divided and allocated, increasing the lifetime of IPv4.


Routing information protocol
Routing Information Protocol

RIP is an Interior Gateway Protocol that uses the Distance Vector approach to routing. The most primitive version (1) was a class oriented routing protocol. RIP Version 2 adds support for subnet masks and authentication.

RIP works just as I have explained Distance Vector routing protocols.

RIP uses split horizon with poison reversal.


More on rip
More on RIP

  • RIP is designed for smaller simple networks, as the infinity metric is 16 hops. Thus the protocol is limited to networks whose longest path (the network's diameter) is 15 hops with a metric of 1. RIP should not be used in larger networks.

  • Like other Distance Vector routing protocols, RIP counts to infinity to resolve unusual situations.

  • RIP is not appropriate for situations where routes need to be chosen based on real-time parameters such a measured delay, reliability, or load.


Why use rip
Why Use RIP?

Because of the simplicity of the protocol:

  • There are many good, interoperable implementations.

  • These implementations have a minimal number of bugs.

  • There is minimal configuration.


Open shortest path first
Open Shortest Path First

OSPF is an Interior Gateway Protocol that uses the Link State approach to routing.

In OSPF, each router maintains a database describing the Autonomous System's topology.

  • This database is referred to as the link-state database.

  • Each participating router has an identical database.

  • Each individual piece of this database is a particular router's local state (e.g., the router's usable interfaces and reachable neighbors).

  • The router distributes its local state throughout the Autonomous System by flooding.


Hello protocol
Hello Protocol

Routers discover other OSPF capable routers through the Hello Protocol.

Once 2 routers have detected each other, a partial adjacency has been formed. They can now share link state information through the exchange of database description packets.

During and after the Database Exchange Process, each router has a list of those LSAs (Link State Advertisements ) for which the neighbor has more up-to-date instances. Requests are sent until the database is updated, now the routers are fully adjacent.


What happens when there is more than one router on the subnet
What happens when there is more than one router on the subnet?

  • In this situation, the Hello Protocol has the capability to elect a designated router.

  • The router that is first to initialize becomes designated router

  • Or if 2 routers initialize at the same time, DR is determined by priority or router ID.

  • The designated router is the only router on that specific network that shares the database with other routers on that network.


The calculation
The Calculation subnet?

  • OSPF uses Djikstra’s Algorithm to construct a tree of shortest path routes across an autonomous system.

  • This is performed by all routers on the network in parallel.

  • The route costs or metrics are configured by the network administrator.

  • The tree that is calculated determines the entire path, but the router only uses this to determine forwarding of data packets to the next hop router.


Multicast routing
Multicast Routing subnet?

Multicast hosts register with their local router through a protocol called Internet Group Management Protocol.

There are several routing protocols that can route IP multicast packets.

(DVMRP)Distance Vector Multicast Routing Protocol creates source routed tree structures.


Link state routing algorithms

Net topology, link costs known to all nodes subnet?

Link state distribution accomplished via “link state broadcast”

all nodes have same info

Compute least cost paths from a node to all other nodes

use Dijkstra’s algorithm

Link-State Routing Algorithms


Dijkstra s algorithm
Dijkstra’s Algorithm subnet?

Notation:

- c(i,j): link cost from node i to j; cost infinite if not direct neighbors

- D(v): current value of cost of path from source to destination v

- N: set of nodes whose least cost path definitively known

1 Initialization:

2 N = {A}

3 for all nodes v

4 if v adjacent to A

5 then D(v) = c(A,v)

6 else D(v) = infty

7

8 Loop

9 find w not in N such that D(w) is a minimum

10 add w to N

11 update D(v) for all v adjacent to w and not in N:

12 D(v) = min( D(v), D(w) + c(w,v) )

13 /* new cost to v is either old cost to v or known

14 shortest path cost to w plus cost from w to v */

15 until all nodes in N


Dijkstra s algorithm example

A subnet?

D

B

E

F

C

Dijkstra’s Algorithm: Example

D(B),p(B)

2,A

2,A

2,A

D(D),p(D)

1,A

D(C),p(C)

5,A

4,D

3,E

3,E

D(E),p(E)

infinity

2,D

Step

0

1

2

3

4

5

start N

A

AD

ADE

ADEB

ADEBC

ADEBCF

D(F),p(F)

infinity

infinity

4,E

4,E

4,E

5

3

5

2

2

1

3

1

2

1


Link State Broadcast subnet?

S

E

F

B

C

M

L

J

A

G

H

D

K

I

N

represents a node that has received update

represents link


Link State Broadcast subnet?

send to neighbors

S

E

F

B

C

M

L

J

A

G

H

D

K

I

N


Link State Broadcast subnet?

S

E

F

B

C

M

L

J

A

G

H

D

K

I

N

To avoid forwarding the same update multiple times, each update has a

sequence number. If an arrived update does not have a higher seq., discard!

- The packet received by E from C is discarded

- The packet received by C from E is discarded as well

- Node H receives packet from two neighbors, and will discard one of them


Summary of link state broadcast
Summary of Link State Broadcast subnet?

  • Link updates are given sequence numbers

  • Each router maintains the highest seq. seen for each router

  • If the seq. of an arrived update is not higher than the stored seq., discard the update; otherwise, update seq. of the src, and forward the update to all the links except the incoming link

  • To avoid corrupted seq. (or a router reboot) and therefore prevent any update, the state at each router has an age field

  • Updates are sent periodically


Routing in the Internet subnet?

  • The Global Internet consists of Autonomous Systems (AS) interconnected with each other

    • An AS is identified by an AS Number (ASN), e.g. Yale ASN is 29

    • Try %whois or

    • http://www.cs-ipv6.lancs.ac.uk/ftp-archive/6Bone/Whois/internic-asn/asn.txt


Different types of as
Different Types of AS subnet?

Qwest

  • Stub AS: single service provider, e.g. small corporation

    • does not participate in inter-AS protocol

    • has one default route and sends non-local traffic to service provider

  • Multihomed AS: large corporation (no transit)

    • does not participate in inter-AS routing protocol

    • has more than one service providers

  • Transit AS: provider

Yale

default routes 0.0.0.0/0

pointing to provider.

132.130.0.0/16


Routing with AS subnet?

  • Intra-AS

    • Routers in the same AS run the same routing protocol

    • Routers in different AS’s can run different intra-AS routing protocols

    • Such protocols are called Interior Gateway Protocols (IGP)

      • RIP: Routing Information Protocol

      • OSPF: Open Shortest Path First

      • IS-IS: very similar to OSPF (or should we say OSPF is very similar to IS-IS?)

      • IGRP: Interior Gateway Routing Protocol (Cisco)

  • Inter-AS

    • A protocol runs among AS’s is also called an Exterior Gateway Protocol (EGP)

      • Unique standard in the current Internet: Border Gateway Protocol (BGP)


Intra as and inter as routing

Inter-AS subnet?

routing

between

A and B

b

c

a

a

C

b

B

b

a

c

d

Host

h1

A

A.a

A.c

C.b

B.a

Intra-AS and Inter-AS Routing

border (exterior gateway) routers

Host

h2

Intra-AS routing

within AS B

Intra-AS routing

within AS A

interior (gateway) routers


Why different Intra- and Inter-AS Routing? subnet?

Policy:

  • Inter-AS: admin wants control over how its traffic routed, who routes through its net

  • Intra-AS: single admin, so no policy decisions needed

    Scale:

  • hierarchical routing saves table size and reduces update traffic

    Performance:

  • Intra-AS: can focus on performance

  • Inter-AS: policy may dominate over performance


RIP process subnet?

OSPF process

BGP process

RIP routing table

BGP routing table

Many Routing Processes Can Run on a Single Router

BGP

OSPF Routing table

OS kernel

RIP

domain

OSPF

domain

Forwarding Table Manager

Forwarding Table


Rip routing information protocol
RIP ( Routing Information Protocol) subnet?

  • Distance vector algorithm

  • Included in BSD-UNIX Distribution in 1982

  • Link cost: 1

  • Distance metric: # of hops (max = 15 hops)

    • why?

  • Distance vectors

    • exchanged every 30 sec via Response Message (also called advertisement) using UDP

    • Each advertisement: route to up to 25 destination nets


Rip routing information protocol1
RIP (Routing Information Protocol) subnet?

z

w

x

y

A

D

B

C

Destination Network Next Router Num. of hops to dest.

w A 2

y B 2

z B 7

x -- 1

…. …. ....

Routing table in D


Rip link failure and recovery
RIP: Link Failure and Recovery subnet?

If no advertisement heard after 180 sec --> neighbor/link declared dead

  • routes via neighbor invalidated

  • new advertisements sent to neighbors

  • neighbors in turn send out new advertisements (if tables changed)

  • link failure info quickly propagates to entire net

  • Reverse-poison used to prevent ping-pong loops (infinite distance = 16 hops)


Ospf open shortest path first1
OSPF (Open Shortest Path First) subnet?

  • “Open”: publicly available

  • Uses Link State algorithm

    • Link state (LS) packet dissemination

    • Topology map at each node

    • Route computation using Dijkstra’s algorithm


Ospf advanced features not in rip
OSPF “Advanced” Features (not in RIP) subnet?

  • Multiple same-cost paths allowed (only one path in RIP)

  • For each link, multiple cost metrics for different Type Of Service (eg, satellite link cost set “low” for best effort; high for real time)

  • Security: all OSPF messages authenticated (to prevent malicious intrusion); TCP connections used

  • Hierarchical OSPF in large domains


Hierarchical ospf
Hierarchical OSPF subnet?

run OSPF routing limited to backbone.

“summarize” distances to nets in own area, advertise to other Area Border routers.

  • - Link-state advertisements only in area

  • each nodes has detailed area topology;- only know direction (shortest path) to nets in other areas.

Two-level hierarchy: local area, backbone.


Internet inter as routing bgp
Internet Inter-AS Routing: BGP subnet?

  • BGP (Border Gateway Protocol):the de facto standard

  • Path Vector protocol:

    • Similar to Distance Vector protocol

    • Each Border Gateway broadcasts to neighbors (peers) entire path (i.e., sequence of AS’s) to destination

    • e.g., Gateway X may send its path to dest. Z:

      Path (X,Z) = X,Y1,Y2,Y3,…,Z


Bgp policy routing
BGP: Policy Routing subnet?

Suppose: gateway X sends its path to peer gateway W

  • W may or may not select path offered by X

    • cost, policy (e.g., don’t route via competitor’s AS), loop prevention reasons

  • If W selects path advertised by X, then:

    Path (W,Z) = W, Path (X,Z)

  • Note: X can control incoming traffic by controlling its route advertisements to peers:

    • e.g., don’t want to route traffic to Z -> don’t advertise any routes to Z


advertise subnet? path to B and D

advertise path to C, but not D

advertise path to C, but not B

IP traffic

Selective Transit

NET B

NET C

NET A provides transit

between NET B and NET C

and between NET D

and NET C

NET A DOES NOT

provide transit

Between NET D

and NET B

NET A

NET D

Suppose Net C is a paying costumer of Net A


2 1 0 subnet?

2 0

2

4

0

preferred

3 2 0

3 0

1 3 0

1 0

3

3

1

less

preferred

BGP: Policy Interactions Could Lead to Oscillations

Each router has a choice

among two paths;

The policy is to prefer its

counter clock-wise neighbor

  • If each one chooses the first choice, not consistent;

  • If one chooses the second choice, say 1 chooses 10, then 2 will choose 210, the only valid for 3 is 30; however, the choice of 3 forces 1 to change to 130

  • Have not seen oscillations in practice, but this is a hidden threat!

  • Solution: check for dependency!


BGP Operations (Simplified) subnet?

Establish session on

TCP port 179

AS1

BGP session

Exchange all

active routes

AS2

While connection

is ALIVE exchange

route UPDATE messages

Exchange incremental

updates


Igrp interior gateway routing protocol
IGRP (Interior Gateway Routing Protocol) subnet?

  • CISCO proprietary; successor of RIP (mid 80s)

  • Distance Vector, like RIP

  • Several cost metrics (delay, bandwidth, reliability, load etc)

  • Uses TCP to exchange routing updates

  • Loop-free routing via Distributed Updating Alg. (DUAL) based on diffused computation


Bgp messages
BGP Messages subnet?

  • Four types of messages

    • OPEN: opens TCP connection to peer and authenticates sender

    • UPDATE: advertises new path (or withdraws old)

    • KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request

    • NOTIFICATION: reports errors in previous msg; also used to close connection


Why is a routing protocol needed
Why is a routing protocol needed? subnet?

  • Early requirements to exchanges data between computers over interconnected networks.

  • Routing entities had to make a judgement on which path to route traffic to destination.


Background to rip
Background to RIP subnet?

  • RIP dates back to 1969, the early networking days and ARPNET when Xerox and Berkley’s Unix implemented it broadly similar protocols.

  • RIP distributed through ‘route d’ application, included in early Unix O.S.

  • RIP uses a single class of routing algorithm known as distance vector - based on a simple hop count algorithm (derived from Bellman’s equation).

  • Although superseded by more complex algorithms, its simplicity means is still found widely in smaller autonomous systems.


Purpose of routing protocol
Purpose of Routing Protocol subnet?

  • The purpose of RoutING protocols is to supply information needed to do routing of datagrams from router to router.

  • RIP intended for use in IP based network environment.

  • Operating at layer 3 of OSI (Network)

  • RIP makes no formal distinction between networks and hosts.

  • Routers typically provide a gateway for datagrames to leave one network or AS and be forwarded onward to another network.

  • Routers therefore, have to make decisions if there is a choice of forwarding path on offer.


Routing metrics
Routing metrics subnet?

  • Routing entities keep a database (look up table) of basic information based on numeric result s (metric) of an algorithm to forward a datagram onward to its next destination.

  • Each entity participating in routing decisions sends update messages to its neighbour.

  • In order to provide complete network routing information every router within the AS must participate in the protocol.

  • Each router has a lookup table which contains one entry for every destination that is reachable.


How does a metric work
How does a metric work? subnet?

  • Metrics are the result of a formula based on a choice of measurement criteria.

    Example, travel cost by taxi:

    £10 to go by taxi from Edinburgh to Livingston. (P1)

    £25 to go from Livingston to Glasgow (P2)

    £15 to go from Edinburgh to Falkirk (P3)

    £30 to go from Falkirk to Glasgow (P4)

    Cost (Edinburgh, Glasgow) = [P1+P2] = £35

    also/or [P3+P4] = £45


What is in a rip routing table
What is in a RIP routing table? subnet?

  • Address - IP address (IPv4) of host or network destination.

  • Router - First router along the route to destination.

  • Interface - The physical network which must be used to reach the next router.

  • Metric - A number indicating the distance to the destination. This number is the sum of the ‘costs’ that have to be transversed to get to the destination.

  • Timers - Time since entry was last updated and others.

  • Flags - Various flags to indicate status of various adjacent routers (for example).


Other entries in the routing table
Other entries in the routing table subnet?

  • The entries for directly connected networks typically have a value of 1 (a simple hop count).

  • Initially subnet masks were not included in RIP protocol implementations, but were included later to support feature extensions and to identify different subnets within local and distant networks.

  • Administrators may also add static routes for example, which are outside the scope of the routing system.


The rip datagram
The RIP datagram subnet?

  • RIP is a UDP-based protocol.

  • Small regular messages, no need for windowing, handshaking or re-transmission.

  • Frames received and transmitted on UDP port number 520 (Rip 1&2)

  • 1 - 25 RIP routing entries RTEs.


Gateway hierarchy
Gateway Hierarchy subnet?

InternetCore

AutonomousSystem(AS)

AutonomousSystem(AS)


Two levels of routing protocols
Two levels of Routing Protocols subnet?

RoutingDomain

RoutingDomain

IGP

IGP

EGP

RoutingDomain

EGP

EGP

Intra-domainrouting protocol

Exteriorrouting protocol

IGP


Routing protocols
Routing Protocols subnet?

  • Intra-domain Gateway Protocols

    • RIP

    • RIP V2

    • OSPF - open shortest path first

    • IS-IS (similar to OSPF)

  • Exterior Gateway Protocols

    • EGP

    • BGP


RIP subnet?

  • Distance vector routing algorithm based on hops that communicates between routers using UDP

  • On initialization, router determines all available interfaces and sends a REQUEST packet out each interface. Special request for “send everything”

  • On receipt of request,

    • Either return everything

    • Or, for each requested destination, return distance + 1

  • On response

    • Update routing tables


Rip v1 protocol
RIP V1 Protocol subnet?

Command

Version

MBZ

Address Family

MBZ

32-bit IP address

MBZ

MBZ

Metric (value of 1..16)

Up to 24 more routes in same format...


Metrics
Metrics subnet?

N2 is 1 hop

N1

Route to N3via R2 withhop count of 2

R1

N3 is 1 hop

N2

N1 is 1 hop

R2

N3

N2 is 1 hop


Problems
Problems subnet?

  • Hop count limited to 15

    • Can only be used within an AS where maximum network diameter of 15

  • It’s based on HOPS, not e.g., latency or bandwidth

  • No notion of subnet addressing in RIP V1


Rip v2 protocol
RIP V2 Protocol subnet?

Command

Version

Routing domain

Address Family

Route tag

32-bit IP address

32-bit subnet mask

32-bit next-hop IP address

Metric (value of 1..16)

Up to 24 more routes in same format...


Rip v2
RIP V2 subnet?

  • Routing domain is an identifier of the routing daemon

    • Process ID in UNIX

    • …So you can run multiple instances of RIP

  • Route tag carries an autonomous system number for EGP and BGP

  • Next op address is where packets corresponding to that (sub)network should be sent. A value of zero means send to the system sending RIP info.

  • Simple authentication scheme with clear-text password


Distance vector routing
Distance Vector Routing subnet?

  • Also called Bellman-Ford or Ford-Fulkerson algorithms

  • Used by RIP

  • Each router is responsible for keeping track and informing it’s neighbors of its distance to each destination

  • The router computes its distance to a destination based on its neighbors distance to the destination

  • Router must know it’s own ID and the cost of its links to each neighbor


Distance vector routing for address d
Distance Vector Routing For Address “D” subnet?

17

2

Link number

1

2

35

R

3

5

4

41

5

Link cost


Distance vector routing for address d1
Distance Vector Routing For Address “D” subnet?

97

81

17

2

Cost from neighbor to destination D

1

2

35

R

62

3

5

4

41

5

29

118


Distance vector routing for address d2
Distance Vector Routing For Address “D” subnet?

97

81

99

17

2

Cost for Rto get to Dvia this link

98

1

2

35

R

62

3

5

97

4

41

5

70

123

29

118

Minimumcost route


Distance vector routing for address d3
Distance Vector Routing For Address “D” subnet?

70

70

17

2

Cost fromR to D

1

2

35

R

70

3

5

4

41

5

70

70


Problems with distance vector
Problems With Distance Vector subnet?

  • Slow convergence to the lowest cost route

  • Slow recovery time

  • Slow recovery leads to routing problems during recovery

    • Router loops

    • Count to infinity


Routing loops
Routing Loops subnet?

A

A

C

C

B

B

D

D


Count to infinity worse case loop

2 subnet?

4

3

2

1

2

3

1

Count To Infinity (worse case loop)

A

A

A

A

B

B

B

B

C


Ospf open shortest path first2
OSPF - Open Shortest Path First subnet?

  • OSPF uses IP directly (I.e., like ICMP)

  • Routes calculated based on TOS

  • Each interface is assigned a dimensionless cost, for each TOS

  • If several equal-cost routes are available, traffic is load-balanced

  • Subnets are associated with each advertised route

  • Supports authentication

  • Uses multicast to distribute information


Link state routing
Link State Routing subnet?

  • Used by OSPF and IS-IS

  • Construct a Link State Packet that lists neighbors and costs to get to those neighbours

  • Use Dijkstra’s algorithm to compute global routes as a tree from the current router


BGP subnet?

  • Uses TCP

  • Distance vector protocol, but BGP enumerates the route to each destination (using a sequence of AS numbers)

  • Each AS is identified by a 16-bit number


ad