基本环境:
BDCOM 26xx 系列路由器
串口 serial 3/1 接收HDLC数据包;
网口 FastEhternet1/0 输出UDP广播包
串口引脚定义:
串口 4、5 短接; 6、8、20短接;
如果需要路由器串口自身提供发送时钟,则 24、15短接。
相关配置参数:
!
interface Fast 1/0
ip address 192.168.20.2 255.255.255.0
!
interface Serial 3/1
hdlc-transparent
hdlc-udp-tunnel 192.168.20.2 9131 192.168.20.255 9031
!
write
配置命令说明:
interface Serial 3/1
hdlc-udp-tunnel 192.168.20.2 9131 192.168.20.255 9031
路由器将网卡接收到的,目的地址:端口 为 192.168.20.2:9131 的udp包,通过 串口 Se3/1 以HDLC方式发出;
对于串口 Se3/1接收到的HDLC包,路由器以UDP方式发送, 目的地址:端口 为 192.168.20.255:9031 。
(目的地址可以为单播地址或广播地址,不支持UDP组播方式输出。)
补充说明:
对于较新的 BSR系列路由器,对应的命令格式为:
interface Serial 3/1
hdlc mode tunnel
hdlc tunnel 192.168.20.2 9131 192.168.20.255 9031
!
如果需要路由器串口提供 发送、接收时钟,则 24、15、17短接。
并且 interface Serial 3/1 段落需要添加:
physical-layer speed 64000