ZKX's LAB

linux如何批量添加静态路由表 linux 加永久路由表

2021-04-04知识3

Linux系统下配置双网卡路由表的配置 如果eth0为192.168.10.123/255.255.255.0,eth1为192.168.20.231/255.255.255.0,则命令格式如下: 。上面的命令把发送给192.168.10.0网段的IP包交给eth0转发,把192.168.20.0。

写个shell脚本 开机自动添加路由表怎么写? Linux Fedora系统 主要是想把路由表永久保存 1、在/etc/sysconfig/static-routes里添加static-routes的写法是any net 192.168.0.0/16 gw 192.168.0.1any net 192.168.3.0/24 gw 192.168.3.254any net 10.250.228.128 netmask 255.255.255.192 gw 10.250.228.129检查vi/etc/init.d/networkAdd non interface-specific static-routes.if[-f/etc/sysconfig/static-routes];then2、在route-eth0里添加在/etc/sysconfig/network-scripts/route-eth0添加10.203.166.0/25 via 10.203.166.1 dev eth0

linux 添加默认路由 1、首先,连接相应linux主机,进2113入到linux命令5261行状态下,等待输入shell指令。41022、其次,在linux命令行中输入:route add default gw 192.168.0.1。3、键1653盘按“回车键”运行shell指令,此时会看到192.168.0.1被成功添加到了默认路由。

#linux 加永久路由表

随机阅读

qrcode
访问手机版