4.3.3 Router C的配置
1. 配置步骤
# 配置OSPF协议。
<RouterC> system-view
[RouterC] ospf 1
[RouterC-ospf-1] area 0.0.0.0
[RouterC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[RouterC-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] network 192.168.4.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] quit
[RouterC-ospf-1] quit
# 使能IP组播路由,并在各接口上使能PIM-SM。
[RouterC] multicast routing-enable
[RouterC] interface serial 2/1
[RouterC-Serial2/1] pim sm
[RouterC-Serial2/1] quit
[RouterC] interface serial 2/2
[RouterC-Serial2/2] pim sm
[RouterC-Serial2/2] quit
[RouterC] interface pos 5/1
[RouterC-Pos5/1] pim sm
[RouterC-Pos5/1] quit
[RouterC] interface loopback 0
[RouterC-LoopBack0] pim sm
[RouterC-LoopBack0] quit
# 配置BSR的服务边界。
[RouterC] interface pos 5/1
[RouterC-Pos5/1] pim bsr-boundary
[RouterC-Pos5/1] quit
# 将Loopback0接口配置为C-BSR和C-RP。
[RouterC] pim
[RouterC-pim] c-bsr loopback 0
[RouterC-pim] c-rp loopback 0
[RouterC-pim] quit
# 配置BGP协议和MBGP对等体,并引入OSPF路由。
[RouterC] bgp 100
[RouterC-bgp] router-id 3.3.3.3
[RouterC-bgp] peer 192.168.2.1 as-number 100
[RouterC-bgp] peer 192.168.3.1 as-number 100
[RouterC-bgp] peer 192.168.4.2 as-number 200
[RouterC-bgp] import-route ospf 1
[RouterC-bgp] ipv4-family multicast
[RouterC-bgp-af-mul] peer 192.168.2.1 enable
[RouterC-bgp-af-mul] peer 192.168.3.1 enable
[RouterC-bgp-af-mul] peer 192.168.4.2 enable
[RouterC-bgp-af-mul] import-route ospf 1
[RouterC-bgp-af-mul] quit
[RouterC-bgp] quit
# 配置MSDP对等体。
[RouterC] msdp
[RouterC-msdp] peer 192.168.4.2 connect-interface pos 5/1
[RouterC-msdp] return
2. 配置文件
<RouterC> display current-configuration
#
sysname RouterC
#
multicast routing-enable
#
interface Serial2/1
link-protocol ppp
ip address 192.168.2.2 255.255.255.0
pim sm
#
interface Serial2/2
link-protocol ppp
ip address 192.168.3.2 255.255.255.0
pim sm
#
interface Pos5/1
link-protocol ppp
ip address 192.168.4.1 255.255.255.0
pim bsr-boundary
pim sm
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
pim sm
#
bgp 100
router-id 3.3.3.3
import-route ospf 1
undo synchronization
peer 192.168.2.1 as-number 100
peer 192.168.3.1 as-number 100
peer 192.168.4.2 as-number 200
#
ipv4-family multicast
import-route ospf 1
peer 192.168.1.1 enable
peer 192.168.3.1 enable
peer 192.168.4.2 enable
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.3.0 0.0.0.255
network 192.168.4.0 0.0.0.255
#
pim
c-bsr LoopBack0
c-rp LoopBack0
#
msdp
peer 192.168.4.2 connect-interface Pos5/1
#
return
1. 配置步骤
# 配置OSPF协议。
<RouterD> system-view
[RouterD] ospf 1
[RouterD-ospf-1] area 0.0.0.0
[RouterD-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0
[RouterD-ospf-1-area-0.0.0.0] network 10.110.2.0 0.0.0.255
[RouterD-ospf-1-area-0.0.0.0] network 192.168.4.0 0.0.0.255
[RouterD-ospf-1-area-0.0.0.0] network 192.168.5.0 0.0.0.255
[RouterD-ospf-1-area-0.0.0.0] quit
[RouterD-ospf-1] quit
|