linux路由器Quagga的配置(二):开启RIP协议

转载自http://blog.sina.com.cn/s/blog_68b156d50101kfcq.html,作者:郑大哲

 

部分资料摘自http://blog.chinaunix.net/uid-25513153-id-212353.html

  在上一篇文章《linux下安装Quagga使电脑变成路由器》中,我们已经学会了Quagga的安装及简单配置,并且已经启动了Quagga。但是虽然我们的“路由器”(软路由)已经运行起来,但是它还无法正常工作。因为我们还没有给它配置路由表。一种方法,我们可以给它手动配置路由表,另一种方法,我们可以运行一些路由协议(如rip,ospf),实现自动配置。先简单介绍一下手动配置的方法。

   手动配置路由表

首先启动Quagga的守护进程,

  1. #sudo zebra –d

利用telnet进入zebra配置

zinkin@zinkin-desktop:~/quagga/quagga-0.99.17$ telnet localhost 2601
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Hello, this is Quagga (version 0.99.17).
Copyright 1996-2005 Kunihiro Ishiguro, et al.


User Access Verification

Password:(输入 zebra
Router> en
Password:(输入 zebra
Router# show in
Interface eth0 is up, line protocol detection is disabled
  index 2 metric 1 mtu 1500
  flags:
  HWaddr: 48:5b:39:b8:f9:4f
  inet 218.192.169.88/24 broadcast 218.192.169.255
  inet6 2001:250:3000:4bf3:4a5b:39ff:feb8:f94f/64
  inet6 fe80::4a5b:39ff:feb8:f94f/64
Interface lo is up, line protocol detection is disabled
  index 1 metric 1 mtu 16436
  flags:
  inet 127.0.0.1/8
  inet6 ::1/128
Router# show interface
Interface eth0 is up, line protocol detection is disabled
  index 2 metric 1 mtu 1500
  flags:
  HWaddr: 48:5b:39:b8:f9:4f
  inet 218.192.169.88/24 broadcast 218.192.169.255
  inet6 2001:250:3000:4bf3:4a5b:39ff:feb8:f94f/64
  inet6 fe80::4a5b:39ff:feb8:f94f/64
Interface lo is up, line protocol detection is disabled
  index 1 metric 1 mtu 16436
  flags:
  inet 127.0.0.1/8
  inet6 ::1/128
Router#
 
Router#:conf t进入配置模式
Router(config)# interface eth0 (进入接口f0/0)
Router(config-if)# ip address 192.168.1.1/24 (设置接口ip地址和子网掩码)
Router(config-if)# no shutdown (启用接口)
开启RIP协议
  对于结构比较简单的网络来说,手动配置路由的方法是可行的,但是对于具有一定规模的网络来说,就应该使用自动配置的方法了,同时,自动配置还能在网络结构出现变化的情况下及时自动反应,避免在我们搂着小姑娘的时候还老板叫去维护网络。 RIP协议的配置文件默认存放在/usr/local/etc/下,执行以下命令
  1. #cp /usr/local/etc/ripd.conf.sample /usr/local/etc/ripd.conf



  2. #vi /usr/local/etc/ripd.conf

加入如下内容

  1. router rip



  2. version 2



  3. network eth0



  4. network eth1

保存退出

ripd配置完成,执行

 

  1. #zebra –d



  2. #ripd –d

rip正常启动后,可以用ip route show看看路由是否已经建立。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值