科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网网络频道多播配置

多播配置

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

Seeing as how we only have two routers, I did not want one router to be 3. Next, you need to set the multicast threshold.4. It's probably a VERY good idea at this point to save your config.

作者:中国IT实验室 2007年9月12日

关键字: 多播 IP组播 网络管理

  • 评论
  • 分享微博
  • 分享邮件

  源码:--------------------------------------------------------------------------------

  Multicast is a UDP-based protocol which literally delivers packets from one

  host to many. If abused, it can be made to deliver from many hosts to

  many hosts to many hosts to many hosts... This is why it's important to

  setup multicasting routing on the routers in a sane manner.

  

  1. First, enable the global multicast routing parameter by:

   !

   ip multicast-routing

   !

   This can be disabled, if you so choose, by doing:

   !

   no ip multicast-routing

   !

  

  2. Next, select your style of multicasting. I chose PIM (Protocol-

   Independent Multicast) for the following reasons:

   - PIM works with all existing multicast routing protocols.

   - PIM has two modes (dense &sparse) which gives me some freedom at

   configuration time.

   You could also choose from IGMP (Internet Group Management Protocol,

   which is good for large WANs) or DVMRP (Distance Vector Multicast

   Routing Protocol, which is slightly unsupported). However, be aware

   that Cisco only tacitly supports DVMRP. To use DVMRP with a Cisco

   router, you need to point your Cisco to a router that DOES support

   DVMRP directly.

  

   Of the two PIM choices, I went with dense mode. Here are the differences:

   - Dense mode: When the router receives a multicast packet, the router

   sends the packet out of all interfaces except for the interface from

   whence the packet originated. If the router discovers that a certain

   interface has no multicast recipients, it sends a "prune" message back

   to the sender stating that there is no need to send messages to that

   interface/subnet/link/host.

   - Sparse mode: In sparse mode, it is assumed that no host wants multi-

   cast packets unless the host specifically asks for it. So, instead

   of the shotgun approach of dense mode, one router becomes the central

   hub. This central hub logs all hosts that wish to receive multicast.

   Further multicast packets are sent only to those hosts.

   Seeing as how we only have two routers, I did not want one router to be

   burdened with the list of multicast hosts (especially since practically

   ALL of our hosts "want" multicast). Additionally, I did not want to

   spend time fudging entries in the multicast recipient list.

  

   So, to configure for PIM dense mode multicast routing:

   !

   interface ethernet 0

   ip pim dense-mode

   !

   interface ethernet 1

   ip pim dense-mode

   !

   Obviously, all involved routers should be speaking the same lingo. Thus,

   routerA is configured the same as routerB.

  

  3. Next, you need to set the multicast threshold. This is the BIG TRICK[tm]

   to multicast routing. In a nutshell, every multicast packet has a TTL.

   That's basic to all IP. By setting the multicast threshold on a given

   router interface, you create a hurdle. If the packet's TTL is higher

   than the multicast threshold, the packet may pass. If the packet's TTL

   is LOWER than the multicast threshold, the packet is stopped (actually,

   it is bounced with an ICMP message, but that's for another "howto" ;-).

  

   This is how one prevents multicast packets from careening out into the

   great 'Net. The range for multicast threshold is 0 to 255, with 0

   meaning all packets may pass (well, *almost* all) and 255 meaning

   virtually no packets may pass. On the routerB router, I set up the

   multicast threshold at a comfortable 1 (because this is an internal

   router). The multicast threshold on the interface leading to the

   Internet on routerA should be set at 255 (if, in fact, multicast is

   enabled on the interface at all).

   !

   interface ethernet 0

   ip multicast-threshold 1

   !

   interface ethernet 1

   ip multicast-threshold 1

   !

   And you're set!

  

  4. It's probably a VERY good idea at this point to save your config. I

   choose to save off to tftp (in case my NVRAM gets scrammed), but you

   can choose your own danger here. At the least, you should copy your

   running-config to your saved config.

   router#copy running-config startup-config

  

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章