You are on page 1of 7

CSC 573 Section 002

Fall 2017

Homework #4

Question 1:

Imagine the Internet is divided into the Autonomous Systems shown below. In this problem we assume
NO subnetting and NO supernetting and NO CIDR are used. A packet is being sent from Host H1 to
Host H2. The packets take the following route: H1 −> R1 −> R2 −> R3 −> R4 −> R5 −> R6 −>H2

Some information: R2, R3, R4, and R5 are gateway routers. Assume that there are many routers and
networks within each AS that are not shown. Assume also that there are NO default entries in routers.
Please answer the questions below in 10 words or less. We are NOT looking for numerical answers.
a. Which of the labeled routers above likely use the BGP routing algorithm to create their
forwarding tables?
b. How many entries does R1’s forwarding table have?
c. Assume that host H1’s IP address is 205.96.17.172, What can we say about the IP address of R1
d. Give an example of an entry in R1’s forwarding table (don’t leave out any fields).
e. How many entries are there in R2’s forwarding table?
f. Suppose AS X thinks that AS Y drops too many packets. Using only BGP, is it possible for AS X to
implement a policy stating that “traffic outbound from my AS should not cross Y?” Why or why
not?
g. Now suppose AS X thinks that AS Y generates a lot of illegal file sharing traffic. Using only BGP is
it possible for AS X to implement a policy stating that, “I don’t want to carry traffic from Y to my
customers?” Why or why not? Assume that AS X does not want to deny transit to traffic from
any other AS.

Solution:

a. R2, R3, R4, R5. Recall that gateway routers speak BGP when computing routes.
b. Number of networks in the AS containing R1. Recall that R1 needs to be able to reach any of the
networks within its AS, not just those networks that it is directly connected to.
c. It has the same network number prefix as H1, namely 205.96.17. Recall that H1 must have the
same network number as R1, since R1 is the next IP hop from H1 and thus R1 has an interface
on the same network as H1. Observing that H1 has a class C IP address, we know that R1 and H1
share the network number 205.96.17.
d. (205.95.17, 2, 8:0:2b:e4:b:1:2) where (network prefix, outing interface, MAC)
e. Number of networks in whole Internet. Remember that R2 is a gateway router and thus needs
to know about every network in the Internet.
f. Yes, assuming it has an alternative route. Prefer paths that don’t contain Y. Of course, if the only
path to a destination contains Y , it cannot reach that destination without going through Y.
g. Not in general. Traffic from a neighbor might be from both good ASs and Y. BGP can only accept
all the traffic by advertising a route or deny all of it by not advertising.

Question 2 (Distance Vector Routing):

Consider the following network, modeled as an undirected graph with all edge weights equal to one.
Suppose all nodes run distance-vector routing with split horizon and poison reverse to compute shortest
paths to all other nodes.

1. What is the largest entry (distance) in any node’s distance vector after the distance-vector
algorithm stabilizes? Write down one of the distance vectors containing this entry.
2. Now suppose the link between A and B goes down. B will advertise a distance of ∞ to A in its
next routing message. What other messages must be propagated before C knows of the new
shortest route to A? (Just specify the originator and destination of each message and the node
and distance advertised)
3. Again assuming the link between A and B goes down, provide a sequence of message
transmissions and arrivals that could convince C to forward packets to A through G (!)
temporarily.
Solution:

1. The answer is 5 (for example, consider nodes J and D).


2. Note that now the only path to A lies through M. The sequence of messages is as follows:
• From M to E: (A, 2)
• From E to C: (A, 3)
3. There are a couple of ways to do this. Here’s the shortest solution I could find: B starts by
advertising a distance of infinity, triggering C’s distance to go to infinity. G’s shortest route to A
still goes through C, so it will suppress advertising that route to C (via split horizon). For C to get
a valid advertisement from G, we first have to get G a route whose first hop is not C. The first
step is for C to advertise a path of length infinity to G. If H now sends an update before it
receives C’s update, it will advertise a path of length 3 to A. If G receives this after the message
from C, it can then advertise a (spurious) path of length 4 to C, not knowing that C lies on that
spurious path. C has to receive this update prior to receiving H’s update that advertises a shorter
path.
Question 3 (BGP):

