I have a script which runs at system startup to change the Default
Route to the gateway of en1. This setup all works fine with no
issues and people are able to browse the internet fine. In this
setup, nat is running and the result of `sudo /sbin/route get
default` shows 'en1' as expected.
If the en0 link goes down, the result of `sudo /sbin/route get
default` shows "en1", but as soon as the interface comes back up,
the result changes to "en0" thus disabling all internet traffic. If
I run the `sudo /sbin/route change default 192.168.0.x` command then
all comes back to life immediately.
If the en1 link goes down, the result of `sudo serveradmin status
nat` shows "STOPPED". If I run the command `sudo serveradmin start
nat` it all comes back to life immediately.
My main questions are:
- Is this expected behaivour for a status change on the network
interfaces (eg. Router or Core switch goes down due to power outage
or some reason)?
Yes, configd is notified of the fact, re-reads its configuration
plists and acts accordingly: it tries to reach a desired state (stored
in configuration plists) under the constraint of what's currently
available.
As a result, any changes made outside of configd's framework, such as
those made through route or ifconfig, are liable to be lost at any
moment.
- Is there a way around this so that I do not have to manually reset
the default route or restart nat following some network status change?
If I correctly understood your problem, it seems you have to change
the ordering of your interfaces.
This can be done graphically, through System Preferences, or with the
networksetup(8) command (see its -listnetworkserviceorder and -
ordernetworkservices options.
In both cases, this will act upon the configuration plists and be
taken into account by configd.
But I may be wrong as well... do you still have your 10.4 server, so
as to check how exactly it was configured?
HTH,
Axel _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden