From Mandriva Community Wiki

(Redirected from Docs/SysAdmin/Networking)
Jump to: navigation, search

Support for your Network


Networking Hardware

What's the difference between a Hub, a Switch and a Router?

Networking Software

You can get more information about controling network settings by reading, in your Mandriva Linux computer /usr/share/doc/initscripts/sysconfig.txt. You will have to scroll down the file a bit until you get to "Files in /etc/sysconfig/network-scripts/" section.


The setting in /etc/resolv.conf are overwritten by the dhcp client. To prevent this behaviour, edit /etc/sysconfig/network-scripts/ifcfg-eth0 and add PEERDNS=no.

Static Routes

Mandriva Linux uses a script /etc/sysconfig/network-scripts/ifup-routes to parse the file for static routes for each interface. This doesn't seem to be very well documented, so I'll do it here.

The files used to configure the routes are /etc/sysconfig/network-scripts/route-<dev> (e.g. /etc/sysconfig/network-scripts/route-eth0) and they contain the variables:

ADDRESS0=<network address for route 0>
NETMASK0=<netmask for route 0>
GATEWAY0=<gateway address for route 0>
ADDRESS1=<network address for route 1>
NETMASK1=<netmask for route 1>
GATEWAY1=<gateway address for route 1>

example: (route-eth0 for eth0)


Note the number after each variable name, they start at 0 and go up for each route you add.

Changing / Setting Your System's Hostname

Edit the /etc/sysconfig/network file. Add a line resembling the following:


Be sure to include the domain portion, even if it's a made-up one. The "short hostname" (what you see at the bash prompt) is the leftmost segment of a fully quallified domain name (FQDN). If the FQDN is, the hostname (the shortname) would be "your".

Note that you do not specify the FQDN with the HOSTNAME variable, it is not even possible. Quoting the manpage of hostname (the tool that is used to set the hostname): You can't change the FQDN (as returned by hostname --fqdn) or the DNS domain name (as returned by dnsdomainname) with this command.

The FQDN/DNS domain name is configured in /etc/hosts by default (unless a more elaborate method like DNS or NIS are used to configure the hostnames - the order in which methods are tries is defined in /etc/host.conf)

Then edit your /etc/hosts file, adding both the long & short names to the line, like so (the fqdn is only needed if you're actually part of the network of the FQDN. If you just want to name your computer something different than "localhost", then the shortname is all you need to configure):       localhost your.fully.qualified.hostname your

If you are configured for a static IP address on your network interface, leave the line alone, and instead create a new line in the hosts file that links the names to that static IP address, like so:       localhost     your.fully.qualified.hostname your

(One side benefit of this latter method is that you can put every system on your static-IP-based LAN into the file in this fashion, and then use a copy of that same /etc/hosts file on every one of them).

Assuming that the interface to your LAN and/or broadband modem and/or router is eth0, next edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file, editing/adding this line:


If you are experiencing issues with retaining your hostname and you utilize DHCP add the following line to /etc/sysconfig/network-scripts/ifcfg-eth0


Lastly, restart the following services, in this order:

# service network restart
# service xfs restart
# service dm restart

(restart xfs and dm only if they were already running)

That last one will end any running X sessions that were launched from the display manager, so bear that in mind. You should also manually end & relaunch any X sessions that were manually started (e.g., startx). Also worth restarting are any services that determine the hostname of the system on which they run at launch time, and use it thereafter; Samba and CUPS (the smb and cups services, respectively) come to mind here, to name two.

Network Monitoring Links

Useful Links

Creating a new network connection

Wireless Networking

To configure a new wireless networking interface open the Mandriva Control Center from Star menu->System->Configuration->Configure Your System and enter the root/administrator's password when prompted. Select Networking and Internet->Set up a new network interface.

The next screen you see will ask what type of connection you would like to configure, select wireless connection and click next to continue. Here it will ask what interface to configure, there are two methods;

  • DrakConnect has detected your card and you can therefore select the device and click next.
  • More likely your card is not currently supported and it will display unknown, select Use a windows driver (ndiswrapper). DrakConnect will the ask you to manually locate the driver file, insert the driver CD and navigate to the directory that contains the applicable driver. This varies from manufacturors but you are looking for a file that ends with .inf (e.g. bcmw15.inf). You will then be asked to insert the install CD's to install the necessary software, this is all automatic.

From here on in you can simply follow the steps and generally accept the defaults unless you have made any changes to your local network.

Other Topics

Personal tools