2009年11月12日 星期四

Linux 路由指令 route 簡介 :

指令 : route 

route (add) [-net/-host] netmask [gw/dev]
route (del) [-net/-host] netmask [gw/dev]

範例 :
route add 192.168.1.0 netmask 255.255.255.0 dev eth0

指令 : route -n
顯示目前的 routing table


若需要永久有效,必須把 route 加在 /etc/rc.d/rc.local 檔案裡面
免得重開就失效。