IP : 串行隧道 (STUN)

STUN直接封装配置示例

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


目录


简介

本文为串行隧道(STUN)的直接封装提供一个配置示例。本文档的“验证”和“故障排除”部分中演示了 show stun 命令输出中的相关状态和 debug 命令输出中的状态更改。

虽然debug stun packetdebug stun event命令不应该导致CPU利用率过高, logging buffered命令用于复制输出到日志文件。

先决条件

要求

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

使用的组件

本文档中的信息根据Cisco IOSï ¿ Â有IBM功能的½软件版本12.0(8) STUN配置的。

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

规则

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

配置

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

注意: 要查找本文档所用命令的其他信息,请使用命令查找工具仅限注册用户)。

网络图

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

/image/gif/paws/12277/19_a.gif

配置

本文档使用以下配置:

Cloclo
cloclo# show run

Building configuration...
Current configuration:
!
version 12.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname cloclo
!
boot system flash rsp-jsv-mz.120-8
logging buffered 64000 debugging
no logging console
enable password cisco
!
microcode CIP flash slot0:cip27-3
microcode reload
ip subnet-zero
no ip domain-lookup
ip cef
!
!
stun peer-name 10.10.10.10
stun protocol-group 2 sdlc
!
!
!
!
interface Loopback0
 ip address 10.10.10.10 255.255.255.0
 no ip directed-broadcast
!
interface Serial0/0
 no ip address
 no ip directed-broadcast
 encapsulation stun
 no ip mroute-cache
 clockrate 9600
 stun group 2
 stun route address 1 interface Serial0/1
!
interface Serial0/1
 ip address 10.2.1.1 255.255.255.0
 no ip directed-broadcast
 no ip mroute-cache
!

!--- Output suppressed.

!
interface Ethernet1/0
 ip address 10.1.1.1 255.255.255.0
 no ip directed-broadcast
 no ip mroute-cache
 shutdown
!

!--- Output suppressed.

!
router eigrp 100
 network 10.0.0.0
!
ip classless
!
!
!
line con 0
 exec-timeout 0 0
 transport input none
line aux 0
line vty 0 4
 password cisco
 login
!
end
cloclo#

费尔班克斯
fairbanks# show run

Building configuration...
Current configuration:
!
version 12.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname fairbanks
!
boot system flash
 logging buffered 64000 debugging
no logging console
enable password cisco
!
ip subnet-zero
!
!
stun peer-name 10.20.20.20
stun protocol-group 2 sdlc
!
!
!
!
interface Loopback0
 ip address 10.20.20.20 255.255.255.0
 no ip directed-broadcast
!
interface Ethernet0
 ip address 10.1.1.2 255.255.255.0
 no ip directed-broadcast
 shutdown
 media-type 10BaseT
!
interface Ethernet1
 ip address 172.17.240.12 255.255.255.0
 no ip directed-broadcast
 shutdown
 media-type 10BaseT
!
interface Serial0
 no ip address
 no ip directed-broadcast
 encapsulation stun
 no ip mroute-cache
 clockrate 9600
 stun group 2
 stun route address 1 interface Serial2
!

!--- Output suppressed.

!
interface Serial2
 ip address 10.2.1.2 255.255.255.0
 no ip directed-broadcast
 clockrate 19200
!

!--- Output suppressed.

!
router eigrp 100
 network 10.0.0.0
!
ip classless
!
!
!
line con 0
 exec-timeout 0 0
 transport input none
line aux 0
line vty 0 4
 login
!
end
fairbanks#

验证

此部分提供您能使用的,用以确认您的配置正常工作的信息。

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

两个路由器的show stun命令输出在此部分显示。它显示每个路由器STUN状态是开放的此外,每次您发出show stun命令,计数器收到的信息包的(rx_pkts)和已传输数据包的(tx_pkts)会增加。

cloclo# show stun

