====== Networking ====== ===== useful programs ===== ==== tcpdump ==== Tcpdump prints out a description of the contents of packets on a network interface that match the boolean expression.. Examples: * dns: $ tcpdump -i eth0 'udp port 53' * http: $ tcpdump 'tcp port 80' * ftp: $ tcpdump -i eth0 '(port 21 or 20)' ==== mtr - mytraceroute ==== mtmtr combines the functionality of the traceroute and ping programs in a single network diagnostic tool.r combines the functionality of the traceroute and ping programs in a single network diagnostic tool. ==== iptraf ==== iptraf is an ncurses-based IP LAN monitor GUI that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others... ==== iftop ==== iftop listens to network traffic on a named interface ... and displays a table of current bandwidth usage by pairs of hosts. -i interface -p Run in promiscuous mode -P Turn on port display -F net/mask -- Specifies a network for traffic analysis ==== iperf ==== Measures the bandwith of a connections iperf -c iperf.ovh.net -m -i 1 -t 10 -r It's usefull to check LAN Cables: Connect two computers with the cable, setup static IP Addresses and start iperf on both: Server mode on 1. box: iperf -s Client mode on 2. box: iperf -c In the results you get the Banwidth: [ 4] local port 5001 connected with port 2357 [ ID] Interval Transfer **Bandwidth** [ 4] 0.0-10.1 sec 6.5 MBytes **305.2 Mbits/sec**