LinuxSEE

  • 首页
  • APACHE
  • CACTI
  • DNS_BIND
  • IPTABLES
  • LINUX杂记
  • LINUX系统性能分析
  • LOG_SERVER
  • LVS+KEEPALIVED
  • MFS
  • MYSQL
  • PHP
  • POSTFIX
  • RSYNC
  • SHELL
  • SQUID
  • VPN

Linux下路由相关设置

分类:LINUX杂记日期:2011-04-13作者:雨尚

Linux下路由相关设置

增加网关
route add default gateway 192.168.252.174
删除网关
route del default gateway 192.168.252.174
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.135   192.168.1.1     255.255.255.255 UGH   0      0        0 eth0
192.168.1.135   10.0.0.1        255.255.255.255 UGH   0      0        0 eth2
192.168.1.111   192.168.1.1     255.255.255.255 UGH   0      0        0 eth0
192.168.1.111   10.0.0.1        255.255.255.255 UGH   0      0        0 eth2
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth2
10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 eth2
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth1
举例, 添加一条路由(发往192.168.62这个网段的全部要经过网关192.168.1.1)
route add -net 192.168.252.0 netmask 255.255.255.0 gw 192.168.252.174

删除一条路由
route del -net 192.168.252.0 netmask 255.255.255.0
删除的时候不用写网关

转载请注明来自:LinuxSEE

Tags: Linux
  • 上一篇:查看一个顶级域名下所有的二级域名
  • 下一篇:网站的请求返回值
18条评论
  1. Sukey 说:

    I’m impressed! You’ve mnagaed the almost impossible.

    POST:2011-06-13 10:07 回复
    • Keiwan 说:

      Fell out of bed feeling down. This has birgtheend my day!

      POST:2011-06-25 13:08 回复
      • Millicent 说:

        Surpeior thinking demonstrated above. Thanks!

        POST:2011-09-06 17:22 回复
        • Dash 说:

          Extremely hlefpul article, please write more.

          POST:2011-10-14 12:16 回复
      • Indian 说:

        Umm, are you really just gviing this info out for nothing?

        POST:2011-09-07 17:36 回复
        • Channery 说:

          What a joy to find such clear thinking. Thanks for pstoing!

          POST:2011-10-14 16:11 回复
        • Janess 说:

          One or two to rmeemebr, that is.

          POST:2011-10-17 00:29 回复
    • Idana 说:

      More posts of this quality. Not the usual c***, peslae

      POST:2011-06-26 18:47 回复
      • Carrieann 说:

        This site is like a classroom, ecxept I don’t hate it. lol

        POST:2011-09-06 05:36 回复
        • Spud 说:

          Dag nbbait good stuff you whippersnappers!

          POST:2011-10-14 12:42 回复
        • Jaylen 说:

          Times are chaingng for the better if I can get this online!

          POST:2011-10-17 01:21 回复
      • Melvina 说:

        TYVM you’ve sovled all my problems

        POST:2011-09-07 14:17 回复
        • Donyell 说:

          IJWTS wow! Why can’t I think of tinhgs like that?

          POST:2011-10-15 00:31 回复
        • Terrah 说:

          What a great resuroce this text is.

          POST:2011-10-16 23:29 回复
  2. cruises from baltimore 说:

    Hello there! I know this is somewhat off topic but I was wondering which blog platform are you using for this site? I’m getting sick and tired of WordPress because I’ve had issues with hackers and I’m looking at options for another platform. I would be awesome if you could point me in the direction of a good platform.

    POST:2011-10-23 23:12 回复
    • 雨尚 说:

      I always use this platform

      POST:2011-11-13 10:49 回复
  3. Francis Boratko 说:

    Hey. I clearly would like to actually make a nice quick comment and also let you understand that in fact I’ve been following your internet page for quite some time. Keep up the very wonderful task and I am going to be browsing again again in the near future.

    POST:2012-01-08 20:12 回复
    • 雨尚 说:

      thanks a lot

      POST:2012-01-12 08:28 回复
VPSYOU合作推广
发表评论 点击取消评论.

*必填

*必填

  • 关于LinuxSEE

日志存档

  • 2012 年五月
  • 2012 年四月
  • 2012 年三月
  • 2012 年一月
  • 2011 年十二月
  • 2011 年十一月
  • 2011 年十月
  • 2011 年九月
  • 2011 年八月
  • 2011 年七月
  • 2011 年六月
  • 2011 年五月
  • 2011 年四月
>

热门文章

  • 用ssh-tunnel模式加密mysql主从复制
  • MYSQL多主一从多实例配置
  • APNIC获取准确的IP地址段
  • Linux下OPENVPN安装配置
  • 强制LINUX用户第一次登录改密码命令
  • 深入研究linux下命令之ls
  • 非常实用的iptables脚本
  • 新浪微博技术架构分析-转载
  • 全国各地电信、网通、教育网及铁通的DNS服务器地址
  • 修改MySQL的内存表的三种方法

随机文章

  • MySQL中MyISAM引擎优化
  • MySQL生产环境突发故障处理手册(ZT)
  • 在LinuxSEE服务器上添加squid代理本机apache
  • DRBD笔记(ZT)
  • Mysql主从从级联复制(A->B->C)
  • 详解Linux系统内存中buffer和cache
  • Linux下sar使用举例之显示I/O和传送速率
  • Linux下ntop安装笔记
  • Linux下sar使用举例之CPU
  • linux下的/dev/shm/

最新评论

  • 今天有空就来看看你的站»
    Post: 2012-04-29 20:03:15
  • 这个脚本不错,来学习下»
    Post: 2012-04-11 03:37:35
  • 来看看你的博客,有空也去»
    Post: 2012-04-07 20:04:03
  • Great articl»
    Post: 2012-02-24 05:58:40
  • Noarmlly I'm»
    Post: 2012-02-24 05:56:32
  • Why does thi»
    Post: 2012-02-24 05:52:00
  • That's a qui»
    Post: 2012-02-24 05:50:44
  • Well macamdi»
    Post: 2012-02-24 05:50:36
  • Yours is a c»
    Post: 2012-02-24 05:31:50
  • These tpocis»
    Post: 2012-02-24 05:09:11

友情链接

  • 80sec
  • 9inow手机资源门户
  • DBA Notes
  • DeBugFs
  • linuxany.com
  • LinuxTone
  • linux论坛
  • 千千春光
  • 叶茂盛
  • 寒.枫
  • 张宴
  • 最实用的Linux博客
  • 服务器运维
  • 木易水瓶
  • 淘宝数据库技术团队
  • 淘宝核心系统团队博客
  • 简朝阳
  • 运维人生
Copyright © 2011-2012 LinuxSEE All rights reserved.