public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Grant Edwards <grant.b.edwards@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: How to configure eth1:1 ?
Date: Mon, 17 Oct 2011 22:04:50 +0000 (UTC)	[thread overview]
Message-ID: <j7i8q2$qp0$1@dough.gmane.org> (raw)
In-Reply-To: j7i77l$8ur$2@dough.gmane.org

On 2011-10-17, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> On 2011-10-17, Grant Edwards <grant.b.edwards@gmail.com> wrote:
>> I'm trying to configure a second IP address for eth1 using the syntax
>> I found at
>>
>>   http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=2#doc_chap1
>>
>> But, it doesn't work.
>>
>> Here's my /etc/init.d/net file:
>>
>>   config_eth0="192.168.8.4/16"
>>   routes_eth0="default via 192.168.0.254"
>>   config_eth1=10.0.0.1/8"
>>   192.168.250.1/24"
>>
>> But, starting eth1 says:
>>
>> # /etc/init.d/net.eth1 start
>>  * Bringing up interface eth1
>>  *   Starting netplug on eth1 ...                                 [ ok ]
>>  *     Backgrounding ...
>>  * ERROR: net.eth1 failed to start
>>  
>> Only eth1 is configured.  eth1:1 isn't configured.
>
> I disabled netplug for both interfaces, and that got rid of the error
> message:
>
> # /etc/init.d/net.eth1 start
>  * Bringing up interface eth1
>  *   10.0.0.1/8 ...                                                  [ ok ]
>  *   192.168.250.1/24 ...                                            [ ok ]
>                                             
> Now I can ping addresses in the 192.168.250/24 subnet. However, I
> still don't see eth1:1 in netstat output the way that I do when I
> manually configure it.  According TFM, eth1:1 should have been created
> for the second address.  What gives?

OK, I think I've figured it out.  The startup system is using iproute2
instead of ifconfig.  The manual says that ifconfig is the default,
and I don't see anywhere where I've overridden it, but the manual also
says that if I were using ifconfig I'd have an eth1:1 device.

Iproute2 knows how to assign multiple IP address to an interface
without creating multiple devices, and using the "ip" command shows
the second address:

$ /sbin/ip address show
[...]
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:16:17:84:a7:b3 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.1/8 brd 10.255.255.255 scope global eth1
    inet 192.168.250.1/24 brd 192.168.250.255 scope global eth1
[...]

Still haven't figured out where iproute2 is getting enabled instead of
the default ifconfig....

-- 
Grant Edwards               grant.b.edwards        Yow! Gibble, Gobble, we
                                  at               ACCEPT YOU ...
                              gmail.com            




  reply	other threads:[~2011-10-17 22:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-17 21:25 [gentoo-user] How to configure eth1:1 ? Grant Edwards
2011-10-17 21:37 ` [gentoo-user] " Grant Edwards
2011-10-17 22:04   ` Grant Edwards [this message]
2011-10-17 21:42 ` [gentoo-user] " Florian Philipp
2011-10-17 21:47   ` Florian Philipp
2011-10-17 22:19     ` [gentoo-user] " Grant Edwards
2011-10-18 15:09       ` YoYo Siska
2011-10-18 16:18         ` Grant Edwards
2011-10-19 15:19           ` james
2011-10-19 15:45           ` Grant Edwards
2011-10-18 16:23         ` Grant Edwards
2011-10-20  2:56       ` Walter Dnes
2011-10-20 14:12         ` Grant Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='j7i8q2$qp0$1@dough.gmane.org' \
    --to=grant.b.edwards@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox