Question: N 1 . 1 . What is the network prefix for each of the following hosts: ( 1 ) 1 0 . 1 . 2
N What is the network prefix for each of the following hosts: and
N We write the following program to send a packet. How is the source port number of
the packet decided? How is the source IP of the packet decided?
data bHello Server
udp socket.socket socketAFINET, socket.sOCKDGRAM
udp.sendto data
N When we construct a packet, we need to set the address at each layer. What are the
addresses called at he following layers: transport layer, network layer, and
data link layer?
N When we run nc lnu what does the options "lnu" mean?
N What does the bind do in the following code snippet? What is the meaning of
If we are only interested in the packets coming from the localhost, what should be do
udp socket.socketNET, socket.GRAM
udp.bind
N In a server program, we bind the program to a port number, so when a packet comes to
that port, the OS knows which program is the recipient of the packet. However, for the
client program, we typically do not do the binding. When a reply from the server
comes, how does the OS know that this client program is the recipient?
N Why does the sniffing use the superuser privilege?
N Write down the tcpdump command to print out all the packets to UDP destination
port on the interface xyz Write down the tcpdump command to print out all
the packets from port to port on the interface
N Please explain the purpose of each of the arguments in the following Scapy code snippet.
sniff etho', filter'icmp',
N The following result of the ip address" command shows all the network inter
faces on a host. Please write a Scapy program to sniff the packets transmitted over the
network. You are only interested in the UDP packets to s
port
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
