Article title: configure static IP access in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. configure the NIC
PCI can be automatically detected. I will not talk about how to load the driver, but how to configure the IP address directly.
Vi/etc/sysconfig/network, modify according to your situation
DEVICE = eth0 <-- DEVICE
ONBOOT = yes <-- whether to start automatically
BOOTPROTO = static <-- whether to use a static IP address
IPADDR = xxx. xx <-- your IP address
NETMASK = your subnet mask <-- your subnet mask
GATEWAY = 218.99.1.17 <-- your GATEWAY
2 configure dns resolution
Echo "nameserver 211.98.1.28">/etc/resolv. conf
3. start the network
/Etc/init. d/network restart
4 Test
Ping www.sina.com. cm
64 bytes from 202.106.184.200: icmp_seq = 0 ttl = 249 time = 1.881 msec
64 bytes from 202.106.184.200: icmp_seq = 0 ttl = 249 time = 1.881 msec
64 bytes from 202.106.184.200: icmp_seq = 0 ttl = 249 time = 1.881 msec
64 bytes from 202.106.184.200: icmp_seq = 0 ttl = 249 time = 1.881 msec
......
......
OK