Guest

Cisco 2000 Series Connected Grid Routers

Configuring Raw Socket Protocol on the CGR 2010 Router

  • Viewing Options

  • PDF (543.0 KB)
  • Feedback

Table of Contents

Cisco 2010 Connected Grid Router Software Configuration Guide

Raw Socket Transport

Information About Raw Socket Transport

TCP Transport

UDP Transport

Serial Protocols

Serial Data Processing

VRF-Aware Raw Socket

Prerequisites

Guidelines and Limitations

Default Settings

Configuring Raw Socket Transport

Enabling Raw Socket Transport on the Serial Interface

Configuring Common Raw Socket Line Options

Configuring Raw Socket TCP

Configuring the Raw Socket TCP Server

Configuring the Raw Socket TCP Client

Configuring a Raw Socket UDP Peer-to-Peer Connection

Verifying Configuration

Configuration Example

Raw Socket TCP

Configuration on the Server Side

Configuration on the Client Side

Raw Socket UDP

Raw Socket VRF

Related Documents

Feature History

Raw Socket Transport Command Reference

clear raw-socket statistics

debug raw-socket driver event

debug raw-socket driver packet

debug raw-socket tcp event

debug raw-socket tcp packet

encapsulation raw-tcp

encapsulation raw-udp

raw-socket mode best-effort

raw-socket packet-length

raw-socket packet-timer

raw-socket protocol cdc1

raw-socket special-char

raw-socket tcp client

raw-socket tcp idle-timeout

raw-socket tcp server

raw-socket udp connection

show raw-socket tcp detail

show raw-socket tcp sessions

show raw-socket tcp statistics

show raw-socket udp detail

show raw-socket udp sessions

show raw-socket udp statistics

Cisco 2010 Connected Grid Router Software Configuration Guide

First Published: July 2012

Last Updated: March 2014

OL-27562-04

This guide provides configuration information for the Raw Socket Transport feature on the Cisco 2010 Connected Grid Router (CGR 2010) as summarized in the Feature History section.

Use this document in conjunction with the CGR 2010 software configuration documentation as listed in the Related Documents section.

Raw Socket Transport

Raw Socket Transport transports streams of characters from one serial interface to another over an IP network for utility applications.

This document describes Raw Socket Transport for the CGR 2010 and provides a reference section describing the Raw Socket Transport commands. The feature is also supported on the Cisco 1000 Series Connected Grid Router (CGR 1000). For more information, see the Cisco 1000 Series Connected Grid Routers SCADA Software Configuration Guide or the Raw Socket Transport Software Configuration Guide for Cisco 1000 Series Connected Grid Routers (Cisco IOS) .

This document includes the following sections:

Information About Raw Socket Transport

Raw Socket is a method for transporting serial data through an IP network. The feature can be used to transport Supervisory Control and Data Acquisition (SCADA) data from Remote Terminal Units (RTUs). This method is an alternative to the Block Serial Tunnel (BSTUN) protocol.

Raw Socket Transport supports TCP or UDP as the transport protocol. An interface can be configured to use either protocol but not both at the same time. TCP transport is suitable for applications such as control applications that require acknowledged and sequenced delivery of data. For latency-sensitive applications such as line SEL relays, UDP transport provides faster transport of serial data than TCP.

In either transport mode, Raw Socket Transport supports up to 32 sessions per interface (a total of 32 x 32 sessions per CGR 2010).

Raw Socket Transport supports the following for each asynchronous serial interface:

  • TCP as the transport protocol, with built-in auto TCP connection retry mechanism.
  • Up to 32 TCP sessions per interface.
  • Interface configuration as a server, client, or a combination of both.
  • One server per interface, but multiple clients.
  • VRF-awareness, which enables the router to send Raw Socket Transport traffic to a server host connected through a Virtual Private Network (VPN) Virtual Routing and Forwarding (VRF) interface.

This section includes the following topics:

TCP Transport

TCP Raw Socket transport uses a client-server model. At most one server and multiple clients can be configured on a single asynchronous serial line. In client mode, the CGR 2010 can initiate up to 32 TCP sessions to Raw Socket servers, which can be other CGR 2010 routers or third-party devices.

Figure 1 shows a sample Raw Socket TCP configuration. In this example, serial data is transferred between RTUs and a utility management system across an IP network that includes several CGR 2010 routers. One CGR 2010 router acts as a Raw Socket server, listening for TCP connection requests from the other CGR 2010 routers, which are configured as Raw Socket clients.

A Raw Socket client receives streams of serial data from the RTUs and accumulates this data in its buffer, then places the data into packets, based on user-specified packetization criteria. The Raw Socket client initiates a TCP connection with the Raw Socket server and sends the packetized data across the IP network to the Raw Socket server, which retrieves the serial data from the packets and sends it to the serial interface, and on to the utility management system.

Figure 1 Raw Socket TCP Transport


Note When you configure the serial link interface on the router as a server, the interface’s peer is the serial link interface on the client router and vice versa.


UDP Transport

UDP transport uses a peer-to-peer model. Multiple UDP connections can be configured on an asynchronous serial line.

Figure 2 shows a sample Raw Socket UDP configuration. In this example, serial data is transferred between RTUs and a utility management system across an IP network that includes two CGR 2010 routers that are configured as Raw Socket UDP peers.

In this example, the Raw Socket UDP peer receives streams of serial data from the RTUs and accumulates this data in its buffer, then places the data into packets, based on user-specified packetization criteria. The Raw Socket UDP peer sends the packetized data across the IP network to the Raw Socket peer at the other end, which retrieves the serial data from the packets and sends it to the serial interface, and on to the utility management system.

Figure 2 Raw Socket UDP Transport

Serial Protocols

The CGR 2010 supports the following serial protocols for Raw Socket Transport:

  • Asynchronous communication protocol—This is the default. When you use the default protocol, you can select processing options as described in the next section.
  • Control Data Corporation Type 1 (CDC1) protocol—CDC1 is a bit-oriented SCADA protocol that is used for communication between control stations and RTUs or substations. When you select the CDC1 protocol option, the CGR 2010 packetizes the serial data but does not perform processing before transmitting the data using TCP or UDP.

See the Configuring Common Raw Socket Line Options for information about configuring the CDC1 option.

Serial Data Processing

When the default serial protocol, Asynchronous Communication Protocol, is used, the streams of serial data received by a Raw Socket peer can be packetized based on the following criteria:

  • Packet length –You can specify a packet length that triggers the CGR 2010 to transmit the serial data to the peer. Once the CGR 2010 collects this much data in its buffer, it packetizes the accumulated data and forwards it to the Raw Socket peer.
  • Packet-timer value –The packet timer specifies the amount of time the CGR 2010 waits to receive the next character in a stream. If a character is not received by the time the packet timer expires, the data the CGR 2010 has accumulated in its buffer is packetized and forwarded to the Raw Socket peer.
  • Special character –You can specify a character that will trigger the CGR 2010 to packetize the data accumulated in its buffer and send it to the Raw Socket peer. When the special character (for example, a CR/LF) is received, the CGR 2010 packetizes the accumulated data and sends it to the Raw Socket peer.

