Computer Networking Exam 2 Questions and
Answers
A computer with the IP address 10.8.8.5/24 tries to ping 1.2.3.4, which does not exist on the
Internet. If another machine on the 10.8.8.0/24 network tries to sniff the ping packet, will it be
able to get the ping packet? - ✔✔Yes, it will be able to see the ping packet. The ping packet
will be sent to the router first (the destination MAC address of the frame will be the router's
MAC).
What is the network prefix for each of the following hosts: 10.1.2.200/24 and 10.1.2.200/26 -
✔✔10.1.2.0/24 and 10.1.2.192/26
When sending a packet from a client through UDP or TCP, how is the source port and IP
determined? - ✔✔The OS determines both of these.
What are the addresses called at the following layers:
- Transport layer
- Network layer
- Data link layer - ✔✔- Port number
- IP address
- MAC address
In the command "nc -lnu 9090", what do the options "lnu" mean? - ✔✔The l option means
running netcat as a server, u means UDP, and n means to simply print addresses without DNS or
service lookup
What does the "bind" function do? - ✔✔The bind API tells the operating system that their
server will be listening to the specified port on the specified IP address, or all IPs if "0.0.0.0" is
specified
, Why does the client program not have to bind to an IP and port? - ✔✔The OS will do that
automatically when the first packet is sent out from the client program
Why does sniffing use superuser privileges? - ✔✔Sniffing programs need to turn on the
promiscuous mode of the network interface, which requires superuser privileges.
What is promiscuous mode used for? - ✔✔Allowing a network device to intercept and read
each network packet that arrives in its entirety
Why is the loopback interface called "loopback"? - ✔✔Because any traffic that a program
sends on the loopback network is addressed to the same computer. In other words, it "Loops
back"
Why do we need the ARP protocol? - ✔✔To discover the MAC address of a device on the
LAN based on its IP address
What is the value of the destination MAC address field in the ethernet header when an ARP
request is sent out? - ✔✔ff:ff:ff:ff:ff:ff:ff
A computer with the IP address 10.8.8.5/24 tries to ping 10.8.8.100, which does not exist on the
LAN. If another machine on the same LAN tries to sniff the ping packet, will it be able to get the
ping packet? - ✔✔No. The sender will send an ARP request, but since there is no response,
the sender does not know the MAC address of the destination, so the ping packet will never be
sent out.
A computer is on the 10.8.8.0/24 network with the default router set to 10.8.8.1. It tries to ping
93.184.216.34. Before the ping packet is sent out, an ARP request will be sent out. What is the
value of the target IP address field of the ARP message - ✔✔Since 93.184.216.34 is outside,
the ping packet will be sent to the default router, so the target IP address of the ARP packet will
be 10.8.8.1
Answers
A computer with the IP address 10.8.8.5/24 tries to ping 1.2.3.4, which does not exist on the
Internet. If another machine on the 10.8.8.0/24 network tries to sniff the ping packet, will it be
able to get the ping packet? - ✔✔Yes, it will be able to see the ping packet. The ping packet
will be sent to the router first (the destination MAC address of the frame will be the router's
MAC).
What is the network prefix for each of the following hosts: 10.1.2.200/24 and 10.1.2.200/26 -
✔✔10.1.2.0/24 and 10.1.2.192/26
When sending a packet from a client through UDP or TCP, how is the source port and IP
determined? - ✔✔The OS determines both of these.
What are the addresses called at the following layers:
- Transport layer
- Network layer
- Data link layer - ✔✔- Port number
- IP address
- MAC address
In the command "nc -lnu 9090", what do the options "lnu" mean? - ✔✔The l option means
running netcat as a server, u means UDP, and n means to simply print addresses without DNS or
service lookup
What does the "bind" function do? - ✔✔The bind API tells the operating system that their
server will be listening to the specified port on the specified IP address, or all IPs if "0.0.0.0" is
specified
, Why does the client program not have to bind to an IP and port? - ✔✔The OS will do that
automatically when the first packet is sent out from the client program
Why does sniffing use superuser privileges? - ✔✔Sniffing programs need to turn on the
promiscuous mode of the network interface, which requires superuser privileges.
What is promiscuous mode used for? - ✔✔Allowing a network device to intercept and read
each network packet that arrives in its entirety
Why is the loopback interface called "loopback"? - ✔✔Because any traffic that a program
sends on the loopback network is addressed to the same computer. In other words, it "Loops
back"
Why do we need the ARP protocol? - ✔✔To discover the MAC address of a device on the
LAN based on its IP address
What is the value of the destination MAC address field in the ethernet header when an ARP
request is sent out? - ✔✔ff:ff:ff:ff:ff:ff:ff
A computer with the IP address 10.8.8.5/24 tries to ping 10.8.8.100, which does not exist on the
LAN. If another machine on the same LAN tries to sniff the ping packet, will it be able to get the
ping packet? - ✔✔No. The sender will send an ARP request, but since there is no response,
the sender does not know the MAC address of the destination, so the ping packet will never be
sent out.
A computer is on the 10.8.8.0/24 network with the default router set to 10.8.8.1. It tries to ping
93.184.216.34. Before the ping packet is sent out, an ARP request will be sent out. What is the
value of the target IP address field of the ARP message - ✔✔Since 93.184.216.34 is outside,
the ping packet will be sent to the default router, so the target IP address of the ARP packet will
be 10.8.8.1