linux配置永久路由 linux添加路由指令到指定的網(wǎng)卡?
linux添加路由指令到指定的網(wǎng)卡?方法如下:1:使用route命令添加路由機器重啟或網(wǎng)卡重啟后,用route命令添加的路由將無效。方法://route add to the host#route a
linux添加路由指令到指定的網(wǎng)卡?
方法如下:
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)關(guān)
#route add default gw 192.168.2.1
//刪除路由
#route del–host 192.168.1.11 dev eth0