In addition to the packetizing options, you can also select best-effort mode for faster processing. This mode trades reliability for speed. If the buffer is full, the CGR 2010 drops the older packets.

See the Configuring Common Raw Socket Line Options for information about configuring the processing options.

VRF-Aware Raw Socket

The VRF-aware Raw Socket Transport feature enables you to isolate Raw Socket traffic using a VRF for efficient management and control of serial data. After configuring a VRF, you can associate the serial interface configured for Raw Socket Transport with the VRF. See the “Raw Socket VRF” section for a configuration example.

Prerequisites

Determine how you want Raw Socket traffic transported in your network, including the network devices and interfaces to use, how the router packetizes the serial data, and whether to use VRF.

Guidelines and Limitations

Typically, UDP traffic is blocked by firewalls in the network. If the network has such firewalls, make sure to configure pinholes to allow the raw socket UDP traffic.

Default Settings

Feature
Default Setting

Raw Socket Transport

Disabled.

Packet length

No packet length is configured.

Serial Protocol

Asynchronous Communication Protocol

Packet timeout

10 ms.

Special character

No special character is configured.

Raw Socket mode

Best-effort mode is off.

TCP idle timeout

5 minutes.

Configuring Raw Socket Transport

This section includes the following topics:

Enabling Raw Socket Transport on the Serial Interface

To enable Raw Socket Transport on the CGR 2010 router, you must first enable an asynchronous serial port and enable Raw Socket TCP or UDP encapsulation for that port.

BEFORE YOU BEGIN

Determine availability of the serial port on the CGR 2010.

DETAILED STEPS

Command
Purpose

Step 1

configure terminal

Enters global configuration mode.

Step 2

interface serial0 / slot / port

Enters the interface command mode for the serial slot/port.

Step 3

physical-layer async

Places the interface in asynchronous mode.

Step 4

no ip address

Disables IP processing on the interface.

Step 5

encapsulation raw-tcp

or

encapsulation raw-udp

Enables Raw Socket TCP encapsulation or UDP encapsulation for the serial port.

EXAMPLE

This example shows how to enable serial port 0/0/0 and how to enable Raw Socket TCP encapsulation on that port.

router# configure terminal
router(config)# interface Serial0/0/0
router(config-if)# physical-layer async
router(config-if)# no ip address
router(config-if)# encapsulation raw-tcp
router(config-if)# exit
 

This example shows how to enable serial port 0/0/1 and how to enable Raw Socket UDP encapsulation on that port.

router# configure terminal
router(config)# interface Serial0/0/1
router(config-if)# physical-layer async
router(config-if)# no ip address
router(config-if)# encapsulation raw-udp
router(config-if)# exit
 

Configuring Common Raw Socket Line Options

You can configure options common to all connections on a line. The common options apply to both TCP and UDP.

BEFORE YOU BEGIN

Enable Raw Socket Transport as described in Enabling Raw Socket Transport on the Serial Interface.

DETAILED STEPS

Command
Purpose

Step 1

configure terminal

Enters global configuration mode.

Step 2

line 0 / slot / port

Enters line command mode for the serial slot/port.

Step 3

raw-socket protocol cdc1

Specifies the CDC1 communication protocol.

Note The other common line options have no effect when CDC1 is used.

Step 4

raw-socket packet-length length

Specifies the packet size that triggers the CGR 2010 to transmit the data to the peer. When the CGR 2010 accumulates this much data in its buffer, it packetizes the data and forwards it to the Raw Socket peer.

length— 2 to 1400 bytes.

By default, the packet-length trigger is disabled.

Step 5

raw-socket packet-timer timeout

Specifies the maximum time in milliseconds the CGR 2010 waits to receive the next character in a stream. If a character is not received by the time the packet-timer expires, the accumulated data is packetized and forwarded to the Raw Socket peer.

timeout —3 to 1000 ms.

The default is 10 ms.

Step 6

raw-socket spec-char ascii_char

Specifies a character that will trigger the CGR 2010 to packetize the data accumulated in its buffer and send it to the Raw Socket peer.

ascii_char— 0 to 255.

By default, the special character trigger is disabled.

Step 7

raw-socket mode best-effort

Enable best-effort mode for the serial line. When this mode is enabled, older packets are dropped from the head of the queue when the queue is full.

By default, best-effort mode is off.

Use the no form of these commands to return to the default values.

EXAMPLE

router# configure terminal
router(config)# line 0/0/0
router(config-line)# raw-socket packet-length 32
router(config-line)# raw-socket packet-timer 500
router(config-line)# raw-socket special-char 3

Configuring Raw Socket TCP

After enabling Raw Socket TCP encapsulation, you configure the TCP server and/or clients.

Configuring the Raw Socket TCP Server

BEFORE YOU BEGIN

Enable a serial port and Raw Socket TCP encapsulation for that port, as described in “Enabling Raw Socket Transport on the Serial Interface” section.

DETAILED STEPS

Command
Purpose

Step 1

configure terminal

Enters configuration mode.

Step 2

line 0 / slot / port

Enters line command mode for the serial slot/port.

Step 3

raw-socket tcp server port [ ip_address ]

Starts the Raw Socket Transport TCP server for an asynchronous line interface. In Raw Socket server mode, the CGR 2010 listens for incoming connection requests from Raw Socket clients.

port –Port number the server listens on.

ip_address –(Optional) Local IP address on which the server listens for connection requests.

Step 4

raw-socket tcp idle-timeout session_timeout

Sets the Raw Socket Transport TCP session timeout for the asynchronous line interface. If no data is transferred between the client and server over this interval, then the TCP session closes. The client then automatically attempts to reestablish the TCP session with the server.

This timeout setting applies to all Raw Socket Transport TCP sessions under this particular line.

session_timeout –Currently configured session idle timeout in minutes. The default is 5 minutes.

To remove a Raw Socket TCP server, use the no raw-socket tcp server command.

EXAMPLE

This example shows how to configure a Raw Socket TCP server for an asynchronous serial line. The TCP server listens for TCP client connection requests on local port 4000 and local IP address 10.0.0.1. If no data is exchanged between the Raw Socket TCP server and one of the TCP clients for 10 minutes, then the TCP session closes, and the Raw Socket client attempts to reestablish the session with the Raw Socket server.

router# configure terminal
router(config)# line 0/0/0
router(config-line)# raw-socket tcp server 4000 10.0.0.1
router(config-line)# raw-socket tcp idle-timeout 10
router(config-line)# exit
router(config)#

