Linode Forum
https://forum.linode.com/

ifconfig - assigning eyepees to eth0 at startup
https://forum.linode.com/viewtopic.php?f=19&t=1465
Page 1 of 1

Author:  Arkaos [ Wed Feb 16, 2005 5:37 pm ]
Post subject:  ifconfig - assigning eyepees to eth0 at startup

Just wondering if anyone could help
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

Author:  caker [ Wed Feb 16, 2005 6:31 pm ]
Post subject: 

man interfaces

Edit /etc/network/interfaces ...

Code:
iface eth0 inet static
    address <ipaddress>
    netmask 255.255.255.0
    gateway <gateway>


-Chris

Author:  Arkaos [ Thu Feb 17, 2005 3:56 am ]
Post subject: 

cheers caker,
I take it for all the other ip's it would be the same but no need for the default gateway? ie

Code:
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

Author:  caker [ Thu Feb 17, 2005 4:05 am ]
Post subject: 

Looks to me like you just repeat the whole deal, but use "eth0:1" (and so on) for each IP:

http://www.justenoughlinux.com/2003/12/ ... esses.html



-Chris
Code:
/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

Author:  Arkaos [ Thu Feb 17, 2005 12:08 pm ]
Post subject: 

Tried it and couldnt connect to the box after configuring all 5 ip's
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

Author:  caker [ Thu Feb 17, 2005 12:15 pm ]
Post subject: 

Connect via Lish and you'll be able to fix it.

ssh username@hostxx.linode.com

-Chris

Author:  Arkaos [ Thu Feb 17, 2005 12:32 pm ]
Post subject: 

cant really fix it when i dont know what the problem is :(

Author:  bji [ Thu Feb 17, 2005 7:57 pm ]
Post subject: 

Arkaos wrote:
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

Author:  bji [ Thu Feb 17, 2005 7:58 pm ]
Post subject: 

Arkaos wrote:
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.

Author:  sednet [ Fri Feb 18, 2005 10:35 am ]
Post subject: 

Arkaos,

Post your /etc/network/interfaces and we will have a look at it.

Author:  maven [ Sun May 29, 2005 12:37 am ]
Post subject:  addendum: for mandrake 9.1 users

hi,

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 yourregisteredname@hostxy.linode.com replace xy with the number from the linode.com LPM console).

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 (this is useful to set up another ip that you bought)

http://www.nacs.uci.edu/~iglesias/multiboot-linux.html (i like the way he boots up different network setups like for work, home and wireless contexts)

http://www.itworld.com/Open/4877/lw-01-geek_1/ (explains run-levels and why you can't just plug in a ifconfig eth0:1 xx.xx.xx.xx netmask 255.255.255.0 up into one of those startup scripts and expect it to work the first time)

maven

Author:  OverlordQ [ Mon May 30, 2005 2:51 am ]
Post subject: 

/etc/network/interfaces

Code:
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.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/