You are on page 1of 7

1. Consider the network below.

a) Suppose that this network is a datagram network. Show the forwarding table in
router A, such that all traffic destined to host H3 is forwarded through interface 3.
b) Suppose that this network is a datagram network. Can you write down a
forwarding table in router A, such that all traffic from H1 destined to host H3 is
forwarded through interface 3, while all traffic from H2 destined to host H3 is
forwarded through interface 4? (Hint: this is a trick question.)
c) Now suppose that this network is a virtual circuit network and that there is one
ongoing call between H1 and H3, and another ongoing call between H2 and H3.
Write down a forwarding table in router A, such that all traffic from H1 destined
to host H3 is forwarded through interface 3, while all traffic from H2 destined to
host H3 is forwarded through interface 4.
d) Assuming the same scenario as (c), write down the forwarding tables in nodes B,
C, and D.

Answer:

a) Data destined to host H3 is forwarded through interface 3

Destination Address Link Interface


H3 3

b) No, because forwarding rule is only based on destination address.

c) One possible configuration is:

Incoming interface Incoming VC# Outgoing Interface Outgoing VC#


1 12 3 22
2 63 4 18
Note, that the two flows could actually have the same VC numbers.

d) One possible configuration is:

Router B.
Incoming interface Incoming VC# Outgoing Interface Outgoing VC#
1 22 2 24

Router C.
Incoming interface Incoming VC# Outgoing Interface Outgoing VC#
1 18 2 50

Router D.
Incoming interface Incoming VC# Outgoing Interface Outgoing VC#
1 24 3 70
2 50 3 76

2. Consider a subnet with prefix 128.119.40.128/26. Give an example of one IP


address (of form xxx.xxx.xxx.xxx) that can be assigned to this network.
Suppose an ISP owns the block of addresses of the form 128.119.40.64/26.
Suppose it wants to create four subnets from this block, with each block having
the same number of IP addresses. What are the prefixes (of form a.b.c.d/x) for
the four subnets?
Answer:
Any IP address in range 128.119.40.128 to 128.119.40.191

Four equal size subnets: 128.119.40.64/28, 128.119.40.80/28, 128.119.40.96/28,


128.119.40.112/28

3. Consider sending a 2400-byte datagram into a link that has an MTU of 700
bytes. Suppose the original datagram is stamped with the identification number
422. How many fragments are generated? What are the values in the various
fields in the IP datagram(s) generated related to fragmentation?
Answer:
The maximum size of data field in each fragment = 680 (because there are 20 bytes IP
2400−20
=⌈ ⌉=4
header). Thus, the number of required fragments 680
Each fragment will have Identification number 422. Each fragment except the last
one will be of size 700 bytes (including IP header). The last datagram will be of size
360 bytes (including IP header). The offsets of the 4 fragments will be 0, 85, 170,
255. Each of the first 3 fragments will have flag=1; the last fragment will have
flag=0.

4. Consider the following networks. 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.
A.

B.
Answer:
Step N’ D(t),p(t) D(u),p(u) D(v),p(v) D(w),p(w) D(y),p(y) D(z),p(z)
0 x ∞ ∞ 3,x 6,x 6,x 8,x
1 xv 7,v 6,v 3,x 6,x 6,x 8,x
2 xvu 7,v 6,v 3,x 6,x 6,x 8,x
3 xvuw 7,v 6,v 3,x 6,x 6,x 8,x
4 xvuwy 7,v 6,v 3,x 6,x 6,x 8,x
5 xvuwyt 7,v 6,v 3,x 6,x 6,x 8,x
6 xvuwytz 7,v 6,v 3,x 6,x 6,x 8,x

5. Consider the network setup in Figure below. Suppose that the ISP instead
assigns the router the address 24.34.112.235 and that the network address of
the home network is 192.168.1/24.
a. Assign addresses to all interfaces in the home network.
b. Suppose each host has two ongoing TCP connections, all to port 80 at host
128.119.40.86. Provide the six corresponding entries in the NAT translation
table.
Answer: read page 378

a) Home addresses: 192.168.1.1, 192.168.1.2, 192.168.1.3 with the router interface


being 192.168.1.4
b)
NAT Translation Table
WAN Side LAN Side
24.34.112.235, 4000 192.168.1.1, 3345
24.34.112.235, 4001 192.168.1.1, 3346
24.34.112.235, 4002 192.168.1.2, 3445
24.34.112.235, 4003 192.168.1.2, 3446
24.34.112.235, 4004 192.168.1.3, 3545
24.34.112.235, 4005 192.168.1.3, 3546
6. Consider the network shown below. Assume that each node initially knows the
costs to each of its neighbors. Consider the distance-vector and show the
distance table entries at node z.

See page 399

Answer:

You might also like