Configuring the Raw Socket TCP Client

BEFORE YOU BEGIN

Enable a serial port and Raw Socket TCP encapsulation for that port, as described in “Enabling Raw Socket Transport on the Serial Interface” section.

DETAILED STEPS

Command
Purpose

Step 1

configure terminal

Enters configuration mode.

Step 2

line 0 / slot / port

Enters line command mode for the serial slot/port.

Step 3

raw-socket tcp client dest_ip_address dest_port [ local_ip_address ] [ local_port ]

Specifies settings for Raw Socket Transport TCP client sessions.

dest_ip_address –Destination IP address of the remote Raw Socket server.

dest_port –Destination port number to use for the TCP connection to the remote server.

local_ip_address –(Optional) Local IP address that the client can also bind to.

local_port –(Optional) Local port number that the client can also bind to.

Step 4

raw-socket tcp idle-timeout session_timeout

Sets the Raw Socket Transport TCP session timeout for the asynchronous line interface. If no data is transferred between the client and server over this interval, then the TCP session is closed. The client then automatically attempts to reestablish the TCP session with the server.

This timeout setting applies to all Raw Socket Transport TCP sessions under this particular line.

session_timeout –Currently configured session idle timeout in minutes. The default is 5 minutes.

To remove a Raw Socket TCP client, use the no raw-socket tcp client command.

EXAMPLE

This example shows how to configure a Raw Socket TCP client for an asynchronous serial line. The CGR 2010 (router), serving as a Raw Socket client, initiates TCP sessions with a Raw Socket server and forwards packetized serial data to it. The router collects streams of serial data in its buffer; when it accumulates 827 bytes in its buffer, the router packetizes the data and forwards it to the Raw Socket server. If the router and the Raw Socket server do not exchange any data for 10 minutes, then the TCP session with the Raw Socket server closes, and the router attempts to reestablish the session with the Raw Socket server.

router# configure terminal
router(config)# line 0/0/0
router(config-line)# raw-socket tcp client 10.0.0.1 4000
router(config-line)# raw-socket packet-length 827
router(config-line)# raw-socket tcp idle-timeout 10
router(config-line)# exit
router(config)#

Configuring a Raw Socket UDP Peer-to-Peer Connection

After enabling Raw Socket UDP encapsulation and the common line options, you configure the Raw Socket UDP peer-to-peer connection. The local port on one end of the connection should be the destination port on the other end.

BEFORE YOU BEGIN

Enable a serial port and Raw Socket UDP encapsulation for that port, as described in “Enabling Raw Socket Transport on the Serial Interface” section.

DETAILED STEPS

Command
Purpose

Step 1

configure terminal

Enters configuration mode.

Step 2

line 0 / slot / port

Enters line command mode for the serial slot/port.

Step 3

raw-socket udp connection dest_ip_address dest_port local_port [ local_ip_address ]

Specifies settings for Raw Socket Transport UDP connections.

dest_ip_address –Destination IP address to use for the UDP connection.

dest_port –Destination port number to use for the UDP connection.

local_port –Local port number for the UDP connection.

local_ip_address –(Optional) Local IP address for the UDP connection.

To remove a Raw Socket UDP connection, use the no raw-socket udp connection command.

EXAMPLE

This example shows how to configure a Raw Socket UDP connection between router A (local IP address 192.168.0.8) and router B (local IP address 192.168.0.2).

Router A

router# configure terminal
router(config)# line 0/0/6
router(config-line)# raw-socket udp connection 192.168.0.2 5000 7000
router(config-line)# raw-socket mode best-effort
router(config-line)# exit
router(config)#

Router B

router# configure terminal
router(config)# line 0/0/6
router(config-line)# raw-socket udp connection 192.168.0.8 7000 5000
router(config-line)# raw-socket mode best-effort
router(config-line)# exit
router(config)#
 

Verifying Configuration

 

Command
Purpose

show running-config

Shows the configuration of the CGR 2010, including those features that are active and their settings.

show raw-socket tcp detail

Displays information about Raw Socket Transport TCP activity.

show raw-socket tcp sessions

Displays information about Raw Socket Transport TCP sessions.

show raw-socket tcp statistics

Displays Raw Socket Transport TCP statistics for each asynchronous serial line.

show raw-socket udp detail

Displays information about Raw Socket Transport UDP activity.

show raw-socket udp sessions

Displays information about Raw Socket Transport UDP sessions.

show raw-socket udp statistics

Displays Raw Socket Transport UDP statistics for each asynchronous serial line.

clear raw-socket statistics

Clears Raw Socket Transport statistics for a specific TTY interface or for all asynchronous serial lines.

Configuration Example

The following sections include Raw Socket Transport configuration examples:

Raw Socket TCP

The following example shows a Raw Socket Transport configuration in which a CGR 2010 router acts as the server, and another CGR 2010 router acts as the client.

Figure 3 Raw Socket Transport Configuration Example

 

The following table displays the configuration of the server and client CGR 2010s highlighted in Figure 3:

CGR 2010 Server Configuration
CGR 2010 Client Configuration
interface Serial0/1/0
physical-layer async
no ip address
encapsulation raw-tcp
!
line 0/1/0
raw-socket tcp server 5000 10.0.0.1
raw-socket packet-timer 3
raw-socket tcp idle-timeout 5
interface Serial0/1/0
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/1/1
physical-layer async
no ip address
encapsulation raw-tcp
!
line 0/1/0
raw-socket tcp client 10.0.0.1 5000 10.0.0.2 9000
raw-socket packet-length 32
raw-socket tcp idle-timeout 5
line 0/1/1
raw-socket tcp client 10.0.0.1 5000 10.0.0.2 9001
raw-socket packet-length 32
raw-socket tcp idle-timeout 5

Configuration on the Server Side

This example shows the Raw Socket Transport configuration on the TCP server side.

cgr2010-2067#show run
Building configuration...
 
