RedHatLinux5 network configuration 1. ifconfig command 1, # ifconfig -- you can set the status of the network device or display the current settings, which can be used to view the current network
Network Configuration of Red Hat Linux 5
I. ifconfig command
1. # ifconfig -- you can set the status of the network device or display the current settings to view the IP address of the current network device.
# Ifconfig eth0 -- view the status of the specified eth0 NIC (including IP information)
2. Enable Nic
# Ifconfig eth0 up or # ifup eth0
3. Disable the NIC
# Ifconfig eth0 down or # ifdown eth0
2. Configure the NIC
1. Modify the NIC configuration file to set
Nic configuration file for eth0:/etc/sysconfig/network-scripts/ifcfg-eth0
Static IP Address
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE = eth0 indicates the nic device, which must match the configuration file
BOOTPROTO =NoneSTARTUP configuration protocol [NoneStatic dhcp]
ONBOOT = yes boot activated?
HWADDR = 00: 0c: 29: 97: 5a: 4d physical address MAC
NETMASK = 255.255.255.0 Subnet Mask
IPADDR = 192.168.10.153 IP Address
TYPE = Ethernet network TYPE
Dynamic IP Address
DEVICE = eth0
BOOTPROTO =Dhcp
HWADDR = 00: 0c: 29: 97: 5a: 4d
TYPE = Ethernet