Declare:
- end-user's perspective.
- using OS X (Yosemite).
- 2 network devices. (cable-ethernet & wifi ethernet)
- 1 gateway to local servers. (wired interface)
- 1 gateway to internet. (wireless interface)
Similar with previous writing, except this time is using OS X.
Before you go through the catchy things about editing route table, you should makes sure that your "go-to-internet interface" is set at the first order before all of your available service interfaces.
If you're not sure, follow this things:
a. go to network tab at "system preferences".
b. on the management option ("gear" icon), set the service order interface.
c. you're done.. now proceed with the catchy things below :)
1. Open "terminal" and show routing table:
netstat -rn
default routing table would be:
Destination: default
Gateway: a.b.c.d/x (your internet gateway)
Destination: default
Gateway: e.f.g.h/y (your local server gateway)
the idea is to change these value to "re-route" your network traffic.
2. delete all existing route
sudo route -n flush (needs to enter your root password)
if you look at the routing table again ("netstat -rn") there'll be no route to default (0.0.0.0)3. reroute your traffic.
sudo route -n add default (internet gateway)6. test your connection.
sudo route -n add e.f.g.h/y (local server gateway)
connect both interfaces.
ping to your local servers.
ping to internet.
you can apply various methods to determine that your both interfaces' up and route properly as you decide.
Good luck again!