Ifconfig Viewing network card information
The first type of configuration
Vim/etc/sysconfig/network-scripts/ifcfg-eth0
Device= the device name associated with "eth0" to be consistent with the second half of the file name "Eth0"
Onboot= "Yes" activates this network interface automatically when it is powered on
HWADDR=00:0C:29:3B:7B:58 hardware address, to be consistent with the address in the hardware: Save
Gateway= "192.168.100.1" Set default gateway
ipaddr=192.168.100.150 IP Address
prefix=24 Subnet Prefix
bootproto=static [STATIC|NONE|DHCP|BOOTP]: Boot protocol: To use a static address, static or none:dhcp means to obtain an address using a DHCP server:
The second type of configuration
Setup--->network configuration--->device configuration---> select NIC eth0---> Fill in IP information
Both of these configurations must be restarted: Service network restart
Temporary configured IP address: ifconfig eth0 192.168.1.1/24 [Up/down] effective immediately (restart Network service is disabled)
IFCONFIG-A Display all interface configuration information
vim/etc/resolv.conf Configuring DNS
Firewall settings
Open: Service iptables start
Close: Service iptables stop
Configure the Linux network card address