& Nbsp; 1. the Nic machine is too new to be recognized by the existing Linux version. for example, if the Nic cannot be found, what should I do? Don't worry. First, you need to know the model of the NIC. take the new computer purchased in this lab as an example. The NIC is integrated and the model is RealtekRTL8168/8111PCI.
1. install the NIC
The machine is too new to recognize the existing Linux version. for example, if the machine cannot find the NIC, what should I do?
Don't worry, first you need to know what network card is what model, in this laboratory new purchase computer as an example, its network card is integrated, model is Realtek RTL8168/8111 PCI-E Gigabit Ethernet NIC. Then, go to the official website of realtekto download the corresponding linuxdriver r8168-8.005.00.tar.bz2. follow the instructions for installation.
Unpack the tarball:
# Tar vjxf r8168-8.aaa.bb.tar.bz2
Change to the directory:
# Cd r8168-8.aaa.bb
If you are running the target kernel, then you shoshould be able to do:
# Make clean modules (as root or with sudo)
# Make install
#/Sbin/depmod-
#/Sbin/insmod./src/r8168.ko (or r8168.o in linux kernel 2.4.x)
You can check whether the driver is loaded by using following commands.
#/Sbin/lsmod | grep r8168 (check whether the NIC driver is loaded)
#/Sbin/ifconfig? A (check whether there is any information about the startup of the NIC)
If there is a device name, ethX, shown on the monitor, the linux
Driver is loaded. Then, you can use the following command to activate
The ethX.
# Ifconfig ethX up
, Where X = 0, 1, 2 ,...
You can also set the IP address through system → management → network, and then activate it.
1. Set manually
A. Set the IP address of your machine.
# Ifconfig ethX "the IP address of your machine"
B. Set the IP address of DNS.
Insert the following configuration in/etc/resolv. conf.
Nameserver "the IP address of DNS"
C. Set the IP address of gateway.
# Route add default gw "the IP address of gateway"
2. Set by doing configurations in/etc/sysconfig/network-scripts
/Ifcfg-ethX for Redhat and Fedora, or/etc/sysconfig/network
/Ifcfg-ethX for SuSE. There are two examples to set network
Events.
A. Fix IP address:
DEVICE = eth0
BOOTPROTO = static
ONBOOT = yes
TYPE = ethernet
NETMASK = 255.255.255.0
IPADDR = 192.168.1.1
GATEWAY = 192.168.1.254
BROADCAST = 192.168.1.255
2. modify: # vi/etc/hosts. in this text, add two lines:
127.0.0.1 localhost. localdomain localhost
192.168.4.101 node3 (set based on the machine itself)
Modify: vi/etc/hosts. equiv and add a line: (If this text does not exist, create one)
Node3
3. start the ssh service
This program should be included in most Linux versions.
# Ssh-keygen
# Cd. ssh
# Cp id_rsa.pub authorized_keys
# Ssh node3 (if successful, the last logon time will be displayed, and node3 is the host name)
Additional information:
Ifup eth0 to see if eth0 can be started
Lsmod to see if the NIC driver is loaded
Dmesg to see if there is any error message when the NIC is started