sparse模式下multicast配置

简介:

 看图

我们下完成初始配置,我们用r1模拟多播源,r5模拟pc

source配置:nterface Serial0/0

 ip address 192.168.1.1 255.255.255.0

 serial restart-delay 0

 clock rate 64000

!

interface Serial0/1

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/2

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/3

 no ip address

 shutdown

 serial restart-delay 0

!

ip http server

ip route 0.0.0.0 0.0.0.0 192.168.1.

r2配置;interface Serial0/0

 ip address 192.168.1.2 255.255.255.0

 serial restart-delay 0

!

interface Serial0/1

 ip address 192.168.2.2 255.255.255.0

 serial restart-delay 0

!

interface Serial0/2

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/3

 no ip address

 shutdown

 serial restart-delay 0

!

router eigrp 100

 network 2.2.2.0 0.0.0.255

 network 192.168.1.0

 network 192.168.2.0

 auto-summary

r3配置;!

interface Loopback0

 ip address 3.3.3.3 255.255.255.0

!

interface Serial0/0

 ip address 192.168.3.3 255.255.255.0

 serial restart-delay 0

!

interface Serial0/1

 ip address 192.168.2.3 255.255.255.0

 serial restart-delay 0

!

interface Serial0/2

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/3

 no ip address

 shutdown

 serial restart-delay 0

!

router eigrp 100

 network 3.3.3.0 0.0.0.255

 network 192.168.2.0

 network 192.168.3.0

 auto-summary

r4配置:interface Serial0/0

 ip address 192.168.3.4 255.255.255.0

 serial restart-delay 0

!

interface Serial0/1

 ip address 192.168.4.4 255.255.255.0

 serial restart-delay 0

!

interface Serial0/2

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/3

 no ip address

 shutdown

 serial restart-delay 0

!

router eigrp 100

 network 4.4.4.0 0.0.0.255

 network 192.168.3.0

 network 192.168.4.0

 auto-summary

r5;interface Serial0/1

 ip address 192.168.4.5 255.255.255.0

 serial restart-delay 0

!

interface Serial0/2

 no ip address

 shutdown

 serial restart-delay 0

!

interface Serial0/3

 no ip address

 shutdown

 serial restart-delay 0

!

ip http server

ip route 0.0.0.0 0.0.0.0 192.168.4.4

在source ping pc:

 

source#ping 192.168.4.5

 

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/55/104 ms

基本配置完成

我们把r3配置为maping agent r2 r4 配置为 候选路由

source(config)#ip pim autorp listener

source(config)#ip multicast-routing 

source(config)#int s0/0

source(config-if)#ip pim sparse-mode 

source(config)#ip igmp snooping 

r2(config)#ip pim autorp listener 

r2(config)#ip multicast-routing 

r2(config)#int s0/0

r2(config-if)#ip pim sparse-mode 

r2(config)#int s0/1

r2(config-if)#ip pim sparse-mode 

r2(config)#ip igmp snooping 

r2(config)#int lo 0

r2(config-if)#ip pim sparse-mode

r2(config)#ip pim send-rp-announce lo 0 scope 10 group-list 1

r2(config)#access-list 1 permit 224.0.0.0 255.255.255.0  

 

r3(config)#int lo 0

r3(config-if)#ip pim sp

r3(config-if)#ip pim sparse-mo

 

r3(config-if)#int s0/1

r3(config-if)#ip pim sp m

r3(config)#ip pim autorp l

 

r3(config-if)#ip pim sparse-mode

r3(config-if)#int s0/1

r3(config-if)#ip pim sp m

r3(config)#ip pim send-rp-discovery lo 0 scope 10

r4(config)#ip pim send-rp-announce lo 0 scope 10 group-list 1

r4(config)#access-list 1 permit 224.0.0.0 0.255.255.255.0

r4(config)#int lo 0

 

r4(config-if)#ip pim sp

r4(config-if)#ip pim sparse-mo

pc(config)#ip pim autorp l

pc(config-if)#ip igmp join-group 224.1.1.1

我们先检测下pim邻居关系;

 

r2#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

192.168.1.1       Serial0/0                00:06:38/00:01:29 v2    1 / S

192.168.2.3       Serial0/1                00:05:23/00:01:17 v2    1 / S

 

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

192.168.3.4       Serial0/0                00:31:22/00:01:22 v2    1 / S

192.168.2.2       Serial0/1                00:31:43/00:01:30 v2    1 / S

邻居关系正确我们在ping下224.0.0.1

 

source#ping 224.1.1.1 

 

Type escape sequence to abort.

Sending 1, 100-byte ICMP Echos to 224.1.1.1, timeout is 2 seconds:

 

Reply to request 0 from 192.168.4.5, 352 ms

成功!

我们看下多播路由表;

 

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

 

(*, 224.1.1.1), 00:31:54/00:02:16, RP 0.0.0.0, flags: SJC

  Incoming interface: Null, RPF nbr 0.0.0.0

  Outgoing interface list:

    Serial0/1, Forward/Sparse, 00:31:54/00:02:16

 

(*, 224.0.1.39), 00:17:44/stopped, RP 0.0.0.0, flags: D

  Incoming interface: Null, RPF nbr 0.0.0.0

  Outgoing interface list:

    Serial0/0, Forward/Sparse, 00:17:44/00:00:00

 

(2.2.2.2, 224.0.1.39), 00:01:34/00:01:25, flags: PT

  Incoming interface: Serial0/0, RPF nbr 192.168.3.3

  Outgoing interface list: Null

 

(4.4.4.4, 224.0.1.39), 00:15:00/00:02:01, flags: T

  Incoming interface: Loopback0, RPF nbr 0.0.0.0

  Outgoing interface list:

    Serial0/0, Forward/Sparse, 00:15:00/00:00:00

          

(*, 224.0.1.40), 00:33:16/stopped, RP 0.0.0.0, flags: DCL

  Incoming interface: Null, RPF nbr 0.0.0.0

  Outgoing interface list:

    Serial0/0, Forward/Sparse, 00:33:16/00:00:00

发现这是基于源树分发的!  结束!

 

 下面是多播的一些要点

 

 

 

 

 

 ip igmp join-group 224.1.1.1

ip pim autorp listener

 


本文转自q狼的诱惑 51CTO博客,原文链接:http://blog.51cto.com/liangrui/414291,如需转载请自行联系原作者

相关文章
|
19小时前
|
云安全 人工智能 自然语言处理
|
5天前
|
搜索推荐 编译器 Linux
一个可用于企业开发及通用跨平台的Makefile文件
一款适用于企业级开发的通用跨平台Makefile,支持C/C++混合编译、多目标输出(可执行文件、静态/动态库)、Release/Debug版本管理。配置简洁,仅需修改带`MF_CONFIGURE_`前缀的变量,支持脚本化配置与子Makefile管理,具备完善日志、错误提示和跨平台兼容性,附详细文档与示例,便于学习与集成。
310 116
|
8天前
|
数据采集 人工智能 自然语言处理
Meta SAM3开源:让图像分割,听懂你的话
Meta发布并开源SAM 3,首个支持文本或视觉提示的统一图像视频分割模型,可精准分割“红色条纹伞”等开放词汇概念,覆盖400万独特概念,性能达人类水平75%–80%,推动视觉分割新突破。
546 51
Meta SAM3开源:让图像分割,听懂你的话
|
20天前
|
域名解析 人工智能
【实操攻略】手把手教学,免费领取.CN域名
即日起至2025年12月31日,购买万小智AI建站或云·企业官网,每单可免费领1个.CN域名首年!跟我了解领取攻略吧~
|
4天前
|
人工智能 Java API
Java 正式进入 Agentic AI 时代:Spring AI Alibaba 1.1 发布背后的技术演进
Spring AI Alibaba 1.1 正式发布,提供极简方式构建企业级AI智能体。基于ReactAgent核心,支持多智能体协作、上下文工程与生产级管控,助力开发者快速打造可靠、可扩展的智能应用。
|
3天前
|
弹性计算 人工智能 Cloud Native
阿里云无门槛和有门槛优惠券解析:学生券,满减券,补贴券等优惠券领取与使用介绍
为了回馈用户与助力更多用户节省上云成本,阿里云会经常推出各种优惠券相关的活动,包括无门槛优惠券和有门槛优惠券。本文将详细介绍阿里云无门槛优惠券的领取与使用方式,同时也会概述几种常见的有门槛优惠券,帮助用户更好地利用这些优惠,降低云服务的成本。
263 132
|
8天前
|
机器学习/深度学习 人工智能 自然语言处理
AgentEvolver:让智能体系统学会「自我进化」
AgentEvolver 是一个自进化智能体系统,通过自我任务生成、经验导航与反思归因三大机制,推动AI从“被动执行”迈向“主动学习”。它显著提升强化学习效率,在更少参数下实现更强性能,助力智能体持续自我迭代。开源地址:https://github.com/modelscope/AgentEvolver
384 29
|
14天前
|
安全 Java Android开发
深度解析 Android 崩溃捕获原理及从崩溃到归因的闭环实践
崩溃堆栈全是 a.b.c?Native 错误查不到行号?本文详解 Android 崩溃采集全链路原理,教你如何把“天书”变“说明书”。RUM SDK 已支持一键接入。
702 224