Levander
February 6th, 2008, 09:54 PM
I followed this HOWTO which does most of what I want:
http://www.virtualbox.org/discussion/1/126
It creates a static IP for my XP guest running under virtualbox. But, I also want a static IP for the host. The HOWTO says to have eth0 configured in the /etc/network/interfaces file as:
auto eth0
iface eth0 inet manual
However, when I do that, there's no IP listed for eth0 in the output if ifconfig after reboot.
So, I tried guessing what the config for eth0 in /etc/network/interfaces should look like. I came up with this:
iface eth0 inet static
address 192.168.0.63
netmask 255.255.255.0
gateway 192.168.0.1
auto eth0
It kind of works. This is the output for eth0 from the "ip addr" command after reboot:
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:1d:7d:a2:77:6b brd ff:ff:ff:ff:ff:ff
inet6 fe80::21d:7dff:fea2:776b/64 scope link
valid_lft forever preferred_lft forever
There's no IP address for eth0.
But, if after booting I run an ifup and ifdown command like this:
levander@louis:~$ sudo ifdown eth0
SIOCDELRT: No such process # this just comes up when I run this command, no idea what it means
levander@louis:~$ sudo ifup eth0
Then, this is the output for eth0 from 'ip addr':
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:1d:7d:a2:77:6b brd ff:ff:ff:ff:ff:ff
inet 192.168.0.63/24 brd 192.168.0.255 scope global eth0
inet6 fe80::21d:7dff:fea2:776b/64 scope link
valid_lft forever preferred_lft forever
See? There's now my wanted static IP address for eth0.
Anybody know how I can get /etc/network/interfaces configured so I don't have to run the ifup and ifdown commands after every reboot to get my static IP?
http://www.virtualbox.org/discussion/1/126
It creates a static IP for my XP guest running under virtualbox. But, I also want a static IP for the host. The HOWTO says to have eth0 configured in the /etc/network/interfaces file as:
auto eth0
iface eth0 inet manual
However, when I do that, there's no IP listed for eth0 in the output if ifconfig after reboot.
So, I tried guessing what the config for eth0 in /etc/network/interfaces should look like. I came up with this:
iface eth0 inet static
address 192.168.0.63
netmask 255.255.255.0
gateway 192.168.0.1
auto eth0
It kind of works. This is the output for eth0 from the "ip addr" command after reboot:
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:1d:7d:a2:77:6b brd ff:ff:ff:ff:ff:ff
inet6 fe80::21d:7dff:fea2:776b/64 scope link
valid_lft forever preferred_lft forever
There's no IP address for eth0.
But, if after booting I run an ifup and ifdown command like this:
levander@louis:~$ sudo ifdown eth0
SIOCDELRT: No such process # this just comes up when I run this command, no idea what it means
levander@louis:~$ sudo ifup eth0
Then, this is the output for eth0 from 'ip addr':
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:1d:7d:a2:77:6b brd ff:ff:ff:ff:ff:ff
inet 192.168.0.63/24 brd 192.168.0.255 scope global eth0
inet6 fe80::21d:7dff:fea2:776b/64 scope link
valid_lft forever preferred_lft forever
See? There's now my wanted static IP address for eth0.
Anybody know how I can get /etc/network/interfaces configured so I don't have to run the ifup and ifdown commands after every reboot to get my static IP?