CentOS 6.5 64를 사용하고 xen을 사용하여 가상 머신 (CentOS)을 작성합니다.
ifconfig
[root@CentOS ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:54:B3:FA
inet6 addr: fe80::a00:27ff:fe54:b3fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10087 errors:0 dropped:0 overruns:0 frame:0
TX packets:6094 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:763616 (745.7 KiB) TX bytes:541789 (529.0 KiB)
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:65536 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
vif2.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF
inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:3969 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:32
RX bytes:2088 (2.0 KiB) TX bytes:267825 (261.5 KiB)
xenbr0 Link encap:Ethernet HWaddr 08:00:27:54:B3:FA
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe54:b3fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9896 errors:0 dropped:0 overruns:0 frame:0
TX packets:1892 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:613149 (598.7 KiB) TX bytes:284945 (278.2 KiB)
brctl 쇼
[root@CentOS ~]# brctl show
bridge name bridge id STP enabled interfaces
xenbr0 8000.08002754b3fa yes eth0
vif2.0
xl 네트워크 목록
[root@CentOS ~]# xl network-list xc
Idx BE Mac Addr. handle state evt-ch tx-/rx-ring-ref BE-path
0 0 00:16:3e:22:4f:4b 0 4 10 768/769 /local/domain/0/backend/vif/2/0
brctl showmacs xenbr0
[root@CentOS ~]# brctl showmacs xenbr0
port no mac addr is local? ageing timer
2 00:16:3e:22:4f:4b no 89.35
1 00:1e:8c:19:62:67 no 0.00
1 00:22:6b:fe:b9:36 no 4.92
1 08:00:27:54:b3:fa yes 0.00
1 90:c1:15:c4:89:6d no 25.00
1 e0:2a:82:3d:c0:c5 no 3.78
2 fe:ff:ff:ff:ff:ff yes 0.00
핑
동일한 호스트에서 가상 머신 핑
[root@CentOS ~]# ping 192.168.1.120
PING 192.168.1.120 (192.168.1.120) 56(84) bytes of data.
64 bytes from 192.168.1.120: icmp_seq=1 ttl=64 time=2.78 ms
64 bytes from 192.168.1.120: icmp_seq=2 ttl=64 time=0.916 ms
64 bytes from 192.168.1.120: icmp_seq=3 ttl=64 time=0.917 ms
^C
--- 192.168.1.120 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2370ms
rtt min/avg/max/mdev = 0.916/1.538/2.782/0.879 ms
로컬 네트워크의 장치에서 가상 머신 핑
C:\Users\motaz>ping 192.168.1.120
Pinging 192.168.1.120 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
iptables
[root@CentOS ~]# iptables -L -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
11 700 ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED
0 0 ACCEPT icmp -- any any anywhere anywhere
0 0 ACCEPT all -- lo any anywhere anywhere
0 0 ACCEPT tcp -- any any anywhere anywhere state NEW tcp dpt:ssh
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any any anywhere anywhere PHYSDEV match --physdev-is-bridged
0 0 REJECT all -- any any anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 8 packets, 864 bytes)
pkts bytes target prot opt in out source destination
이 문제를 해결할 아이디어를 줄 수있는 사람이라면 누구나 감사 할 것입니다.