LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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

Reply
 
Search this Thread
Old 02-05-2009, 07:54 PM   #1
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Rep: Reputation: 31
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....
 
Old 02-07-2009, 09:23 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,014
Blog Entries: 54

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764
"No luck" doesn't equal posting configuration, troubleshooting steps, diagnostic output and logging...
 
Old 02-07-2009, 12:34 PM   #3
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Original Poster
Rep: Reputation: 31
ok, i will post that in a moment...
 
Old 02-07-2009, 03:59 PM   #4
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Original Poster
Rep: Reputation: 31
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...
 
Old 02-08-2009, 04:43 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,014
Blog Entries: 54

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764
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...
 
Old 02-08-2009, 02:23 PM   #6
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Original Poster
Rep: Reputation: 31
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..
 
Old 02-20-2009, 03:23 PM   #7
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Original Poster
Rep: Reputation: 31
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.
 
Old 02-21-2009, 03:01 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,014
Blog Entries: 54

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764
Quote:
Originally Posted by cucolin@ View Post
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@ View Post
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.
 
Old 02-21-2009, 03:20 PM   #9
frieza
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,079

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
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.
 
Old 02-21-2009, 03:35 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,014
Blog Entries: 54

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764
Quote:
Originally Posted by frieza View Post
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.
 
Old 02-21-2009, 04:11 PM   #11
frieza
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,079

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
thats what it thought
 
Old 02-23-2009, 05:00 PM   #12
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Original Poster
Rep: Reputation: 31
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."
 
Old 02-24-2009, 05:00 PM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,014
Blog Entries: 54

Rep: Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764Reputation: 2764
Quote:
Originally Posted by cucolin@ View Post
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@ View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Configuration to access internet from vmware(host=winXP, guest on vmware=linux-5) afz_linux Linux - Newbie 3 12-30-2008 12:20 AM
Assign Public IP to my Unix Server drpaudel Linux - Newbie 1 12-16-2008 12:57 AM
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 10:51 AM
Vmware guest awilisch Linux - Software 1 01-24-2005 07:35 PM
I need to assign a Public IP to my Firewall How? mfeoli Linux - Networking 3 02-05-2004 07:54 PM


All times are GMT -5. The time now is 11:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration