[RouterA-bgp] import-route ospf 1
[RouterA-bgp] ipv4-family multicast
[RouterA-bgp-af-mul] peer 192.168.1.2 enable
[RouterA-bgp-af-mul] peer 192.168.2.2 enable
[RouterA-bgp-af-mul] import-route direct
[RouterA-bgp-af-mul] import-route ospf 1
[RouterA-bgp-af-mul] return
2. 配置文件
<RouterA> display current-configuration
#
sysname RouterA
#
multicast routing-enable
#
interface Ethernet1/1
port link-mode route
ip address 10.110.1.1 255.255.255.0
igmp enable
pim sm
#
interface Serial2/1
link-protocol ppp
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface Serial2/2
link-protocol ppp
ip address 192.168.2.1 255.255.255.0
pim sm
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
pim sm
#
bgp 100
router-id 1.1.1.1
import-route direct
import-route ospf 1
undo synchronization
peer 192.168.1.2 as-number 100
peer 192.168.2.2 as-number 100
#
ipv4-family multicast
import-route direct
import-route ospf 1
peer 192.168.1.2 enable
peer 192.168.2.2 enable
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.110.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
return
1. 配置步骤
# 配置OSPF协议。
<RouterB> system-view
[RouterB] ospf 1
[RouterB-ospf-1] area 0.0.0.0
[RouterB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[RouterB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
# 使能IP组播路由,并在各接口上使能PIM-SM。
[RouterB] multicast routing-enable
[RouterB] interface serial 2/1
[RouterB-Serial2/1] pim sm
[RouterB-Serial2/1] quit
[RouterB] interface serial 2/2
[RouterB-Serial2/2] pim sm
[RouterB-Serial2/2] quit
[RouterB] interface loopback 0
[RouterB-LoopBack0] pim sm
[RouterB-LoopBack0] quit
# 配置BGP协议和MBGP对等体,并引入OSPF路由。
[RouterB] bgp 100
[RouterB-bgp] router-id 2.2.2.2
[RouterB-bgp] peer 192.168.1.1 as-number 100
[RouterB-bgp] peer 192.168.3.2 as-number 100
[RouterB-bgp] import-route ospf 1
[RouterB-bgp] ipv4-family multicast
[RouterB-bgp-af-mul] peer 192.168.1.1 enable
[RouterB-bgp-af-mul] peer 192.168.3.2 enable
[RouterB-bgp-af-mul] import-route ospf 1
[RouterB-bgp-af-mul] return
2. 配置文件
<RouterB> display current-configuration
#
sysname RouterB
#
multicast routing-enable
#
interface Serial2/1
link-protocol ppp
ip address 192.168.1.2 255.255.255.0
pim sm
#
interface Serial2/2
link-protocol ppp
ip address 192.168.3.1 255.255.255.0
pim sm
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
pim sm
#
bgp 100
router-id 2.2.2.2
import-route ospf 1
undo synchronization
peer 192.168.1.1 as-number 100
peer 192.168.3.2 as-number 100
#
ipv4-family multicast
import-route ospf 1
peer 192.168.1.1 enable
peer 192.168.3.2 enable
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.3.0 0.0.0.255
#
return
|