Tag : static

add / delete static routing on mac mountain lion

sometimes we feel lazy to have to connect to wifi campus  or business office and connect the modem to a personal. and this happened to me today, because there are parts I need online, and also to collect duties through the campus network.

the solution is simple, unplug the modem and use the wifi (consequently can not browse internet quickly)

I finally decided to try out a friend’s new science by adding static routing on the macbook. so that the current routing towards my college with a manual, and the rest let the internet business.

ip address from the campus network 10.126.10.20

and i have connect to wifi and i get ip 10.239.2.189

dan i have connect to modem and i get dhcp IP

first..
let’s cek route table with

{code}netstat -nr{/code}

route table

and

{code}sudo route -n add 10.126.10.20 10.239.2.1{/code}

and type your password

cek again route table with

{code}netstat -nr{/code}

after add route

——————

to delete static route you can use

{code}sudo route -n delete 10.126.10.20 10.239.2.1{/code}

reference : man route and google