Network problem with DNS and default gateway ip on VM
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Network problem with DNS and default gateway ip on VM
Hi,
I have a Oracle Linux 5 server with Oracle VM Server 2.2.1 software installed. I downloaded OEL5 VM template and set it up using the DNS and default gateway of the VM server machine. Now I realize I cannot access the internet from inside this Virtual Machine. So I think the DNS and gateway is not correctly setup.
Please note that I can ssh the VM from VM server, ping to it from everywhere.
Can you please guide me as to what DNS and gateway I should use for configuring my VMs? Do I need to set up an IP alais with different DNS.
My VM server ip is (some values changed) 99.44.95.115, DNS 213.133.98.98, Def gateway 99.44.95.97 , netmask 255.255.255.224
So for my first VM I am using ip 99.44.95.98, DNS 213.133.98.98, Def gateway 99.44.95.97 , netmask 255.255.255.224
Am I doing anything wrong. I am completely new to Linux and networking. So I am still learning.
Just a general idea would take me a long way.
If you VM is in the same subnet as your host, it should have the same DNS and same DEFAULT GATEWAY as the host.
What kind of networking did you set up?
(Disclaimer: I use VirtualBox and KERNEL virtualization daily, but do NOT use VMWARE.)
Hi,
Thanks for your reply.
It is NAT network I think. Actually it is a cloud server provided to us by a company.
The VM server is fine in all respect. But for VMs to run on NAT network, do I need to do some special setup like ip alais setup?
The VM network is provided by Oracle, I think its called xenbr0 similar to VMware.
If it was a bridged network, and they gave you that IP address to use, it should work.
If it is a NAT network, your server will NOT be in the same subnet as the host and those settings will NEVER work. The guest server should either be provided its network settings via DHCP, or the hosting provider should give you your settings to use (and ONLY those settings will work).
If you are providing your own hosting, you need to do some more reading about the networking in your style of hosting. The VMWARE online documentation is said to be excellent. (Says the guy who almost never used VMWARE, but that is what I have read.)
Without knowing more I am not sure we will be able to help you. I do wish you good luck, and will be watching for traffic here in case you can pin down enough information that we can help you fix the problem.
If it was a bridged network, and they gave you that IP address to use, it should work.
If it is a NAT network, your server will NOT be in the same subnet as the host and those settings will NEVER work. The guest server should either be provided its network settings via DHCP, or the hosting provider should give you your settings to use (and ONLY those settings will work).
If you are providing your own hosting, you need to do some more reading about the networking in your style of hosting. The VMWARE online documentation is said to be excellent. (Says the guy who almost never used VMWARE, but that is what I have read.)
Without knowing more I am not sure we will be able to help you. I do wish you good luck, and will be watching for traffic here in case you can pin down enough information that we can help you fix the problem.
Hi ,
I just realised that I was pinging a different machine which has same ip as my virtual machine. To put my question straight.
My case:#
I have given IP address of X to my Virtual machine hosted on Y (VM server) and specified gateway, netmask and dns on X to be same as Y.
Now my VM can be connected via vncviewer and ssh (through Y ssh console). Now there is another machine somewhere with same ip as X. Will this affect the ability of my Virtual Machine X to connect to the internet?
About my network. Its pretty simple with 1 NIC and eth0 setup. When using Oracle VM server to manage networks a xenbr0 bridge is created which allows the guests to be available.
NO: you cannot have multiple machines with the same IP address on the same network.
The actual behavior is not well defined: a collision can cause the first machine to drop off the network, the second to refuse to start its networking, or (depending upon their behavior and that of the switch involved) they may take turns receiving packets. The result is never pretty. The technical term is 'BAD'!
If you use NAT networking, it is more difficult to set up routing so that external machines can reach the virtual server. NAT is an advantage for client machines, because (though thay have a private IP that differs) they appears to external machines to use the HOST IP address (they let the HOST route for them). You do not generally have to worry about addressing collisions.
If you use BRIDGED networking, the virtual looks exactly like any physical node on your network and is that easy to address. Alas, for this to work you must apply all of the discipline and standards for good networking. That means you must make sure that each local IP address is unique and in the same subnet to communicate (among other things).
Sorry for the confusion.
I hope that this helps.
Last edited by wpeckham; 09-21-2011 at 10:00 AM.
Reason: clarification
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.