Kill Network Manager

Network manager doesn't have a clue. We hate it. We cannot say enough bad things about it (although we do try). Before even starting to do things such as those described here, be sure to get rid of network manager as it will just make trouble for you.

enable root login on console

OK, this doesn't belong here, but since I am busy rebooting the system I am working with over and over while writing this, it is starting to annoy me, so this note goes here for now.

Changing a network card (and other tricks).

What I want to describe ultimately is how to be able to yank out one kind of network card and pop in another - and then get everything working again. But I am going to work my way up to this.

No network configured at all

I just finished installing Fedora 11 on a machine, but did not have a cable connected to the onboard network interface, so the install never asked me for things like IP numbers or DNS servers and that kind of stuff. In the past I have been lazy (in one way of thinking about it) and just connected the cable and repeated the install. This actually is a lazy and easy approach, given that you can do something else in most cases while the install chugs away installing packages. However, it is cowardly and we intend to pursue the high road in an effort to learn some things and improve our character.

I have the luxury of having a running system nearby that I can use to examine the proper contents of files, as follows:

The ifcfg-eth0 file contained the IP number, Gateway, and as near as I could tell everything I might want apart from DNS setup. After adding all the lines I felt I should, I did:
service network restart
And I was able to ping machines on our LAN using IP numbers, then the thing to do was to get DNS set up. Relevant files are: A person could use /etc/hosts for static name service, and this might make sense for a machine or two, but we won't even go there. I just put the IP numbers of the nameservers (and the domain name) into /etc/resolv.conf and life was good.

Hand dorkage of the ifcfg files

If you get the bright idea (as I once did) of putting files like ifcfg-site1 and ifcfg-site2 into /etc/sysconfig/network-scripts and then having ifcfg-eth0 be a link to whichever is appropriate, be aware that this won't work because the network startup scripts search for all files with a pattern like ifcfg-* and then do bad things. Back when I was hell-bent on doing things this way, I just used another name if-site1 and made links to that. I found this useful when I was moving a machine repeatedly from one site to another, but DHCP would make a lot more sense for a machine like that.

Swapping the network card

The specific motherboard I am playing with while writing this has an on-board networwork chip (by realtek) that I set up as eth0. There unfortunately is no option in the BIOS to disable the onboard network, but this proves to not be a problem. I plug in an intel etherpro 100 card and it automagically gets set up as eth1, as can be seen via the command:
ifconfig -a
I copy /etc/sysconfig/network-scripts/ifcfg-eth0 to ifcfg-eth1 and change only one thing in it. I copy the MAC address from the info displayed on the ifconfig line. Then I edit ifconfig-eth0 and set the onboot option to no, then do:
service network restart
The option "onboot" apparently refers to the network script, and this does just what I want (as shown by ifconfig -a), namely the eth0 interface is now disabled, and the eth1 interface is active, and it works just fine. The job is finished.

How did my network card get assigned eth7?

I've been plugging network cards in and out of my system and each new card gets a new identity, so I am all the way up to eth7, and would really prefer to call this eth0 now. Take a look at:
/etc/udev/rules.d/70-persistent-net.rules
You will see what is up in a flash here and can edit to your hearts delight. However I don't see any way to get a running system to take changes on the fly, so I just reboot. You may be more clever.

What card and driver combination is fastest?

I just finished playing with an assortment of 100 megabit cards and they all seem to manage to move about 11 megabytes per second. I tested some old 3com 3c906b and 3c905c cards, as well as a "netgear fa311" which is based on the natsemi dp83815 chip. No clear winner among these, sorry.
Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org