TCP/IP 详解 卷1 ch12 Broadcasting and Multicasting

1. 广播

1) 255.255.255.255 - Limited Broadcast

2) 网络号+主机号(全1) - Net-directed Broadcast

3) 网络号+主机号(全1),并且有特定的子网号 - Subnet-directed Broadcast

4) 网络号+子网号&主机号(全1)All-subnets-directed Broadcast

 

2. 一个例子

 

3. Multicast

IP multicasting provides two services for an application.

1) Delivery to multiple destinations

2) Solicitation of servers by clients

D类地址(1110 + 多播组ID):Some multicast group addresses are assigned as well-known addresses by the IANA

A class D IP address is called a multicast group address. It is converted to an Ethernet address by placing its lower 23 bits into a fixed Ethernet address. The mapping is not unique, requiring additional filtering by one of the protocol modules.

 

一个多播的代码示例:

http://www.tenouk.com/Module41c.html

 

一个广播的示例:

http://alas.matf.bg.ac.rs/manuals/lspe/cnode=111.html

 

Note: server 135.252.129.116 has 2 ips, and one with 127 and the other with 255 as broadcast addr.

 

bserver.c

 

bclient.c

 

测试结果(pcap file):

server端:

 

client端:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值