This article is outdated. Please see - Configuring a network card in Linux for the updated information.
There are different ways of installing a network card in linux - and that too depending on the linux distribution that you are using. I will explain each one of these methods here.
The Manual method
Open the computer case and insert the network card into an empty PCI slot. Then boot up your machine to load linux.
In linux login as root and then navigate to the directory
/lib/modules/
. Here you will find the modules supported by your system. Assuming that you have a 3Com ethernet card, in which case, the module name is 3c59x , you have to add this in the /etc/modules.conf
file to let the machine detect the card each time the machine boots.#File: /etc/modules.conf alias eth0 3c59x
If you have only one network card, it is known by the name eth0, the succeeding network cards in your computer go by the name eth1, eth2 ... and so on.
Next, load the module into the kernel.
root# /sbin/insmod -v 3c59x
Configure an IP address for the network card using
ifconfig
or netconfig
or any other method if your machine gets its IP address from a DHCP server. Eg:root# ifconfig eth0 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.255
The Easy way
RedHat/Fedora distributions of linux ships with Kudzu a device detection program which runs during systems initialization (
/etc/rc.d/init.d/kudzu
). This can detect a newly installed NIC and load the appropriate driver. Then use the program
/usr/sbin/netconfig
to configure the IP address and network settings. The configuration will be stored so that it will be utilized upon system boot.Also see Assigning an IP address to know more ways of configuring an IP address for your network card.
3 comments:
Awesome, worked like a charm! I haven't used linux in years and I forgot how to do this. Thank you!
What is the need for two addresses for a single machine? Where does the MAC address fall deficient of the requirements that an IP address meets?
shaik,
This technique is quite useful. For instance, web hosting companies (can) use this technique to provide unique IP addresses to multiple domains hosted on the same server.
Post a Comment