- 1 -
1. (5 points). The table at right represents a forwarding table for
an IP router (for simplicity, we are using 8 bit addresses).
If a packet arrives with destination address 0101 0011, what
output is it sent to, and what is the IP address of the next
network-level component to receive the packet?
5, 0101 0011
If a packet arrives with destination address 1010 1110, what output is it sent to, and what is
the IP address of the next network-level component to receive the packet?
7, 1010 1110
Does the address 1011 0000 belong to a host or a router? How do you know?
It belongs to a router. Only router addresses appear explicitly in the next-hop-address field.
CSE 473 Introduction to Computer Networks
Quiz 2 Solution
Jon Turner 9/24/2013
prefix
next hop
output address
101* 2 1010 1111
0100* 4 0100 0110
0010 0* 6 -
1010 1* 7 -
0101 0* 5 0101 0011
1011 00* 3 1011 0000
0101 11* 1 0101 1100
0010 01* 9 -
- 2 -
2. (5 points). Suppose a server with IP address [Link] starts executing the following lines of
java.
ServerSocket sock = new ServerSocket();
[Link](InetSocketAddress([Link],14357));
Socket connsock1 = [Link]();
Socket connsock2 = [Link]();
InetAddress x = [Link]();
InetAddress y = [Link]();
Now, suppose a host with IP address [Link] executes the following lines.
Socket sockA = new Socket();
[Link](InetSocketAddress([Link],23456));
[Link](InetSocketAddress([Link],14357));
At this point, how many sockets are there at the server?
2
A short while later, another host with IP address [Link] executes the following lines.
Socket sockB = new Socket();
[Link](InetSocketAddress([Link], 54321))
[Link](InetSocketAddress([Link],14357))
At this point, how many sockets are there at the server?
3
How many port numbers are being used at the server?
1
What are the values of the variables x and y at the server?
x=[Link] y=[Link]