[Solved] static IP 10.0... but I need 192.168....

Discussions related to using VirtualBox on Windows hosts.
Post Reply
jcpamart
Posts: 7
Joined: 30. Nov 2008, 19:56

[Solved] static IP 10.0... but I need 192.168....

Post by jcpamart »

Hi, I run VB on a vista and I've installed a Ubuntu 8.10 on it.

The DHCP configuration give me a 10.0 ip.
But my network have a 192.168.0..... ip.

So I can't ping computers....

I need to have a 192.168... IP on my ubuntu.

In the help file, i saw that I could change it :
"
9.11. Configuring the address of a NAT network interface
In NAT mode, the guest network interface is assigned to the IPv4 range 10.0.x.0/24 by default where x corresponds to the instance of the NAT interface +2 of that VM. So x is 2 if there is only once NAT instance active. In that case the guest is assigned to the address 10.0.2.15, the gateway is set to 10.0.2.2 and the name server can be found at 10.0.2.3.

If, for any reason, the NAT network needs to be changed, this can be achieved with the following command:

VBoxManage modifyvm "My VM" -natnet1 "192.168/16"
This command would reserve the network addresses 192.168.0.0 ... 192.168.254.254 for the first NAT network instance of "My VM". The guest IP would be assigned to 192.168.0.15 and the default gateway could be found at 192.168.0.2.
"

But I don't understand How can I enter a command line with the vboxmanage ?

Can someone could help me to have a 192.168..... static IP on my virtual ubuntu.

thanks JC
stefan.becker
Volunteer
Posts: 7639
Joined: 7. Jun 2007, 21:53

Post by stefan.becker »

You have to read the User Manual. You must have a Network Bridge.
jcpamart
Posts: 7
Joined: 30. Nov 2008, 19:56

hi

Post by jcpamart »

Could you explain me ?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: hi

Post by Sasquatch »

jcpamart wrote:Could you explain me ?
Why should we if you didn't even read the manual? Please read it, then try it yourself and if you're stuck, you can come back here. See the Forum Posting Guide for help finding information on the forums. Bridging in Windows is explained dozens of times.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
jcpamart
Posts: 7
Joined: 30. Nov 2008, 19:56

of course

Post by jcpamart »

Of course, I've tried, but in the manual they wrote :
"
If, for any reason, the NAT network needs to be changed, this can be achieved with the following command:
"
But I don't understand how can I enter this command line ?
Where I can write it...

So please help me.
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Post by vbox4me2 »

Open up a command prompt(windows,run,cmd,hit enter), then cd to where VB is installed and type your commands.
This part is a commandline tool and not a GUI.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post by Sasquatch »

And even if you change the network range given by the DHCP server in VB for NAT attached NICs, that won't make your Guest a part of your own network. The option is available because VB uses the class A private network (10.x.y.z) and some companies and home routers/modems use that range too which could cause problems if you would access one of the network resources, like a DNS server.

Only by bridging the interface with Host Interface Networking you can make your Guest a part of your physical network.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
jcpamart
Posts: 7
Joined: 30. Nov 2008, 19:56

ok

Post by jcpamart »

Hi, whith this command, I have the good IP adress,

thanks a lot

Bye
JC
Post Reply