Roy Marples
2009-03-03 20:36:03 UTC
Hi List!
ifconfig re0 alias 192.168.0.1/24 #re0 gets the connected route
ifconfig re1 alias 192.168.0.2/24
Now, we want to change the connected route to re1
route change 192.168.0.0/24 -ifa 192.168.0.2
route change 192.168.0.0/24 -ifp re1 -ifa 192.168.0.2
route change 192.168.0.0/24 -ifp re1
What is the *expected* behaviour of the above three commands?
I ask because in my mind they are equivalent when there is only one INET
address on the interface, but the real world results are different.
ifconfig re0 -alias 192.168.0.1 # connected route remains, ok
ifconfig re1 -alias 192.168.0.2
Now, if the last route style command is used, the last ifconfig command
will not remove the connected route. If the other two where used (ifa
specified) then the connected route is removed.
I've read the man page, and it's implied that -ifp should be used if
-ifa is ambiguous but doesn't say what the effect is if used without
-ifa.
Comments?
Thanks
Roy
ifconfig re0 alias 192.168.0.1/24 #re0 gets the connected route
ifconfig re1 alias 192.168.0.2/24
Now, we want to change the connected route to re1
route change 192.168.0.0/24 -ifa 192.168.0.2
route change 192.168.0.0/24 -ifp re1 -ifa 192.168.0.2
route change 192.168.0.0/24 -ifp re1
What is the *expected* behaviour of the above three commands?
I ask because in my mind they are equivalent when there is only one INET
address on the interface, but the real world results are different.
ifconfig re0 -alias 192.168.0.1 # connected route remains, ok
ifconfig re1 -alias 192.168.0.2
Now, if the last route style command is used, the last ifconfig command
will not remove the connected route. If the other two where used (ifa
specified) then the connected route is removed.
I've read the man page, and it's implied that -ifp should be used if
-ifa is ambiguous but doesn't say what the effect is if used without
-ifa.
Comments?
Thanks
Roy