linux策略路由配置實例 linux路由設置命令?
linux路由設置命令?方法如下:1:使用route命令添加路由機器重啟或網(wǎng)卡重啟后,用route命令添加的路由將無效。方法://route add to the host#route add–hos
linux路由設置命令?
方法如下:
1:使用route命令添加路由
機器重啟或網(wǎng)卡重啟后,用route命令添加的路由將無效。方法:
//route add to the host
#route add–host 192.168.1.11 dev eth0
#route add–host 192.168.1.12 GW 192.168.1.1
//路由添加到網(wǎng)絡
#route add–net 192.168.1.11 netmask 255.255.255.0 eth0
#route add–net 192.168.1.11 netmask 255.255.255.0 GW 192.168.1.1
#routeadd–net 192.168.1.0/24 eth1
//添加默認網(wǎng)關
#route add default gw 192.168.2.1
//刪除路由
#route del–host 192.168.1.11 dev eth0