网址怎么做静态路由,linux怎么做静态路由

首页 > 实用技巧 > 作者:YD1662023-06-27 02:34:07

配置临时静态路由:(11.2.80.0 代表目标地址)

添加静态路由:route add -net 11.2.80.0 netmask 255.255.255.0 gw 11.2.81.1

删除静态路由:route del -net 11.2.80.0 netmask 255.255.255.0 gw 11.2.81.1

永久配置静态路由:(11.2.80.0 代表目标地址)

suse 11 sp3

vi /etc/sysconfig/network/routes

修改内容为:

---------------------------------------

11.2.80.0 11.2.81.1 255.255.255.0 em2

default 11.6.42.1 - -

-----------------------------------------

重启服务:service network restart

redhat6.8

vi /etc/sysconfig/network-scripts route-eth0

添加内容为:

-------------------------------------------

11.2.80.0/28 via 11.2.81.1

-------------------------------------------

重启服务:service network restart

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.