我将Oracle Enterprise Linux 5作为VirtualBox上的Guest虚拟机在使用桥接networking的Windows 7主机上运行。
我一直在尝试在OEL5 VM Guest虚拟机上configuration一个静态IP,因为之前的虚拟机已经configuration为在家中的networking中工作。 我发现一个未使用的IP(10.167.190.118)通过ping从Windows主机的IP地址。 我对OEL5的访客做了以下修改:
在/ etc / sysconfig / network中的脚本/的ifcfg-eth0的
# Intel Corporation 82540EM Gigabit Ethernet Controller DEVICE=eth0 BOOTPROTO=static BROADCAST=10.167.176.1 ##Default Gateway HWADDR=08:00:27:DE:AF:6D IPADDR=10.167.190.118 #IPADDR=192.168.1.149 NETMASK=255.255.240.0 ##Subnet Gateway #NETWORK=192.168.1.0 ONBOOT=yes
/ etc / hosts文件
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 10.167.190.118 oel5-11g.com # ::1 localhost6.localdomain6 localhost6
在/etc/resolv.conf
nameserver 10.167.176.1 search localdomain
现在,当我停止/启动networking守护进程,我可以从Windows机器ping 10.167.190.118,并可以使用腻子SSH。 但是,我无法连接到OEL5客人的互联网。
我更新了/ etc / sysconfig / network
NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=oel5-11g.com GATEWAY=10.167.176.1
…但得到错误
调出接口eth0:RTNETLINK回答:无效的参数
运行networking启动命令时。
我曾尝试使用谷歌search的问题,但只要能够从主机使用腻子SSH到OEL5客人。 我需要做些什么改变来确保我可以通过OEL5访客连接到互联网?
附加信息:
从主机ipconfig:
Windows IP Configuration Wireless LAN adapter Wireless Network Connection: Media State . . . . . . . . . . . : Media disconnec Connection-specific DNS Suffix . : uk.oracle.com Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : uk.oracle.com IPv4 Address. . . . . . . . . . . : 10.167.190.117 Subnet Mask . . . . . . . . . . . : 255.255.240.0 Default Gateway . . . . . . . . . : 10.167.176.1 Ethernet adapter VMware Network Adapter VMnet1: Connection-specific DNS Suffix . : IPv4 Address. . . . . . . . . . . : 192.168.231.1 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : Ethernet adapter VMware Network Adapter VMnet8: Connection-specific DNS Suffix . : IPv4 Address. . . . . . . . . . . : 192.168.233.1 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : Ethernet adapter VirtualBox Host-Only Network: Connection-specific DNS Suffix . : IPv4 Address. . . . . . . . . . . : 192.168.56.1 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . :
来自OEL5 guest的ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:DE:AF:6D inet addr:10.167.190.118 Bcast:10.167.176.1 Mask:255.255.240.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:193187 errors:0 dropped:14987 overruns:0 frame:0 TX packets:697 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:23047971 (21.9 MiB) TX bytes:82847 (80.9 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1256 errors:0 dropped:0 overruns:0 frame:0 TX packets:1256 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3085266 (2.9 MiB) TX bytes:3085266 (2.9 MiB)
我是Linux和Vitualbox的新手,对networking知识有限,所以任何帮助将不胜感激。
提前谢谢了。
10.167.176.1不是10.167.176.1的广播地址。
使用IP计算器检查: http : //jodies.de/ipcalc
您可以删除ifcfg文件中的BROADCAST行,系统足够聪明,只需要一个有效的IP和子网掩码即可找出所有的东西。
(PS:我假设你不是networkingpipe理员,请代表他请求一个静态IP或通过DHCP获得你的访客IP,你的networkingpipe理员在他遇到地址冲突的那一天不会很高兴,将其跟踪到在您的工作站上运行的stream氓虚拟机。)