0% found this document useful (0 votes)
70 views2 pages

Quiz 2 Solution: Jon Turner 9/24/2013

If a packet with destination address 0101 0011 arrives, it will be sent to output 5 and the next network component will have IP address 0101 0011. If a packet with destination 1010 1110 arrives, it will be sent to output 7 and the next network component will have IP address 1010 1110. The address 1011 0000 belongs to a router because only router addresses appear in the next-hop-address field. When the second host connects, the server will have 2 sockets. When the third host connects, the server will have 3 sockets. The server only uses one port number, 14357. The values of variables x and y on the server will be x=2.3.

Uploaded by

NickHenry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views2 pages

Quiz 2 Solution: Jon Turner 9/24/2013

If a packet with destination address 0101 0011 arrives, it will be sent to output 5 and the next network component will have IP address 0101 0011. If a packet with destination 1010 1110 arrives, it will be sent to output 7 and the next network component will have IP address 1010 1110. The address 1011 0000 belongs to a router because only router addresses appear in the next-hop-address field. When the second host connects, the server will have 2 sockets. When the third host connects, the server will have 3 sockets. The server only uses one port number, 14357. The values of variables x and y on the server will be x=2.3.

Uploaded by

NickHenry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

- 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]

You might also like