TCP IP Illustrated

The a flag reports on all network end points the n

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 777: sun % sock -u -s 7777 We then use the netstat command to see the state of the end point: sun % netstat -a -n -f inet Active Internet connections (including servers) Recv-Q Send-Q Local Address Foreign Address (state) Proto udp 0 0 *.7777 *.* We have deleted many lines of output other than the one in which we're interested. The -a flag reports on all network end points. The -n flag prints IP addresses as dotted-decimal numbers, file:///D|/Documents%20and%20Settings/bigini/Doc...omenet2run/tcpip/tcp-ip-illustrated/udp_user.htm (24 of 29) [12/09/2001 14.46.58] Chapter 11. UDP: User Datagram Protocol instead of trying to use the DNS to convert the address to a name, and prints numeric port numbers instead of service names. The -f inet option reports only TCP and UDP end points. The local address is printed as *.7777 where the asterisk means the local IP address has been wildcarded. When the server creates its end point it can specify one of the host's local IP addresses, including one of its broadcast addresses, as the local IP address for the end point. Incoming UDP datagrams will then be passed to this end point only if the destination IP address matches the specified local address. With our sock program, if we specify an IP address before the port number, that IP address becomes the local IP address for the end point. For example, sun % sock -u -s 7777 restricts the server to datagrams arriving on the SLIP interface ( The netstat output shows this: Proto Recv-Q Send-Q udp 0 0 Foreign Address *.* Local Address (state) If we try to send this server a datagram from a host on the Ethernet, bsdi at address, an ICMP port unreachable is returned. The server never sees the datagram. Figure 11.21 shows this scenario. 1 2 0.0 0.000822 (0.0008) bsdi.1723 > sun.7777: udp 13 sun > bsdi: icmp: sun udp port 7777 unreachable Figure 11.21 Rejection of UDP datagram caused by server's local address binding. It is possible to st...
View Full Document

This test prep was uploaded on 04/04/2014 for the course ECE EL5373 taught by Professor Guoyang during the Spring '12 term at NYU Poly.

Ask a homework question - tutors are online