This peer: 10.10.10.10
  *Serial0/0  (group 2 [sdlc])
                             state       rx_pkts   tx_pkts     drops    poll
1     IF  Serial0/1        open             4510      4513         0
fairbanks# show stun

This peer: 10.20.20.20
  *Serial0  (group 2 [sdlc])
                             state       rx_pkts   tx_pkts     drops    poll
1     IF  Serial2          open             2260      2257         0

fairbanks# show stun

This peer: 10.20.20.20
  *Serial0  (group 2 [sdlc])
                             state       rx_pkts   tx_pkts     drops    poll
1     IF  Serial2          open             2270      2267         0

故障排除

此部分提供您能使用故障排除您的配置的信息。

故障排除命令

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

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

  • debug stun packet —显示关于游遍STUN链路的数据包的信息。

  • debug stun event —显示STUN连接和活动。

调试捕获在STUN激活时

cloclo# show log

Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns)
    Console logging: disabled
    Monitor logging: level debugging, 0 messages logged
    Buffer logging: level debugging, 232 messages logged
    Trap logging: level informational, 43 message lines logged

Log Buffer (64000 bytes):

!--- These timestamped lines each appear on one line in normal output:

*Nov  3 11:35:06.191: %LINK-3-UPDOWN:
  Interface Serial0/1, changed state to up
*Nov  3 11:35:07.191: %LINEPROTO-5-UPDOWN:
  Line protocol on Interface Serial0/1, changed state to up
*Nov  3 11:35:31.819: %LINK-3-UPDOWN:
  Interface Serial0/0, changed state to up
*Nov  3 11:35:32.819: %LINEPROTO-5-UPDOWN:
  Line protocol on Interface Serial0/0, changed state to up
*Nov  3 11:35:36.631: STUN sdlc:
  00:04:12 Serial0/0       SDI: (001/008) U: SNRM    PF:1  
*Nov  3 11:35:37.831: STUN sdlc:
  00:00:01 Serial0/0       SDI: (001/008) U: SNRM    PF:1  
*Nov  3 11:35:37.859: STUN sdlc:
  00:00:00 Serial0/0       NDI: (001/008) U: UA      PF:1  
*Nov  3 11:35:37.879: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) S: RR      PF:1  NR:000  
*Nov  3 11:35:37.907: STUN sdlc:
  00:00:00 Serial0/0       NDI: (001/008) S: RR      PF:1  NR:000  
*Nov  3 11:35:38.031: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) S: RR      PF:1  NR:000  
*Nov  3 11:35:38.059: STUN sdlc:
  00:00:00 Serial0/0       NDI: (001/008) S: RR      PF:1  NR:000  
*Nov  3 11:35:38.091: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) I:         PF:0  NR:000  NS:000
*Nov  3 11:35:38.231: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) S: RR      PF:1  NR:000  
*Nov  3 11:35:38.295: STUN sdlc:
  00:00:00 Serial0/0       NDI: (001/008) I:         PF:1  NR:001  NS:000
*Nov  3 11:35:38.431: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) S: RR      PF:1  NR:001  
*Nov  3 11:35:38.459: STUN sdlc:
  00:00:00 Serial0/0       NDI: (001/008) S: RR      PF:1  NR:001  
*Nov  3 11:35:38.555: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) I:         PF:0  NR:001  NS:001
*Nov  3 11:35:38.631: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) S: RR      PF:1  NR:001  
*Nov  3 11:35:38.691: STUN sdlc:
  00:00:00 Serial0/0       NDI: (001/008) I:         PF:1  NR:002  NS:001
*Nov  3 11:35:38.831: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 11:35:38.859: STUN sdlc:
  00:00:00 Serial0/0       NDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 11:35:39.031: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 11:35:39.059: STUN sdlc:
  00:00:00 Serial0/0       NDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 11:35:39.231: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 11:35:39.259: STUN sdlc:
  00:00:00 Serial0/0       NDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 11:35:39.431: STUN sdlc:
  00:00:00 Serial0/0       SDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 11:35:39.563: STUN sdlc:
  00:00:00 Serial0/0       NDI: (001/008) S: RR      PF:1  NR:002  

