I have installed Xen4Centos on Centos7, having single NIC with bridge network and have two VMs on that.
In one VM, I want to add two static IP one for webserver and one for mail server.
So I have created IP alias in guest VM, it was created but it was not pinging from outside public network or from the host.
So if you have any idea how to add second IP in the guest VM then please let me know.
I have searched on Google but most of the tutorials had given example for one IP only.
I have figure out the way to listen the second IP from public network.
I have added second interface in the VM configuration file with MAC address, so inside VM it looks like eth0 and eth1.
Then I have created a routing table for eth1 and added default gateway to eth1. [ ip route add default via XXX.XX.XXX.112 dev eth1 table eth1].
So doing this way second IP in VM was reachable from public network.
Related
I used DevStack(victoria branch) to quick-deploy the OpenStack all-in-one on my Ubuntu-20.04 system. This machine has a public ip address 222.XXX.XXX.XXX on interface eno1, and the DevStack script has automatically added br-ex and virbr0 interfaces on this machine. Here is my config.
#ifconfig
br-ex: inet 172.24.4.1 netmask 255.255.255.0 broadcast 0.0.0.0
eno1: inet 222.XXX.XXX.XXX netmask 255.255.255.128 broadcast 222.XXX.XXX.XXX
virbr0: inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
Now I created an VM instance on image cirros. On my OpenStack dashboard, I created a private network demo-net of type vxlan, and it has a subnet 'demo-subnet', with the CIDR 10.56.1.0/24 and Gateway 10.56.1.1. The DHCP option is on.
Meanwhile, DevStack has already created a public net with CIDR 172.24.4.0/24(bonded to br-ex) and Gateway 172.24.4.1.
There is a router connecting the demo-net and public net.
I allocated a floating IP 172.24.4.124 in the public net's pool to this instance. I can ping this IP on this machine, and vice versa. But the problem is, when I ping 172.24.4.124 on another machine, it fails. I hope to access the VM instance outside the host, so what should I do to fix it?
Any help will be greatly appreciated! Thank you.
By default, Devstack creates an isolated "external" network which it calls public. You can only connect to this network, and all virtual networks that are attached to it, from the Devstack host. You could try to configure port forwarding (iptables command) on the Devstack host, but the real solution is below.
You need to configure Devstack so that it uses your external network 222.XXX.XXX.XXX. The way this is done is documented at https://docs.openstack.org/devstack/latest/networking.html#shared-guest-interface (assuming your Devstack host has a single NIC eno1). In your case, you need to put this in local.conf:
PUBLIC_INTERFACE=eno1
HOST_IP=222.x.x.x
FLOATING_RANGE=222.x.y.z/PREFIX
PUBLIC_NETWORK_GATEWAY=your router, probably 222.something
Q_FLOATING_ALLOCATION_POOL=start=222.a.b.c,end=222.d.e.f
FLOATING_RANGE is the CIDR for the subnet to which eno1 is connected, and PREFIX is the prefix used by eno1. Q_FLOATING_ALLOCATION_POOL is the range of IP addresses in the 222.x.x.x network that you want to use for floating IPs.
You will have to recreate a Devstack (although it might be possible to change the configuration of the current cloud, I would not know how). Before you do that, I would also strongly recommend reinstalling Ubuntu, to ensure no unwanted configurations from your current setup remain.
I am in need of a internal network on my Proxmox 3.4 installation.
I want to use a proxy server to route all my servers to the internet and back. That way I only have the need for one WAN address.
I only use containers and have one vm available.
I've created a vmbr1 nic (10.0.0.1, 255.0.0.0), and a container with vmbr1 as eht0, assigned a static ip to it (10.0.0.102, 255.0.0.0) which contains a DHCP server to lease ips between 10.0.0.10 and 10.0.0.100.
When I connect a new container with vmbr1 as eth0 I do not get a ip address leased to it. DHCP service is running.
What am I doing wrong, or what did I forget? Any help would be gladly appreciated. Kind regards, Roberto
hello recommend running 2 nic eth0 and eth1
eth0 public
eth1 private manual ip config , like 192.168.1.xxx
use public to login to proxmox console from world wide and private to developer environment
The IP of of an instance created through Openstack is 10.0.0.2. But when I tried to ping this IP from other machine, it was not successful, however I am able to ping this IP from the machine on which Openstack(Devstack) is installed.
What could be the reason and how to resolved this?
This may help you: http://www.liquidstate.net/blog/technology/openstack-havana-home-lab-on-centos6-with-external-networking/
Basically, you need a virtual router to connect from you LAN to OpenStack private network.
I think, you don't need a Floating IP exactly on each instance. Only a virtual router, then you can create a static route on each machine in you LAN, for example:
ip route add 10.0.0.0/8 via 192.168.1.100 dev em1
Good Luck!
This IP is a private one, by default, when you deploy a new instance it is deployed with a private IP.
If you want to have a public IP, you need to create a floating IP for your project and afterward, you should assign one IP from this pool to the server instance that you have created previously.
After that you could access to your server instance without any problem.
I hope that it could help you.
I am using a dedicated server with a certain wan ip / netmask / gateway / nameservers.
I got a second wan ip to use with virtualbox i installed on the server.
I want to use bridge connection in virtualbox because i use some "servers" in it and want them to be able to be seen from internet .
I created a virtual network interface on the server and assigned the second ip to it.
It works , meaning i can ping that ip from outside.I setup virtualbox to bridge to that interface but i am stuck at what settings i have to set up in the virtual guest so everything will work.
Second ip has netmask 255.255.255.255 so i assume its a single ip situation and probably using gateway and nameservers of the server because i was given none of them with it.
I have to mention that first ip and second ip are not in the same subnet , nor is the gateway (e.g. XX.YY.ZZ.WW , ZZ is different between first , second and gateway ip)
Thanks in advance.
You have to unbind TCP and all other protocols and services on the hosts NIC that you want to use in VBox. After that, you can configure a bridged network connection using that interface. After that, you can set the IP and network settings in your virtual system. This has also been addressed in this post: https://serverfault.com/questions/136969/dedicate-a-nic-to-a-virtualbox-vm
How can a Linux VM work out the IPaddress of the host node?
I need to connect to the IP address of the host node. I also need to know when it changes as it could be a dynamic IP. I need it to connect to a service there.
Is there some way to check this, irregardless of the type of VM, VMWare, Xen, Virtual Box?
It needs to be a Linux script, and should work regardless of the host operating system, whether Linux or Windows
My solution is to bridge a network adapter in the VM with one on the host, making it a dymanic IP address. As such it will always be on the subnet as the host adapter.
Next thing is to run an HTTP service on the host IP, that the VM will scan its network range on. The IP the service responds on will be the IP of the host. Having an IP service on the host is not ideal, but it is the best I can come up with.