我在 Windows 7 x64 上的 VirtualBox 中安装了 Scientific Linux 6.2 x86。
适配器是
Adapter 1: Paravirtualized Network (Bridged adapter, Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Controller)
promiscuous mode: Deny
但是这个适配器没有获取IP地址。
[root@server ~]# ifconfig -a
eth1 Link encap:Ethernet HWaddr 00:40:5A:33:F2:92
inet6 addr: fe80::240:5aff:fe33:f292/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:398 (398.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:960 (960.0 b) TX bytes:960 (960.0 b)
名单/etc/sysconfig/network-scripts
[root@server network-scripts]# ls
ifcfg-eth0 ifdown-eth ifdown-ppp ifup-aliases ifup-isdn ifup-routes net.hotplug
ifcfg-eth1 ifdown-ippp ifdown-routes ifup-bnep ifup-plip ifup-sit network-functions
ifcfg-lo ifdown-ipv6 ifdown-sit ifup-eth ifup-plusb ifup-tunnel network-functions-ipv6
ifdown ifdown-isdn ifdown-tunnel ifup-ippp ifup-post ifup-wireless
ifdown-bnep ifdown-post ifup ifup-ipv6 ifup-ppp init.ipv6-global
并且ifcfg-eth1
是
DEVICE=eth1
HWADDR=00:40:5a:33:f2:92
NM_CONTROLLED=yes
ONBOOT=no
BOOTPROTO=dhcp
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
请告诉我如何获取eth1的IP地址192.168.0.x。
答案1
好吧,你自己输入IP地址即可:
ifconfig eth1 192.168.0.x
如果它不起作用,请进入特定虚拟驱动器的设置并通过虚拟适配器之一启用网络选项。
答案2
更有可能的是您忘记在适配器上启用混杂:
默认情况下,嗅探被拒绝。