Options

Linux I.P Address Woes

ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
Running Ubuntu 11.10 Serve in virtual box I am ever so slightly confused, When I am logged on as a user and cat ifconfig here are the results

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
user@shinobi:/etc/network$

the interface is configured to use DHCP

Then if i switch to Root and repeat the command

root@shinobi:~# cat interfaces
# The primary network interface

auto eth0
iface eth0 inet static
address 192.168.1.4
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

Which are the details I have configure via interfaces. But the strange thing is when I do a ifconfig It is using completley different I.P credential is Virtual Box doing something strange?


root@shinobi:~# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:b9:bc:e6
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:feb9:bce6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1184 errors:0 dropped:0 overruns:0 frame:0
TX packets:1157 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1026164 (1.0 MB) TX bytes:168888 (168.8 KB)
Interrupt:10 Base address:0xd020

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:340 (340.0 B) TX bytes:340 (340.0 B)
Microsoft's strategy to conquer the I.T industry

" Embrace, evolve, extinguish "

Comments

  • Options
    vinbuckvinbuck Member Posts: 785 ■■■■□□□□□□
    Looks like your network adapter for your VirtualBox server is set for NAT instead of Bridge. Go into the virtual server network settings (i think you have to shut the virtual server down to do this) and change your virtual NIC from NAT to Bridged.
    Cisco was my first networking love, but my "other" router is a Mikrotik...
  • Options
    ally_ukally_uk Member Posts: 1,145 ■■■■□□□□□□
    Thank you for the response my man :)
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
Sign In or Register to comment.