Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

setup multi-ip on one card

174 views
Skip to first unread message

pipe...@gmail.com

unread,
Apr 24, 2006, 12:33:37 AM4/24/06
to
Hello everyone here:

I have installed 10.2 on the box and want to set up two ip on one card,
one is for outer connection and the other one is for private network.
Can anyone here show me how to do this work? I write some ifconfig in
my rc.local. But I think /etc/rc.d/rc.inet1.conf is prefered place to
tell slackware what I want. And I know ip alias may be necessary. But
at last, what should I do?

Thanks for your help!

Sylvain Robitaille

unread,
Apr 24, 2006, 1:22:43 AM4/24/06
to
pipe...@gmail.com wrote:

> I have installed 10.2 on the box and want to set up two ip on one card,
> one is for outer connection and the other one is for private network.
> Can anyone here show me how to do this work?

If you've installed the "linux-howtos" package (and if you haven't,
consider this a recommendation that you should), I think your best
source of information for this will be in /usr/doc/Linux-HOWTOs/IP-Alias,
though what it describes may match what you've already done.

> I write some ifconfig in my rc.local. But I think
> /etc/rc.d/rc.inet1.conf is prefered place to tell slackware what
> I want.

You're correct, as far as primary interfaces go, but the virtual
interfaces need to be setup elsewhere, and for that I would recommend
that /etc/rc.d/rc.local is likely the most appropriate place, providing
you don't have anything running at boot time that will need the virtual
interface before rc.local is called. (otherwise, adjust accordingly)

> And I know ip alias may be necessary. But at last, what should I do?

If you haven't configured your kernel yet, I recommend
that you read through /usr/doc/Linux-HOWTOs/IP-Alias and
/usr/doc/Linux-HOWTOs/IP-Masquerade-HOWTO before going any further.
You'll likely get most of the help you need from those files.

You may find other files in that directory to be of interest, but I
think these two are the ones you really want to read. I hope that helps
...

--
----------------------------------------------------------------------
Sylvain Robitaille s...@alcor.concordia.ca

Systems and Network analyst Concordia University
Instructional & Information Technology Montreal, Quebec, Canada
----------------------------------------------------------------------

pipe...@gmail.com

unread,
Apr 24, 2006, 1:37:54 AM4/24/06
to
Thanks!
Thanks for way you write here! It 's helpful a lot

Eric Hameleers

unread,
Apr 24, 2006, 2:45:31 PM4/24/06
to
Sylvain Robitaille wrote:
> pipe...@gmail.com wrote:

>>I write some ifconfig in my rc.local. But I think
>>/etc/rc.d/rc.inet1.conf is prefered place to tell slackware what
>>I want.
>
>
> You're correct, as far as primary interfaces go, but the virtual
> interfaces need to be setup elsewhere, and for that I would recommend
> that /etc/rc.d/rc.local is likely the most appropriate place, providing
> you don't have anything running at boot time that will need the virtual
> interface before rc.local is called. (otherwise, adjust accordingly)

Not quite correct. You can just as well configure eth0 as, say, eth0:1
in rc.inet1.conf. For instance:

# Config information for eth0
IPADDR[0]="192.168.0.1"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""

# Config information for eth0:1
IFNAME[1]="eth0:1"
IPADDR[1]="192.168.1.12"
NETMASK[1]="255.255.255.0"
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

This will work, as long as you place the definition of the alias
(eth0:1 in this example) after the definition of the interface (eth0)
itself.

Eric

Sylvain Robitaille

unread,
Apr 25, 2006, 12:54:01 AM4/25/06
to
Eric Hameleers wrote:

> Not quite correct. You can just as well configure eth0 as, say, eth0:1

> in rc.inet1.conf. ...

Ah, well that's what I get for not reading through the whole file or the
rc.inet1 script ... I completely missed the IFNAME variable. Thanks
for pointing it out.

0 new messages