Adapter 1: |
Intel PRO/1000 MT Desktop (Bridged adapter, eth0) |
ubuntu上虛擬機的網絡實驗
宿主機:ubuntu1204 desktop
虛擬機:ubuntu1204 server
虛擬化軟件: virtualbox 4.1.12
虛擬機網絡設置:
宿主機eth0沒插網線,利用ifconfig設置ip如下:
#ifconfig eth0 192.168.4.2/24
#ip a
1: lo: mtu 16436 qdisc noqueue state
UNKNOWN
link/loopback
00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope
host lo
inet6 ::1/128 scope
host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc mq state DOWN qlen 1000
link/ether
20:6a:8a:39:70:d3 brd ff:ff:ff:ff:ff:ff
inet 192.168.4.3/24 brd
192.168.4.255 scope global eth0
3: wlan0: mtu 1500 qdisc mq state UP qlen 1000
link/ether
20:7c:8f:61:82:27 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.103/24
brd 192.168.1.255 scope global wlan0
inet6
fe80::227c:8fff:fe61:8227/64 scope link
valid_lft forever preferred_lft forever
虛擬機與宿主機的eth0橋接,虛擬機設置如下:
#ifconfig eth0 192.168.4.2/24
虛擬機ping宿主機
# ping 192.168.4.3
此處爲一直等待,沒有反映。
宿主機抓包顯示如下:
#tcpdump -i eth0 -n
15:19:25.452878 ARP, Request who-has 192.168.4.3 tell
192.168.4.2, length 28
15:19:26.451340 ARP, Request who-has 192.168.4.3 tell
192.168.4.2, length 28
15:19:27.451419 ARP, Request who-has 192.168.4.3 tell
192.168.4.2, length 28
15:19:28.463920 ARP, Request who-has 192.168.4.3 tell
192.168.4.2, length 28
15:19:29.463457 ARP, Request who-has 192.168.4.3 tell
192.168.4.2, length 28
15:19:30.463530 ARP, Request who-has 192.168.4.3 tell
192.168.4.2, length 28
15:19:31.463691 ARP, Request who-has 192.168.4.3 tell
192.168.4.2, length 28
15:19:32.463560 ARP, Request who-has 192.168.4.3 tell
192.168.4.2, length 28
15:19:33.463584 ARP, Request who-has 192.168.4.3 tell
192.168.4.2, length 28
宿主機ping虛擬機
#ping 192.168.4.2
此處爲一直等待,沒有反映。
虛擬機上抓包沒有任何信息:
#tcpdump -i eth0 -n
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.