cloclo#
fairbanks# show log

Syslog logging: enabled (0 messages dropped, 0 flushes, 0 overruns)
    Console logging: disabled
    Monitor logging: level debugging, 0 messages logged
    Buffer logging: level debugging, 203 messages logged
    Trap logging: level informational, 40 message lines logged

Log Buffer (64000 bytes):

!--- These timestamped lines each appear on one line in normal output:

*Nov  3 09:38:12.759: %SYS-5-CONFIG_I:
  Configured from console by console
*Nov  3 09:38:14.231: %LINK-3-UPDOWN:
  Interface Serial2, changed state to up
*Nov  3 09:38:15.231: %LINEPROTO-5-UPDOWN:
  Line protocol on Interface Serial2, changed state to up
*Nov  3 09:38:44.687: STUN sdlc:
  00:04:41 Serial0         NDI: (001/008) U: SNRM    PF:1  
*Nov  3 09:38:45.887: STUN sdlc:
  00:00:01 Serial0         NDI: (001/008) U: SNRM    PF:1  @
*Nov  3 09:38:45.899: STUN sdlc:
  00:00:00 Serial0         SDI: (001/008) U: UA      PF:1  
*Nov  3 09:38:45.935: STUN sdlc:
  00:00:00 Serial0         NDI: (001/008) S: RR      PF:1  NR:000  
*Nov  3 09:38:45.947: STUN sdlc:
  00:00:00 Serial0         SDI: (001/008) S: RR      PF:1  NR:000  
*Nov  3 09:38:46.087: STUN sdlc:
  00:00:00 Serial0         NDI: (001/008) S: RR      PF:1  NR:000  
*Nov  3 09:38:46.099: STUN sdlc:
  00:00:00 Serial0         SDI: (001/008) S: RR      PF:1  NR:000  
*Nov  3 09:38:46.155: STUN sdlc:
  00:00:00 Serial0         NDI: (001/008) I:         PF:0  NR:000  NS:000
*Nov  3 09:38:46.287: STUN sdlc:
  00:00:00 Serial0         NDI: (001/008) S: RR      PF:1  NR:000  
*Nov  3 09:38:46.323: STUN sdlc:
  00:00:00 Serial0         SDI: (001/008) I:         PF:1  NR:001  NS:000
*Nov  3 09:38:46.487: STUN sdlc:
  00:00:00 Serial0         NDI: (001/008) S: RR      PF:1  NR:001  
*Nov  3 09:38:46.499: STUN sdlc:
  00:00:00 Serial0         SDI: (001/008) S: RR      PF:1  NR:001  
*Nov  3 09:38:46.615: STUN sdlc:
  00:00:00 Serial0         NDI: (001/008) I:         PF:0  NR:001  NS:001
*Nov  3 09:38:46.687: STUN sdlc:
  00:00:00 Serial0         NDI: (001/008) S: RR      PF:1  NR:001  
*Nov  3 09:38:46.719: STUN sdlc:
  00:00:00 Serial0         SDI: (001/008) I:         PF:1  NR:002  NS:001
*Nov  3 09:38:46.887: STUN sdlc:
  00:00:00 Serial0         NDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 09:38:46.899: STUN sdlc:
  00:00:00 Serial0         SDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 09:38:47.087: STUN sdlc:
  00:00:00 Serial0         NDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 09:38:47.099: STUN sdlc:
  00:00:00 Serial0         SDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 09:38:47.287: STUN sdlc:
  00:00:00 Serial0         NDI: (001/008) S: RR      PF:1  NR:002  
*Nov  3 09:38:47.299: STUN sdlc:
  00:00:00 Serial0         SDI: (001/008) S: RR      PF:1  NR:002  
 
fairbanks#

相关信息


Document ID: 12277