Give Ubuntu a static IP address

Network configuration in Ubuntu is handled by the NetworkManager tool and it does a superb job. However, it's primarily geared towards wireless networking and always assumes a DHCP server is in use.8 You might choose to use a static IP address, which is to say one that you set yourself. A handful of workplaces insist their workstation computers use static IP addresses.

If this is the case then you might consider using Ubuntu's older but still very functional Network Settings configuration tool. It comes with some caveats, however. It's compatible with wireless networking but doesn't have the ability to "roam" (detect other networks automatically), so if you move into an area with a different wireless network, you'll need to manually reconfigure. Because of this, Network Settings is better suited for situations where you'll only ever connect to one wireless network. Secondly, Network Settings deactivates the NetworkManager icon that shows the strength of your wifi connection. If you wish to configure a static IP address for a wifi card, considering using wicd instead, which features its own notification icon that shows signal strength and allows the configuring of a manual IP address—see Tip 41, on page 100

Using Network Settings is easy. To do so, follow these steps:

1. Click the NetworkManager applet and select Manual Configuration, or select Network from the System ^ Administration menu. Click the Unlock button and enter your password when prompted.

2. Double-click the entry that reads either Wireless Connection or Wired Connection, depending on whether you want to configure a wifi or Ethernet connection.

3. In the dialog box that appears, uncheck Enable Roaming Mode. If you're configuring a wifi card, enter your base station details and

8. A DHCP server automatically assigns network addresses to other computers. Every broadband modem and the majority of workplaces or other institutions use DHCP servers because they simply make joining a network as fuss-free as possible. In the case of Ethernet (cabled) connections you can just plugin and go. In the case of wifi, once the base station password has been entered, you're ready to go.

password into the Network Name and Network password boxes. Select the type of wifi protection in use from the Password type dropdown list. If you click the dropdown arrow in the Network Name text box, you might see that the base station has automatically been detected, although I found this wasn't always reliable.

4. In the Configuration dropdown, select Static IP address. Then fill in the IP address, Subnet mask and Gateway address boxes. Click OK when done.

5. Still in the Network Settings dialog box, click the DNS tab and then click the Add button. Then type the first of the DNS addresses. Once done, hit [Enter] and repeat the step for the second (or perhaps even third) addresses. Following this, close Network Settings and then reboot your computer for the changes to take effect.

For more network configuration tricks, see Tip 41, on page 100; Tip 60, on page 121; Tip 70, on page 128; and Tip 119, on page 167.

Was this article helpful?

0 0

Post a comment