> On Saturday 16 December 2006 14:28, Feng Yi wrote:
>> 2006/12/16, slubman <[EMAIL PROTECTED]>:
>> > Le samedi 16 décembre 2006 14:57, Feng Yi a écrit:
>> > > Is it possible to set in some config file?
>> >
>> > I think (i've not test) thats it's possible for exemple in the
>> > /etc/rc.conf
>> > with somthing like that:
>> >
>> > #
>> > # Interfaces to start at boot-up (in this order)
>> > # Declare each interface then list in INTERFACES
>> > # - prefix an entry in INTERFACES with a ! to disable it
>> > #
>> > # Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
>> > #
>> > lo="lo 127.0.0.1"
>> > eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
>> > eth0:1="dhcp"
>> > INTERFACES=(lo eth0 eth0:1)
>> >
>> >
>> > With those lines eth0 as a fixed IP, eth0:1 (wich is on the same NIC)
>> got
>> > an
>> > adress by DHCP.
>> >
>> > So I got "/etc/rc.conf: line 59: eth0:1=dhcp: command not found" error
>> > ...
>> >
>> > :(
>> >
>> > --
>> > slubman (aka Nicolas DOUALOT)
>> > mail: [EMAIL PROTECTED]
>> > jabber ID: [EMAIL PROTECTED]
>> > site: http://www.slubman.info
>> >
>> > _______________________________________________
>> > arch mailing list
>> > [email protected]
>> > http://www.archlinux.org/mailman/listinfo/arch
>
> Yes, the "/etc/rc.conf: line 59: eth0:1=dhcp: command not found" error is
> because rc.conf works by setting variables, a variable can't have ":" in
> it's
> name so it thinks it might be some sort of wacky command.
>
> You can try something like this:
>
> lo="lo 127.0.0.1"
> eth0="dhcp"
> eth01="eth0:1 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"
> INTERFACES=(lo eth0 eth01)
>
> I set eth0 to dhcp because as far as i know i don't think you can set an
> extra
> bound interface as dhcp ( i might be wrong ).
>
> Cheers
>
> --
> Guillermo A. Amaral, BCSE
> @ site: http://www.guillermoamaral.com/
> @ blog: http://blog.guillermoamaral.com/
> _______________________________________________
> arch mailing list
> [email protected]
> http://www.archlinux.org/mailman/listinfo/arch
>
well you can atleast do something like
ifconfig eth0:1 192.168.0.2
dhcpcd eth0:1
I had problems with assigning addresses if i just did it with the up
syntax. dont know how to do that easy with rc.conf but you could write a
quick and easy init script.. and then start it as a service when booting
the machine :P
_______________________________________________
arch mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/arch