Current configuration : 2655 bytes
!
! Last configuration change at 00:03:18 UTC Thu May 31 2013
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname cgr2010-2067
!
boot-start-marker
boot-end-marker
!
!
card type t1 0 3
!
no aaa new-model
no network-clock-participate wic 0
no network-clock-participate wic 3
!
!
!
!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
multilink bundle-name authenticated
!
!
!
!
license udi pid CGR-2010/K9 sn FTX1532AMCT
!
!
!
!
controller T1 0/3/0
clock source internal
cablelength long 0db
channel-group 0 timeslots 1-24
!
controller T1 0/3/1
cablelength long 0db
!
ip tcp mss 10000
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface GigabitEthernet0/0
ip address 10.0.0.97 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 2.20.56.97 255.255.0.0
duplex auto
speed auto
!
interface Serial0/3/0:0
ip address 100.0.0.1 255.255.255.0
!
interface Serial0/0/0
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/1
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/2
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/3
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/4
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/5
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/6
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/7
physical-layer async
no ip address
encapsulation raw-tcp
!
router ospf 1
router-id 3.3.3.3
network 3.3.3.3 0.0.0.0 area 0
network 100.0.0.0 0.0.0.255 area 0
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 223.255.254.254 255.255.255.255 2.20.0.1
!
!
!
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
line aux 0
line 0/0/0
raw-socket tcp server 2012 3.3.3.3
raw-socket tcp idle-timeout 120
line 0/0/1
raw-socket tcp server 2 3.3.3.3
raw-socket tcp idle-timeout 120
line 0/0/2
raw-socket tcp server 3 3.3.3.3
raw-socket tcp idle-timeout 120
line 0/0/3
raw-socket tcp server 4 3.3.3.3
raw-socket tcp idle-timeout 120
line 0/0/4
raw-socket tcp server 5 3.3.3.3
raw-socket tcp idle-timeout 120
line 0/0/5
raw-socket tcp server 6 3.3.3.3
raw-socket tcp idle-timeout 120
line 0/0/6
raw-socket tcp server 7 3.3.3.3
raw-socket tcp idle-timeout 120
line 0/0/7
raw-socket tcp server 8 3.3.3.3
raw-socket tcp idle-timeout 120
line vty 0 4
login
transport input all
!
scheduler allocate 20000 1000
!
end

Configuration on the Client Side

This example shows the Raw Socket Transport configuration on the TCP client side.

cgr2010-2069#show run
Building configuration...
 
Current configuration : 2726 bytes
!
! Last configuration change at 23:04:49 UTC Fri Jun 1 2013
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname cgr2010-2069
!
boot-start-marker
boot-end-marker
!
!
card type t1 0 3
!
no aaa new-model
!
no network-clock-participate wic 0
no network-clock-participate wic 3
!
!
!
!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
!
license udi pid CGR-2010/K9 sn FHH1347P010
!
!
!
redundancy
!
!
!
!
!
controller T1 0/3/0
cablelength long 0db
channel-group 0 timeslots 1-24
!
controller T1 0/3/1
cablelength long 0db
!
ip tcp mss 10000
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
interface GigabitEthernet0/0
ip address 10.0.0.95 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 2.20.56.95 255.255.0.0
duplex auto
speed auto
!
interface Serial0/3/0:0
ip address 100.0.0.2 255.255.255.0
!
interface Serial0/0/0
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/1
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/2
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/3
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/4
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/5
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/6
physical-layer async
no ip address
encapsulation raw-tcp
!
interface Serial0/0/7
physical-layer async
no ip address
encapsulation raw-tcp
!
!
router ospf 1
router-id 4.4.4.4
network 4.4.4.4 0.0.0.0 area 0
network 100.0.0.0 0.0.0.255 area 0
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 223.255.254.254 255.255.255.255 2.20.0.1
!
!
!
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
privilege level 15
line aux 0
line 0/0/0 0/0/1
raw-socket tcp client 3.3.3.3 2012
raw-socket packet-timer 500
raw-socket packet-length 827
raw-socket tcp idle-timeout 120
line 0/0/2
raw-socket tcp client 3.3.3.3 3 3
raw-socket packet-timer 500
raw-socket packet-length 827
raw-socket tcp idle-timeout 120
line 0/0/3
raw-socket tcp client 3.3.3.3 4 4
raw-socket tcp idle-timeout 120
line 0/0/4
raw-socket tcp client 3.3.3.3 5 5
raw-socket tcp idle-timeout 120
line 0/0/5
raw-socket tcp client 3.3.3.3 6 6
raw-socket tcp idle-timeout 120
line 0/0/6
raw-socket tcp client 3.3.3.3 7 7
raw-socket tcp idle-timeout 120
line 0/0/7
raw-socket tcp client 3.3.3.3 8 8
raw-socket tcp idle-timeout 120
line vty 0 4
login
transport input all
!
scheduler allocate 20000 1000
!
end

Raw Socket UDP

This example shows the configuration for a Raw Socket UDP connection between two CGR 2010 routers:

From Router1

interface GigabitEthernet0/1
ip address 192.168.0.8 255.255.255.0
duplex auto
speed auto
 
 
interface Serial0/0/6
physical-layer async
no ip address
encapsulation raw-udp
 
 
line 0/0/6
raw-socket udp connection 192.168.0.2 2 2
raw-socket mode best-effort
 

From Router2

interface GigabitEthernet0/1
ip address 192.168.0.2 255.255.255.0
load-interval 60
duplex auto
speed auto
no keepalive
 
interface Serial0/0/6
physical-layer async
no ip address
encapsulation raw-udp
 
line 0/0/6
raw-socket udp connection 192.168.0.8 2 2
raw-socket mode best-effort

Raw Socket VRF

The following example shows a Raw Socket VRF configuration in which two CGR 2010 routers, configured for Raw Socket Transport, connect through a VRF. CGR1 serves as the Raw Socket TCP server, and CGR2 serves as the Raw Socket TCP client.

Figure 4 Raw Socket Transport VRF Configuration Example

 

Following are the configurations of CGR1 and CGR2 as shown in Figure 4:

CGR1 Configuration

Defining VRF on the router:

vrf definition router1
rd 100:1
route-target export 100:3
route-target import 100:3
!
address-family ipv4
exit-address-family
 

Applying VRF configuration on the interface:

interface GigabitEthernet0/0
vrf forwarding router1
ip address 100.100.100.2 255.255.255.0
duplex auto
speed auto
 

Applying raw-tcp on the serial interface:

interface Serial0/0/0
physical-layer async
vrf forwarding router1
no ip address
encapsulation raw-tcp
 

Applying raw-tcp on the line:

line 0/0/0
raw-socket tcp server 5000 4.4.4.4
 

CGR2 Configuration

Defining VRF on the router:

vrf definition router1
rd 100:1
route-target export 100:3
route-target import 100:3
!
address-family ipv4
exit-address-family
 

Applying VRF configuration on the interface:

interface GigabitEthernet0/0
vrf forwarding router1
ip address 100.100.100.1 255.255.255.0
duplex auto
speed auto
 

Applying raw-tcp on the serial interface:

interface Serial0/0/0
physical-layer async
vrf forwarding router1
no ip address
encapsulation raw-tcp
 

Applying raw-tcp on line:

line 0/0/0
raw-socket tcp client 4.4.4.4 5000

Related Documents

  • Cisco 2000 Series Connected Grid Routers Configuration Guides:

www.cisco.com/go/ie2000u-docs

Feature History

 

Feature Name
Release
Feature Information

