Manchester University logo

Main links

Fedora Tips home page
Automatic Login
Nothing
Legacy Red Hat stuff -- some still relevant
JTL's home page

Section links

Read first
Multi-use devices
Wired DHCP
Wired Fixed IP
Wireless -- WEP
Wireless -- WPA
Google
Back to top        
JTL's Fedora Tips:         Setting up networks

UNIVERSITY OF MANCHESTER

School of Computer Science

JTL's Fedora Tips

Setting up networks

Here are some tips for setting up networks on Fedora, without resorting to using the GNOME/KDE network GUI `patronage'. In particular, if you believe networks should be independent of desktop and user and whether anybody is even logged on, and should be able to be started from scripts, etc., then read on! ;-)

Please feel free to pass me any constructive feedback by email. jtl{at}cs.man.ac.uk (you will need to edit the abstraction of the at sign). You can also suggest other topics for me to give some hints about.

Section links

Read first General information
Multi-use devices Having multiple network setups for the same device
Wired DHCP Setting up a wired network: DHCP
Wired Fixed IP Setting up a wired network: fixed IP
Wireless -- WEP Setting up a wireless WEP network
Wireless -- WPA Setting up a wireless WPA network
Google Search Google for Fedora network configuration

Read first

On Fedora (and Red Hat), every network which `belongs' to the whole machine (as opposed to an individual user) has configuration information stored in the directory /etc/sysconfig/network-scripts.

Each network has a file called ifcfg-X where X is the name of the network. Often the the name, X is the same as the name of the device used by the network, but it does not have to be. For example, you will probably find a file called ifcfg-eth0 which was placed there by the Fedora installation process. This probably contains a configuration for using a wired network on device eth0 (the first wired ethernet port) that will work for a network using Dynamic Host Control Protocol (DHCP).

Networks that need authentication keys (e.g. wireless ones) will also have a file called keys-X where X is the name of the network.

To start the network called X from the command line or within a script, we run the command ifup X. And to shut it down we run ifdown X.

The configuration may specify the network should be started at boot up, in which case it is started when either of the network or the NetworkManager services are started. Otherwise it is to be started on demand by a user or a script.

The configuration may state that ordinary users are allowed to start and stop the network. Otherwise only root can do so.

Back to top

Multi-use devices

The name of a network does not have to be the same as the name of the device the network uses. You may wonder why that is useful.

For a mobile machine, you probably don't want any network started up at boot. Instead you want to start a network when you're ready, and you may need to start the right one for the location you are in. For example, you might have a wireless network for use at home, another for work, a third for when you visit your girl/boyfriend, your mum, etc.. Each of these will no doubt have different settings -- in particular different authentication keys.

So you set up ifcfg-home and keys-home to use device wlan0 (the first wireless LAN card), and run ifup home and ifdown home as you need to.

Then you pop to your work, and set up ifcfg-work and keys-work also to use the same device. And you make another pair of files for each of the places you frequent -- this way you never need to re-enter the setup information when you go back to a place you have been to before! ;-)

For a desktop machine, you might want to use the same wireless card sometimes to talk to a router, and sometimes to act as an ad-hoc network when the router is not available.

Back to top

Wired DHCP

Setting up a wired network: DHCP
Expand: Wired DHCP

Back to top

Wired Fixed IP

Setting up a wired network: fixed IP
Expand: Wired Fixed IP

Back to top

Wireless -- WEP

Setting up a wireless WEP network
Expand: Wireless -- WEP

Back to top

Wireless -- WPA

Setting up a wireless WPA network
Expand: Wireless -- WPA

Back to top

Google

Search Google for Fedora network configuration
Google

Back to top