Consider the following network:

 AS1, AS2, and AS3 are ISPs, peering with each other at the links between routers J-K, N-A, and
D-G.
 AS6 is a customer of AS1 and AS3. Two more customer networks are shown.
 All routers are shown. All links between routers are shown. All networks are running OSPF as their
IGP, and all link costs are equal.
 All providers are running I-BGP.
 The prefix for AS6 is 12.2.0.0/16. The prefix for AS65432 is 35.207.16.0/20. The prefix for the
nameless customer containing router S and host d is 192.20.225.0/24.
 AS1, AS2, and AS3 number their routers out of 1.0.0.0/8, 2.0.0.0/8, and 3.0.0.0/8, respectively.

DO not make any unnecessary assumption. If you have to make any assumptions they have to be
reasonable and state them very clearly.

1. Suppose that AS6 announces its entire prefix out of both X and Y, and that it receives full BGP
tables from its providers. What is the path from a to b? From a to c? From a to d? From c to a?
From d to a?

2. Now suppose that AS6 announces the lower half of its address space (12.2.0.0/17) from the X-E
link, and the upper half from the Y-C link. Let a's IP address be 12.2.33.65, and b's IP address be
12.2.192.66. What is the path from a to b? From a to c? From a to d? From c to a? From d to a?

3. What is undesirable about the flow of traffic in the previous question? Suggest a way to fix it.

4. How would AS6 tell the world that it prefers receiving traffic for the upper half of its address
space only via the C-Y link, unless of course it is broken?

Solution:

1. a to b: a,Z,X,Y,T,B
a to c: a,Z,X,E,C,B,W,U,V,c
a to d: a,Z,X,H,F,J,K,L,S,d
c to a: c,V,U,W,B,C,Y,X,Z,a
d to a: d,S,L,K,J,F,H,X,Z,a

2. a to b: a,Z,X,Y,T,B
a to c: a,Z,X,E,C,B,W,U,V,c
a to d: a,Z,X,H,F,J,K,L,S,d
c to a: c,V,U,W,B,C,E,X,Z,a
d to a: d,S,L,K,J,F,H,X,Z,a

3. What is undesirable is that traffic to a (and b) may be crossing more links than are needed and
may force AS1 to carry more traffic than is needed. This can be fixed in many ways. The simplest
way is to advertise the whole address space through both the XE and CY links

4. By advertising the upper half only through the C-Y link and using the “preference” BGP
attributes.
Question 4:
Consider the following network. With the indicated link costs, use Dijkstra’s shortest-path algorithm to
compute the shortest path from x to all network nodes. Show how the algorithm works by computing a
table similar to the table on slide 14 of Lecture 19.

Solution:

Question 5:
Consider the count-to-infinity problem in the distance vector routing. Will the count-to-infinity problem
occur if we decrease the cost of a link? Why? How about if we connect two nodes which did not
previously have a link?

Solution:

NO, this is because that decreasing link cost won’t cause a loop (caused by the next-hop relation of
between two nodes of that link). Connecting two nodes with a link is equivalent to decreasing the link
weight from infinite to the finite weight.
Question 6:
Consider the network shown below. Suppose AS3 and AS2 are running OSPF for their intra-AS routing
protocol. Suppose AS1 and AS4 are running RIP for their intra-AS routing protocol. Suppose eBGP and
iBGP are used for the inter-AS routing protocol. Initially suppose there is no physical link between AS2
and AS4.

a) Router 3c learns about prefix x from which routing protocol: OSPF, RIP, eBGP, or iBGP?
b) Router 3a learns about x from which routing protocol?
c) Router 1c learns about x from which routing protocol?
d) Router 1d learns about x from which routing protocol?

Solution:

a) eBGP
b) iBGP
c) eBGP
d) iBGP

You might also like