Listing and identifying sockets. the ss command may be used to display the listening connections and the established connections on a machine. Suppose you see the sample output shown below. Netid State Local Addr:Port Peer Addr:Port Users udp UNCONN 0.0.0.0:8003 0.0.0.0:* (pid=29604,fd=3) tcp LISTEN 0.0.0.0:8003 0.0.0.0:* (pid=28832,fd=3) Netid State Local Addr:Port Peer Addr:Port Users tcp ESTAB 127.0.0.1:8003 127.0.0.1:47468 (pid=28832,fd=4) tcp ESTAB 127.0.0.1:47468 127.0.0.1:8003 (pid=29910,fd=3) The output above lists all the connections on the machine where the ss command is run. Helpfully, the last column of the output, entitled Users, also shows the process ID (pid) of the application process associated with the socket and the number of the file descriptor (fd) associated with the socket. (a) Suppose a TCP packet enters the machine, destined to TCP port 8003 corresponding to an established connection. Can you identify the pid and socket fd, if any, corresponding to the socket where this packet is demuxed to? (b) Suppose a TCP packet enters the machine, destined to TCP port 8003, corresponding to a fresh connection just being initiated by a client through a connect() call. Can you identify the pid and socket fd, if any, corresponding to the socket where this packet is demuxed to?   Suppose a TCP packet enters the machine, destined to TCP port 47468, corresponding to a fresh connection being made by a client through the connect() call. Will this client’s  connect() succeed? Why or why not?   Suppose a UDP packet enters the machine, destined to UDP port 8003. Can you identify the pid and socket fd, if any, corresponding to the socket where this packet is demuxed to?

A+ Guide to Hardware (Standalone Book) (MindTap Course List)
9th Edition
ISBN:9781305266452
Author:Jean Andrews
Publisher:Jean Andrews
Chapter8: Connecting To And Setting Up A Network
Section: Chapter Questions
Problem 2TC
icon
Related questions
Question

Listing and identifying sockets. the ss command

may be used to display the listening connections and the established connections on a machine.

Suppose you see the sample output shown below.

Netid State Local Addr:Port Peer Addr:Port Users

udp UNCONN 0.0.0.0:8003 0.0.0.0:* (pid=29604,fd=3)

tcp LISTEN 0.0.0.0:8003 0.0.0.0:* (pid=28832,fd=3)

Netid State Local Addr:Port Peer Addr:Port Users

tcp ESTAB 127.0.0.1:8003 127.0.0.1:47468 (pid=28832,fd=4)

tcp ESTAB 127.0.0.1:47468 127.0.0.1:8003 (pid=29910,fd=3)

The output above lists all the connections on the machine where the ss command is run. Helpfully,

the last column of the output, entitled Users, also shows the process ID (pid) of the application

process associated with the socket and the number of the file descriptor (fd) associated with

the socket.

(a) Suppose a TCP packet enters the machine, destined to TCP port 8003 corresponding to

an established connection. Can you identify the pid and socket fd, if any, corresponding to the

socket where this packet is demuxed to?

(b) Suppose a TCP packet enters the machine, destined to TCP port 8003, corresponding to a

fresh connection just being initiated by a client through a connect() call. Can you identify the

pid and socket fd, if any, corresponding to the socket where this packet is demuxed to?

 

Suppose a TCP packet enters the machine, destined to TCP port 47468, corresponding

to a fresh connection being made by a client through the connect() call. Will this client’s 

connect() succeed? Why or why not?

 

Suppose a UDP packet enters the machine, destined to UDP port 8003. Can you identify

the pid and socket fd, if any, corresponding to the socket where this packet is demuxed to?

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Creating a local network
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A+ Guide to Hardware (Standalone Book) (MindTap C…
A+ Guide to Hardware (Standalone Book) (MindTap C…
Computer Science
ISBN:
9781305266452
Author:
Jean Andrews
Publisher:
Cengage Learning
A+ Guide To It Technical Support
A+ Guide To It Technical Support
Computer Science
ISBN:
9780357108291
Author:
ANDREWS, Jean.
Publisher:
Cengage,
Comptia A+ Core 1 Exam: Guide To Computing Infras…
Comptia A+ Core 1 Exam: Guide To Computing Infras…
Computer Science
ISBN:
9780357108376
Author:
Jean Andrews, Joy Dark, Jill West
Publisher:
Cengage Learning
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L