CentOS6 uses the ifconfig command without ipv4 address _ solution, centos6ifconfig

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.