Raw Socket Transport

15.2(4)M

Initial support of the feature on the CGR 2010.

15.3(3)M

Addition of VRF awareness for TCP Raw Socket.

15.4(1)T

Addition of UDP as transport protocol.

15.4(2)T

Addition of support for Control Data Corporation Type 1 (CDC1), a bit-oriented SCADA communication protocol.

clear raw-socket statistics

To clear Raw Socket Transport statistics for a specific TTY interface or for all asynchronous interfaces, use this command:

clear raw-socket statistics { tty_line_num | all }

 
Syntax Description

tty_line_num

The asynchronous TTY line number, a value between 3 and 136.

all

All asynchronous TTY line numbers.

 
Usage Guidelines

After running this command, run the show raw-socket tcp statistics or show raw-socket udp statistics command to verify that the raw statistics have been cleared.

Examples

This is an example of the clear raw-socket statistics command:

router# show raw-socket tcp statistics
--------------------------------------------- Network-Serial Statistics------------------------------------------------------
Interface tty vrf_name sessions network_in_bytes network_out_bytes network_to_tty_frames tty_to_network_frames
0/0/0 3 --------- 1 168264 5153864 6232 160707
0/0/1 4 --------- 1 168264 5153864 6232 159407
0/0/6 9 --------- 1 0 0 0 0
router# show raw-socket udp statistics
---------------------------------------------Network-Serial Statistics ------------------------------------------------------
Interface tty vrf_name sessions network_in_bytes network_out_bytes network_to_tty_frames tty_to_network_frames
0/2/6 41 -------- 1 238135496 238125328 59533874 59531332
 
 
router# clear raw-socket statistics all
router# show raw-socket tcp statistics
---------------------------------------------Network-Serial Statistics ------------------------------------------------------
Interface tty vrf_name sessions network_in_bytes network_out_bytes network_to_tty_frames tty_to_network_frames
0/0/0 3 --------- 1 0 0 0 0
0/0/1 4 --------- 1 0 0 0 0
0/0/6 9 --------- 1 0 0 0 0
router# show raw-socket udp statistics
---------------------------------------------Network-Serial Statistics ------------------------------------------------------
Interface tty vrf_name sessions network_in_bytes network_out_bytes network_to_tty_frames tty_to_network_frames
0/2/6 41 -------- 1 0 0 0 0
 

debug raw-socket driver event

To turn Raw Socket Transport driver event debugging on, use this command:

debug raw-socket driver event

 
Usage Guidelines

Issues you can debug with this command include actions related to:

  • Packet timer
  • Packet length

Caution Unless for debugging purposes, we do not recommend turning this command on because it slows down console access and impacts CPU performance, especially in cases of heavy traffic.

To turn this debug command off, run one of these commands:

  • no debug raw-socket driver event
  • no debug all

Examples

This example shows the output of the debug raw-socket driver event command:

router# debug raw-socket driver event
*Jun 15 16:12:28.791: rawsocket_get_pak[tty 3]: get pak buffer from pool (0x3168CE24)
*Jun 15 16:12:28.791: rawsocket_get_pak[tty 3]: successfully get pak (0x2A842C70)
*Jun 15 16:12:28.791: rawsocket_tcp_to_async[tty 3]: put pak(0x2A842C70) to queue
*Jun 15 16:12:28.791: rawsocket_async_output[tty 3]: putpkt(0x2A842C70) to physical async line
*Jun 15 16:12:29.083: rawsocket_rx_service[tty 3]: recieved 32 bytes from serial interface
*Jun 15 16:12:29.083: rawsocket_rx_service[tty 3]: Accumulated length(32) met configured pak-length(32)
*Jun 15 16:12:29.083: rawsocket_get_pak[tty 3]: get pak buffer from pool (0x3168CE24)
*Jun 15 16:12:29.083: rawsocket_get_pak[tty 3]: successfully get pak (0x316A0DA8)
*Jun 15 16:12:29.083: rawsocket_async_to_tcp[tty 3]: send pak(0x316A0DA8) to rawsocket
 

debug raw-socket driver packet

To turn on debugging for issues related to Raw Socket Transport driver packets, use this command:

debug raw-socket driver packet

 
Usage Guidelines

Issues related to Raw Socket Transport driver packets include packetizing actions based on some or all of the following:

  • Packet length
  • Packet timer
  • Special character

Caution Unless for debugging purposes, we do not recommend turning this command on because it slows down console access and impacts CPU performance, especially in cases of heavy traffic.

To turn this debug command off, run one of these commands:

  • no debug raw-socket driver packet
  • no debug all

Examples

This example shows the output of the debug raw-socket driver packet command:

router# debug raw-socket driver packet
*Jun 15 16:09:48.775: rawsocket_async_output[tty 3]: Received 27 byte from socket...
*Jun 15 16:09:48.775: [Socket --> Async] 05 64 14 C4 04 00 03 00 C7 17 C9 CA 01 3C 02 06 3C 03 06 3C 04 06 3C 01 06 C0 5F
*Jun 15 16:09:48.959: [Async --> Socket] tty(3) Received 32 byte from serial...
*Jun 15 16:09:48.959: [Async --> Socket] 05 64 FF 44 03 00 04 00 48 60 57 CA 81 00 00 01 01 00 00 27 00 00 00 00 00 03 3F A1 01 00 00 27
*Jun 15 16:09:48.991: [Async --> Socket] tty(3) Received 32 byte from serial...
*Jun 15 16:09:48.991: [Async --> Socket] 55 55 55 55 55 55 55 55 55 55 0A 02 6A AF 00 00 22 01 01 01 01 01 01 01 01 01 01 01 01 01 29 D2
*Jun 15 16:09:49.027: [Async --> Socket] tty(3) Received 32 byte from serial...
*Jun 15 16:09:49.027: [Async --> Socket] 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 BB C3 01 01 01 01 01 01 14 05 00 00 1D 00 00 00
*Jun 15 16:09:49.059: [Async --> Socket] tty(3) Received 32 byte from serial...
 

debug raw-socket tcp event

To debug issues related to Raw Socket Transport TCP and UDP sessions, use this command to turn TCP and UDP event debugging on:

debug raw-socket tcp event

 
Usage Guidelines

Issues that you can debug with this command include:

  • Interface and connection registration
  • TCP socket establish/release information
  • Configuration event
  • Retry information

Caution Unless for debugging purposes, we do not recommend turning this command on because it slows down console access and impacts CPU performance, especially in cases of heavy traffic.

To turn this debug command off, run one of these commands:

  • no debug raw-socket tcp event
  • no debug all

Examples

This example shows the output of the debug raw-socket tcp event command:

