> Dag Richards wrote: > > Am I correct in inferring ( not assuming no! ) that once a carp iface is > > created we can not add aliases to them?
i can from here > > fw1:root:/etc #ifconfig carp1 > > carp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > > description: virtual if for all internal traffic > > carp: MASTER carpdev em1 vhid 15 advbase 1 advskew 100 > > groups: carp > > inet 198.160.35.1 netmask 0xffffff00 broadcast 198.160.35.255 > > inet 198.160.35.24 netmask 0xffffff00 broadcast 255.255.255.0 > > inet 198.160.35.25 netmask 0xffffff00 broadcast 255.255.255.0 > > inet 198.160.35.30 netmask 0xffffff00 broadcast 255.255.255.0 > > inet 172.17.9.34 netmask 0xffff0000 broadcast 172.17.255.255 > > > > but afterwards when I ... well this: > > > > fw1:root:/etc #ifconfig carp1 alias 123.32.217.21 netmask 255.255.255.0 > > ifconfig: SIOCAIFADDR: Can't assign requested address > > > > Is there a way to add addrs without having to destroy and recreate the > > iface? perhaps this is non-essential when working with aliases, but i have found the best and most predictable results come with using 'alias' at the end. eg instead of: $ sudo ifconfig carp1 alias 123.32.217.21 netmask 255.255.255.0 use: $ sudo ifconfig carp1 123.32.217.21 netmask 255.255.255.0 alias perhaps my stigma for using alias at the end comes from mixing up the 'delete' command for use with aliases and trying things like $ sudo ifconfig carp1 delete inet 192.168.5.4 alias instead of just doing $ sudo ifconfig carp1 inet 192.168.5.4 -alias to subtract the alias out. i tried your ifconfig add and it seems to work OK for me: --- carp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 description: LAN(sis0) carp: MASTER carpdev sis0 vhid 14 advbase 1 advskew 1 groups: carp inet 192.168.2.30 netmask 0xffffffe0 broadcast 192.168.2.31 inet 192.168.5.5 netmask 0xffffff00 broadcast 192.168.5.255 inet 192.168.6.5 netmask 0xffffff00 broadcast 192.168.6.255 inet 192.168.7.5 netmask 0xffffff00 broadcast 192.168.7.255 inet 192.168.8.5 netmask 0xffffff00 broadcast 192.168.8.255 inet 192.168.9.5 netmask 0xffffff00 broadcast 192.168.9.255 inet 123.32.217.21 netmask 0xffffff00 broadcast 123.32.217.255 --- and i can remove it OK with $ sudo ifconfig carp1 123.32.217.21 -alias without disturbing the rest of them. ( didn't need 'inet', but tbh it makes me feel dirty to not type it in in these cases ). there *is* a little difference between the syntax in hostname.if files and commandline ifconfig. since 'alias' and '-alias' are parameters, according to ifconfig(8), see if your result is any different if you religiously adhere to the: --- ifconfig [interface] [address_family] [address [dest_address]] [parameters] --- in the synopsis. since i have made an effort to do so, i have never had an unexpected result while using ifconfig - whereas previously i had made awesome maneuvers like, while trying to remove an alias on an iface, actually removing the IP i was logging into via.... etc. -- jared [ openbsd 3.9-current GENERIC ( mar 15 ) // i386 ]