配置IP之后ping不同,ifconfig打印出的信息有RX packets:234 errors:12字样

原因  VirtualBox虚拟机默认网卡选择错误(公司用无线,选了有线网卡),重选之后即可

另:Oracle linux (Red Hat Linux) 与 Ubuntu配置IP的文件不同:

/etc/sysconfig/network-scripts/ifcfg-eth0 (Ubuntu为/etc/network/interfaces)

DEVICE="eth0"

BOOTPROTO="static"

HWADDR="......"

NM_CONTROLLED="yes"

ONBOOT="yes"

TYPE="Ethernet"

UUid="....."

IPADDR=192.168.0.219

NETMASK=255.255.255.0

NETWORK=192.168.0.0

BROADCAST=192.168.0.255

GATEWAY=192.168.0.1

$ service network restart