返回信息流比如在二层交换机上,有8个端口,
每个数据包上只有MAC地址,没有这种端口信息呀?
这是一条镜像帖。来源:北邮人论坛 / cpp / #27897同步于 2009/9/1
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖
[求助]以太网中怎样获得接收包的二层接收端口?
focuson
2009/9/1镜像同步4 回复
订阅后,新回复会通过你的通知中心匿名送达。
4 条回复
RFC里面的原话:
Each entry will contain the following information:
o IP source address
o Layer-2 information, such as Layer-2 address, port through which
the packet was received, etc
。。。
没太看明白你的问题,具体哪个包走哪个口是有交换机自动选择的啊
至于选择的规则:交换机一般具有MAC地址学习的功能,也叫地址反向学习,计算机网络教材上有详细说明
在以太网上
Layer-2 information, such as Layer-2 address, port through which
the packet was received, etc
不就是6字节的目的mac地址+6字节的源mac地址+2字节的类型么
这个就是传说中的端口信息。