router# debug raw-socket tcp event
Raw TCP Event Trace debugging is on
router#
router#
router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#line 0/0/0
router(config-line)#no raw-socket tcp client 1.1.1.1 1
router(config-line)#
*May 17 04:12:04.831: Raw Socket: stopping TCP client on interface 0/0/0 tty 3
*May 17 04:12:04.831: Raw Socket: --> server addr: 1.1.1.1 1, local addr: any_ip any_port
*May 17 04:12:04.835: Raw Socket: released connection socket 0 on virtual line 0
*May 17 04:12:04.835: Raw Socket: unregistered interface 0/0/0 tty 3 from virtual line 0
*May 17 04:12:04.835: Raw Socket: unregistered config event at 0x30E28C2C
router(config-line)#
router(config-line)#
router(config-line)#raw-socket tcp client 1.1.1.1 1 1
router(config-line)#
*May 17 04:13:10.919: Raw Socket: starting TCP client on interface 0/0/0 tty 3
*May 17 04:13:10.919: Raw Socket: --> server addr: 1.1.1.1 1, local addr: any_ip 1
*May 17 04:13:10.919: Raw Socket: registered config event at 0x30E2874C
*May 17 04:13:11.023: Raw Socket: executing config event at 0x30E2874C retry count (0)
*May 17 04:13:11.023: Raw Socket: start client: interface 0/0/0 tty 3 server addr 1.1.1.1 1
*May 17 04:13:11.023: Raw Socket: connecting to server 1.1.1.1 1
*May 17 04:13:11.023: Raw Socket: created connection socket 0 successfully
*May 17 04:13:11.023: Raw Socket: registered interface 0/0/0 tty 3 to virtual line 0
*May 17 04:13:11.023: Raw Socket: registered client connection 0 on virtual line 0
*May 17 04:13:11.023: Raw Socket: established socket 0 on virtual line 0
router(config-line)#
router(config-line)#
router(config-line)#end
router#no debug raw-socket tcp event
Raw TCP Event Trace debugging is off

 

debug raw-socket tcp packet

To debug issues related to raw TCP and UDP packets at the socket level, use this command to turn TCP packet debugging on:

debug raw-socket tcp packet

 
Usage Guidelines

In the output of this command:

Parameter
Description

[From TCP]

Indicates that the frame is from a remote peer.

[To Serial]

Indicates the frame is written to the local asynchronous serial interface.

[From Serial]

Indicates the frame is coming from the local asynchronous serial interface.

[To TCP]

Indicates the frame is sent to the remote peer through the TCP session.


Caution Unless for debugging purposes, we do not recommend turning this command on because it slows down console access and impacts CPU performance, especially in cases of heavy traffic.

To turn this debug command off, run one of these commands:

  • no debug raw-socket tcp packet
  • no debug all

Examples

This example shows the output of the debug raw-socket tcp packet command:

router# debug raw-socket tcp packet
Raw TCP Packet Trace debugging is on
router#
*Jun 15 16:04:38.787: [From TCP]<-- received 27 bytes on socket 0 from 3.3.3.3 port 2012
*Jun 15 16:04:38.787: 056414C404000300C717EACB013C02063C03063C04063C0106C6D4
*Jun 15 16:04:38.787: [To Serial]<-- sending 27 bytes from socket 0 to interface 0/0/0
 
*Jun 15 16:04:38.995: [From Serial]--> received 32 bytes from interface 0/0/0 tty 3
*Jun 15 16:04:38.995: 0564FF440300040048607DCB81000001010000270000000000036EAF01000027
*Jun 15 16:04:38.995: [To TCP]--> dispatched 32 bytes on socket 0 to ip 3.3.3.3 conf port 2012
 
*Jun 15 16:04:39.027: [From Serial]--> received 32 bytes from interface 0/0/0 tty 3
*Jun 15 16:04:39.027: 555555555555555555550A026AAF0000220101010101010101010101010129D2
*Jun 15 16:04:39.027: [To TCP]--> dispatched 32 bytes on socket 0 to ip 3.3.3.3 port 2012
 
*Jun 15 16:04:39.059: [From Serial]--> received 32 bytes from interface 0/0/0 tty 3
*Jun 15 16:04:39.059: 01010101010101010101010101010101BBC3010101010101140500001D000000
*Jun 15 16:04:39.063: [To TCP]--> dispatched 32 bytes on socket 0 to ip 3.3.3.3 port 2012
 
*Jun 15 16:04:39.095: [From Serial]--> received 32 bytes from interface 0/0/0 tty 3
*Jun 15 16:04:39.095: 0000974A00000000000000000000000000000000FFFF00000000000000000000
*Jun 15 16:04:39.095: [To TCP]--> dispatched 32 bytes on socket 0 to ip 3.3.3.3 port 2012

encapsulation raw-tcp

To configure an asynchronous interface to run in raw TCP encapsulation, use this command:

encapsulation raw-tcp

 
Usage Guidelines

To use this command, switch to the Interface Configuration mode (config-if).

Examples

This example shows how to use the encapsulation raw-tcp command:

router# configure terminal
router(config)# interface Serial0/0/0
router(config-if)# encapsulation raw-tcp

 

encapsulation raw-udp

To configure an asynchronous interface to run in raw UDP encapsulation, use this command:

encapsulation raw-udp

 
Usage Guidelines

To use this command, switch to the Interface Configuration mode (config-if).

Examples

This example shows how to use the encapsulation raw-udp command:

router# configure terminal
router(config)# interface Serial0/0/0
router(config-if)# encapsulation raw-udp

raw-socket mode best-effort

To enable best-effort mode for the serial line, use this command:

raw-socket mode best-effort

 
Usage Guidelines

Use best-effort mode for faster transmission of serial data to the Raw Socket peer. Older packets are dropped from the head of the queue when the queue is full.

To use this command, switch to the Line Configuration mode (config-line).

Examples

router# configure terminal
router(config)# line 0/0/6
router(config-line)# raw-socket mode best-effort
router(config-line)# exit
router(config)#

 

raw-socket packet-length

To set the packet length that the asynchronous serial driver uses to packetize the serial bytes into TCP or UDP frames, use this command:

raw-socket packet-length length

 
Syntax Description

length

Packet length in bytes (2–1400).

 
Usage Guidelines

To use this command, switch to the Line Configuration mode (config-line).

Examples

This example shows how to use the raw-socket packet-length command:

router# configure terminal
router# line 0/0/0
router(config-line)# raw-socket packet-length 827

raw-socket packet-timer

To set the packet timer that the asynchronous serial driver uses when packetizing serial bytes into TCP or UDP frames, use this command:

raw-socket packet-timer packet_timer

 
Syntax Description

packet_timer

The timer value in ms to trigger packetization.

 
Usage Guidelines

By default, the serial interface packetizes the serial received bytes in its buffer every 10 ms. However, you can change this value using this command. After creating the packet, the interface sends the packet to the peer serial interface on the server side through the Raw Socket Transport tunnel.

