【MOOC Homework】Chapter 4 Network Layer

Not a standard answer nor a reference answer

Do questions only from personal understanding


1. (20 points) Consider the network shown in the figure.

a. Assume the network is a datagram network. shows the forwarding table in router A, where all traffic destined for host H3 is forwarded through interface 3.

destination network link interface
H3 3

b. Assume the network is a datagram network. Can you write the forwarding table in Router A? All traffic from H1 to host H3 is forwarded through interface 3, and all traffic from H2 to host H3 is forwarded through interface 4.

Answer: No. Because the datagram network is only forwarded based on the destination address, it has nothing to do with the source address.

c. Now assume that the network is a virtual circuit network and that there is a call in progress between H1 and H3 and another call in progress between H2 and H3. Write the forwarding table in router A, where all traffic from H1 to host H3 is forwarded through interface 3, and all traffic from H2 to host H3 is forwarded through interface 4.

incoming interface Incoming VC outgoing interface Outgoing VC
1 5 3 6
2 7 4 8

You can choose the VC number at will, as long as it is not the same as the VC number belonging to the same interface and the same link

d. Assuming the same scenario as in c, write down the forwarding tables in nodes B, C and D.

the same way.

2. (20 points) Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix matching and has a forwarding table as shown:

​For each of the 4 interfaces, give the range of destination host addresses for the response and the number of addresses in that range.

host address range Number of host addresses
00 000001 to 00 111110 62
010 00001 to 010 11110 30
011 00001 to 011 11110 30
10 000001 to 10 111110 62
11 000001 to 11 111110 62

3. (20 points) Consider a router that interconnects 3 subnets (subnet 1, subnet 2, and subnet 3). Assume that all interfaces in each of the 3 subnets are required to have the prefix 223.1.17/24. Also assume that subnet 1 is required to support up to 60 interfaces, subnet 2 is required to support up to 90 interfaces, and subnet 3 is required to support up to 12 interfaces. Provide 3 network addresses (of the form abcd/x) that meet these constraints.

Analysis: Subnet 1 needs 6-digit host numbers, subnet 2 needs 7-digit host numbers, and subnet 3 needs 4-digit host numbers.

  • Subnet 1: 223.1.17.128/26
  • Subnet 2: 223.1.17.0/25
  • Subnet 3: 223.1.17.192/28

4. Suppose you are interested in detecting the number of hosts behind a NAT. You observe that the IP layer sequentially stamps an identification number on each IP packet. The identification number of the first IP group generated by a host is a random number, and the identification numbers of subsequent IP groups are assigned sequentially. Assume that all IP packets generated by hosts behind NAT are sent outside.

a. Based on this observation, can you outline a simple technique for detecting the number of distinct hosts behind a NAT, assuming you are able to capture all packets sent out by the NAT? Evaluate your answers.

Because all IP datagrams are sent outside, we can use a packet sniffer to log all IP datagrams generated by hosts behind NATs. Since each host generates a sequence of IP packets with a sequence number and a different initial identification number, IP packets with consecutive IDs can be grouped into a series of clusters. The number of clusters is the number of hosts behind the NAT.

b. Would this technique still work if identification numbers were assigned randomly instead of sequentially? Evaluate your answers.

If these identification numbers are assigned randomly instead of sequentially, then this technique will not work properly because there will be no clusters in the sniffed data.

5. (20 points) Calculate the algorithm table of router A based on Dijkstra algorithm.

Algorithm table calculation process:

Guess you like

Origin blog.csdn.net/m0_64140451/article/details/131372477