dhclient multiple aliases limitation



I currently have a setup on a laptop where I have two aliases that I
always want present. I would like to setup two aliases in
/etc/dhclient.conf to handle having the Ethernet cable plugged in after
boot, but dhclient has a limit of handling only one alias.

/etc/rc.conf
ifconfig_xl0="DHCP"
ifconfig_xl0_alias0="inet 192.168.1.46 netmask 255.255.255.255"
ifconfig_xl0_alias1="inet 192.168.6.46 netmask 255.255.255.0"

The first address uses an alias-type netmask while the second is a
private network I have for QEMU.

I found that during PREINIT /sbin/dhclient-script is deleting the
192.168.1.46 address when it runs this:

ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up

A possible solution that works for me is to add an "alias" to this line.
It appears to work, but I do not know if this would cause problems
elsewhere or for other scenarios. Does anyone see any problems with
this change?

Sean

P.S. Please Cc me since I am not on this list.
--
scf@xxxxxxxxxxx--- /sbin/dhclient-script 2006-05-12 22:24:00.000000000 -0500
+++ /etc/dhclient-script 2007-08-28 15:25:30.000000000 -0500
@@ -223,7 +223,7 @@

PREINIT)
delete_old_alias
- ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 up
+ ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 broadcast 255.255.255.255 alias up
;;

ARPCHECK|ARPSEND)
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"

Relevant Pages

  • Re: Word looks for another server on the network
    ... Pictures alias removed the AFP Connection Status dialog. ... If Word is interested in obtaining a resource, ... In the dialog that comes up after the request fails. ... I did not delete any aliases, ...
    (microsoft.public.mac.office.word)
  • Re: (quickie) (Aliasing) Possible to get this to work in strict?
    ... Here it just copies the memory address. ... an alias remains an alias. ... the reference-count has gone up to 2. ... Aliases are a lot like hard links on Unices. ...
    (comp.lang.perl.misc)
  • Re: Migrating from one server to another
    ... - where one of the aliases seems to become the ... unconfigure that alias to move it somewhere, ... for actually configuring stuff on the servers themselves.) ... We do not have them in the ODM. ...
    (AIX-L)
  • Re: Parse style names into alias segments?
    ... The delimiters in alias names can turn into semicolons then, ... I like the idea of incorporating the comma delimiters in the comparison. ... But now I'm asked to add aliases to my standard set of styles. ... segment of the style name, then evaluate each segment, ...
    (microsoft.public.word.vba.general)
  • Re: JFs Cowardice
    ... >I've never used an alias, I post under my real name on this group. ... regulars there who used to support him are now sick of him. ... Some of JF's colorful posting aliases: ...
    (sci.space.shuttle)