Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Ubuntu - Help Reconfigure to Static IP
New Posts  All Forums:Forum Nav:

Ubuntu - Help Reconfigure to Static IP

post #1 of 4
Thread Starter 
I installed Ubuntu into a virtual machine using NAT. Now, I want to change to a bridged connection and set a static IP to the virtual machine but all the resources I've found on google aren't much of a help.

I'm using Ubuntu 10.10 and VMware Workstation (latest build).

Maybe I'm confused but its my understanding that I have to change from loopback to static???

Regardless, I must be using the wrong commands; can someone shed some light into this dark tunnel? Thanks.

EDIT: Please keep in mind that I'm a bit of a Linux newb.

EDIT2: I definitely goofed something up, now I can't get to an external IP even when re-enabling NAT.
Edited by tr8rjohnk - 12/24/10 at 4:49am
Project Unamed
(21 items)
 
HTPC
(16 items)
 
 
CPUMotherboardGraphicsRAM
i7 920 D0 - 3913B269 Foxxconn Bloodrage Sapphire 6950 2GB flashed to 6970 BIOS 6GB G-Skill Trident 2000mhz 
Hard DriveOptical DriveCoolingOS
2x OCZ Vertex 2 160GB in RAID 0 Samsung Swiftech H2O-320 W7 Ultimate 64bit 
MonitorMonitorKeyboardPower
Acer 24" AL2423Wdr Acer 24" P243W DAS Model S & Cherry My 7000 Seasonic 860wt Platinum+ 
CaseMouseAudioAudio
In progress R.A.T. 7 Creative Titanium HD Fiio E9 
AudioAudioAudioAudio
Denon AH-D2000 AKG Q701 Grado SR225i Audio-Technica ATH-A900 
Audio
Klipsch Pro Media 2.1 
CPUGraphicsGraphicsRAM
e5700 HD6670 Ceton InfiniTV 4 4GB G-Skill DDR2 1066 
Hard DriveHard DriveOptical DriveOS
60 GB Agility 3 (OS Drive) Hitachi 3TB (TV Buffer and Recording) LG Blu-Ray Burner Windows 7 Ultimate 
MonitorCaseAudioAudio
58" Samsung Plasma DH101 Polk CS2 (Center) Polk Monitor 70 (FL/FR) 
AudioAudioAudioAudio
Polk Monitor 60 (RL/RR) Polk Monitor 40 (Surround L/R) Definitive Technology Supercube 2000 Onkyo HT-RC360 
CPUMotherboardGraphicsRAM
T9550 G51VX nVidea 260m 4GB DDR2 1066 
Hard DriveHard DriveOSMonitor
120 GB Agility 3 (OS/Programs Drive) 320GB 7200rpm (VM and Data Drive) Windows 7 Ultimate 1920 x 1080 (came with 1366 x 768) 
Case
Ventilated Bottom of Laptop Housing 
  hide details  
Reply
Project Unamed
(21 items)
 
HTPC
(16 items)
 
 
CPUMotherboardGraphicsRAM
i7 920 D0 - 3913B269 Foxxconn Bloodrage Sapphire 6950 2GB flashed to 6970 BIOS 6GB G-Skill Trident 2000mhz 
Hard DriveOptical DriveCoolingOS
2x OCZ Vertex 2 160GB in RAID 0 Samsung Swiftech H2O-320 W7 Ultimate 64bit 
MonitorMonitorKeyboardPower
Acer 24" AL2423Wdr Acer 24" P243W DAS Model S & Cherry My 7000 Seasonic 860wt Platinum+ 
CaseMouseAudioAudio
In progress R.A.T. 7 Creative Titanium HD Fiio E9 
AudioAudioAudioAudio
Denon AH-D2000 AKG Q701 Grado SR225i Audio-Technica ATH-A900 
Audio
Klipsch Pro Media 2.1 
CPUGraphicsGraphicsRAM
e5700 HD6670 Ceton InfiniTV 4 4GB G-Skill DDR2 1066 
Hard DriveHard DriveOptical DriveOS
60 GB Agility 3 (OS Drive) Hitachi 3TB (TV Buffer and Recording) LG Blu-Ray Burner Windows 7 Ultimate 
MonitorCaseAudioAudio
58" Samsung Plasma DH101 Polk CS2 (Center) Polk Monitor 70 (FL/FR) 
AudioAudioAudioAudio
Polk Monitor 60 (RL/RR) Polk Monitor 40 (Surround L/R) Definitive Technology Supercube 2000 Onkyo HT-RC360 
CPUMotherboardGraphicsRAM
T9550 G51VX nVidea 260m 4GB DDR2 1066 
Hard DriveHard DriveOSMonitor
120 GB Agility 3 (OS/Programs Drive) 320GB 7200rpm (VM and Data Drive) Windows 7 Ultimate 1920 x 1080 (came with 1366 x 768) 
Case
Ventilated Bottom of Laptop Housing 
  hide details  
