I think what you want is something like the following the important part is the modules=( "ifconfig" ) part because otherwise it uses iproute2 which doesn't really work for ip-aliases. I *think* that the dhcp client should set eth0 to be the default route.

----
modules=( "ifconfig" )
config_eth0("dhcp")

# 192.168.1.2 is the alias and should show up as eth1:1
config_eth1=(
              "192.168.1.1 netmask 255.255.255.0"
              "192.168.1.2  netmask 255.255.255.0"
            )

config_eth2=(
              "192.168.2.1 netmask 255.255.255.0"
              "192.168.2.2  netmask 255.255.255.0"
            )

BRM wrote:
Ok, first - I wasn't sure which list this should go to, so if this is
the wrong list please just let me know.

I am in the process of upgrading my server from a P90 running Slackware
to a "newer" system running Gentoo 2007.0. Everything is pretty okay
until I got to doing the network config. My basic config is as follows:

Public DHCP'd Interface -> eth0 (default gw)
Private Lan Interface #1 -> eth1
Private Lan Interface #2 -> eth2

I also have a number of IP Aliases on the eth1 & eth2. I managed this
under Slack through a series of custom rc scripts, which autodetected
the IP address of eth0 for use in the routing. However, I am having
trouble figuring out how to do the same thing in Gentoo's conf.d/net
file system.

Thus far, in /etc/conf.d/net, I have the following:

config_eth0("dhcp")

config_eth1(<list of static IP addresses>)

config_eth2(<static ip address>)

I also had a route line for eth1 and eth2, but it specified the IP of
eth1, not eth0 - which is unknown.

I've tried the following:

route_eth1("default via ${COMMAND_STRING_TO_EXTRACT_IP_OF_ETH1}")

which kinda works (it does get the IP address, but fails with at adding
the route - I'm not at the system right now, so I'll have to post the
specific SIG name later); however, I am very much doubting that that is
the right way to do what I want under Gentoo.

So, my primary question is:

What is the proper way to do this under Gentoo?

I know I could just go and manually write versions of
/etc/init.d/net.eth1/eth2, but I'd rather do it the right way if there
is one, and only do that as a last resort. (And even then, wouldn't I
be risking the Gentoo Configuration system replace them with symlinks?)

Any how...any advice on the proper way to do this would be greatly
appreciated. I really like Gentoo and really do want to keep - I use to
keep Slack up-to-date manually, and just don't have the time for it
anymore, which is why I'm trying Gentoo.

Thanks,

Ben


--
David Gardner
--
[EMAIL PROTECTED] mailing list

Reply via email to