You are on page 1of 10

MSDP 配置案例 2

【CCIE】MSDP 配置案例 2

版本 V1.0
密级 开放 内部 机密
类型 讨论版 测试版 正式版

修订记录
修订日期 修订人 版本号 审核人 修订说明
2014-07-01 Dennis 1.0 Dennis 正式发布

1 案例配置拓扑

2 案例配置需求

1、 设备之间互联的 IP 如图所示;
2、 R1 和 R2 设 备 互 联 使 用 12.1.1.X/24 , X 表 示 设 备 编 号 , 如 R1 使 用 12.1.1.1/24 , R2 使 用
12.1.1.2/24,其它设备互联同上;
3、 AS100 内 IGP 协议运行 OSPF 协议,AS200 内 IGP 协议运行 EIGRP 协议;
4、 R3 和 R4 配置运行 BGP 协议,建立 EBGP 邻居关系;
5、 配置组播稀疏模式,其中 R3 和 R4 为 RP,在 AS100,配置静态 RP 地址为 3.3.3.3,在 AS200,
配置静态 RP 地址为 4.4.4.4;

SPOTO 全球 培训 ● 项目 ● 人才 1
SPOTO IT 人才培训机构 ● IT 人才解决方案 ● CCIE 实验室 ● BOOTCAMP 全真 IT 项目实战
WEB: http://www.SPOTO.net BBS: (网络)http://bbs.SPOTO.net ●
以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。 —— 我们共创未来 !
MSDP 配置案例 2

6、 R1 作为组播源,R6 作为 239.1.1.1 的组播接收者;


7、 R4 根据 MBGP 做 RPF 检测,其它路由器根据单播路由表做 RPF 检测;
8、 R3 和 R4 配置 BGP 协议,单播流量走 S1/1 线路。组播流量走 S1/2 线路;
9、 R3 和 R4 使用 Loopback0 口建立 MSDP;

3 案例配置思路

1、 根据拓扑配置 IP 地址;
2、 R1、R2、R3 运行 OSPF;
R1
router ospf 100
router-id 1.1.1.1
network 12.1.1.1 0.0.0.0 area 0

R2
router ospf 100
router-id 2.2.2.2
network 12.1.1.2 0.0.0.0 area 0
network 23.1.1.2 0.0.0.0 area 0

R3
router ospf 100
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 0
network 23.1.1.3 0.0.0.0 area 0

3、 在 R4、R5、R6、配置 EIGRP
R4
router eigrp 100
network 4.4.4.4 0.0.0.0
network 45.1.1.4 0.0.0.0
no auto-summary

R5
router eigrp 100
network 45.1.1.5 0.0.0.0
network 56.1.1.5 0.0.0.0
no auto-summary

SPOTO 全球 培训 ● 项目 ● 人才 2
SPOTO IT 人才培训机构 ● IT 人才解决方案 ● CCIE 实验室 ● BOOTCAMP 全真 IT 项目实战
WEB: http://www.SPOTO.net BBS: (网络)http://bbs.SPOTO.net ●
以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。 —— 我们共创未来 !
MSDP 配置案例 2

R6
router eigrp 100
network 56.1.1.6 0.0.0.0
no auto-summary

4、 R3、R4 配置 BGP
R3
router bgp 100
no bgp default ipv4-unicast
neighbor 34.1.1.4 remote-as 200
neighbor 43.1.1.4 remote-as 200
!
address-family ipv4
neighbor 34.1.1.4 activate
no auto-summary
no synchronization
network 3.3.3.3 mask 255.255.255.255 /--保证 MSDP 单播可达,能够建立 MSDP 连接--/
network 12.1.1.0 mask 255.255.255.0 /--通过 BGP,将组播源路由传递到 AS200,保证 R5
能够通过 RPF 检测--/
exit-address-family
!
address-family ipv4 multicast
neighbor 43.1.1.4 activate
no auto-summary
no synchronization
network 12.1.1.0 mask 255.255.255.0 /--题目要求 R4 通过 MBGP 检测,RPF 检测顺序,默
认 MBGP 由于单播路由表 --/
exit-address-family

R4
router bgp 200
no bgp default ipv4-unicast
neighbor 34.1.1.3 remote-as 100
neighbor 43.1.1.3 remote-as 100
!
address-family ipv4
neighbor 34.1.1.3 activate
no auto-summary
no synchronization
network 4.4.4.4 mask 255.255.255.255 /--保证 MSDP 单播可达,能够建立 MSDP 连接--/
exit-address-family

SPOTO 全球 培训 ● 项目 ● 人才 3
SPOTO IT 人才培训机构 ● IT 人才解决方案 ● CCIE 实验室 ● BOOTCAMP 全真 IT 项目实战
WEB: http://www.SPOTO.net BBS: (网络)http://bbs.SPOTO.net ●
以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。 —— 我们共创未来 !
MSDP 配置案例 2

!
address-family ipv4 multicast
neighbor 43.1.1.3 activate
no auto-summary
no synchronization
exit-address-family

R4
access-list 1 permit 12.1.1.0 0.0.0.255
route-map BGPTOEIGRP permit 10
match ip address 1
router eigrp 100
redistribute bgp 200 metric 10000 100 255 1 1500 route-map BGPTOEIGRP
/--重分步组播源网段 12.1.1.0/24,为了让 R5 能够通过 RPF 检测--/
5、 组播基本配置
R2
ip multicast-routing
interface FastEthernet0/0、FastEthernet0/1
ip pim sparse-mode
ip pim rp-address 3.3.3.3

R3
ip multicast-routing
interface FastEthernet0/1、Serial1/2
ip pim sparse-mode
ip pim rp-address 3.3.3.3

R4
ip multicast-routing
interface FastEthernet0/1、Serial1/2
ip pim sparse-mode
ip pim rp-address 4.4.4.4

R5
ip multicast-routing
interface FastEthernet0/0、FastEthernet0/1
ip pim sparse-mode
ip pim rp-address 4.4.4.4

6、 在 R3、R4 上配置 MSDP


R3

SPOTO 全球 培训 ● 项目 ● 人才 4
SPOTO IT 人才培训机构 ● IT 人才解决方案 ● CCIE 实验室 ● BOOTCAMP 全真 IT 项目实战
WEB: http://www.SPOTO.net BBS: (网络)http://bbs.SPOTO.net ●
以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。 —— 我们共创未来 !
MSDP 配置案例 2

ip msdp peer 4.4.4.4 connect-source Loopback0 remote-as 200


ip msdp originator-id Loopback0

R4
ip msdp peer 3.3.3.3 connect-source Loopback0 remote-as 100
ip msdp originator-id Loopback0

7、 配置 R6 加入组播组
R6
interface FastEthernet0/0
ip igmp join-group 239.1.1.1

4 案例检验结果

1、 验证 PIM-SM 邻居:
R3#show ip pim interface
Address Interface Ver/ Nbr Query DR DR
Mode Count Intvl Prior
23.1.1.3 FastEthernet0/1 v2/S 1 30 1 23.1.1.3
43.1.1.3 Serial1/2 v2/S 1 30 1 0.0.0.0
/--串口链路默认不选举 DR,DR 用 0.0.0.0 表示--/

R3#show ip pim neighbor


PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
S - State Refresh Capable
Neighbor Interface Uptime/Expires Ver DR
Address Prio/Mode
23.1.1.2 FastEthernet0/1 02:33:15/00:01:14 v2 1 / S
43.1.1.4 Serial1/2 02:32:02/00:01:33 v2 1 / S
2、 查看 RP 信息:
R3#show ip pim rp mapping in-use
PIM Group-to-RP Mappings
Group(s): 224.0.0.0/4, Static
RP: 3.3.3.3 (?)

3、 查看主机加入组播组。
R2#show ip igmp groups

SPOTO 全球 培训 ● 项目 ● 人才 5
SPOTO IT 人才培训机构 ● IT 人才解决方案 ● CCIE 实验室 ● BOOTCAMP 全真 IT 项目实战
WEB: http://www.SPOTO.net BBS: (网络)http://bbs.SPOTO.net ●
以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。 —— 我们共创未来 !
MSDP 配置案例 2

