Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've some problem connecting my virtual machine to my internet. Can I use another gateway ip address other then my subnet ip address? The gateway ip address is from my router ip address? My problem is that the vmnet8 dhcp server isn't started automatically. When I want to connect my virtual machine I need to restart the vmnet8 dhcp server everytime when I start my virtual machine?

enter image description here

share|improve this question
Each subnet has a gateway to the outside world. In order to communicate with anything on outside your network, you must first traverse your subnet's gateway. If you put an address in the gateway field that is not on your subnet, you will not be able to send traffic outside your network. We might be able to suggest a way around it if we knew more about your network topography (break down of subnets, routers, clients, etc). – MaQleod Oct 19 '12 at 17:13
Thanks, so it must be the same subnet. But when it's on the same subnet I can't ping the gateway? I don't have an interface for the gateway? Or can I use the virtual interface ip address as gateway ip address? Do you suggest dhcp lease time for my problem? I need to restart the dhcp server everytime? – Betterdev Oct 19 '12 at 17:23
up vote 0 down vote accepted

No, you cannot. The gateway IP tells the system how to get to another subnet, and without it, packets won't leave the current subnet.

A computer only knows how to talk to the other computers that are directly connected on the same subnet. A gateway is a "default route" which specifies where packets should be sent by default if they are not destined for somewhere on the local subnet.

share|improve this answer

It is possible, if you define a static route to the default gateway.

This router has to be on your subnet. This doesn't make it your default gateway.

Found here

share|improve this answer
While this may answer the question, please be aware you have answered a question that is many years old and already has an accepted answer. – CharlieRB Jan 14 at 21:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .