NETWORK PROGRAMMING ASSIGNMENT ONE.
GROUP MEMBERS:
THOMAS MUMO 19/02725
VICTORIA NDULU 19/02751
EZRON KIPKEMOI 19/02674
TALEYSHA VUYANZI
... [Show More] 19/03199
LEVIN MUTAI 19/03647
JACKIE KEMBOI 19/03934
DUKE OMBATI 19/02855
IAN MWANGI 18/02931
NICHODEMUS NDONYE 18/03903
Section One
With the help of a neat sketch explain the steps and buffers involved when an application writes to a
TCP socket.
When an application calls write, the kernel copies all the data from the application buffer into the socket
send buffer. After that the kernel cannot return from the write until the final byte in the application
buffer has been copied to the socket send buffer.
TCP takes the data from the socket send buffer and sends it to peer TCP. It sends the data to an IP in
MSS-sized or smaller segments. The IP prepends its header, searches the routing table for the
destination IP address and passes the datagram to the appropriate datalink.
Each datalink has an output queue and if it is full the packet is discarded and an error is returned up the
protocol stack. From datalink to IP and finally to TCP. TCP will note the error and try sending the segment
later. The error does not reach the application.
User process
kernel
write
MTU-sized IPv4 or IPv6 packets
MSS-sized TCP segments
MSS normally<=MTU-40(IPv4) or
MTU-60(IPv6)
datalink
Output queue
IP
TCP
Application Application buffer (any size)
Socket send buffer (so_SNDBUF)
SECTION 2.
1. NETSTAT
i. _ Netstat — derived from the words network and statistics — is a program that’s
controlled via commands issued in the command line. It delivers basic statistics on all
network activities and informs users on which portsand addresses the corresponding
connections (TCP, UDP) are running and which ports are open for tasks. Netstat has been
integrated into Linux since its debut in 1991 and has been present in Windows since the
appearance of version 3.11 (1993), which could also communicate via TCP/IP with the
help of extensions. While the parameters of netstat’s commands (as well as their
outputs) differ from system to system, when it comes to their functions, the various
implementations are very similar
_ It is used for finding problems in network and to determine the amount of traffic on
the network as performance measurement.
_Netstat is designed to identify all connections to your system
ii. what parameter for netsta should you use to show all the TCP connections
established? Include a print out of this list for your machine. Be sure to explain
what all foelds are. [Show Less]