2013-03-10 4 views
1

나는 quagga 라우터 역할을하는 VM 호스트를 가지고있다. 호스트 된 VM에 대한 경로를 알려줍니다 (브리지는 사용하지 않고 라우팅 된 VM 만 사용합니다)어떻게 quagga ospfd로 연결된/32를 재배포 하시겠습니까?

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 

하지만 네트워크, 방송 및 호스트 IP에 대한 3 IP의 낭비없이 일부의 VM에 일부 publicy 라우팅 IP 년대를 넣을; 예 : 경로 "쇼 IP 경로"스 quagga 명령에 도시

$ ip ro 
94.23.110.211 dev gentoo scope link 

arrakeen# show ip route 

번호 : K - 커널 경로 C - 접속, S - 정적 R - RIP, O - OSPF, I - ISIS, B - BGP> - 선택된 경로 * - FIB 경로

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의 FIB에없는

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에 넣을 수있는 방법이 있습니까?

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

감사합니다,

답변

1

redistribute kernel

누락되었습니다 여기

는 ospfd.conf입니다