Multicast-1

implementing Multicast
Explaining Multicast
Why Multicast?
Used when sending same data to multiple receivers
Better bandwidth utilization
Less host/router processing
Used when addresses of receivers unknown
Used when simultaneous delivery for a group of receivers is required(simulcast)

同时性
 
Multicast Disadvantages
Multicast is UDP based. PIM
Best-effort delivery:Drops are be be expected.Multicast applications must expect reliable delivery of data and should be designed accordingly.Reliable multicast applications will address this issue.
No congestion avoidance:The lack of TCP windowing and "slow-start" mechanisms can result in network congestion.if possible.multicast applications should attempt to detect and avoid congestion conditions.
Out-of-sequence delivery:Network topology changes affect the order of delivery-the application must properly address the issue.
Duplicates:Some multicast protocol mechanisms result in the occasional generation of duplicate packets.Multicast applictions should be designed to expect occasional duplicate packets.

Type of Multicast Applications
One to many:A single host sending to two or more (n) receivers
eg:
Many to many:Any number of hosts sending to the same multicast group;hosts are also members of the group(sender = receiver)
eg:视频会议,电子白板
Many to one:Any number of receivers sending data back to a source (via unicast or multicast)
eg:监控,画中画

IP Multicast Service Model
  • Multicast network routers are distinct from source and receiver segments
  • Sources simply start sending data without any indication 
  • First-hop routers forward data Receivers report their membership to last hop routers
  • Last-hop(leaf)routers communicate group membership to the netowrk
Multicast Conceptual Model

PIM  IGMP

 Multicast IP address structure
Class D  1 1 1 0 Multicast Group ID
A类 1-126
B类128-192
C类192-223
D类 224-239

A Class D address consists of 1110 as the high-order bits in the first octet,followed by a 28-bit group address.
Class D addresses range fro 224.0.0.0 through 239.255.255.255.The high-order bits in the first octet identify this 224-base address.
IP Multicast Addresses
1、 Description Range
reserved link local 224.0.0.0 to 225.0.0.255  224.0.0.0/24
address
2、 Globally scoped 224.0.1.0 to 238.255.255.255
addresses
Source specific 232.0.0.0 to 232.255.255.255
multicast   SSM
GLOP addresses 233.0.0.0 to 233.255.255.255   GLOP
3、 Limited scope 239.0.0.0 to 239.255.255.255
addresses

224.0.0.1 所有host和router
224.0.0.2 所有router
224.0.0.3 不多
224.0.0.4 不多
224.0.0.5 OSPF
224.0.0.6  OSPF
225.0.0.7 不多
225.0.0.8
225.0.0.9 RIP
225.0.0.10       EIGRP
225.0.0.13  PIM

申请一个AS号,送一个多播地址
AS ----->Multicast
AS 65123   = 0xFE63
FE=254
63=99
233.254.99.0/24

IGMP and Layer 2 Issues
IGMP
Internet Group Management Protocol
  • The way hosts tell routers about group membership
  • Routers solicit group membership from directly 
RFC 1112 specifies the first version of IGMP
RFC 2236 specifies the current version of IGMP
IGMP v3 enhancements
Supported on UNIX systems,PCs,and MACs.

RFC 1112,Host extensions for IP Multicasting

--Membership Queries
Querier sends IGMP query messages to 224.0.0.1 with TTL=1
One router on LAN is designated/elected to send queries
Query interval 60 seconds
--Membership Reports
IGMP report send by one host suppresses sending by others
Restrict to one report per group per LAN
Unsolicited reports send by host when it first joins the group

IGMPv1 -Packet Format
Multicast-1


  E | IP | IGMP | FCS
query D:224.0.0.1 G:0.0.0.0
report  D:224.1.1.1 G 224.1.1.1
原因有两个
1、路由器和本组的组员都收到
2、抑制其它组员report报文

IGMPv1 -Leaving a Group
Router sends periodic queries
Hosts silently leave group
Router continues sending periodic queries
No reports for group received by router
Group times out

IGMPv2
Group-specific query
Leave Group message

Querier:IGMPv2(查询包,IP地址较小的)
IGPMv1(PIM,DR充当查询者)

show ip igmp interfaces e0

Leave:D224.0.0.2 G:224.1.1.1

