我有OracleEnterpriseLinux5作为VirtualBox上的来宾,使用桥接网络在Windows7主机上运行。
我正在工作时尝试在OEL5 VMs上配置一个静态IP,就像以前在我的网络中配置VM一样。我通过从windows主机上点击IP地址找到了一个未使用的IP (10.167.190.118)。我对OEL5客户机做了以下更改:
# 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# 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 localhost6nameserver 10.167.176.1
search localdomain现在,当我停止/启动网络守护进程时,我可以从windows机器上平10.167.190.118,并可以使用Putty进行SSH。但是,我无法连接到OEL5客人内的互联网。
我更新了/etc/sysconfig/网络
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=oel5-11g.com
GATEWAY=10.167.176.1...but得到错误
打开接口eth0: RTNETLINK答案:无效参数
运行网络启动命令时。
我已经尝试过搜索这个问题,但是我已经能够使用来自主机的Putty将SSH放到OEL5来宾中。我需要做什么改变,以确保我可以通过OEL5客人连接到互联网?
来自主机的
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 . . . . . . . . . :来自
的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的新手,对网络了解有限,因此,任何帮助都将不胜感激。
在此之前,非常感谢您。
发布于 2013-05-15 12:13:44
10.167.176.1不是10.167.190.118/20的广播地址。
使用IP计算器检查:http://jodies.de/ipcalc
您只需删除ifcfg-文件中的BROADCAST行,系统就足够聪明,只需要一个有效的IP和子网掩码就可以解决所有问题。
(PS:我假设你不是网络管理员。请代表他索取静态IP或通过DHCP获取您的客户IP。您的网络管理员将不高兴的一天,他得到一个地址冲突,并必须跟踪它到一个流氓VM运行在您的工作站。)
https://serverfault.com/questions/502195
复制相似问题