IP : X25 Over TCP (XOT)

带XOT Keepalive的基于TCP/IP的x25

2015 年 8 月 28 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 4 月 22 日) | 反馈


目录


简介

X.25 over TCP (XOT)使您发送在TCP/IP网络的X.25数据包而不是链路接入过程,平衡式(LAPB)链路。XOT也允许您通过IP网络以隧道传输X.25流量。

在X.25链路和TCP连接之间的思科IOS�软件交换机X.25数据包。每虚拟电路目的地目标地址可以被映射对一个分开的IP地址。XOT Keepalive可以用于检测层下TCP。TCP有能力通过检查确认序号检测连接。如果它不接收其中任一确认数据包,保持unack数据包并且继续尝试重新传输,直到最终放弃并且切断TCP连接。然而,此进程花费时间。

本文描述如何使用XOT保活功能,在TCP连接是残破的情况下,检测它,并且采取更加快速的行动。

先决条件

要求

本文档没有任何特定的要求。

使用的组件

本文档中的信息基于以下软件和硬件版本:

  • Cisco IOS软件版本9.21或以上,与任何特性组

  • 有Cisco IOS软件版本9.21或以上支持的任何Cisco路由器此功能

  • Cisco IOS软件版本12.2(13)T13和12.2(27)

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

配置

本部分提供有关如何配置本文档所述功能的信息。

注意: 有关本文档所用命令的详细信息,请使用命令查找工具仅限注册用户)。

网络图

本文档使用以下网络设置:

/image/gif/paws/21120/xot_keepalives.gif

配置

本文档使用以下配置:

R1 (Cisco 2500路由器)
Current configuration:
!
version 12.2
service timestamps debug datetime msec
service timestamps log uptime
!
hostname R1
!
x25 routing 

!--- The X.25 local switching.

!
interface Serial0
no ip address
no ip directed-broadcast
encapsulation x25
no ip mroute-cache
x25 address 45678
x25 win 5 

!--- For testing purposes, the X.25 flow control 
!--- is set to something other than 
!--- the default value. In this configuration, 
!--- win 5 and wout 5, and ips and ops 256 are used.

x25 wout 5
x25 ips 256
x25 ops 256
x25 idle 1
!
line con 0
transport input none
line aux 0
line vty 0 4
password cisco
login
!
end

R2 (Cisco 2500路由器)
Current configuration 
!
version 12.2
service pad to-xot 

!--- Enable this command in order to make a packet assembler/disassembler (PAD) 
!--- over XOT through the router locally. It is useful for troubleshooting XOT problems.

service timestamps debug datetime msec
service timestamps log uptime
!
hostname R2
!
x25 routing 

!--- Enables X.25 switching.

!
!
!
interface Loopback0
ip address 10.1.2.2 255.255.255.0
!
interface Ethernet0
ip address 10.64.9.101 255.255.255.0
no ip route-cache
no ip mroute-cache
!
interface Serial0
no ip address
encapsulation x25 dce
no ip mroute-cache
x25 win 5
x25 wout 5
x25 ips 256
x25 ops 256 

!--- Set these flow control parameters since the interface you have connected to 
!--- also has these parameters set. If not matched, you can reset the link 
!--- while there are larger packets that go over.

x25 idle 1
clockrate 64000
!
router rip
network 10.0.0.0
!
x25 route ^12 xot 10.64.9.100 xot-keepalive-period 
 10 xot-keepalive-tries 3 xot-source Loopback0
x25 route ^4 interface Serial0 xot-keepalive-period 
 10 xot-keepalive-tries 3
         

!--- By default, xot-keepalives is always enabled, uses the default keepalive 
!--- period of 60 seconds, and retries four times. Use the 
!--- loopback as the XOT source to enhance the TCP connection reliability.
!--- If you have two interfaces configured for X.25 and one of the 
!--- interfaces goes down, one interface remains up so that the TCP 
!--- connection is not interrupted. In order to achieve this redundancy
!--- connection, the XOT uses the loopback interface since the 
!--- source and the TCP connection do not fail.
!--- If you want to have redundant interfaces in your router, the 
!--- X.25 route command is configured as  -  X.25 route ^12 xot 10.64.9.100 10.64.9.200
!--- where 10.64.9.100 and 10.64.9.200 are the remote destination IP addresses.

!
line con 0
line aux 0
line vty 0 4
login
!
end

R3 (Cisco 2600路由器)
Current configuration : 1427 bytes
!
version 12.2
service timestamps debug datetime msec
service timestamps log uptime
!
hostname R3
!
!
x25 routing
!
!
interface Loopback0
ip address 10.1.3.1 255.255.255.0
!
interface Serial1
bandwidth 384
no ip address
encapsulation x25
no ip route-cache
no ip mroute-cache
x25 win 7
x25 wout 7
x25 ips 1024
x25 ops 1024
x25 idle 1
service-module t1 clock source internal
service-module t1 timeslots 1-6
!
interface Ethernet1/0
ip address 10.64.9.100 255.255.255.0
no ip route-cache
no ip mroute-cache
half-duplex
!
router rip
network 10.0.0.0
!
!
x25 route ^12 interface Serial1 xot-keepalive-period
 10 xot-keepalive-tries 3
x25 route ^4 xot 10.64.9.101 xot-keepalive-period
 10 xot-keepalive-tries 3 xot-source Loopback0

!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
login
!
end

R4 (Cisco 2600路由器)
Current configuration
!
!
!
version 12.2
service timestamps debug datetime msec
service timestamps log uptime
no service password-encryption
!
hostname R4
!
!
interface Ethernet0/0
 ip address 10.64.9.88 255.255.255.0
 half-duplex
!
interface Serial1
 bandwidth 384
 no ip address
 encapsulation x25 dce
 x25 address 123456
 x25 win 7
 x25 wout 7
 x25 ips 1024
 x25 ops 1024 

!--- These parameters are set for testing purposes.

 x25 idle 1
 service-module t1 timeslots 1-6
!
line con 0
line aux 0
line vty 0 4
 password cisco
 login
!
end

验证

使用本部分可确认配置能否正常运行。

命令输出解释程序仅限注册用户)(OIT) 支持某些 show 命令。使用 OIT 可查看对 show 命令输出的分析。

  • show x25 pad —显示关于当前开放连接的信息,包括数据包的传输、X.3参数设置和虚拟电路当前状态。

  • show x25 xot —显示匹配一个给的标准的所有XOT虚拟电路的信息。

  • show tcp —显示TCP连接状况。

  • 填充位—请使用此命令记录在PAD上。

当PAD呼叫从R1发出到R4时,此输出显示显示的debug输出:

R1#pad 123456

User Access Verification

Password:
1w1d: Serial0: X.25 O R1 Call (15) 8 lci 1024
1w1d: From (5): 45678 To (6): 123456
1w1d: Facilities: (0)
1w1d: Call User Data (4): 0x01000000 (pad)
1w1d: Serial0: X.25 I R1 Call Confirm (5) 8 lci 1024
1w1d: From (0): To (0):
1w1d: Facilities: (0)
R4>

此呼叫穿过R2。使用debug x25 eventdebug ip tcp driver命令,此输出捕获。

R2#
*Mar 9 07:02:39.982: Serial0: X.25 I R1 Call (15) 8 lci 1024
*Mar 9 07:02:39.986: From (5): 45678 To (6): 123456
*Mar 9 07:02:39.990: Facilities: (0)
*Mar 9 07:02:39.990: Call User Data (4): 0x01000000 (pad)
*Mar 9 07:02:40.006: TCPDRV404EF4: Active async open 10.1.2.2:0 
 --> 10.64.9.100 :1998 OK, lport 11020
*Mar 9 07:02:40.034: TCPDRV404EF4: disable tcp timeouts
*Mar 9 07:02:40.034: TCPDRV404EF4: enable tcp timeouts
*Mar 9 07:02:40.038: TCPDRV404EF4: keepalive interval set to 10000 ms


!--- The keepalives parameters.

*Mar 9 07:02:40.038: TCPDRV404EF4: keepalive attempts set to 3
*Mar 9 07:02:40.042: TCPDRV404EF4: keepalives turned on
*Mar 9 07:02:40.046: [10.64.9.100,1998/10.1.2.2,11020]: XOT O P2 Call (21) 8 lc i 1
*Mar 9 07:02:40.050: From (5): 45678 To (6): 123456
*Mar 9 07:02:40.054: Facilities: (6)
*Mar 9 07:02:40.054: Packet sizes: 256 256
*Mar 9 07:02:40.058: Window sizes: 5 5
*Mar 9 07:02:40.058: Call User Data (4): 0x01000000 (pad)
*Mar 9 07:02:40.182: [10.64.9.100,1998/10.1.2.2,11020]: XOT I P2 Call Confirm (11) 8 lci 1
*Mar 9 07:02:40.182: From (0): To (0):
*Mar 9 07:02:40.186: Facilities: (6)
*Mar 9 07:02:40.186: Packet sizes: 256 256
*Mar 9 07:02:40.190: Window sizes: 5 5
*Mar 9 07:02:40.194: Serial0: X.25 O R1 Call Confirm (5) 8 lci 1024
*Mar 9 07:02:40.194: From (0): To (0):
*Mar 9 07:02:40.198: Facilities: (0)

R3通过XOT收到从R2的呼叫然后通过它对R4。使用debug x25 eventdebug ip tcp driver命令,此输出捕获。

R3#
*Mar 9 07:00:41.338: TCPDRV27693C: Passive open 10.64.9.100:1998 <-- 10.1.2.2:1 1020
*Mar 9 07:00:41.342: TCPDRV27693C: disable tcp timeouts
*Mar 9 07:00:41.342: TCPDRV27693C: enable tcp timeouts
*Mar 9 07:00:41.370: [10.1.2.2,11020/10.64.9.100,1998]: XOT I P/Inactive Call (21) 8 lci 1
*Mar 9 07:00:41.370: From (5): 45678 To (6): 123456
*Mar 9 07:00:41.374: Facilities: (6)
*Mar 9 07:00:41.378: Packet sizes: 256 256
*Mar 9 07:00:41.378: Window sizes: 5 5
*Mar 9 07:00:41.382: Call User Data (4): 0x01000000 (pad)
*Mar 9 07:00:41.394: TCPDRV27693C: keepalive interval set to 10000 ms
*Mar 9 07:00:41.394: TCPDRV27693C: keepalive attempts set to 3
*Mar 9 07:00:41.398: TCPDRV27693C: keepalives turned on
*Mar 9 07:00:41.402: Serial1: X.25 O R1 Call (21) 8 lci 1024
*Mar 9 07:00:41.402: From (5): 45678 To (6): 123456
*Mar 9 07:00:41.406: Facilities: (6)
*Mar 9 07:00:41.410: Packet sizes: 256 256
*Mar 9 07:00:41.410: Window sizes: 5 5
*Mar 9 07:00:41.414: Call User Data (4): 0x01000000 (pad)
*Mar 9 07:00:41.454: Serial1: X.25 I R1 Call Confirm (5) 8 lci 1024
*Mar 9 07:00:41.454: From (0): To (0):
*Mar 9 07:00:41.458: Facilities: (0)
*Mar 9 07:00:41.462: [10.1.2.2,11020/10.64.9.100,1998]: XOT O P3 Call Confirm (11) 8 lci 1
*Mar 9 07:00:41.462: From (0): To (0):

R4收到呼叫并且连接它到VTY端口:

R4#
*Mar 9 06:57:16.598: Serial1: X.25 I R1 Call (21) 8 lci 1024
*Mar 9 06:57:16.602: From (5): 45678 To (6): 123456
*Mar 9 06:57:16.606: Facilities: (6)
*Mar 9 06:57:16.606: Packet sizes: 256 256
*Mar 9 06:57:16.610: Window sizes: 5 5
*Mar 9 06:57:16.610: Call User Data (4): 0x01000000 (pad)
*Mar 9 06:57:16.622: Serial1: X.25 O R1 Call Confirm (5) 8 lci 1024
*Mar 9 06:57:16.626: From (0): To (0):
*Mar 9 06:57:16.626: Facilities: (0)

R4#show x25 vc
SVC 1024, State: D1, Interface: Serial1
Started 00:02:15, last input 00:02:12, output 00:02:12

Line: 2 vty 0 Location: Host: 45678
45678 connected to 123456 PAD <--> X25

Window size input: 5, output: 5
Packet size input: 256, output: 256
PS: 4 PR: 0 ACK: 0 Remote PR: 4 RCNT: 0 RNR: no
P/D state timeouts: 0 timer (secs): 0
data bytes 47/60 packets 4/8 Resets 0/0 RNRs 0/0 REJs 0/0 INTs 0/0

R2#show tcp

Stand-alone TCP connection to host 10.64.9.100
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 10.1.2.2, Local port: 11020
Foreign host: 10.64.9.100, Foreign port: 1998

Enqueued packets for retransmit: 0, input: 0 mis-ordered: 0 (0 bytes)

TCP driver queue size 0, flow controlled FALSE

Event Timers (current time is 0x2AB893F0):
Timer Starts Wakeups Next
Retrans 11 0 0x0
TimeWait 0 0 0x0
AckHold 10 0 0x0
SendWnd 0 0 0x0
KeepAlive 50 0 0x2AB8A290


!--- Sends keepalive packets and increments.

GiveUp 0 0 0x0
PmtuAger 0 0 0x0
DeadWait 0 0 0x0

iss: 1072933807 snduna: 1072933977 sndnxt: 1072933977 sndwnd: 8023
irs: 1206945087 rcvnxt: 1206945244 rcvwnd: 8036 delrcvwnd: 156

SRTT: 231 ms, RTTO: 769 ms, RTV: 538 ms, KRTT: 0 ms
minRTT: 8 ms, maxRTT: 300 ms, ACK hold: 200 ms
Flags: higher precedence, retransmission timeout, keepalive running


!--- The keepalive status.


Datagrams (max data segment is 536 bytes):
Rcvd: 40 (out of order: 0), with data: 10, total data bytes: 156
Sent: 41 (retransmit: 0, fastretransmit: 0), with data: 10, total data bytes: 16 9

参考X.25 route命令XOT保活选项欲知更多信息。

故障排除

使用本部分可排除配置故障。

故障排除命令

命令输出解释程序仅限注册用户)(OIT) 支持某些 show 命令。使用 OIT 可查看对 show 命令输出的分析。

注意: 使用 debug 命令之前,请参阅有关 Debug 命令的重要信息

  • debug x25 events —显示关于所有X.25流量的信息除了数据和资源记录数据包。

  • debug ip tcp driver —显示关于TCP驱动程序事件的信息。

如果R2和R3之间的连接是残破的, TCP连接在保活周期之后切断。然后输出show tcp命令是空的在R2和R3路由器。

当R2和R3 XOT接口发生故障时,您能观察此debug输出:

R2#debug x25 events
   *Mar 10 05:36:24.685: [10.64.9.100,1998/10.1.2.2,11037]: XOT cx closed
   *Mar 10 05:36:24.689: Serial0: X.25 O R1 Clear (5) 8 lci 1024
   *Mar 10 05:36:24.693: Cause 9, Diag 0 (Out of order/No additional information)
   *Mar 10 05:36:24.709: Serial0: X.25 I R1 Clear Confirm (3) 8 lci 1024

   R2#debug ip tcp driver
   *Mar 10 05:41:08.800: TCPDRV205B44: 10.1.2.2:11038 --> 10.64.9.100:1998 DoClose
   (Cookie 402718) tcp close 

   R3#debug x25 events
   *Mar 10 05:34:27.241: [10.1.2.2,11037/10.64.9.100,1998]: XOT cx closed
   *Mar 10 05:34:27.245: Serial1: X.25 O R1 Clear (5) 8 lci 1024
   *Mar 10 05:34:27.245: Cause 0, Diag 0 (DTE originated/No additional information)
   *Mar 10 05:34:27.261: Serial1: X.25 I R1 Clear Confirm (3) 8 lci 1024
   
    R3#debug ip tcp driver
   *Mar 10 05:39:11.321: TCPDRV354BB8: 10.64.9.100:1998 --> 10.1.2.2:11038 DoClose
   (Cookie 354B5C) tcp close

相关的思科支持社区讨论

思科支持社区是您提问、解答问题、分享建议以及与工作伙伴协作的论坛。


相关信息


Document ID: 21120