Reply
post #2 of 4
Greetz
I know next to nothing about VMWare but a lot about networking so you might need to check the VMWare manual on specifics but this should apply.

What definitely does apply is that "loopback" and "static" are not two sides of the same coin. Loopback is necessary for any ethernet device to work properly. Do not attempt to destroy Loopback. It is basically how it "shakes hands". The two sides of the coin are Static and DHCP.

DHCP is Dynamic Host Configuration Protocol where your machine is the host and your server, probably your router but could be your ISP, assigns or leases an IP to your NIC. This is easier but some protocols don;t play nice with it like Samba. Samba, and some other interfaces, require a "permanently assigned" or Static IP.

To assign a Static IP from command line is easy if you know a few things.
1) Your Nic's device, as in whether eth0 or eth1
2) Your router's IP which acts as the Gateway address for your Nic through which it reaches the network

If we assume eth0 for #1 and 192.168.0.1 for #2 the commands are as follows:

Code:
  ifconfig eth0 192.168.0.foo  netmask 255.255.255.0  *

(foo is any number within range and not use by another host, say 10, 22 whatever)
(* some, though few anymore, require the bcast command switch where the * is located above and it is just the whole enchilada namely, 192.168.0 , for this example

route add default gw 192.168.0.1
some systems need "ifconfig eth0 up" to activate

you can confirm it "took" with just "ifconfig" which will list all assignments including Loopback and eth0

You should then be able to test with "ping yahoo.com" (in Linux ping continues until you stop it with "Ctrl-C")

If that doesn't work begin troubleshooting by pinging the router (gateway). 90% of the time that is sufficient and you will be connected and surfing away.
NewMain
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 - 3550 Asrock Z77 Extreme4 Gigabyte GTX 760  4x2GB Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Seagate SATA 2TB x 2  Plextor PX-891SAW CM-Hyper N520 Slackware 14, Studio KUbuntu, OpenSuSe 12.3, Wi... 
MonitorKeyboardPowerCase
32" Vizio HDTV + DLP Logitech Wireless Corsair HX-850 Antec Sonata I 
MouseMouse PadAudioOther
Razer DeathAdder 2013 dual ESI Juli@ CoolGear ExtSata Enclosure w/ Optical and 3TB S... 
  hide details  
Reply
NewMain
(16 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 - 3550 Asrock Z77 Extreme4 Gigabyte GTX 760  4x2GB Corsair Vengeance 
Hard DriveOptical DriveCoolingOS
Seagate SATA 2TB x 2  Plextor PX-891SAW CM-Hyper N520 Slackware 14, Studio KUbuntu, OpenSuSe 12.3, Wi... 
MonitorKeyboardPowerCase
32" Vizio HDTV + DLP Logitech Wireless Corsair HX-850 Antec Sonata I 
MouseMouse PadAudioOther
Razer DeathAdder 2013 dual ESI Juli@ CoolGear ExtSata Enclosure w/ Optical and 3TB S... 
  hide details  
Reply
post #3 of 4
Thread Starter 
Thanks, enorbet2:

Good info about linkback, its appreciated. My issues is a bit more complex though. I'm definitely having issues (I believe) due to the initial settings on the vm.
Project Unamed
(21 items)
 
HTPC
(16 items)
 
 
CPUMotherboardGraphicsRAM
i7 920 D0 - 3913B269 Foxxconn Bloodrage Sapphire 6950 2GB flashed to 6970 BIOS 6GB G-Skill Trident 2000mhz 
Hard DriveOptical DriveCoolingOS
2x OCZ Vertex 2 160GB in RAID 0 Samsung Swiftech H2O-320 W7 Ultimate 64bit 
MonitorMonitorKeyboardPower
Acer 24" AL2423Wdr Acer 24" P243W DAS Model S & Cherry My 7000 Seasonic 860wt Platinum+ 
CaseMouseAudioAudio
In progress R.A.T. 7 Creative Titanium HD Fiio E9 
AudioAudioAudioAudio
Denon AH-D2000 AKG Q701 Grado SR225i Audio-Technica ATH-A900 
Audio
Klipsch Pro Media 2.1 
CPUGraphicsGraphicsRAM
e5700 HD6670 Ceton InfiniTV 4 4GB G-Skill DDR2 1066 
Hard DriveHard DriveOptical DriveOS
60 GB Agility 3 (OS Drive) Hitachi 3TB (TV Buffer and Recording) LG Blu-Ray Burner Windows 7 Ultimate 
MonitorCaseAudioAudio
58" Samsung Plasma DH101 Polk CS2 (Center) Polk Monitor 70 (FL/FR) 
AudioAudioAudioAudio
Polk Monitor 60 (RL/RR) Polk Monitor 40 (Surround L/R) Definitive Technology Supercube 2000 Onkyo HT-RC360 
CPUMotherboardGraphicsRAM
T9550 G51VX nVidea 260m 4GB DDR2 1066 
Hard DriveHard DriveOSMonitor
120 GB Agility 3 (OS/Programs Drive) 320GB 7200rpm (VM and Data Drive) Windows 7 Ultimate 1920 x 1080 (came with 1366 x 768) 
Case
Ventilated Bottom of Laptop Housing 
  hide details  
Reply
Project Unamed
(21 items)
 
HTPC
(16 items)
 
 
CPUMotherboardGraphicsRAM
i7 920 D0 - 3913B269 Foxxconn Bloodrage Sapphire 6950 2GB flashed to 6970 BIOS 6GB G-Skill Trident 2000mhz 
Hard DriveOptical DriveCoolingOS
2x OCZ Vertex 2 160GB in RAID 0 Samsung Swiftech H2O-320 W7 Ultimate 64bit 
MonitorMonitorKeyboardPower
Acer 24" AL2423Wdr Acer 24" P243W DAS Model S & Cherry My 7000 Seasonic 860wt Platinum+ 
CaseMouseAudioAudio
In progress R.A.T. 7 Creative Titanium HD Fiio E9 
AudioAudioAudioAudio
Denon AH-D2000 AKG Q701 Grado SR225i Audio-Technica ATH-A900 
Audio
Klipsch Pro Media 2.1 
CPUGraphicsGraphicsRAM
e5700 HD6670 Ceton InfiniTV 4 4GB G-Skill DDR2 1066 
Hard DriveHard DriveOptical DriveOS
60 GB Agility 3 (OS Drive) Hitachi 3TB (TV Buffer and Recording) LG Blu-Ray Burner Windows 7 Ultimate 
MonitorCaseAudioAudio
58" Samsung Plasma DH101 Polk CS2 (Center) Polk Monitor 70 (FL/FR) 
AudioAudioAudioAudio
Polk Monitor 60 (RL/RR) Polk Monitor 40 (Surround L/R) Definitive Technology Supercube 2000 Onkyo HT-RC360 
CPUMotherboardGraphicsRAM
T9550 G51VX nVidea 260m 4GB DDR2 1066 
Hard DriveHard DriveOSMonitor
120 GB Agility 3 (OS/Programs Drive) 320GB 7200rpm (VM and Data Drive) Windows 7 Ultimate 1920 x 1080 (came with 1366 x 768) 
Case
Ventilated Bottom of Laptop Housing 
  hide details  
Reply
post #4 of 4
The Ubuntu virtual machine won't notice a difference. Right now it probably has a private 10.0.0.0 address (last time I played with VMWare that's what they got for private addresses. If you change it to bridged it should just pick up a DHCP address from your dhcp server / home router , etc.

You can try running /etc/init.d/networking restart ... that will "reload" the network


You can also try editing /etc/network/interfaces and add the required information there. There is a working example in the /etc/network/interfaces file ...
    
CPUMotherboardGraphicsRAM
E6300 @ 2.3 GHz Foxconn Intel x3100 4.5 Rendition 
Hard DriveOptical DriveOSMonitor
160+500 DVDRW Server 08 x64 Princeton 17'' square 
KeyboardPowerCaseMouse
Unicomp Germanic Model M 250W Dell Vostro 200 Gateway Ball Mouse 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
E6300 @ 2.3 GHz Foxconn Intel x3100 4.5 Rendition 
Hard DriveOptical DriveOSMonitor
160+500 DVDRW Server 08 x64 Princeton 17'' square 
KeyboardPowerCaseMouse
Unicomp Germanic Model M 250W Dell Vostro 200 Gateway Ball Mouse 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Ubuntu - Help Reconfigure to Static IP