Chinaunix首页 | 论坛 | 博客
  • 博客访问: 759665
  • 博文数量: 99
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1163
  • 用 户 组: 普通用户
  • 注册时间: 2016-09-22 09:50
个人简介

一个守望数据库的老菜鸟

文章分类

全部博文(99)

文章存档

2019年(21)

2018年(17)

2017年(37)

2016年(24)

我的朋友

分类: LINUX

2016-09-27 11:58:34


博客文章除注明转载外,均为原创。转载请注明出处。
本文链接地址:http://blog.chinaunix.net/uid-31396856-id-5752460.html

简要Linux 静态路由的方法记录如下,以备查询:

1、添加默认网关,作为默认路由。
/etc/sysconfig/network里添加到末尾
方法:GATEWAY= 
比如:
vi /etc/sysconfig/network-scripts/route-eth0
添加如下信息:
192.168.56.200/24 via 192.168.56.10
检查路由
route -n

2、配置静态路由文件
在/etc/rc.d/init.d/network配置文件中有这么几行:
# Add non interface-specific static-routes.
if [ -f /etc/sysconfig/static-routes ]; then
grep "^any" /etc/sysconfig/static-routes | while read ignore args ; do
/sbin/route add -$args
done
fi
也就是说,可以将静态路由加到/etc/sysconfig/static-routes 文件中。
如加入:
route add -net 10.1.1.0 netmask 255.255.255.0 gw 10.1.1.1
则static-routes的格式为
any net 10.1.1.0 netmask 255.255.255.0 gw 10.1.1.1
---the end
阅读(3069) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:expdp时候出错:ORA-31626,ORA-31637,ORA-39062,ORA-31613

给主人留下些什么吧!~~