Advertisement
Promo

Server platforms Toolkit

How to tweak Linux network files

Jack Wallen

Published: 07 Jan 2003 09:56 GMT

  • Email
  • Trackback
  • Clip Link
  • Print friendly
  • Post Comment

Getting to the heart of the network configuration
Only two files are left to configure. The first is the network script located in /etc/sysconfig/. This configuration file dictates whether networking will be used and what the hostname will be. The network file takes on the form of:

NETWORKING=yes
HOSTNAME="nickel.nater.org"

Last, but not least
The final file to configure is /etc/sysconfig/network-scripts/ifcfg-eth# (where # is the numerical name of the device used for networking). Configurations in this particular file determine which device will be used for networking, which protocol will be used (manual, dhcp, and so on), whether the device will be started at boot, the IP address, the gateway address, the netmask, and, if needed, a number of IPX configurations.

The format of this file looks like:

DEVICE="eth0"
ONBOOT="yes"
BOOTPROTO="none"
IPADDR="192.168.1.2"
NETMASK="255.255.255.0"
GATEWAY="192.168.1.1"

This information is relatively self-explanatory. The most important thing to remember is to keep everything consistent.

Rev it up
With all the configurations in place, it's time to fire up the server. Run the command  /etc/rc.d/init.d/networkstart and, if everything is configured correctly, the OKs will fly by and networking will be up and running. To test networking, run a simple ping command such as ping www.techrepublic.com.

If networking fails to work, you can try a couple of quick troubleshooting tips. The first thing to check is the firewall. If the server is using  ipchains, run the command /sbin/ipchains -F and then rerun the ping command. If this doesn't work, run the command /sbin/ipchains -L and make sure that the input policy isn't set to DENY. If it is, run the command /sbin/ipchains --P, input ACCEPT, and then rerun the ping command. If the server is running iptables instead of ipchains, substitute iptables wherever you see ipchains above.

If neither of the above commands fix networking, the most obvious place to check (outside of making sure the network, as a whole, is actually up and running) is the NIC module. Make sure the correct module is loaded into the kernel with the  /sbin/lsmod command. If the correct module is not loaded, the server has no way of knowing where and how to throw packets out to the world. If the correct module isn't listed, revisit the first section of this article (NIC modules) and rerun that process.

If all else fails...
As a last resort, it is possible to shut down the server, remove the NIC, restart the server (letting the machine detect the removal of the hardware), shut the server down again, reinstall the NIC, reboot the NIC, and configure the NIC when/if prompted. Even if the system does not prompt you to configure the NIC, it should at least detect the installed NIC and load the correct module.


For a weekly round-up of the enterprise IT news, sign up for the Enterpise newsletter.

Find out what's where in the new Tech Update with our Guided Tour.

Tell us what you think in the Enterprise Mailroom.

Next

Previous

1 2


  • Email
  • Trackback
  • Clip Link
  • Print friendlyPrint with EPSON

Did you find this article useful?
55 out of 178 people found this useful


Full Talkback thread

0 comments

Company/Topic Alerts

Create a new alert from the list below:














Video icon

Video

Microsoft Futures

Windows 7: Mixed reviews from PDC attendees

As developers received their copies of Windows 7 on Tuesday, they offered varied reactions to the Microsoft operating system update More

Microsoft floats clouds on Windows Azure

At the Professional Developers Conference, Microsoft announced the Azure Services Platform, the company's cloud-computing platform More

Ozzie: Success of Azure comes down to trust

In an interview, Ray Ozzie says businesses will be taking a risk by placing core operations in Microsoft's datacentre, but that the software giant has more to lose if things go bad More


Skip Sub Navigation Links to CNET Brand Links

Help

Become part of the ZDNet community.

Newsletters