iproute2
suite. /24
syntax is not implemented in all ifconfig
versions, you may have to use netmask 255.255.255.0
ormask 255.255.255.0
syntax.
sudo
route -n add -net 10.1.0.0
/16
172.19.10.1
route is a traditional utility now replaced by ‘ip route’ on Linux which belongs to
Printing the route
route add -host 10.12.76.5 netmask 255.255.255.0 dev eth0
route del -host 10.12.76.5 netmask 255.255.255.0 dev eth0
route add default gw 192.168.1.1 wlan2
ip route add default via 192.0.2.1
Any packets come in from 10.x.x.x they will be masked out prior to hitting the default route.
You can also specify in the route command the interface it should use using the IF paramter:
Examples -
Add or delete route on OSX
sudo route delete -net 10.1
MS-CWOPA Exchange
route add 206.0.0.0 mask 255.0.0.0 172.19.10.1 METRIC 15
Update metric for JNET Wifi
route change 0.0.0.0 mask 0.0.0.0 192.168.1.1 METRIC 18
Acess Cwopa LAN
route add 10.0.0.0 mask 255.0.0.0 172.19.10.1 METRIC 15