One possible workaround is putting -inet as the first line in /etc/hostname.vio4 It will nuke all v4 addresses and re-add them.
Depending on your usecase this might work for you or it might melt down your whole network ;) On Thu, Dec 06, 2018 at 10:49:01PM +0000, Tom Smyth wrote: > Hello, > > Im running a router with multiple ips on an interface using the > inet alias > > issue: > when commenting out configured aliases on hostname.if > after running sh /etc/netstart vio4 > > if you run ifconfig vio4 after the restart of the interface > the old aliases that were commented still appear in ifconfig output ahead > of the first ip address configured in the /etc/hostname.vio4 file. > > ifconfig before commenting out 10.134.91.253 in hostname.vio4 > is listed below > vio4: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > lladdr 16:2c:a4:f2:b4:e3 > index 5 priority 0 llprio 3 > media: Ethernet autoselect > status: active > inet 10.94.0.1 netmask 0xffff0000 broadcast 10.94.255.255 > inet 10.134.91.65 netmask 0xfffffffc broadcast 10.134.91.67 > inet 10.134.91.69 netmask 0xfffffffc broadcast 10.134.91.71 > inet 10.134.91.73 netmask 0xfffffffc broadcast 10.134.91.75 > inet 10.134.91.85 netmask 0xfffffffc broadcast 10.134.91.87 > inet 10.134.91.89 netmask 0xfffffffc broadcast 10.134.91.91 > inet 10.134.91.93 netmask 0xfffffffc broadcast 10.134.91.95 > inet 10.134.91.161 netmask 0xfffffffc broadcast 10.134.91.163 > inet 10.134.91.165 netmask 0xfffffffc broadcast 10.134.91.167 > inet 10.134.91.169 netmask 0xfffffffc broadcast 10.134.91.171 > inet 10.134.91.173 netmask 0xfffffffc broadcast 10.134.91.175 > inet 10.134.91.193 netmask 0xfffffffc broadcast 10.134.91.195 > inet 10.134.91.197 netmask 0xfffffffc broadcast 10.134.91.199 > inet 10.134.91.201 netmask 0xfffffffc broadcast 10.134.91.203 > inet 10.134.91.205 netmask 0xfffffffc broadcast 10.134.91.207 > inet 10.134.91.209 netmask 0xfffffffc broadcast 10.134.91.211 > inet 10.134.91.213 netmask 0xfffffffc broadcast 10.134.91.215 > inet 10.134.91.217 netmask 0xfffffffc broadcast 10.134.91.219 > inet 10.134.91.221 netmask 0xfffffffc broadcast 10.134.91.223 > inet 10.134.91.225 netmask 0xfffffffc broadcast 10.134.91.227 > inet 10.134.91.229 netmask 0xfffffffc broadcast 10.134.91.231 > inet 10.134.91.233 netmask 0xfffffffc broadcast 10.134.91.235 > inet 10.134.91.237 netmask 0xfffffffc broadcast 10.134.91.239 > inet 10.134.91.241 netmask 0xfffffffc broadcast 10.134.91.243 > inet 10.134.91.245 netmask 0xfffffffc broadcast 10.134.91.247 > inet 10.134.91.249 netmask 0xfffffffc broadcast 10.134.91.251 > inet 10.134.91.253 netmask 0xfffffffc broadcast 10.134.91.255 > -------------------------------------------------------------------------------------------- > > after commenting out the last 2 inet aliases , and running sh /etc/netstart > vio4 > > the ifconfig output is as follows (i have highlighted with *** the addresses > which I think should have been removed > > vio4: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > lladdr 16:2c:a4:f2:b4:e3 > index 5 priority 0 llprio 3 > media: Ethernet autoselect > status: active > ** inet 10.134.91.249 netmask 0xfffffffc broadcast 10.134.91.251**** > ** inet 10.134.91.253 netmask 0xfffffffc broadcast 10.134.91.255**** > inet 10.94.0.1 netmask 0xffff0000 broadcast 10.94.255.255 > inet 10.134.91.65 netmask 0xfffffffc broadcast 10.134.91.67 > inet 10.134.91.69 netmask 0xfffffffc broadcast 10.134.91.71 > inet 10.134.91.73 netmask 0xfffffffc broadcast 10.134.91.75 > inet 10.134.91.85 netmask 0xfffffffc broadcast 10.134.91.87 > inet 10.134.91.89 netmask 0xfffffffc broadcast 10.134.91.91 > inet 10.134.91.93 netmask 0xfffffffc broadcast 10.134.91.95 > inet 10.134.91.161 netmask 0xfffffffc broadcast 10.134.91.163 > inet 10.134.91.165 netmask 0xfffffffc broadcast 10.134.91.167 > inet 10.134.91.169 netmask 0xfffffffc broadcast 10.134.91.171 > inet 10.134.91.173 netmask 0xfffffffc broadcast 10.134.91.175 > inet 10.134.91.193 netmask 0xfffffffc broadcast 10.134.91.195 > inet 10.134.91.197 netmask 0xfffffffc broadcast 10.134.91.199 > inet 10.134.91.201 netmask 0xfffffffc broadcast 10.134.91.203 > inet 10.134.91.205 netmask 0xfffffffc broadcast 10.134.91.207 > inet 10.134.91.209 netmask 0xfffffffc broadcast 10.134.91.211 > inet 10.134.91.213 netmask 0xfffffffc broadcast 10.134.91.215 > inet 10.134.91.217 netmask 0xfffffffc broadcast 10.134.91.219 > inet 10.134.91.221 netmask 0xfffffffc broadcast 10.134.91.223 > inet 10.134.91.225 netmask 0xfffffffc broadcast 10.134.91.227 > inet 10.134.91.229 netmask 0xfffffffc broadcast 10.134.91.231 > inet 10.134.91.233 netmask 0xfffffffc broadcast 10.134.91.235 > inet 10.134.91.237 netmask 0xfffffffc broadcast 10.134.91.239 > inet 10.134.91.241 netmask 0xfffffffc broadcast 10.134.91.243 > inet 10.134.91.245 netmask 0xfffffffc broadcast 10.134.91.247 > > This behaviour is counter intuitive as it is different to sh /etc/netstart > behaviour on the configuration of inet addresses > im wondiring is this a feature or a bug ... or me misunderstanding the > use of netstart script to reset / reload the configuration of an interface > > Thanks > > Tom Smyth > -- I'm not entirely sure you are real.