LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-16-2011, 09:26 AM   #1
cprusty
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Rep: Reputation: Disabled
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.

Regards
CP

Last edited by cprusty; 09-16-2011 at 09:39 AM.
 
Old 09-16-2011, 09:47 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,667

Rep: Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711
Networking

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.)

Last edited by wpeckham; 09-16-2011 at 09:48 AM.
 
Old 09-16-2011, 09:58 AM   #3
cprusty
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wpeckham View Post
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.

Regards
CP

Last edited by cprusty; 09-16-2011 at 10:00 AM.
 
Old 09-18-2011, 08:24 AM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,667

Rep: Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711
Oh my...

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.
 
Old 09-20-2011, 06:41 AM   #5
cprusty
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wpeckham View Post
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.

Regards
CP

Last edited by cprusty; 09-20-2011 at 06:43 AM.
 
Old 09-21-2011, 09:58 AM   #6
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,667

Rep: Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711
Ohhhh Myy!

OK, that I did not understand. I do now.

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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default gateway problem with router jpjohn Linux - Wireless Networking 1 08-02-2011 07:38 PM
Problem in adding Default gateway and DNS . gardenair Linux - Newbie 5 06-19-2010 04:40 PM
Wierd default Gateway problem Tarn Linux - Networking 1 10-10-2007 10:27 AM
How to add default gateway in /etc/sysconfig/network-scripts/* zamri Linux - Networking 2 09-06-2005 10:32 AM
Problem pinging default gateway robeb Linux - Networking 6 01-30-2003 12:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration