Table of Contents
A machine which can access Internet resources has an IP address, whether that IP address is a public address or a private address hidden behind an SNAT router [42]. With the increasingly common use of linux machines as servers, desktops, and embedded devices and with changing network topologies and re-addressing, the need to be able to determine the current IP address of a machine and modify that address has consequently become a common need.
I assume in this chapter that the reader has some familiarity with CIDR addressing and netmasks. If any of these concepts are unfamiliar, or the reader would like to brush up, I suggest a visit to some of the links which can be found in Section I.1.3, “General IP Networking Resources”.
We'll begin our tour of the utilities for observing, changing, removing, and adding IP addresses to network devices with ifconfig, the traditional utility for IP management. We will also examine the newer and more flexible ip address, a key part of the iproute2 package.
[42] I'm sure somebody will be glad to nitpick here and tell me that s/he has a machine connected to the Internet which uses SNA, DecNET, IPX, or NetBEUI to connect to another host which actually does speak IP, thus proving that not every host which has access to the Internet is actually directly speaking IP. Another example is doubtless, wireless devices, such as telephones. Here, I'll concern myself with the majority case.