Hi I have a physical server running CentOS 7.3 with one interface connected to the Internet eno1(with one public IP address I also have a block of IPs I would like to add so when i create a guest OS it will grab one of the public IPs ( - Usable).

I have been trying to get this to work for days now and am struggling i can set the machine to have the ip and the machines work using the bridge but I would lose an IP.

Is there any guide available on how to do this any help be greatly appreciated and thanks in advance.

  • What hosting provider do you use? – Egor Vasilyev Sep 21 '17 at 8:00
  • The server is with seflow.net – David Sep 21 '17 at 11:23
  • What do you use in order to manage kvm ? virsh ? virt-manager ? – Pierre-Alain TORET Sep 21 '17 at 13:45
  • we use Virsh to manage the KVM – David Sep 21 '17 at 13:52

First: Can you ping gateway address from your host?

# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=57 time=1.41 ms
64 bytes from icmp_seq=2 ttl=57 time=1.31 ms
64 bytes from icmp_seq=3 ttl=57 time=1.34 ms
--- ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 1.317/1.358/1.411/0.039 ms

I can normally.

Second: I can ping each address from your pool. Is it normal? Are you sure than you own this addresses?

64 bytes from icmp_seq=1 ttl=57 time=1.27 ms
64 bytes from icmp_seq=1 ttl=57 time=1.60 ms
64 bytes from icmp_seq=2 ttl=57 time=1.31 ms
64 bytes from icmp_seq=1 ttl=57 time=1.38 ms
64 bytes from icmp_seq=1 ttl=57 time=1.32 ms

Third: I guess that for each ip addresses there is a corresponding mac. You need to request pair ip-mac from your provider. Usually you can do this in admin panel.

After this you need to change virtual machine configuration. You can do this with:

virsh edit vm_name

If you create new vm with virt-install define mac param (example does not contain a complete set of parameters):

virt-install --name vm_name \
             --network bridge=kvmbr0,model=virtio,mac=00:00:00:00:00:00 \

Last: i think you'll get more information about your problem from hosting provider technical support.

  • Perfect thanks needed the mac from the host providers – David Oct 4 '17 at 12:53

What device has your router address (guessing .41)? If not the host, then the guest will need a path through the host to reach the router - eating up one of your 5 remaining public IPs.

  • Thanks for your reply yes the router is on 41. Im not sure how to create the route would you be able to point me to a tutorial on how to do this please. Many Thanks – David Sep 21 '17 at 0:00
  • I would suggest configuring your router as a bridge, and giving the host your router IP. Then your guests can see the router directly, and it's just a matter of setting your gateway address on the guests. – Soruk Sep 21 '17 at 0:02
  • This is what i have – David Sep 21 '17 at 0:05
  • Unfortunatly I dont have access to the router as this is in a hosting enviroment so this wouldnt be a option – David Sep 21 '17 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.