So you want to do dual-homing.
First remember that Macs really are setup, out of the box, to be a one connection at time machine. And, there is a service order for interfaces. Which you can set in Systems Prefs Network.
However, I think this is what you are looking for:
open a terminal and do:
sudo sysctl -w net.inet.ip.forwarding=1
This command will allow the Mac to use two defaults gateways. Then it will be up to you to populate the routing table with what route goes to what gateway.
To add a static route every time you boot (taking from Dr. V on techarena)
http://forums.techarena.in/operating-systems/1187193.htm
Code:
sudo route -nv add -net 192.168 -interface en0
To avoid having to do this everytime you reboot:
Code:
cd /System/Library/StartupItems sudo cp -R NetworkExtensions NetworkLocal cd NetworkLocal sudo mv NetworkExtensions NetworkLocal sudo vi NetworkLocal
- replace the startup section with the comand above:
Code:
#!/bin/sh ## # Load network kernel modules ## . /etc/rc.common StartService () { ConsoleMessage "Loading Network Local" route -nv add -net 192.168 -interface en0 } StopService () { return 0 } RestartService () { return 0 } RunService "$1" sudo vi StartupParameters.plist
-- edit it to get
Code:
{ Description = "Network Local"; Provides = ("NetworkLocal"); Requires = ("Network"); OrderPreference = "None"; } cd Resources/English.lproj sudo vi Localizable.strings
-- edit it to get:
Code:
(?xml version="1.0" encoding="UTF-8"?) (!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd") (plist version="0.9") (dict> (key>Loading Network Local(/key) (string>Loading Network Local(/string) (/dict) (/plist)
You could also edit the Network startup file and add the single line but that could get replaced if system is upgraded.