IGMP Connected Group Membership


Group Address Interface Uptime Expires Last Reporter Group Accounted
224.10.10.10 FastEthernet1/0 00:20:53 00:02:55 27.1.1.7

R5#show ip igmp groups


IGMP Connected Group Membership
Group Address Interface Uptime Expires Last Reporter Group Accounted
239.1.1.1 FastEthernet0/0 02:47:52 00:02:25 56.1.1.6
224.0.1.40 FastEthernet0/1 02:48:14 00:02:43 45.1.1.5

4、 查看共享树的建立:
R5#show ip mroute
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
L - Local, P - Pruned, R - RP-bit set, F - Register flag,
T - SPT-bit set, J - Join SPT, M - MSDP created entry,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report,
Z - Multicast Tunnel, z - MDT-data group sender,
Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode

(*, 239.1.1.1), 02:48:48/00:02:28, RP 4.4.4.4, flags: SJC


Incoming interface: FastEthernet0/1, RPF nbr 45.1.1.4
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 02:48:48/00:02:28

R4#show ip mroute
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
L - Local, P - Pruned, R - RP-bit set, F - Register flag,
T - SPT-bit set, J - Join SPT, M - MSDP created entry,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report,
Z - Multicast Tunnel, z - MDT-data group sender,
Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode

SPOTO 全球 培训 ● 项目 ● 人才 6
SPOTO IT 人才培训机构 ● IT 人才解决方案 ● CCIE 实验室 ● BOOTCAMP 全真 IT 项目实战
WEB: http://www.SPOTO.net BBS: (网络)http://bbs.SPOTO.net ●
以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。 —— 我们共创未来 !
MSDP 配置案例 2

(*, 239.1.1.1), 02:32:20/00:03:13, RP 4.4.4.4, flags: S


Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/1, Forward/Sparse, 02:32:20/00:03:13
5、 测试组播的连通性:
R1#ping 239.1.1.1 repeat 5

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 239.1.1.1, timeout is 2 seconds:

Reply to request 0 from 56.1.1.6, 92 ms


Reply to request 0 from 56.1.1.6, 92 ms
Reply to request 1 from 56.1.1.6, 108 ms
Reply to request 2 from 56.1.1.6, 108 ms
Reply to request 3 from 56.1.1.6, 116 ms
Reply to request 4 from 56.1.1.6, 104 ms
6、 组播注册过程:
(1)R1 发给 R2 一个组播注册包
(2)R2 将该注册包以单播形式发送给 RP(3.3.3.3),因为此时未建立任何组播分发树,无法传递
组播流量。

(3)R3 提取单播包中的组播数据报文,封装到 MSDP 报文,单播发送给 R4,源地址和目的地址是配


置 MSDP 使用的地址。此时数据包是通过 S1/1 链路发送给 R4。

(4)R4 收到 MSDP 报文,查看组播路由表中已经建立了关于 239.1.1.1 的共享树,说明有主机需要


接收 239.1.1.1 的组播流量。此时,R4 会从 S1/2 链路回应一个 PIM join/prune 报文给 R3。

SPOTO 全球 培训 ● 项目 ● 人才 7
SPOTO IT 人才培训机构 ● IT 人才解决方案 ● CCIE 实验室 ● BOOTCAMP 全真 IT 项目实战
WEB: http://www.SPOTO.net BBS: (网络)http://bbs.SPOTO.net ●
以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。 —— 我们共创未来 !
MSDP 配置案例 2

(5)R3 收到 R4 的 PIM join/prune 之后,也发送一个 PIM join/prune,建立(S,G)条目,最终形成


源树。

7、 查看源树
R4#show ip mroute
(12.1.1.1, 239.1.1.1), 00:00:05/00:02:54, flags: MT
Incoming interface: Serial1/2, RPF nbr 43.1.1.3, Mbgp
Outgoing interface list:
FastEthernet0/1, Forward/Sparse, 00:00:05/00:03:24

