2016 - 2024

感恩一路有你

centos 双网卡 永久静态路由 linux添加默认路由?

浏览量:2629 时间:2021-03-12 15:37:47 作者:admin

linux添加默认路由?

在Linux中添加路由的方法:1。使用route命令添加使用route命令添加的管线。重新启动机器或重新启动网卡后,路由将无效。Methods://routes add to the host#route add–host 192.168.168.110 dev eth0#route add–host 192.168.168.119 GW 192.168.168.1//添加到网络的路由#route add–net IP netmask eth0#route add–net IP netmask GW IP#route add–net IP/24 eth1//添加默认网关#route add default GW IP//删除route#route del–host 192.168.168.110 dev eth0 2:在Linux中设置永久路由的方法:1。在/etc/rc.本地添加方法:route Add-net 192.168.3.0/24 dev eth0 route Add-net 192.168.2.0/24 GW 192.168.3.254 2。添加到/etc/sysconfig/network方法的末尾:gateway=GW IP或gateway=GW dev 3。/etc/sysconfig/static Router:any net x.x.x.x/24gw y.y.y.y

centos 双网卡 永久静态路由 centos7添加默认路由 centos7添加路由命令

版权声明:本文内容由互联网用户自发贡献,本站不承担相关法律责任.如有侵权/违法内容,本站将立刻删除。