Need IP address in offline mode

Hi there

On my laptop (openssuse 11.0) runs a vmware as well as an apache webserver. i need to access the apache from the VM. this is no problem as long as i am connected to the net. but if i startup the system without having any net, i am not able to define a static IP address. how can i do that? i tried it on the network interfaces eth0 and wlan0, but that doesn’t work!

thanks in advance
Simon

You can very well define IP addresses even if you are not connected to the net. What is the problem you are facing with?

> On my laptop (openssuse 11.0) runs a vmware as well as an apache
> webserver. i need to access the apache from the VM. this is no problem
> as long as i am connected to the net. but if i startup the system
> without having any net, i am not able to define a static IP address. how
> can i do that? i tried it on the network interfaces eth0 and wlan0, but
> that doesn’t work!

i do not know if this will work, but try this address in your browser:
http://127.0.0.1


deConficter

well, it is not working if i set the static ip address in the network settings in yast. but i just figured out the commandline that works:

ifconfig eth0 192.168.X.X netmask 255.255.255.0 up

the problem i have got now, is that i can not reach the apache from within the VM, even if i can reach it with this ip from the host itself. but this problem seems not to be a linux problem but a VM one. so i’ll probably have to change the forum :slight_smile:

greez simon

What is the VM version?
Latest versions have very simple network setup - use the “host interface” mode.

I’ve got that exact setup. I have bridged networking for the VM and an IP of 192.168.33.108 for the virtual ether net card. And in openSUSE I have 192.168.33.102 for the real physical wired ethernet card. I tell apache to use the address 192.168.33.102 with this line in default-server.conf:

NameVirtualHost 192.168.33.102

and in Suse’s file /etc/hosts I define the name like so:

192.168.33.102     www.some_domainame.com

Then I can address the apache server with this address in the VM_machine: http://www.some_domainname.com when no internet is involved.

i just wonder what was the result of doing nothing but entering
http://127.0.0.1/ in a browser??


deConficter

@syampillai
i’m using VM version 2.5.1. i tried to upgrade to the actual 2.5.2 version, but that does not really work, because it is some how compiled into the kernel… but i don’t think that there are so huge differences between version 2.5.1 and 2.5.2!

@deConficter
hmm, that can’t work for 2 reasons:

  1. 127.0.0.1 refers to the localhost, which is in this case the VM itself.
  2. i need to configure a specific IP address, because i’m running magento ecommerce system in the apache, and this is just running with always the same IP.

@swerdna
well, this is actually not so far from what i am trying. i added the NameVirtualHost property to the apache config, but can not discover a difference. the mapping between IP and hostname was in the hosts file anyway, and i was trying all different kinds of connections from the VM. but it just don’t work. i can’t access the host with the browser, nor am i able to ping it. it seems that the VM is just switching of the network adapter if i’m not connected to the net!

i’m just going nuts with this! :frowning:

If you would use Virtualbox I have an answer for you, but you don’t so I don’t know if something similar exists in Vmware as I haven’t tried it.

In Virtualbox, when you create a VM with the default setting of NAT assigned IP address, the VM gets 10.0.2.15. The host is at 10.0.2.2. So you can reach the host at that address.

Good luck.

Sorry, I posted this thinking that you are using VirtualBox and not VMware. I don’t use VMware and I like VirtualBox for my stuff.

> @deConficter
> hmm, that can’t work for 2 reasons:
> 1. 127.0.0.1 refers to the localhost, which is in this case the VM
> itself.
> 2. i need to configure a specific IP address, because i’m running
> magento ecommerce system in the apache, and this is just running with
> always the same IP.

hmmmm…thanks for the answer…i learned something…


deConficter

Does your VM config allow bridged networking? That puts the host and the guest on the same LAN, which I think is what you want. At least, that’s the way it works in VMware Server.