Appendices and Reference

The content in this part is intended to function as supporting reference material for the above chapters. Following you will find a reference for many common linux command line utilities as well as the example network map and network description. A set of links to external resources, and a troubleshooting guide round out the content in this part of the document.

Table of Contents

A. An Example Network and Description
A.1. Example Network Map and General Notes
A.2. Example Network Addressing Charts
B. Ethernet Layer Tools
B.1. arp
B.2. arping
B.3. ip link
B.3.1. Displaying link layer characteristics with ip link show
B.3.2. Changing link layer characteristics with ip link set
B.3.3. Deactivating a device with ip link set
B.3.4. Activating a device with ip link set
B.3.5. Using ip link set to change the MTU
B.3.6. Changing the device name with ip link set
B.3.7. Changing hardware or Ethernet broadcast address with ip link set
B.4. ip neighbor
B.5. mii-tool
C. IP Address Management
C.1. ifconfig
C.1.1. Displaying interface information with ifconfig
C.1.2. Bringing down an interface with ifconfig
C.1.3. Bringing up an interface with ifconfig
C.1.4. Reading ifconfig output
C.1.5. Changing MTU with ifconfig
C.1.6. Changing device flags with ifconfig
C.1.7. General remarks about ifconfig
C.2. ip address
C.2.1. Displaying interface information with ip address show
C.2.2. Using ip address add to configure IP address information
C.2.3. Using ip address del to remove IP addresses from an interface
C.2.4. Removing all IP address information from an interface with ip address flush
C.2.5. Conclusion
D. IP Route Management
D.1. route
D.1.1. Displaying the routing table with route
D.1.2. Reading route's output
D.1.3. Using route to display the routing cache
D.1.4. Creating a static route with route add
D.1.5. Creating a default route with route add default
D.1.6. Removing routes with route del
D.2. ip route
D.2.1. Displaying a routing table with ip route show
D.2.2. Displaying the routing cache with ip route show cache
D.2.3. Using ip route add to populate a routing table
D.2.4. Adding a default route with ip route add default
D.2.5. Setting up NAT with ip route add nat
D.2.6. Removing routes with ip route del
D.2.7. Altering existing routes with ip route change
D.2.8. Programmatically fetching route information with ip route get
D.2.9. Clearing routing tables with ip route flush
D.2.10. ip route flush cache
D.2.11. Summary of the use of ip route
D.3. ip rule
D.3.1. ip rule show
D.3.2. Displaying the RPDB with ip rule show
D.3.3. Adding a rule to the RPDB with ip rule add
D.3.4. ip rule add nat
D.3.5. ip rule del
E. Tunnels and VPNs
E.1. Lightweight encrypted tunnel with CIPE
E.2. GRE tunnels with ip tunnel
E.3. All manner of tunnels with ssh
E.4. IPSec implementation via FreeS/WAN
E.5. IPSec implementation in the kernel
F. Sockets; Servers and Clients
F.1. telnet
F.2. nc
F.3. socat
F.4. tcpclient
F.5. xinetd
F.6. tcpserver
F.7. redir
G. Diagnostics
G.1. ping
G.1.1. Using ping to test reachability
G.1.2. Using ping to stress a network
G.1.3. Recording a network route with ping
G.1.4. Setting the TTL on a ping packet
G.1.5. Setting ToS for a diagnostic ping
G.1.6. Specifying a source address for ping
G.1.7. Summary on the use of ping
G.2. traceroute
G.2.1. Using traceroute
G.2.2. Telling traceroute to use ICMP echo request instead of UDP
G.2.3. Setting ToS with traceroute
G.2.4. Summary on the use of traceroute
G.3. mtr
G.4. netstat
G.4.1. Displaying socket status with netstat
G.4.2. Displaying the main routing table with netstat
G.4.3. Displaying network interface statistics with netstat
G.4.4. Displaying network stack statistics with netstat
G.4.5. Displaying the masquerading table with netstat
G.5. tcpdump
G.5.1. Using tcpdump to view ARP messages
G.5.2. Using tcpdump to see ICMP unreachable messages
G.5.3. Using tcpdump to watch TCP sessions
G.5.4. Reading and writing tcpdump data
G.5.5. Understanding fragmentation as reported by tcpdump
G.5.6. Other options to the tcpdump command
G.6. tcpflow
G.7. tcpreplay
H. Miscellany
H.1. ipcalc and other IP addressing calculators
H.2. Some general remarks about iproute2 tools
H.3. Brief introduction to sysctl
I. Links to other Resources
I.1. Links to Documentation
I.1.1. Linux Networking Introduction and Overview Material
I.1.2. Linux Security and Network Security
I.1.3. General IP Networking Resources
I.1.4. Masquerading topics
I.1.5. Network Address Translation
I.1.6. iproute2 documentation
I.1.7. Netfilter Resources
I.1.8. ipchains Resources
I.1.9. ipfwadm Resources
I.1.10. General Systems References
I.1.11. Bridging
I.1.12. Traffic Control
I.1.13. IPv4 Multicast
I.1.14. Miscellaneous Linux IP Resources
I.2. Links to Software
I.2.1. Basic Utilities
I.2.2. Virtual Private Networking software
I.2.3. Traffic Control queueing disciplines and command line tools
I.2.4. Interfaces to lower layer tools
I.2.5. Packet sniffing and diagnostic tools
J. GNU Free Documentation License
J.12. ADDENDUM: How to use this License for your documents