Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
02-05-2009, 07:54 PM
|
#1
|
Member
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416
Rep:
|
How to assign public IP to vmware guest OS
Hi, we are running dedicated server with CentOS. We installed VMware in order to run a win2003 server. the problem is we need to access that server from outside (public).
1. the centos server has 2 NIC cards: eth0, eth1, eth2 with 2 public ips.
2. when vmware was installed we bind it to eth1.
3. we tried assigning eth1's public IP to the vmware machine and its not able to access anything outside.
4. tried to use NAT, bridged and host-only and no luck.
How can we make this happen? is this possible? i was looking at:
http://communities.vmware.com/thread/148280
thanks for any help....
|
|
|
02-07-2009, 09:23 AM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,415
|
"No luck" doesn't equal posting configuration, troubleshooting steps, diagnostic output and logging...
|
|
|
02-07-2009, 12:34 PM
|
#3
|
Member
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416
Original Poster
Rep:
|
ok, i will post that in a moment...
|
|
|
02-07-2009, 03:59 PM
|
#4
|
Member
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416
Original Poster
Rep:
|
1. Configuration:
guest.commands.enabledonhost = "TRUE"
vmnet1.hostonlyaddress = "192.168.252.1"
authd.client.port = "902"
authd.proxy.nfc = "vmware-hostd:ha-nfc"
loop.fullpath = "/usr/bin/vmware-loop"
guest.commands.anonguestpasswordonhost = ""
product.buildnumber = "122956"
vmnet1.hostonlynetmask = "255.255.255.0"
authd.proxy.vim = "vmware-hostd:hostd-vmdb"
bindir = "/usr/bin"
dhcpd.fullpath = "/usr/bin/vmnet-dhcpd"
guest.commands.anonguestusernameonhost = ""
control.fullpath = "/usr/bin/vmware-cmd"
product.version = "2.0.0"
authd.fullpath = "/usr/sbin/vmware-authd"
guest.commands.allowanonrootguestcommandsonhost = "FALSE"
vmware.fullpath = "/usr/bin/vmware"
libdir = "/usr/lib/vmware"
guest.commands.allowanonguestcommandsonhost = "FALSE"
vmdir = "/home/cocotuc/vm"
authd.soapserver = "TRUE"
product.name = "VMware Server"
2. Troubleshooting steps:
tried to use NAT, bridged and host-only
tried to statically assigning the eth1 IP to the virtual machine and not able to access the outside world
i'm able to ping anything when the vmware machine is 192.168.252.1
3. Not sure where/what to find 'diagnostic output'
4. Not sure where/what to find 'logging'
5. We are using:
VMware Infrastructure Web Access
Version 2.0.0
Build 122589
VMware Server
Version 2.0.0
Build 122956
Thanks for your help...
|
|
|
02-08-2009, 04:43 AM
|
#5
|
Moderator
Registered: May 2001
Posts: 29,415
|
Bridged mode means the VMware guest is an autonomous networked device on the LAN. Meaning it can be handled like any other (physical) networked device. Meaning DHCP should be able to assign it whatever IP address: LAN range or public. So, given a Vmware host, with 2 NIC cards (eth0, eth1) with 2 available public IP addresses, and connected to a network assigning IP addresses using DHCP, and being able to either request changes or control the DHCP leases, you should free up 1 public IP address (say the one on eth1). MAC of eth1 should then lease a LAN address from the router. VMware guest should get lease from DHCP as well, just assign MAC of VMware guest the public IP address. Problems arise when both eth0 and eth1 already provide publicly available services and can not be reconfigured, or when IP addresses can not be reassigned (providing party refuses to change MAC mappings) or when the routing device or firewall does not (want to) recognise the guests MAC as "valid". Of course I could be horribly wrong so any corrections are more than welcome...
|
|
|
02-08-2009, 02:23 PM
|
#6
|
Member
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416
Original Poster
Rep:
|
thanks, this is a dedicated hosted server. should we contact the host company and let them know about this? we tried assigning the IP from the eth1 and we were not able to reach the outside from the vmware machine or reach it from the outside. I will try assigning the MAC address to the vmware machine and assigning the eth1 public IP to see what happens.
thanks again unSpawn..
|
|
|
02-20-2009, 03:23 PM
|
#7
|
Member
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416
Original Poster
Rep:
|
ok unSpawn,
the support guys at the host server said:
"I assume you're currently doing NAT on your vm node. Additionally I believe that NAT is incorrect...you need Bridged if you want to assign a public static IP. Chances are you need to remove one of the IPs from cpanel ....Additionally I believe that NAT is incorrect...you need Bridged if you want to assign a public static IP. "
1. I set Bridged networking.
2. I removed the IP from the Cpanel.
3. I assigned the public IP to the vm machine and still not able to ping anything.
4. VMware does not recognize the network card.
5. When I set it to NAT vmware recognizes the card, but i cannot ping anything and the vm machine cannot be ping from anywere.
Not sure what to do next.....i will keep trying....thanks unSpawn.
|
|
|
02-21-2009, 03:01 PM
|
#8
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by cucolin@
the support guys at the host server said
|
Funny. When I read that reply I vaguely get the idea of getting my previous reply echoed back.
Quote:
Originally Posted by cucolin@
Not sure what to do next....
|
Maybe you should get acquainted with VMware bridge mode a wee bit more? Unless you control the LAN DHCP server AFAIK you don't get to "assign" anything: your hosting provider should. Basically what address your physical ethernet devices get assigned doesn't matter much as long as they can get a lease from the DHCPd. VMware just uses a physical ethernet device as a conduit to transport the DHCP broadcast for the MAC of the VMware guest onto the LAN. So ask your hosting provider if they are willing to assign an IP address to a MAC address you provide. Provide them with the VMware guest MAC. If they are willing to do that you'll be fine.
|
|
|
02-21-2009, 03:20 PM
|
#9
|
Senior Member
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
|
perhaps it would be easier to treat the vmware machine as if it were a separate physical machine behind a router and give it it's own private ip then use the physical ethernet's ip address as the 'public' ip and simply install a firewall like firestarter and forward the necessary traffic to the virtual machine's virtual interface?
such as physical nic->firestarter->virtual nic
just a suggestion
Last edited by frieza; 02-21-2009 at 03:22 PM.
|
|
|
02-21-2009, 03:35 PM
|
#10
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by frieza
perhaps it would be easier to treat the vmware machine as if it were a separate physical machine behind a router and give it it's own private ip then use the physical ethernet's ip address as the 'public' ip and simply install a firewall like firestarter and forward the necessary traffic to the virtual machine's virtual interface?
|
Well, that's exactly what makes bridged mode so efficient: it doesn't *need* all sorts of workarounds.
|
|
|
02-21-2009, 04:11 PM
|
#11
|
Senior Member
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
|
thats what it thought
|
|
|
02-23-2009, 05:00 PM
|
#12
|
Member
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, CentOS, RedHat
Posts: 416
Original Poster
Rep:
|
hi guys,
i contacted my hosting provider, and this is what i got from him:
"dedicated server environments use STATIC ips and there is no DHCP server like he is talking about. If vmware cannot assign a static IP to your guest then it's just not going to work. But I still think your main issue is the lack of a network interface in the guest.......eitehr way this is way beyond anything I am able to support at this point. Asking forums for help probably won't work, you'll need to talk to real tech support."
|
|
|
02-24-2009, 05:00 PM
|
#13
|
Moderator
Registered: May 2001
Posts: 29,415
|
Quote:
Originally Posted by cucolin@
If vmware cannot assign a static IP to your guest then it's just not going to work.
|
Assigning a static IP in the VMware quest is as easy as disabling DHCP and setting eth0 MAC, IP, GW and DNS settings...
Quote:
Originally Posted by cucolin@
But I still think your main issue is the lack of a network interface in the guest.......eitehr way this is way beyond anything I am able to support at this point.
|
The one thing is to find out in what way a mcrsft Vmware guest differs from a GNU/Linxu one (one Vmware community thead offers to reinstall the TCP/IP stack) but to test I just disabled DHCP on a GNU/Linux Vmware guest, removed its MAC from DHCP assignment on the router, configured a static IP in the Vmware guest and brought up networking again and it just works. How many public IP addresses do you have anyway? Just two I guess? Can you disable and remove configuration for eth1 completely? I mean CLI routine, not an UI, and make sure VMware doesn't recognise any eth1 stuff. Now if you remove networking components in your Vmware guest, reboot, reinstall and assign the eth1 IP and related static settings to the Vmware guest?
If you don't want all of that (granted, this is LQ not WQ) then if for instance you run one or two services you could stay with NAT mode. Of course that would mean you can never run an instance of those same services on your host.
|
|
|
All times are GMT -5. The time now is 06:12 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|