Discussion:
sh /etc/netstart interface counter intuitive behaviour with multiple inet aliases 6.4 and 6.3
(too old to reply)
Tom Smyth
2018-12-06 22:49:01 UTC
Permalink
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
Martin Pieuchot
2018-12-07 13:09:14 UTC
Permalink
Post by Tom Smyth
Hello,
Im running a router with multiple ips on an interface using the
inet alias
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
It's a known behavior of how alias are implemented. I agree it is
confusing.
Tom Smyth
2018-12-07 13:21:34 UTC
Permalink
Thanks
Tom Smyth
Post by Martin Pieuchot
Post by Tom Smyth
Hello,
Im running a router with multiple ips on an interface using the
inet alias
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
It's a known behavior of how alias are implemented. I agree it is
confusing.
--
Kindest regards,
Tom Smyth

Mobile: +353 87 6193172
The information contained in this E-mail is intended only for the
confidential use of the named recipient. If the reader of this message
is not the intended recipient or the person responsible for
delivering it to the recipient, you are hereby notified that you have
received this communication in error and that any review,
dissemination or copying of this communication is strictly prohibited.
If you have received this in error, please notify the sender
immediately by telephone at the number above and erase the message
You are requested to carry out your own virus check before
opening any attachment.
Florian Obser
2018-12-07 18:48:31 UTC
Permalink
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 ;)
Post by Tom Smyth
Hello,
Im running a router with multiple ips on an interface using the
inet alias
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.
Tom Smyth
2018-12-07 19:09:42 UTC
Permalink
Hi Florian,

i had the inet address as the first line ...
and then all the inet alias lines were after that...
the behaviour was as described...
Thanks for the suggestion though
Post by Florian Obser
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 ;)
Post by Tom Smyth
Hello,
Im running a router with multiple ips on an interface using the
inet alias
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.
--
Kindest regards,
Tom Smyth

Mobile: +353 87 6193172
The information contained in this E-mail is intended only for the
confidential use of the named recipient. If the reader of this message
is not the intended recipient or the person responsible for
delivering it to the recipient, you are hereby notified that you have
received this communication in error and that any review,
dissemination or copying of this communication is strictly prohibited.
If you have received this in error, please notify the sender
immediately by telephone at the number above and erase the message
You are requested to carry out your own virus check before
opening any attachment.
tomr
2018-12-07 19:48:35 UTC
Permalink
Post by Tom Smyth
Hi Florian,
i had the inet address as the first line ...
and then all the inet alias lines were after that...
the behaviour was as described...
Thanks for the suggestion though
I think Florian was saying you could use '-inet' to remove *all* inet
addresses first, different to what you probably have already.

Maybe something like the following would work to remove any aliases not
set explicitly in hostname.if (with reduced risk of melting the network)....

in hostname.vio4:
!/usr/local/bin/clean_ifaliases.sh \$if

in /usr/local/bin/clean_ifaliases.sh:
#!/bin/ksh
for addr in $(ifconfig $1 | awk '/^[[:blank:]]inet/ {print $2}') ; do
egrep "^(alias|inet) $addr" /etc/hostname.$1 >/dev/null || ifconfig $1
delete $addr ; done



hth
Post by Tom Smyth
Post by Florian Obser
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 ;)
Post by Tom Smyth
Hello,
Im running a router with multiple ips on an interface using the
inet alias
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.
Radek
2018-12-07 21:08:20 UTC
Permalink
I have tried '-inet' on 6.3/i386 firewall/GW/VPN/etc.. adding 4 aliases (public IPs) and then removing 2 of them. If_driver was vr(4). I did it few times over SSH without any meltdown of the network. Everything seems to work as expected.

$ cat /etc/hostname.vr0
-inet
inet A.B.C.77 255.255.254.0
inet alias A.B.C.76 255.255.255.255 NONE description "Alias76"
inet alias A.B.C.75 255.255.255.255 NONE description "Alias75"
inet alias A.B.C.74 255.255.255.255 NONE description "Alias74"
inet alias A.B.C.73 255.255.255.255 NONE description "Alias73"

On Sat, 8 Dec 2018 06:48:35 +1100
Post by tomr
Post by Tom Smyth
Hi Florian,
i had the inet address as the first line ...
and then all the inet alias lines were after that...
the behaviour was as described...
Thanks for the suggestion though
I think Florian was saying you could use '-inet' to remove *all* inet
addresses first, different to what you probably have already.
Maybe something like the following would work to remove any aliases not
set explicitly in hostname.if (with reduced risk of melting the network)....
!/usr/local/bin/clean_ifaliases.sh \$if
#!/bin/ksh
for addr in $(ifconfig $1 | awk '/^[[:blank:]]inet/ {print $2}') ; do
egrep "^(alias|inet) $addr" /etc/hostname.$1 >/dev/null || ifconfig $1
delete $addr ; done
hth
Post by Tom Smyth
Post by Florian Obser
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 ;)
Post by Tom Smyth
Hello,
Im running a router with multiple ips on an interface using the
inet alias
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.
--
radek
Loading...