ifconfig - assigning eyepees to eth0 at startup
I have a debian image updated to sarge.
I have killed the dhcp client and have configured all the ip's through ifconfig statements.
obviously when i go to reboot the server it will all be lost.
Thereis mention of adding it i the rc startup scripts butim not sure
Any help appreciated
Arkaos
11 Replies
Edit /etc/network/interfaces …
iface eth0 inet static
address <ipaddress>netmask 255.255.255.0
gateway <gateway></gateway></ipaddress>
-Chris
I take it for all the other ip's it would be the same but no need for the default gateway? ie
iface eth0 inet static
address <ipaddress>netmask 255.255.255.0
gateway <gateway>iface eth0:1 inet static
address <ipaddress>netmask 255.255.255.0</ipaddress></gateway></ipaddress>
-Chris
/etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian installation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
auto eth0:0
iface eth0:0 inet static
address 192.168.0.101
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
-Chris
submitted a support request to see if u could get it working.
Cant really use the dhcp client as when i try to run an eggdrop it doesnt recognise the other ips so stuck with 1 vhost
ssh
-Chris
@Arkaos:
cant really fix it when i dont know what the problem is
:(
I think that Caker can double-check to make sure that on the host end, the IPs are assigned and set up correctly, but I think that on your Linode's end, the configuration is up to you. Linode doesn't offer support for Linux configuration of your Linode itself, although as you can see, Caker does sometimes have the time to try help out.
I'm just posting this so that you know what to expect. Some people have complained on the forums that they have not received timely response to their support tickets when their support tickets were for issues that Linode doesn't actually provide support for such as configuration of Linodes themselves.
Your best bet would be to use the traditional avenues of support for Linux networking problems, including the internet at large and its abundant set of howtos, faqs, usegroups, and other documentation. I don't know exactly what's wrong with your IP configuration but I'll bet the answer is out there somewhere.
BTW Caker's suggestion that you should lish into your Linode to fix the network was just so that you know that even when your Linode's networking is screwed up you can always get in via console using lish.
Best of luck,
Bryan
@Arkaos:
cant really fix it when i dont know what the problem is
:(
BTW I think that as far as these forums go, your best bet will be to find a Linode customer who has multiple IPs set up and see an example of their configuration files. If you search these groups you should find some discussion of this as I know it's been asked about before. I would show you my config but I only have a single IP so it wouldn't help you very much.
Post your /etc/network/interfaces and we will have a look at it.
just wanted to add that if you are on Mandrake (I'm on 9.1 but not sure whether it works on the Mandriva stock now) you might want to try the following to bring the new ip up automatically on bootup by doing the following to a certain run-level script:
cd /etc/sysconfig/network-scripts/
cp ifcfg-eth0 ifcfg-eth0:1
(edit the copy which will serve as a reference)
vi ifcfg-eth0:1
(and type the following into the file)
DEVICE=eth0:1
BOOTPROTO=static
IPADDR=xx.xx.xx.xx
NETMASK=255.255.255.0
ONBOOT=yes
I've commented out the BOOTPROTO and not sure whether that is a good thing.
now reboot and your new ip should be up.
You might want to call the lish shell to see the boot-up sequence and see whether processes are up and running. (just ssh
If /etc/sysconfig/network-scripts/ does not seem right for your mandrake dist then you might want to grok into /etc/rc.d/init.d or for some of you /etc/init.d and find the network shell executable. It will clue you in to that particular directory where ifcfg or ifconfig definitions are stored, then add into that file like the above.
The following links are helpful too.
http://www.linode.com/forums/viewtopic.php?t=159
http://www.nacs.uci.edu/~iglesias/multiboot-linux.html
http://www.itworld.com/Open/4877/lw-01-geek_1/
maven
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 64.62.231.86
netmask 255.255.255.0
gateway 64.52.231.1
auto eth0:1
iface eth0:1 inet static
address 66.160.141.148
netmask 255.255.255.0
gateway 66.160.141.1
repeat last stanza for your other ips.
eth0:2 eth0:3 and so on.