这一章我们主要 |
|
Cisco的串口隧道技术(Serial tunnel)是Cisco为同步数据链路控制(SDLC)设备多协议的与网上设备互连而设计的.它为SDLC到SDLC数据透过IP网传输实现一条链路上走多协议提供了解决方案.
它能实现PU 4到PU2.0/2.1,PU 4到PU 4等互连,并且有本地应答(Local acknowledge)功能,尽可能节省广域网带宽,保证有效数据传输.
它比DLSw+产生的早,目前它的大多数功能,如PU 4到PU 2.0/2.1,均可由DLSw+实现.但要用路由器实现PU 4到PU 4连接,TG组传输还要用STUN技术.
对STUN命令,首先配置peer-name.这条命令是定义STUN必需的(作BASIC和SDLC).没有peer-name配置,你就不能进入下面配置.
| 功 能 | 命 令 |
| 特殊IP地址定义STUN | stun peer-name ip-address |
IP地址必须是有效的,如果定义了loopback interface,最好用looppback地址.
这一步是确切决定你使用哪一种STUN协议.它有三种模式:
如果你要用本地应答特性,你必须指定SDLC协议或SDLC transmission group协议.
| 功 能 | 命 令 |
| 指定basic协议组和组号 | stun protocol-group group-number basic |
| 指定SDLC协议组和组号 | stun protocol-group group-number sdlc |
| 指定SDLC协议组和组号,产生SNA TG组 | stun protocol-group group-number sdlc sdlc-tg |
在我们想要走STUN端口上作定义,并把它放在刚刚指定的协议组里.
| 功 能 | 命 令 |
| 在串口上指定STUN方式 | encapsulation stun |
| 把端口加入前面指定的协议组里 | stun group group-number |
STUN技术实现SDLC数据在IP网上传输,它的原理就是把SDLC帧再加上IP地址等IP的包头,作为一个IP数据帧传送出去.有几种不同打包方式:
我们将详细说明有本地应答和优先级的TCP打包方式,其它的请参阅Cisco文档.
SDLC本地应答,两个末端节点SDLC会话不是端到端的,而是终止在两个路由器之间,如图所示.
图:SDLC Session with Local Acknowledgment
配置本地应答和优先级的TCP打包方式,需以下步骤:
指定路由器作primary或secondary
建立SDLC本地应答,路由器必须指定作主站primary或从站secondary.主站依次轮询从站.
例如,在IBM环境中,一个FEP是主站而群集控制器作从站.如果路由器连接cluster controller,路由器被当作FEP而必须指定成主站.若路由器连在EFP上,
路由器被当作群集控制器而指定成从站.
| 功 能 | 命 令 |
| 指定路由器作主站 | stun sdlc-role primary |
| 指定路由器作从站 | stun sdlc-role secondary |
指定SDLC本地应答方式
在端口配置模式下:
| 功 能 | 命 令 |
| TCP打包建立SDLC本地应答 | stun route address address-number tcp ip-address [local-ack] [priority] [tcp-queue-max] |
建立优先队列等级
在SDLC本地应答下,可用优先级队列给串口指定优先级.有四种级别:Low,Medium,Normal,High.
| 功 能 | 命 令 |
| 优先级队列指定串口优先级 | stun route address address-number tcp ip-address [local-ack] priority [tcp-queue-max] |
用串口地址或TCP端口号设定优先级.需要完成以下两步:
i) 在global配置模式下:
| 功 能 | 命 令 |
| 用STUN端口指定优先级 | priority-list list-number stun queue address group-number address-number |
| 指定TCP端口优先级 | priority-list list-number protocol ip queue tcp tcp-port-number |
ii) 在端口配置模式下:
| 功 能 | 命 令 |
| 把优先级队列表指定到端口上 | priority-group list-number |
Configuration for router:
stun peer-name 1.0.0.1
stun protocol-group 1 basic
!
interface serial 0
no ip address
encapsulation stun
stun group 1
stun route all tcp 1.0.0.2
priority-group 1
!
interface ethernet 0
ip address 1.0.0.1 255.0.0.0
Configuration for 4700:
stun peer-name 1.0.0.1
stun protocol-group 1 sdlc
stun remote-peer-keepalive 5
!
interface serial 0
no ip address
encapsulation stun
nrzi-encoding
stun group 1
stun sdlc-role secondary
sdlc address C1
sdlc address A7
stun route address C1 tcp 1.0.0.2 local-ack priority
stun route address A7 tcp 1.0.0.2 local-ack priority
priority-group 1
!
interface serial 0
ip address 1.0.0.1 255.0.0.0
!
priority-list 1 protocol ip high tcp 1994
priority-list 1 protocol ip medium tcp 1990
priority-list 1 protocol ip normal tcp 1991
priority-list 1 protocol ip low tcp 1992
priority-list 1 stun high address 1 C1
priority-list 1 stun normal address 2 A7
Configuration for 2522:
stun peer-name 1.0.0.2
stun protocol-group 1 sdlc
stun protocol-group 2 sdlc
stun remote-peer-keepalive 5
!
interface serial 0
no ip address
encapsulation stun
nrzi-encoding
stun group 1
stun sdlc-role primary
sdlc address C1
stun route address C1 tcp 1.0.0.1 local-ack priority
priority-group 1
!
interface serial 1
no ip address
encapsulation stun
stun group 2
stun sdlc-role primary
sdlc address A7
stun route address A7 tcp 1.0.0.1 local-ack priority
priority-group 2
!
interface serial 0
ip address 1.0.0.2 255.0.0.0
!
priority-list 1 protocol ip high tcp 1994
priority-list 1 protocol ip medium tcp 1990
priority-list 1 protocol ip normal tcp 1991
priority-list 1 protocol ip low tcp 1992
priority-list 1 stun high address 1 C1
!
priority-list 2 protocol ip high tcp 1994
priority-list 2 protocol ip medium tcp 1990
priority-list 2 protocol ip normal tcp 1991
priority-list 2 protocol ip low tcp 1992
priority-list 2 stun normal address 2 A7