首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用quagga ospfd重新分发连接的/32?

如何使用quagga ospfd重新分发连接的/32?
EN

Stack Overflow用户
提问于 2013-03-11 05:57:19
回答 1查看 4.6K关注 0票数 1

我有一台VM主机,它充当quagga路由器。它宣布到其托管的VM的路由(我不使用网桥,只使用路由的VM)

当tun接口配置了/30时,它可以很好地工作;例如:

代码语言:javascript
复制
$ ip a
4: gentoo: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/ether 2a:c8:0a:ae:cc:c1 brd ff:ff:ff:ff:ff:ff
    inet 10.42.1.5/30 brd 10.42.1.7 scope global gentoo
    inet6 fe80::5c23:52ff:fec1:f2b7/128 scope link 
       valid_lft forever preferred_lft forever
    inet6 fe80::28c8:aff:feae:ccc1/64 scope link 
       valid_lft forever preferred_lft forever

但我想在一些VM上放置一些公共路由的IP,而不会浪费网络、广播和主机IP的3个IP;例如:

代码语言:javascript
复制
$ ip ro
94.23.110.211 dev gentoo  scope link 

该路由显示在"show ip route“quagga命令中

代码语言:javascript
复制
arrakeen# show ip route  

编码:K-内核路由、C-连接、S-静态、R- RIP、O- OSPF、I- ISIS、B- BGP、>-选定路由、*- FIB路由

代码语言:javascript
复制
O   0.0.0.0/0 [110/110] via 10.42.42.1, eth0, 00:01:24
K>* 0.0.0.0/0 via 10.42.42.1, eth0
O>* 10.0.0.0/24 [110/20] via 10.42.42.1, eth0, 00:01:25
C>* 10.0.42.21/32 is directly connected, eth0
O>* 10.42.0.0/24 [110/20] via 10.42.42.1, eth0, 00:01:25
O   10.42.1.4/30 [110/10] is directly connected, gentoo, 00:01:35
C>* 10.42.1.4/30 is directly connected, gentoo
K>* 10.42.1.6/32 via 10.42.1.5, gentoo
O   10.42.42.0/24 [110/10] is directly connected, eth0, 00:01:35
C>* 10.42.42.0/24 is directly connected, eth0
O>* 10.242.0.1/32 [110/30] via 10.42.42.1, eth0, 00:01:25
O>* 10.255.0.1/32 [110/30] via 10.42.42.1, eth0, 00:01:25
O>* 10.255.0.2/32 [110/20] via 10.42.42.1, eth0, 00:01:25
O   94.23.110.210/32 [110/10] is directly connected, eth0, 00:01:35
C>* 94.23.110.210/32 is directly connected, eth0
K>* 94.23.110.211/32 is directly connected, gentoo
C>* 127.0.0.0/8 is directly connected, lo

但正如你所看到的,这不在OSPF的谎言中

代码语言:javascript
复制
arrakeen# show ip ospf route  
============ OSPF network routing table ============
N    10.0.0.0/24           [20] area: 0.0.0.0
                           via 10.42.42.1, eth0
N    10.42.0.0/24          [20] area: 0.0.0.0
                           via 10.42.42.1, eth0
N    10.42.1.4/30          [10] area: 0.0.0.0
                           directly attached to gentoo
N    10.42.1.36/30         [10] area: 0.0.0.0
N    10.42.42.0/24         [10] area: 0.0.0.0
                           directly attached to eth0
                           via 10.42.42.1, eth0
N    10.242.0.1/32         [30] area: 0.0.0.0
                           via 10.42.42.1, eth0
N    10.255.0.1/32         [30] area: 0.0.0.0
                           via 10.42.42.1, eth0
N    10.255.0.2/32         [20] area: 0.0.0.0
                           via 10.42.42.1, eth0
N    94.23.110.210/32      [10] area: 0.0.0.0
                           directly attached to eth0
N    94.23.110.218/32      [30] area: 0.0.0.0
                           via 10.42.42.1, eth0

============ OSPF router routing table =============
R    10.42.42.1            [10] area: 0.0.0.0, ASBR
                           via 10.42.42.1, eth0

============ OSPF external routing table ===========
N E1 0.0.0.0/0             [110] tag: 0
                           via 10.42.42.1, eth0

有没有办法强制它们进入ospf?

下面是ospfd.conf:

代码语言:javascript
复制
! -*- ospf -*-
!
hostname arrakeen
!
interface eth0
!
router ospf
 ospf router-id 10.42.42.21
 redistribute static
 redistribute connected
 network 10.42.1.0/24 area 0
 network 10.42.42.0/24 area 0
 network 94.23.110.210/28 area 0
!
log file /var/log/quagga/ospfd.log

谢谢,

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-09-06 20:39:42

redistribute kernel不见了

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15328171

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档