Multicast-1


R1配置
ip multicast-routing 
interface Ethernet0/0
 ip address 10.1.1.1 255.255.255.0
 ip pim sparse-mode

R2 配置
 ip multicast-routing 
interface Ethernet0/0
 ip address 10.1.1.2 255.255.255.0
 ip pim sparse-mode

R3配置
interface Ethernet0/2
 ip address 10.1.1.3 255.255.255.0
 ip igmp join-group 224.1.1.1

查看配置
R1#show ip igmp interface 
Ethernet0/0 is up, line protocol is up
  Internet address is 10.1.1.1/24
  IGMP is enabled on interface
  Current IGMP host version is 2
  Current IGMP router version is 2
  IGMP query interval is 60 seconds
  IGMP configured query interval is 60 seconds
  IGMP querier timeout is 120 seconds
  IGMP configured querier timeout is 120 seconds
  IGMP max query response time is 10 seconds
  Last member query count is 2
  Last member query response interval is 1000 ms
  Inbound IGMP access group is not set
  IGMP activity: 2 joins, 0 leaves
  Multicast routing is enabled on interface
  Multicast TTL threshold is 0
  Multicast designated router (DR) is 10.1.1.2  
  IGMP querying router is 10.1.1.1 (this system)
  Multicast groups joined by this system (number of users):
      224.0.1.40(1)

 R1#show ip igmp groups 
IGMP Connected Group Membership
Group Address    Interface                Uptime    Expires   Last Reporter   Group Accounted
224.1.1.1        Ethernet0/0              00:07:18  00:02:15  10.1.1.3        
224.0.1.40       Ethernet0/0              00:07:56  00:02:09  10.1.1.1   

R1#show ip igmp groups 
IGMP Connected Group Membership
Group Address     Interface                 Uptime     Expires   Last Reporter   Group Accounted
224.0.1.40       Ethernet0/0               00:10:56   00:02:16   10.1.1.1  


R3(config-if)#
*Jun 28 13:51:15.279: IGMP(0): IGMP delete group 224.1.1.1 on Ethernet0/2
*Jun 28 13:51:15.279: IGMP(0): Send Leave for 224.1.1.1 on Ethernet0/2


R1#
*Jun 28 13:51:14.639: IGMP(0): Received Leave from 10.1.1.3 (Ethernet0/0) for 224.1.1.1
*Jun 28 13:51:14.639: IGMP(0): Received Group record for group 224.1.1.1, mode 3 from 10.1.1.3 for 0 sources
*Jun 28 13:51:14.639: IGMP(0): Lower expiration timer to 2000 msec for 224.1.1.1 on Ethernet0/0
*Jun 28 13:51:14.639: IGMP(0): Send v2 Query on Ethernet0/0 for group 224.1.1.1
*Jun 28 13:51:15.643: IGMP(0): Send v2 Query on Ethernet0/0 for group 224.1.1.1
R1#
*Jun 28 13:51:16.643: IGMP(0): Switching to INCLUDE mode for 224.1.1.1 on Ethernet0/0
R1#show ip igmp groups 
IGMP Connected Group Membership
Group Address    Interface                Uptime    Expires   Last Reporter   Group Accounted
224.0.1.40       Ethernet0/0              00:10:56  00:02:16  10.1.1.1        
R1#
R1#
*Jun 28 13:52:02.191: IGMP(0): Send v2 general Query on Ethernet0/0
*Jun 28 13:52:02.191: IGMP(0): Set report delay time to 0.1 seconds for 224.0.1.40 on Ethernet0/0
*Jun 28 13:52:02.343: IGMP(0): Send v2 Report for 224.0.1.40 on Ethernet0/0
*Jun 28 13:52:02.343: IGMP(0): Received v2 Report on Ethernet0/0 from 10.1.1.1 for 224.0.1.40
*Jun 28 13:52:02.343: IGMP(0): Received Group record for group 224.0.1.40, mode 2 from 10.1.1.1 for 0 sources
*Jun 28 13:52:02.343: IGMP(0): Updating EXCLUDE group timer for 224.0.1.40
*Jun 28 13:52:02.343: IGMP(0): MRT Add/Update Ethernet0/0 for (*,224.0.1.40) by 0
R1#u all
All possible debugging has been turned off

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值