AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 486589
Accepted
Bastien Durel
Bastien Durel
Asked: 2013-03-12 01:28:08 +0800 CST2013-03-12 01:28:08 +0800 CST 2013-03-12 01:28:08 +0800 CST

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

  • 772

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

当 tun 接口配置为 /30 时效果很好;例如 :

$ 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,而不会浪费 3 个 IP 用于网络、广播和主机 IP;例如 :

$ ip ro
94.23.110.211 dev gentoo  scope link 

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

arrakeen# show ip route  
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
       I - ISIS, B - BGP, > - selected route, * - FIB route
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 的谎言中

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 :

! -*- 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

谢谢,

ospf
  • 1 1 个回答
  • 3557 Views

1 个回答

  • Voted
  1. Best Answer
    Bastien Durel
    2013-03-22T08:20:36+08:002013-03-22T08:20:36+08:00

    redistribute kernel成功了

    • 1

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve