libvirt

 

虚拟机

root@srv6:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether fa:16:3e:33:92:f5 brd ff:ff:ff:ff:ff:ff
    inet 10.10.18.156/24 brd 10.10.18.255 scope global ens3
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fe33:92f5/64 scope link 
       valid_lft forever preferred_lft forever
root@srv6:~# ping 10.10.18.254
PING 10.10.18.254 (10.10.18.254) 56(84) bytes of data.
64 bytes from 10.10.18.254: icmp_seq=1 ttl=254 time=0.999 ms
64 bytes from 10.10.18.254: icmp_seq=2 ttl=254 time=1.02 ms
64 bytes from 10.10.18.254: icmp_seq=3 ttl=254 time=0.945 ms
^C
--- 10.10.18.254 ping statistics ---

 

 

计算节点

[root@x86compute01 38c54999-0d37-4499-aee7-2c2615a6cf46]# bridge fdb show master  brq07e0cfa1-17 | grep fa:16:3e:33:92:f5 
fa:16:3e:33:92:f5 dev tapde0e58c8-f9 master brq07e0cfa1-17 
[root@x86compute01 38c54999-0d37-4499-aee7-2c2615a6cf46]# tcpdump -i tapde0e58c8-f9 host 10.10.18.254 and icmp -env
tcpdump: listening on tapde0e58c8-f9, link-type EN10MB (Ethernet), capture size 262144 bytes
15:27:46.375620 fa:16:3e:33:92:f5 > f4:1d:6b:87:53:2c, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 55084, offset 0, flags [DF], proto ICMP (1), length 84)
    10.10.18.156 > 10.10.18.254: ICMP echo request, id 12719, seq 1, length 64
15:27:46.376467 f4:1d:6b:87:53:2c > fa:16:3e:33:92:f5, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 254, id 55084, offset 0, flags [DF], proto ICMP (1), length 84)
    10.10.18.254 > 10.10.18.156: ICMP echo reply, id 12719, seq 1, length 64
15:27:47.377067 fa:16:3e:33:92:f5 > f4:1d:6b:87:53:2c, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 64, id 55091, offset 0, flags [DF], proto ICMP (1), length 84)
    10.10.18.156 > 10.10.18.254: ICMP echo request, id 12719, seq 2, length 64
15:27:47.377887 f4:1d:6b:87:53:2c > fa:16:3e:33:92:f5, ethertype IPv4 (0x0800), length 98: (tos 0x0, ttl 254, id 55091, offset 0, flags [DF], proto ICMP (1), length 84)
    10.10.18.254 > 10.10.18.156: ICMP echo reply, id 12719, seq 2, length 64
^C
4 packets captured
4 packets received by filter
0 packets dropped by kernel
[root@x86compute01 38c54999-0d37-4499-aee7-2c2615a6cf46]# 

 

[root@x86compute01 38c54999-0d37-4499-aee7-2c2615a6cf46]# cat libvirt.xml  | grep mac
      <mac address="fa:16:3e:33:92:f5"/>
[root@x86compute01 38c54999-0d37-4499-aee7-2c2615a6cf46]# cat libvirt.xml  | grep bridge
    <interface type="bridge">
      <source bridge="brq07e0cfa1-17"/>
fa:16:3e:33:92:f5 
[root@x86compute01 38c54999-0d37-4499-aee7-2c2615a6cf46]# ip link show tapde0e58c8-f9 
318: tapde0e58c8-f9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master brq07e0cfa1-17 state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fe:16:3e:33:92:f5 brd ff:ff:ff:ff:ff:ff
[root@x86compute01 38c54999-0d37-4499-aee7-2c2615a6cf46]# 

 

root@controller1:~# neutron port-list | grep fa:16:3e:33:92:f5
| de0e58c8-f95f-40f1-a81e-3aa63998f48a |      | fa:16:3e:33:92:f5 | {"subnet_id": "95c90361-906f-4d04-9f97-b5bbbae60fea", "ip_address": "10.10.18.156"}    |
root@controller1:~# 

 

posted on 2020-09-04 15:42  tycoon3  阅读(210)  评论(0编辑  收藏  举报

导航