On the utility RTU server side, you can set this value to 3 ms to flush polling requests out as soon as possible. The shorter the timer, the sooner the polling data is sent to the RTU client.

To use this command, switch to the Line Configuration mode (config-line).

Examples

This example shows how to use the raw-socket packet-timer command:

router# configure terminal
router(config)# line 0/0/0
router(config-line)# raw-socket packet-timer 1000

 

raw-socket protocol cdc1

To select the Control Data Corporation Type 1 (CDC1) communication protocol for Raw Socket Transport, use this command:

raw-socket protocol cdc1

 
Usage Guidelines

When you select the CDC1 protocol, the CGR 2010 packetizes and transports the serial data using TCP or UDP but does not perform processing of the data.

To use this command, switch to the Line Configuration mode (config-line).

The following line option commands have no effect when you use CDC1:

  • raw-socket packet-length
  • raw-socket packet-timer
  • raw-socket spec-char
  • raw-socket mode best-effort

Examples

This example shows how to use the raw-socket protocol cdc1 command:

router# configure terminal
router(config)# line 0/0/0
router(config-line)# raw-socket protocol cdc1
 

raw-socket special-char

To set the special character that triggers the packetization of incoming bytes, use this command:

raw-socket special-char special_character

 
Syntax Description

special_character

The ASCII character (0–255).

 
Usage Guidelines

When the serial interface detects this special character, the interface packetizes the received bytes into a TCP or UDP frame and sends it to the peer through the Raw Socket Transport tunnel.

To use this command, switch to the Line Configuration mode (config-line).

Examples

This example shows how to use the raw-socket special-char command:

router# configure terminal
router(config)# line 0/0/0
router(config-line)# raw-socket special-char 13
 
 

raw-socket tcp client

To initiate a Raw Socket Transport TCP client session, use this command:

raw-socket tcp client dest_ip_address dest_port [ local_ip_address ] [ local_port ]

 
Syntax Description

dest_ip_address

Destination IP address and port number of the remote TCP server.

dest_port

local_ip_address

(Optional) Local IP address and port number that the client can also bind to.

local_port

 
Usage Guidelines

To use this command, switch to the Line Configuration mode (config-line).

Examples

This example shows how to use the raw-socket tcp client command:

cgr2010-master-2066#configure terminal
cgr2010-master-2066(config)#line 0/0/0
cgr2010-master-2066(config-line)#raw-socket tcp client 10.0.0.1 4000 10.0.20.30 6000

raw-socket tcp idle-timeout

To set the Raw Socket Transport TCP session timeout for an asynchronous line interface, use this command:

raw-socket tcp idle-timeout session_timeout

 
Syntax Description

session_timeout

Currently configured session idle timeout in minutes.

 
Usage Guidelines

This timeout setting applies to all Raw Socket Transport TCP sessions under this particular asynchronous line. By default, the session idle timeout is 5 minutes.

To use this command, switch to the Line Configuration mode (config-line).

Examples

This example shows how to use the raw-socket tcp idle-timeout command:

cgr2010-master-2066#configure terminal
cgr2010-master-2066(config)#line 0/0/0
cgr2010-master-2066(config-line)#raw-socket tcp idle-timeout 120

raw-socket tcp server

To start the Raw Socket Transport TCP server for an async asynchronous line interface, use this command:

raw-socket tcp server port [ ip_address ]

 
Syntax Description

port

Server port number the server listens on.

ip_address

(Optional) Server IP address.

 
Usage Guidelines

To use this command, switch to the Line Configuration mode (config-line).

Examples

This example shows how to use the raw-socket tcp server command:

cgr2010-master-2066#configure terminal
cgr2010-master-2066(config)#line 0/0/0
cgr2010-master-2066(config-line)#raw-socket tcp server 5000 10.0.0.30

raw-socket udp connection

To initiate a Raw Socket Transport UDP session, use this command:

raw-socket udp connection dest_ip_address dest_port local_port [ local_ip_address ]

 
Syntax Description

dest_ip_address

Destination IP address of the remote UDP peer.

dest_port

Destination port number from 1 to 65535.

local_port

Local port number from 1 to 65535.

local_ip_address

(Optional) Local IP address.

 
Usage Guidelines

To use this command, switch to the Line Configuration mode (config-line).

Examples

This example shows how to use the raw-socket udp connection command:

router# configure terminal
router(config)# line 0/0/6
router(config-line)# raw-socket udp connection 192.168.0.2 5000 7000
router(config-line)# exit
router(config)#

 

show raw-socket tcp detail

To display the details of Raw Socket Transport TCP activity, mainly for debugging purposes, use this command:

show raw-socket tcp detail

 
Usage Guidelines

This command displays:

  • Line Registration and Connections

Current status for each virtual line (up to 32 lines), including the asynchronous interface and VRF currently registered with this line.

Server status. If the status is on, this line accepts call-in sessions.

Server master socket (listening socket).

Server listening port.

Total number of Raw Socket Transport TCP sessions currently running for this asynchronous interface.

Under each line there can be up to 32 sessions. For each session, this command displays the following:

[out]—Indicates that the session was initiated by this line interface (referred to as caller ).

[in]—Indicates that the session was initiated by the remote peer (referred to as called ).

l_ip—Local IP address for this session.

l_port—Local port number.

d_ip—Destination IP address.

d_port—Destination port number.

w_err—Number of socket write errors.

  • Socket Mapping

Displays information about each socket and its connection details.

  • Configuration Event List

Displays all the Raw Socket Transport TCP configurations and retry information.

Examples

This example shows the output of the show raw-socket tcp detail command:

#show raw-socket tcp detail
-------------------------------------- Line Registration and Connections -----------------------------------
Line 00, if: 0/2/0 vrfname: ------------tty: 35 , server status: on, socket: 0, listen port: 5008 , total sessions: 0
 
---------------------------------------------- Socket Mapping ---------------------------------------------
Socket status interface tty vrf_name hwidb local_ip_addr local_port dest_ip_addr dest_port protocol
[ 0] listening 0/2/0 35 2B33EAF0 ------ 5008 ------ ---- TCP
 
------------------------------------------ Configuration Event List ---------------------------------------
Event_addr initiator event_action local_ip_addr local_port dest_ip_addr dest_port retry_count protocol
0x2AE56C7C 0/2/0 start server ------ 5008 ------- ----- 0 TCP

show raw-socket tcp sessions

To display Raw Socket Transport TCP session details, use this command:

show raw-socket tcp sessions

 
Usage Guidelines

The returned raw TCP session details include this information

Parameter
Description

Interface

Asynchronous serial interface (and its TTY number) associated with this TCP session.

tty

vrf_name

