12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Network Configuration—BasicsIn the above example, the httpd process that is running as user www with PID93848, is listening on the TCP port 80 and is bound to all available interfaces (notethe "*:80").You can also use the sockstat(1) utility to see a list of currently connected socketsas well:# sockstat -cUSER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESSfarrokhi sshd 41221 3 tcp4 10.0.11.2:22 172.16.31.9:1175farrokhi sshd 41221 4 stream -> ??root sshd 41219 3 tcp4 10.0.11.2:22 172.16.31.9:1175root sshd 41219 5 stream -> ??cvsup cvsupd 95113 6 dgram -> ??root login 686 3 dgram -> ??root cron 646 5 dgram -> ??netstatThe netstat(1) utility is another all-in-one utility that displays various sorts ofnetwork related information. Using various netstat parameters, you can see thestatistics of the network subsystem. The following table contains a list of netstatparameters and describes what they would display:ParameterNo ParametersDescriptionDisplays list of active network sockets per protocol-i Network interface statistics-s Protocol statistics-siProtocol statistics per interface-m Memory buffers (mbuf(9)) statistics-B bpf(4) interface statistics-r Displays routing table contents-rsRouting statisticsCombination of different netstat parameters can be used to display very usefulinformation that would come in handy, while troubleshooting network. Oneexample is that, you can see the statistics of a specific the network interface fromdifferent perspectives as shown in the following command:# netstat -i -I bge1Name Mtu Network Address Ipkts IerrsOpkts Oerrs Coll[ 124 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!