[libvirt] set a different default gateway in an isolated network

pichon patrick at pichon.me
Sat Feb 6 21:16:03 UTC 2016


I would like to set a specify default gateway for my VMs. However I’m not succeeding 

Here after is the isolated lan, where I added the statement   <route address='' prefix='8' gateway='’/> where my aim is to route to the 

What should I do , to make it works ?


<bridge name='virbr3' stp='off' delay='0'/>
<mac address='52:54:00:08:1e:d8'/>
<domain name='prd.pipiche.net'/>
  <forwarder addr=''/>
  <forwarder addr=''/>
<ip address='' netmask=''>
    <range start='' end=''/>
    <host mac='52:54:10:b6:35:ca'  ip=''/>
    <host mac='52:54:10:5f:92:05'  ip=''/>
    <host mac='52:54:10:7d:3a:3f'  ip=''/>
    <host mac='52:54:10:30:93:56'  ip=''/>
    <host mac='52:54:10:78:c1:c2'  ip=''/>
    <host mac='52:54:10:64:00:21'  ip=''/>
    <host mac='52:54:10:5a:5f:63'  ip=''/>
    <host mac='52:54:10:4c:b2:61'  ip=''/>
    <host mac='52:54:10:62:de:5f' ' ip=''/>
<route address='' prefix='8' gateway=''/>

When looking on the VM (guest) the route is not correctly set

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     100    0        0 ens4

arp -a
? ( at 52:54:00:08:1e:d8 [ether] on ensue

ens4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
      inet  netmask  broadcast
      inet6 fe80::5054:10ff:fe4c:b261  prefixlen 64  scopeid 0x20<link>
      ether 52:54:10:4c:b2:61  txqueuelen 1000  (Ethernet)
      RX packets 1805  bytes 153644 (150.0 KiB)
      RX errors 0  dropped 0  overruns 0  frame 0
      TX packets 1745  bytes 136075 (132.8 KiB)
      TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

More information about the libvir-list mailing list