R3#show ip mroute
(12.1.1.1, 239.1.1.1), 00:00:45/00:03:00, flags: TA
Incoming interface: FastEthernet0/1, RPF nbr 23.1.1.2
Outgoing interface list:
Serial1/2, Forward/Sparse, 00:00:45/00:02:44
8、 查看 MSDP
R3#show ip msdp peer
MSDP Peer 4.4.4.4 (?), AS 200 (configured AS)

SPOTO 全球 培训 ● 项目 ● 人才 8
SPOTO IT 人才培训机构 ● IT 人才解决方案 ● CCIE 实验室 ● BOOTCAMP 全真 IT 项目实战
WEB: http://www.SPOTO.net BBS: (网络)http://bbs.SPOTO.net ●
以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。 —— 我们共创未来 !
MSDP 配置案例 2

Connection status:
State: Up, Resets: 1, Connection source: Loopback0 (3.3.3.3)
Uptime(Downtime): 03:08:58, Messages sent/received: 203/188
Output messages discarded: 0
Connection and counters cleared 03:16:58 ago
SA Filtering:
Input (S,G) filter: none, route-map: none
Input RP filter: none, route-map: none
Output (S,G) filter: none, route-map: none
Output RP filter: none, route-map: none
SA-Requests:
Input filter: none
Peer ttl threshold: 0
SAs learned from this peer: 0
Input queue size: 0, Output queue size: 0
MD5 signature protection on MSDP TCP connection: not enabled

R4#show ip msdp sa-cache


MSDP Source-Active Cache - 1 entries
(12.1.1.1, 239.1.1.1), RP 3.3.3.3, BGP/AS 100, 00:02:48/00:05:26, Peer 3.3.3.3

5 案例配置文件

6 案例总结及其它

1、 在不同的 PIM-SM 域之间建立 MSDP 连接时,是使用 TCP 639, IP 地址高的初始化 TCP 连接,
60 秒一次 keepalive,75 秒后没数据或 keepalive 则重建 TCP。
2、 组播源向 RP 注册之后,那么 RP 将这些源信息通过在 MSDP 连接上发送 Source-Active (SA)到
远程 RP,以提供组播源的信息。因为 RP 收到 Source-Active (SA)后,也是要做 RPF 检测。
3、 MSDP 只能在 PIM-SM 下使用
4、 组播路由协议依赖于现有的单播路由信息、MBGP 路由或组播静态路由来创建组播路由表项。组
播路由协议在创建组播路由表项时,运用了 RPF(Reverse Path Forwarding,逆向路径转发)
检查机制,以确保组播数据能够沿正确的路径传输,同时还能避免由于各种原因而造成的环路。
5、 在执行 RPF 检查时,路由器同时查找单播路由表、MBGP 路由表和组播静态路由表,具体过程如

首先,分别从单播路由表、MBGP 路由表和组播静态路由表中各选出一条最优路由:
然后,从这三条最优路由中选择一条作为 RPF 路由:
如果配置了按照最长匹配选择路由,则从这三条路由中选出最长匹配的那条路由;
如果这三条路由的掩码一样,则按照组播静态路由、MBGP 路由、单播路由的顺序进行选择。

SPOTO 全球 培训 ● 项目 ● 人才 9
SPOTO IT 人才培训机构 ● IT 人才解决方案 ● CCIE 实验室 ● BOOTCAMP 全真 IT 项目实战
WEB: http://www.SPOTO.net BBS: (网络)http://bbs.SPOTO.net ●
以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。 —— 我们共创未来 !
MSDP 配置案例 2

SPOTO 全球 培训 ● 项目 ● 人才 10
SPOTO IT 人才培训机构 ● IT 人才解决方案 ● CCIE 实验室 ● BOOTCAMP 全真 IT 项目实战
WEB: http://www.SPOTO.net BBS: (网络)http://bbs.SPOTO.net ●
以伙伴关系帮助客户成功,帮助员工成功,帮助合作伙伴成功。 —— 我们共创未来 !

You might also like