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