CentOS6 uses the ifconfig command without ipv4 address _ solution, centos6ifconfig
Problem: Check CentOS6.0 in VMware with the ifconfig command. No ipv4 address is found!
Solution:
Step 1: Change the network connection mode from bridging to NAT connection
Step 2: run on the terminal
/Etc/init. d/network restart
Step 3: restart the system and run ifconfig.
Solve the problem.
CentOS64 is installed on the VM, And the ipv4 address cannot be viewed in ifconfig.
Temporary effective command
# Ifconfig eth0 192.168.0.22 netmask 255.255.255.0 (up)
Add the ip address and subnet mask of the first Nic
# Route add default gw 192.168.0.1 dev eth0
Add the first Nic of the gateway dev eth0 Device
Redhat/Centos
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = eth0 DEVICE name
BOOTPROTO = dhcp/static automatic retrieval/static IP
IPADDR = IP Address
NETMASK = mask
GATEWAY = GATEWAY
ONBOOT = yes boot enable Nic
# Service network restart the network
Hi.baidu.com/..e4adb1
The linux ifconfig command does not return ipv4, as shown in the figure below: Is there a problem with the VM Nic?
The network connection method between you and the host machine is incorrect. Try bridging.