Greetings,
I have two vms, one is a router and the other one is a client, for some reason,
the client vm is unable get ip via dhcp from the router vm.
here are outputs:
vm1.xml:
<interface type='bridge'>
<mac address='52:54:00:54:78:be'/>
<source bridge='virbr0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x01'
slot='0x00' function='0x0'/>
</interface>
router.xml:
<interface type='bridge'>
<mac address='52:54:00:f9:bd:fb'/>
<source bridge='virbr0'/>
<target dev='vnet1'/>
<model type='virtio'/>
<alias name='net1'/>
<address type='pci' domain='0x0000' bus='0x0a'
slot='0x00' function='0x0'/>
</interface>
ifconfig:
$ busybox ifconfig -a
dummy0 Link encap:Ethernet HWaddr CE:2E:DD:15:8A:0C
BROADCAST NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.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:65536 Metric:1
RX packets:21428 errors:0 dropped:0 overruns:0 frame:0
TX packets:21428 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1039176 (1014.8 KiB) TX bytes:1039176 (1014.8 KiB)
virbr0 Link encap:Ethernet HWaddr 52:54:00:7E:27:AF
inet6 addr: fe80::5054:ff:fe7e:27af/64 Scope:Link
inet6 addr: fdab:9802:eb52:0:5054:ff:fe7e:27af/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:530861 errors:0 dropped:0 overruns:0 frame:0
TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:591914339 (564.4 MiB) TX bytes:4042 (3.9 KiB)
virbr0-dummy Link encap:Ethernet HWaddr 52:54:00:7E:27:AF
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:141357 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:32288355 (30.7 MiB)
vnet0 Link encap:Ethernet HWaddr FE:54:00:8B:66:C1
inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fdab:9802:eb52:0:fc54:ff:fe8b:66c1/64 Scope:Global
inet6 addr: fe80::fc54:ff:fe8b:66c1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:261801 errors:0 dropped:0 overruns:0 frame:0
TX packets:438289 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:42370344 (40.4 MiB) TX bytes:895415306 (853.9 MiB)
vnet1 Link encap:Ethernet HWaddr FE:54:00:F9:BD:FB
inet6 addr: fe80::fc54:ff:fef9:bdfb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:531064 errors:0 dropped:0 overruns:0 frame:0
TX packets:262 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:599366518 (571.5 MiB) TX bytes:27088 (26.4 KiB)
/etc/network/interface:
$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
#allow-hotplug enx503eaa4f9dcd
#iface enx503eaa4f9dcd inet dhcp
#allow-hotplug enp0s31f6
#iface enp0s31f6 inet dhcp
allow-hotplug vnet0
iface vnet0 inet dhcp
auto virbr0-dummy
iface virbr0-dummy inet manual
pre-up /sbin/ip link add virbr0-dummy type dummy
up /sbin/ip link set virbr0-dummy address 52:54:00:7e:27:af
auto virbr0
iface virbr0 inet manual
hwaddress ether 19:7c:3b:92:ec:ee
bridge_ports virbr0-dummy
any ideas what cen be the issue?
Thanks,
Dagg.
On 12/15/18 9:54 AM, daggs wrote:> Greetings, > > I have two vms, one is a router and the other one is a client, for some reason, the client vm is unable get ip via dhcp from the router vm. > here are outputs: > vm1.xml: > <interface type='bridge'> > <mac address='52:54:00:54:78:be'/> > <source bridge='virbr0'/> > <model type='virtio'/> > <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> > </interface> > > router.xml: > <interface type='bridge'> > <mac address='52:54:00:f9:bd:fb'/> > <source bridge='virbr0'/> > <target dev='vnet1'/> > <model type='virtio'/> > <alias name='net1'/> > <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/> > </interface> > > ifconfig > $ busybox ifconfig -a > dummy0 Link encap:Ethernet HWaddr CE:2E:DD:15:8A:0C > BROADCAST NOARP MTU:1500 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:0 (0.0 B) TX bytes:0 (0.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:65536 Metric:1 > RX packets:21428 errors:0 dropped:0 overruns:0 frame:0 > TX packets:21428 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:1039176 (1014.8 KiB) TX bytes:1039176 (1014.8 KiB) > > virbr0 Link encap:Ethernet HWaddr 52:54:00:7E:27:AF > inet6 addr: fe80::5054:ff:fe7e:27af/64 Scope:Link > inet6 addr: fdab:9802:eb52:0:5054:ff:fe7e:27af/64 Scope:Global > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:530861 errors:0 dropped:0 overruns:0 frame:0 > TX packets:85 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:591914339 (564.4 MiB) TX bytes:4042 (3.9 KiB) > > virbr0-dummy Link encap:Ethernet HWaddr 52:54:00:7E:27:AF > UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:141357 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:0 (0.0 B) TX bytes:32288355 (30.7 MiB) > > vnet0 Link encap:Ethernet HWaddr FE:54:00:8B:66:C1 > inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0 > inet6 addr: fdab:9802:eb52:0:fc54:ff:fe8b:66c1/64 Scope:GlobalHow did vnet0 get IP addresses? They aren't in the domain xml, and the guest has no visibility to change the IP of the tap interface on the host side. That means that you have "something else" messing around with the networking config. I can't say what it is, but this is definitely a red flag that needs investigating - the host side of tap devices should not have an IP address except in special cases when you're routing directly from host to guest using the tap and *not* using a bridge.> inet6 addr: fe80::fc54:ff:fe8b:66c1/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:261801 errors:0 dropped:0 overruns:0 frame:0 > TX packets:438289 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:42370344 (40.4 MiB) TX bytes:895415306 (853.9 MiB) > > vnet1 Link encap:Ethernet HWaddr FE:54:00:F9:BD:FB > inet6 addr: fe80::fc54:ff:fef9:bdfb/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:531064 errors:0 dropped:0 overruns:0 frame:0 > TX packets:262 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:599366518 (571.5 MiB) TX bytes:27088 (26.4 KiB) > > /etc/network/interface: > $ cat /etc/network/interfaces > # This file describes the network interfaces available on your system > # and how to activate them. For more information, see interfaces(5). > > source /etc/network/interfaces.d/* > > # The loopback network interface > auto lo > iface lo inet loopback > > # The primary network interface > #allow-hotplug enx503eaa4f9dcd > #iface enx503eaa4f9dcd inet dhcp > #allow-hotplug enp0s31f6 > #iface enp0s31f6 inet dhcp > > allow-hotplug vnet0 > iface vnet0 inet dhcpAh. Why are you doing this^^^ ?? It makes no sense at all. The tap devices should not be listed at all in the host's network config; they are created and configured by libvirt directly.> > auto virbr0-dummy > iface virbr0-dummy inet manual > pre-up /sbin/ip link add virbr0-dummy type dummy > up /sbin/ip link set virbr0-dummy address 52:54:00:7e:27:af > > auto virbr0 > iface virbr0 inet manual > hwaddress ether 19:7c:3b:92:ec:ee > bridge_ports virbr0-dummyLikewise for both of these. The bridge created by libvirt for its default network is usually named virbr0. You don't have both a libvirt default network that uses virbr0 *and* this manual configuration of virbr0 in your interfaces file too, do you? That would be a recipe for disaster.> > any ideas what cen be the issue?1) You haven't shown anything to indicate your guest named "router" actually has a dhcp server running. 2) Based on the oddities I've mentioned above, it sounds like you may have conflicting/nonsensical config that isn't shown in this email.> Thanks, > > Dagg. > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >
Greetings Laine,
you are correct, this prints are from a non libvirt network config, the
following are, they show the same issue I've deleted the rest of the mail it
isn't relevant:
there are two vms:
Id Name State
----------------------------------------------------
1 router running
5 TvHeadend_server running
and the following network:
Name State Autostart Persistent
----------------------------------------------------------
default active yes yes
Name: default
UUID: 735c1a37-5af8-4cad-a620-6f55046060dd
Active: yes
Persistent: yes
Autostart: yes
Bridge: virtsw0
router's virtual interfaces in xml file:
<interface type='ethernet'>
<mac address='52:54:00:8b:66:c1'/>
<target dev='vnet0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x08'
slot='0x00' function='0x0'/>
</interface>
<interface type='bridge'>
<mac address='52:54:00:a7:79:6b'/>
<source bridge='virtsw0'/>
<target dev='vnet1'/>
<model type='virtio'/>
<alias name='net1'/>
<address type='pci' domain='0x0000' bus='0x0a'
slot='0x00' function='0x0'/>
</interface>
TvHeadend_server's interfaces in xml file:
<interface type='bridge'>
<mac address='52:54:00:54:78:be'/>
<source bridge='virtsw0'/>
<target dev='vnet2'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x01'
slot='0x00' function='0x0'/>
</interface>
here is the output of ifconfig -a from within the router vm:
br-lan Link encap:Ethernet HWaddr 52:54:00:8B:66:C1
inet addr:10.0.0.138 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fdab:9802:eb52::1/60 Scope:Global
inet6 addr: fe80::5054:ff:fe8b:66c1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1315167 errors:0 dropped:12 overruns:0 frame:0
TX packets:2565222 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:112493233 (107.2 MiB) TX bytes:3352094669 (3.1 GiB)
eth0 Link encap:Ethernet HWaddr 52:54:00:8B:66:C1
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:752747 errors:0 dropped:0 overruns:0 frame:0
TX packets:528778 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2165680401 (2.0 GiB) TX bytes:44330393 (42.2 MiB)
eth1 Link encap:Ethernet HWaddr 52:54:00:A7:79:6B
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:81686 errors:0 dropped:0 overruns:0 frame:0
TX packets:93198 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4251322 (4.0 MiB) TX bytes:14588557 (13.9 MiB)
eth2 Link encap:Ethernet HWaddr B0:6E:BF:83:EA:14
inet6 addr: fe80::b26e:bfff:fe83:ea14/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2742898 errors:0 dropped:0 overruns:0 frame:0
TX packets:1320324 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3393439640 (3.1 GiB) TX bytes:138750511 (132.3 MiB)
Interrupt:16 Memory:fd800000-fd820000
eth3 Link encap:Ethernet HWaddr 74:DA:38:C2:61:55
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:65916 errors:0 dropped:0 overruns:0 frame:0
TX packets:412666 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7801885 (7.4 MiB) TX bytes:352194419 (335.8 MiB)
eth4 Link encap:Ethernet HWaddr 74:DA:38:C2:70:F4
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1233609 errors:0 dropped:0 overruns:0 frame:0
TX packets:3897395 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:109704871 (104.6 MiB) TX bytes:4761504951 (4.4 GiB)
eth5 Link encap:Ethernet HWaddr 74:DA:38:C2:61:5C
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:28376 errors:0 dropped:0 overruns:0 frame:0
TX packets:54700 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2561537 (2.4 MiB) TX bytes:58101771 (55.4 MiB)
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:15576 errors:0 dropped:0 overruns:0 frame:0
TX packets:15576 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1361313 (1.2 MiB) TX bytes:1361313 (1.2 MiB)
pppoe-wan Link encap:Point-to-Point Protocol
inet addr:176.231.66.131 P-t-P:82.102.128.60 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:2577218 errors:0 dropped:0 overruns:0 frame:0
TX packets:1153300 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:3315828031 (3.0 GiB) TX bytes:97931567 (93.3 MiB)
wlan0 Link encap:Ethernet HWaddr 14:CC:20:1B:60:2B
inet6 addr: fe80::16cc:20ff:fe1b:602b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:314631 errors:0 dropped:0 overruns:0 frame:0
TX packets:629786 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:80089649 (76.3 MiB) TX bytes:527134993 (502.7 MiB)
and from the host machine:
dummy0 Link encap:Ethernet HWaddr C6:C8:2A:04:FD:23
BROADCAST NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.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:65536 Metric:1
RX packets:22048 errors:0 dropped:0 overruns:0 frame:0
TX packets:22048 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1068960 (1.0 MiB) TX bytes:1068960 (1.0 MiB)
virtsw0 Link encap:Ethernet HWaddr 52:54:00:6B:1B:92
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:92908 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13257095 (12.6 MiB) TX bytes:756 (756.0 B)
virtsw0-nic Link encap:Ethernet HWaddr 52:54:00:6B:1B:92
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
vnet0 Link encap:Ethernet HWaddr FE:54:00:8B:66:C1
inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::fc54:ff:fe8b:66c1/64 Scope:Link
inet6 addr: fdab:9802:eb52:0:fc54:ff:fe8b:66c1/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:528665 errors:0 dropped:0 overruns:0 frame:0
TX packets:752585 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44311555 (42.2 MiB) TX bytes:2165654771 (2.0 GiB)
vnet1 Link encap:Ethernet HWaddr FE:54:00:A7:79:6B
inet6 addr: fe80::fc54:ff:fea7:796b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:92983 errors:0 dropped:0 overruns:0 frame:0
TX packets:81658 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14566221 (13.8 MiB) TX bytes:4249914 (4.0 MiB)
vnet2 Link encap:Ethernet HWaddr FE:54:00:54:78:BE
inet6 addr: fe80::fc54:ff:fe54:78be/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:257 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1962 (1.9 KiB) TX bytes:42261 (41.2 KiB)
this is the relevant console output from TvHeadend_server which includes the
network start, ifconfig -a and lspci -k
Starting network: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc: started, v1.29.3
udhcpc: sending discover
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, failing
FAIL
eth0 Link encap:Ethernet HWaddr 52:54:00:54:78:BE
inet6 addr: fe80::5054:ff:fe54:78be/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:1 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:388 (388.0 B) TX bytes:1270 (1.2 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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
03:00.0 Class 0100: 1af4:1042
00:1f.2 Class 0106: 8086:2922
00:01.2 Class 0604: 8086:3420
00:1f.0 Class 0601: 8086:2918
02:00.0 Class 00ff: 1af4:1045
00:01.0 Class 0604: 8086:3420
00:1d.1 Class 0c03: 8086:2935
01:00.0 Class 0200: 1af4:1041
00:1f.3 Class 0c05: 8086:2930
00:00.0 Class 0600: 8086:29c0
00:01.3 Class 0604: 8086:3420
00:01.1 Class 0604: 8086:3420
00:1d.2 Class 0c03: 8086:2936
00:1d.0 Class 0c03: 8086:2934
00:1d.7 Class 0c03: 8086:293a
03:00.0 Class 0100: 1af4:1042 virtio-pci
00:1f.2 Class 0106: 8086:2922
00:01.2 Class 0604: 8086:3420
00:1f.0 Class 0601: 8086:2918
02:00.0 Class 00ff: 1af4:1045 virtio-pci
00:01.0 Class 0604: 8086:3420
00:1d.1 Class 0c03: 8086:2935 uhci_hcd
01:00.0 Class 0200: 1af4:1041 virtio-pci
00:1f.3 Class 0c05: 8086:2930
00:00.0 Class 0600: 8086:29c0
00:01.3 Class 0604: 8086:3420
00:01.1 Class 0604: 8086:3420
00:1d.2 Class 0c03: 8086:2936 uhci_hcd
00:1d.0 Class 0c03: 8086:2934 uhci_hcd
00:1d.7 Class 0c03: 8086:293a ehci-pci
is there anything wrong with my config?