Name of the VRF associated with this TCP session.

socket

TCP socket number.

mode

The mode:

  • client—Indicates that this interface is the caller.
  • server—Indicates that this interface is being called.

local_ip_addr

Local IP address.

local_port

Local port number.

dest_ip_addr

Destination IP address.

dest_port

Destination port number.

up_time

Session up time.

idle_time

Session idle time.

timeout

Currently configured session idle timeout.

After the session idle time reaches the specified idle timeout, the session is removed. The client reconnects to the server based on the retry mechanism.

Examples

This example shows the output of the show raw-socket tcp sessions command:

router# show raw-socket tcp sessions
 
-------------------------------------------------- TCP Sessions ------------------------------------------------------
Interface tty vrf_name socket mode local_ip_addr local_port dest_ip_addr dest_port up_time idle_time/timeout
0/0/0 3 -------- 0 client 100.0.0.2 49574 3.3.3.3 2012 17:22:54 00:00:06/120min
0/0/1 4 -------- 1 client 100.0.0.2 47584 3.3.3.3 2012 17:22:54 00:00:06/120min
0/2/0 35 -------- 2 server ------ 5008 listening ---- ----- -----

show raw-socket tcp statistics

To display Raw Socket Transport TCP statistics for each asynchronous interface, use this command:

show raw-socket tcp statistics

 
Usage Guidelines

The displayed statistics include:

  • Interface TTY number.
  • VRF name.
  • Total Raw Socket TCP sessions currently running for this interface.
  • Total bytes received from remote peers to this interface.
  • Total output bytes from this interface to remote peers.
  • Total packetized frames from remote peers to this interface.
  • Total packetized frames from this interface to remote peers.

Examples

This example shows the output of the show raw-socket tcp statistics command:

#show raw-socket tcp statistics
 
router# show raw-socket tcp statistics
 
--------------------------------------------- Network-Serial Statistics------------------------------------------------------
Interface tty vrf_name sessions network_in_bytes network_out_bytes network_to_tty_frames tty_to_network_frames
0/0/0 3 --------- 1 168264 5153864 6232 160707
0/0/1 4 --------- 1 168264 5153864 6232 159407
0/0/6 9 --------- 1 0 0 0 0

show raw-socket udp detail

To display the details of Raw Socket Transport UDP activity, mainly for debugging purposes, use this command:

show raw-socket udp detail

 
Usage Guidelines

This command displays:

  • Line Registration and Connections

Current status for each virtual line (up to 32 lines), including the asynchronous interface currently registered with this line.

Server status. The status is always off for UDP.

Server master socket (listening socket).

Server listening port.

Total number of Raw Socket Transport UDP sessions currently running for this asynchronous interface.

Under each line there can be up to 32 sessions. For each session, this command displays the following:

[out]—Indicates that the session was initiated by this line interface (referred to as caller ).

[in]—Indicates that the session was initiated by the remote peer (referred to as called ).

l_ip—Local IP address for this session.

l_port—Local port number.

d_ip—Destination IP address.

d_port—Destination port number.

w_err—Number of socket write errors.

  • Socket Mapping

Displays information about each socket and its connection details.

  • Configuration Event List

Displays all the Raw Socket Transport UDP configurations and retry information.

Examples

This example shows the output of the show raw-socket udp detail command:

#show raw-socket udp detail
-------------------------------------- Line Registration and Connections -----------------------------------
Line 00, if: 0/0/0 vrfname: ------------tty: 3 , server status: off, socket: ---, listen port: -----, total sessions: 1
<--[out] Session 0 , socket: 0, l_ip: 0.0.0.0, l_port: 6000 , d_ip: 2.2.2.2, d_port: 7000 w_err: 0
 
---------------------------------------------- Socket Mapping ---------------------------------------------
Socket status interface tty vrf_name hwidb local_ip_addr local_port dest_ip_addr dest_port protocol
[ 0] connected 0/0/0 3 4070DB8C 0.0.0.0 6000 2.2.2.2 7000 UDP
------------------------------------------ Configuration Event List ---------------------------------------
Event_addr initiator event_action local_ip_addr local_port dest_ip_addr dest_port retry_count protocol
0x2A5E0F90 0/0/0 start client ------ 6000 172.27.164.30 7000 0 UDP

show raw-socket udp sessions

To display Raw Socket Transport UDP session details, use this command:

show raw-socket udp sessions

 
Usage Guidelines

The returned raw UDP session details include this information:

Parameter
Description

Interface

Asynchronous serial interface (and its TTY number) associated with this UDP session.

tty

vrf_name

Name of the VRF associated with this UDP session.

socket

UDP socket number.

mode

The mode is always client for UDP sessions.

local_ip_addr

Local IP address.

local_port

Local port number.

dest_ip_addr

Destination IP address.

dest_port

Destination port number.

up_time

Session up time.

idle_time

Session idle time.

timeout

Currently configured session idle timeout.

After the session idle time reaches the specified idle timeout, the session is removed. The client reconnects to the server based on the retry mechanism.

Examples

This example shows the output of the show raw-socket udp sessions command:

router# show raw-socket udp sessions
 
-------------------------------------------------- UDP Sessions ------------------------------------------------------
Interface tty vrf_name socket mode local_ip_addr local_port dest_ip_addr dest_port up_time idle_time/timeout
0/2/6 41 -------- 14 client 0.0.0.0 7000 3.3.3.3 6000 5d21h 4d04h/5 min

show raw-socket udp statistics

To display Raw Socket Transport UDP statistics for each asynchronous interface, use this command:

show raw-socket udp statistics

 
Usage Guidelines

The displayed statistics include:

  • Interface TTY number.
  • VRF name.
  • Total Raw Socket UDP sessions currently running for this interface.
  • Total bytes received from remote peers to this interface.
  • Total output bytes from this interface to remote peers.
  • Total packetized frames from remote peers to this interface.
  • Total packetized frames from this interface to remote peers.

Examples

This example shows the output of the show raw-socket udp statistics command:

#show raw-socket udp statistics
 
--------------------------------------------- Network-Serial Statistics-----------------------------------------------------
Interface tty vrf_name sessions network_in_bytes network_out_bytes network_to_tty_frames tty_to_network_frames
0/2/6 41 -------- 1 238135496 238125328 59533874 59531332
 

Obtaining Documentation and Submitting a Service Request

For information on obtaining documentation, using the Cisco Bug Search Tool (BST), submitting a service request, and gathering additional information, see What’s New in Cisco Product Documentation at: http://www.cisco.com/en/US/docs/general/whatsnew/whatsnew.html .

Subscribe to What’s New in Cisco Product Documentation , which lists all new and revised Cisco technical documentation, as an RSS feed and deliver content directly to your desktop using a reader application. The RSS feeds are a free service.