Configuring Raw Socket Transport on the Cisco ASR 903 Router


Note

Raw Socket Transport Configuration is not supported on the Cisco ASR 900 RSP3 module.


This document describes how to configure Raw Socket on the Cisco ASR 903 Router.


Note

This feature requires the use of a serial interface module, which is not included with the Cisco ASR 903 router.


Understanding Raw Socket Transport

Raw Socket Transport is a method for transporting serial data through an IP network. Raw Socket transports 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 supports point-to-point and point-to-multipoint connections.

Raw Socket Transport supports point-to-multipoint connection over an asynchronous serial line and has a built-in auto TCP connection retry mechanism.

Raw Socket Transport supports the following for each serial interface:

  • Up to 32 TCP session per interface

  • Interface configuration as a server, client, or a combination of both.

  • One server per interface, but multiple clients.

Using the Cisco ASR 903 Router with the serial interface module allows you to transport Raw Socket data over a variety of protocols, including global routing, MPLS VPN, and VRF Lite.

Text Part Number: OL-29796-01

Figures below show example topologies for raw socket using the Cisco ASR 903 Router with the serial interface module.

Raw Socket Configuration

The following sections describe how to configure Raw Socket on the Cisco ASR 903 Router with the serial interface module.

Configuring a Raw Socket Server with Global Routing Table

Use the following steps to configure the Cisco ASR 903 Router as a Raw Socket server using the global routing table.

SUMMARY STEPS

  1. configure terminal
  2. interface serial slot/subslot/port
  3. no ip address
  4. exit

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Enters configuration mode.

Step 2

interface serial slot/subslot/port

Enters configuration mode for the serial interface.

Step 3

no ip address

Disables IP processing on the interface.

Step 4

exit

Example:


Router(config-if)# exit 

Exit interface configuration mode.


Note

  • Repeat Step 2 through Step 4 to create additional serial interfaces.

  1. line [aux | console | tty | vty] line-ifc-number [ending-line-ifc-number]

    
    Router(config)# line 0/1/0
    

Identifies a specific line or range of lines for configuration and enters line configuration mode.

  1. raw-socket tcp server port [ip_address]

    
    Router(config-line)# raw-socket tcp server 5000 10.1.1.1
    

Starts the Raw Socket TCP server for a line interface.

  1. exit

Exits line configuration mode.

  1. interface Loopback number

    
    Router(config)# interface loopback0
    

Enters configuration mode on the loopback interface.

  1. ip address ip-address mask

    
    Router(config-if)# ip address 10.1.1.1 255.255.255.255
    

Specifies an IP address for the loopback address.

  1. exit

Exits interface configuration mode.

  1. router isis [area-tag]

Enables the Intermediate System-to-Intermediate System (IS-IS) routing protocol and specifies an IS-IS process.

  1. net net1 alt net2

Configures an Intermediate System-to-Intermediate System (IS-IS) network entity table (NET) for the routing process.

  1. passive-interface [default] interface-type interface-number

    
    Router(config-router)# passive-interface Loopback0 
    

Disables transmission of routing updates on the loopback interface.

  1. end

Exit configuration mode.

  1. Router(config-controller)# linecode {ami | b8zs | hdb3}

Selects the linecode type.

  • ami—Specifies Alternate Mark Inversion (AMI) as the linecode type. Valid for T1 and E1 controllers.

  • b8zs—Specifies binary 8-zero substitution (B8ZS) as the linecode type. Valid for sonet controller only. This is the default for T1 lines.

  • hdb3—Specifies high-density binary 3 (hdb3) as the linecode type. Valid for E1 controller only. This is the default for E1 lines.

Configuring a Raw Socket Client with Global Routing Table

Use the following steps to configure the Cisco ASR 903 Router as a Raw Socket client using the global routing table.

SUMMARY STEPS

  1. configure terminal
  2. interface serial slot/subslot/port
  3. no ip address
  4. exit

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Enters configuration mode.

Step 2

interface serial slot/subslot/port

Enters configuration mode for the serial interface.

Step 3

no ip address

Disables IP processing on the interface.

Step 4

exit

Exit interface configuration mode.


Note

  • Repeat Step 2 through Step 4 to create additional serial interfaces.

  1. end


Exit configuration mode.

  1. line [aux | console | tty | vty] line-ifc-number [ending-line-ifc-number]

    
    Router(config)# line 0/1/0
    

Identifies a specific line for configuration and enters line configuration collection mode.

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

    
    Router(config-line)# raw-socket tcp client 10.1.1.1 5000 172.2.2.2 9000
    

Initiates a Raw Socket TCP client session.

  1. exit

Repeat Step 6 through Step 8 to create additional line interfaces.

  1. interface loopback number

    
    Router(config)# interface loopback0
    

Enters configuration mode on the loopback interface.

  1. ip address ip-address mask

    
    Router(config-if)# ip address 172.2.2.2 255.255.255.255
    

Specifies an IP address for the loopback address.

  1. exit

Exits interface configuration mode.

  1. router isis [area-tag]

Enables the Intermediate System-to-Intermediate System (IS-IS) routing protocol and specifies an IS-IS process.

  1. net net1 alt net2

    
    Router(config-router)# net 47.0004.004d.0001.0001.0c11.1111.00
    

Configures an Intermediate System-to-Intermediate System (IS-IS) network entity table (NET) for the routing process.

  1. passive-interface [default] interface-type interface-number

    
    Router(config)# passive-interface Loopback0 
    

Disables transmission of routing updates on the loopback interface.

  1. end

Exit configuration mode.

  1. linecode {ami | b8zs | hdb3}

Selects the linecode type.

  • ami—Specifies Alternate Mark Inversion (AMI) as the linecode type. Valid for T1 and E1 controllers.

  • b8zs—Specifies binary 8-zero substitution (B8ZS) as the linecode type. Valid for sonet controller only. This is the default for T1 lines.

  • hdb3—Specifies high-density binary 3 (hdb3) as the linecode type. Valid for E1 controller only. This is the default for E1 lines.

Configuring Raw Socket Server with MPLS VPN

Use the following steps to configure the Cisco ASR 903 Router as a Raw Socket server using MPLS VPN.

SUMMARY STEPS

  1. configure terminal
  2. vrf definition vrf-name
  3. rd route-distinguisher
  4. exit
  5. address-family ipv4 [unicast] vrf vrf-name
  6. route-target [import | export | both] route-target-ext-community
  7. route-target [import | export | both] route-target-ext-community
  8. exit-address-family
  9. interface serial slot/subslot/port
  10. vrf forwarding vrf-name [downstream vrf-name2]
  11. no ip address
  12. exit
  13. interface Loopback number
  14. vrf forwarding vrf-name [downstream vrf-name2]
  15. ip address ip-address mask
  16. exit
  17. router bgp autonomous-system-number
  18. address-family vpnv4 [multicast | unicast]
  19. address-family ipv4 [unicast] vrf vrf-name
  20. redistribute connected
  21. exit-address-family
  22. end
  23. linecode {ami | b8zs | hdb3}

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Enters configuration mode.

Step 2

vrf definition vrf-name

Example:


Router(config)# vrf definition scada

Configures a virtual routing and forwarding (VRF) routing table instance and enters VRF configuration mode.

Step 3

rd route-distinguisher

Example:


Router(config-vrf)# rd 101:3

Specifies a route distinguisher (RD) to distribute endpoint information in a Virtual Private LAN Service (VPLS) configuration.

Step 4

exit

Exits VRF configuration mode.

Step 5

address-family ipv4 [unicast] vrf vrf-name

Example:


Router(config)# address-family ipv4

Enters the address family submode for configuring routing protocols.

Step 6

route-target [import | export | both] route-target-ext-community

Example:


Router(config)# route-target export 101:3

Configures the Virtual Private LAN Services (VPLS) virtual forwarding instance (VFI) to export routing information to the target VPN extended community.

Step 7

route-target [import | export | both] route-target-ext-community

Example:


Router(config)# route-target import 101:3

Configures the Virtual Private LAN Services (VPLS) virtual forwarding instance (VFI) to import routing information from the target VPN extended community.

Step 8

exit-address-family

Exits address-family configuration mode.

Step 9

interface serial slot/subslot/port

Enters configuration mode for the serial interface.

Step 10

vrf forwarding vrf-name [downstream vrf-name2]

Example:


Router(config-if)# vrf forwarding scada

Associates a Virtual Routing and Forwarding (VRF) instance or a virtual network with an interface.

Step 11

no ip address

Disables IP processing on the interface.

Step 12

exit

Exits interface configuration mode.

Step 13

interface Loopback number

Example:


Router(config)# interface loopback0

Enters configuration mode on the loopback interface.

Step 14

vrf forwarding vrf-name [downstream vrf-name2]

Example:


Router(config-if)# vrf forwarding scada

Associates a Virtual Routing and Forwarding (VRF) instance or a virtual network with an interface.

Step 15

ip address ip-address mask

Example:


Router(config-if)# ip address 10.1.1.1 255.255.255.255

Specifies an IP address for the loopback address.

Step 16

exit

Exits interface configuration mode.

Step 17

router bgp autonomous-system-number

Example:


Router(config)# router bgp 1111

Configures a Border Gateway Protocol (BGP) routing process.

Step 18

address-family vpnv4 [multicast | unicast]

Example:


Router(config-router)#address-family vpnv4

Enters address family configuration mode to configure a routing session using Virtual Private Network (VPN) Version 4 address prefixes

Step 19

address-family ipv4 [unicast] vrf vrf-name

Example:


Router(config-router-af)# address-family ipv4 vrf scada

Enters the address family submode for configuring routing protocols.

Step 20

redistribute connected

Configures the router to redistribute routes from one routing domain into another routing domain

Step 21

exit-address-family

Exits address-family configuration mode.

Step 22

end

Exit configuration mode.

Step 23

linecode {ami | b8zs | hdb3}

Selects the linecode type.

  • ami—Specifies Alternate Mark Inversion (AMI) as the linecode type. Valid for T1 and E1 controllers.

  • b8zs—Specifies binary 8-zero substitution (B8ZS) as the linecode type. Valid for sonet controller only. This is the default for T1 lines.

  • hdb3—Specifies high-density binary 3 (hdb3) as the linecode type. Valid for E1 controller only. This is the default for E1 lines.

Configuring a Raw Socket Client with MPLS VPN

Use the following steps to configure the Cisco ASR 903 Router as a Raw Socket client using MPLS VPN.

SUMMARY STEPS

  1. configure terminal
  2. vrf definition vrf-name
  3. rd route-distinguisher
  4. address-family ipv4 [unicast] vrf vrf-name
  5. route-target [import | export | both] route-target-ext-community
  6. route-target [import | export | both] route-target-ext-community
  7. exit-address-family
  8. interface serial slot/subslot/port
  9. vrf forwarding vrf-name [downstream vrf-name2]
  10. no ip address
  11. exit

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Enters configuration mode.

Step 2

vrf definition vrf-name

Example:


Router(config)# vrf definition scada

Configures a virtual routing and forwarding (VRF) routing table instance and enters VRF configuration mode.

Step 3

rd route-distinguisher

Example:


Router(config-vrf)# rd 101:3

Specifies a route distinguisher (RD) to distribute endpoint information in a Virtual Private LAN Service (VPLS) configuration.

Step 4

address-family ipv4 [unicast] vrf vrf-name

Example:


Router(config)# address-family ipv4

Enters the address family submode for configuring routing protocols.

Step 5

route-target [import | export | both] route-target-ext-community

Example:


Router(config-router-af)# route-target export 101:3

Configures the Virtual Private LAN Services (VPLS) virtual forwarding instance (VFI) to export routing information to the target VPN extended community.

Step 6

route-target [import | export | both] route-target-ext-community

Example:


Router(config-router-af)# route-target import 101:3

Configures the Virtual Private LAN Services (VPLS) virtual forwarding instance (VFI) to import routing information from the target VPN extended community.

Step 7

exit-address-family

Exits address-family configuration mode.

Step 8

interface serial slot/subslot/port

Enters configuration mode for the serial interface.

Step 9

vrf forwarding vrf-name [downstream vrf-name2]

Example:


Router(config-if)# vrf forwarding scada

Associates a Virtual Routing and Forwarding (VRF) instance or a virtual network with an interface.

Step 10

no ip address

Disables IP processing on the interface.

Step 11

exit

Exits interface configuration mode.


Note

  1. line [aux | console | tty | vty] line-ifc-number [ending-line-ifc-number]

    
    Router(config)# line 0/1/0
    

Identifies a specific line for configuration and enters line configuration collection mode.

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

    
    Router(config-line)# raw-socket tcp client 10.1.1.1 5000 172.2.2.2 9000
    

Initiates a Raw Socket TCP client session.

  1. exit

Exits line configuration mode.


Note

  • Repeat Step 6 through Step 8 to create additional line interfaces.

  1. interface Loopback number

    
    Router(config)# interface loopback0
    

Enters configuration mode on the loopback interface.

  1. vrf forwarding vrf-name [downstream vrf-name2]

    
    Router(config-if)# vrf forwarding scada
    

Associates a Virtual Routing and Forwarding (VRF) instance or a virtual network with an interface.

  1. ip address ip-address mask

    
    Router(config-if)# ip address 172.2.2.2 255.255.255.255
    

Specifies an IP address for the loopback interface.

  1. exit

Exits interface configuration mode.

  1. router bgp autonomous-system-number

    
    Router(config-router)# router bgp 1111
    

Configures a Border Gateway Protocol (BGP) routing process.

  1. address-family vpnv4 [multicast | unicast]

    
    Router(config-router)#address-family vpnv4
    

Enters address family configuration mode to configure a routing session using Virtual Private Network (VPN) Version 4 address prefixes

  1. address-family ipv4 [unicast] vrf vrf-name

    
    Router(config-router-af)# address-family ipv4 vrf scada
    

Enters the address family submode for configuring routing protocols.

  1. redistribute connected

Configures the router to redistribute routes from one routing domain into another routing domain

  1. exit-address-family

Exits address-family configuration mode.

  1. end

Exit configuration mode.

  1. linecode {ami | b8zs | hdb3}

Selects the linecode type.

  • ami—Specifies Alternate Mark Inversion (AMI) as the linecode type. Valid for T1 and E1 controllers.

  • b8zs—Specifies binary 8-zero substitution (B8ZS) as the linecode type. Valid for sonet controller only. This is the default for T1 lines.

  • hdb3—Specifies high-density binary 3 (hdb3) as the linecode type. Valid for E1 controller only. This is the default for E1 lines.

Configuring a Raw Socket Server with VRF Lite

Use the following steps to configure the Cisco ASR 903 Router as a Raw Socket server using VRF Lite.

SUMMARY STEPS

  1. configure terminal
  2. vrf definition vrf-name
  3. rd route-distinguisher
  4. address-family ipv4 [unicast] vrf vrf-name
  5. route-target [import | export | both] route-target-ext-community
  6. route-target [import | export | both] route-target-ext-community
  7. exit-address-family
  8. interface serial slot/subslot/port
  9. vrf forwarding vrf-name [downstream vrf-name2]
  10. no ip address
  11. exit
  12. line [aux | console | tty | vty] line-ifc-number [ending-line-ifc-number]
  13. raw-socket tcp server port [ip_address]
  14. exit
  15. interface GigabitEthernet slot /subslot /port
  16. encapsulation dot1q vlan-id
  17. vrf forwarding vrf-name [downstream vrf-name2]
  18. ip address ip-address mask
  19. exit
  20. router bgp autonomous-system-number
  21. address-family ipv4 [unicast] vrf vrf-name
  22. redistribute connected
  23. neighbor { ip-address | ipv6-address% | peer-group-name } remote-as autonomous-system-number [ alternate-as autonomous-system-number ... ]
  24. neighbor { ip-address | peer-group-name | ipv6-address% } activate Router(config-router-af)# neighbor 10.1.1.2 activate
  25. exit-address-family
  26. end
  27. linecode {ami | b8zs | hdb3}

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Enters configuration mode.

Step 2

vrf definition vrf-name

Example:


Router(config)# vrf definition scada

Configures a virtual routing and forwarding (VRF) routing table instance and enters VRF configuration mode.

Step 3

rd route-distinguisher

Example:


Router(config-vrf)# rd 100:3

Specifies a route distinguisher (RD) to distribute endpoint information in a Virtual Private LAN Service (VPLS) configuration.

Step 4

address-family ipv4 [unicast] vrf vrf-name

Example:


Router(config)# address-family ipv4

Enters the address family submode for configuring routing protocols.

Step 5

route-target [import | export | both] route-target-ext-community

Example:


Router(config-router-af)# route-target export 100:3

Configures the Virtual Private LAN Services (VPLS) virtual forwarding instance (VFI) to export routing information to the target VPN extended community.

Step 6

route-target [import | export | both] route-target-ext-community

Example:


Router(config-router-af)# route-target import 100:3

Configures the Virtual Private LAN Services (VPLS) virtual forwarding instance (VFI) to import routing information from the target VPN extended community.

Step 7

exit-address-family

Exits address-family configuration mode.

Step 8

interface serial slot/subslot/port

Enters configuration mode for the serial interface.

Step 9

vrf forwarding vrf-name [downstream vrf-name2]

Example:


Router(config-if)# vrf forwarding scada

Associates a Virtual Routing and Forwarding (VRF) instance or a virtual network with an interface.

Step 10

no ip address

Disables IP processing on the interface.

Step 11

exit

Exits interface configuration mode.

Step 12

line [aux | console | tty | vty] line-ifc-number [ending-line-ifc-number]

Example:


Router(config)# line 0/1/0

Identifies a specific line for configuration and enters line configuration collection mode.

Step 13

raw-socket tcp server port [ip_address]

Example:


Router(config-line)# raw-socket tcp server 5000 10.1.1.1

Starts the Raw Socket TCP server for a line interface.

Step 14

exit

Exits line configuration mode.

Step 15

interface GigabitEthernet slot /subslot /port

Example:


Router(config)# interface GigabitEthernet0/0.10

Enters configuration mode on the Gigabit Ethernet interface.

Step 16

encapsulation dot1q vlan-id

Example:


Router(config-if)# encapsulation dot1q 10

Enables IEEE 802.1Q encapsulation of traffic on the interface.

Step 17

vrf forwarding vrf-name [downstream vrf-name2]

Example:


Router(config-if)# vrf forwarding scada

Associates a Virtual Routing and Forwarding (VRF) instance or a virtual network with an interface.

Step 18

ip address ip-address mask

Example:


Router(config-if)# ip address 10.1.1.1 255.255.255.0

Specifies an IP address for the Gigabit Ethernet interface.

Step 19

exit

Exits interface configuration mode.

Step 20

router bgp autonomous-system-number

Example:


Router(config-router)# router bgp 100

Configures a Border Gateway Protocol (BGP) routing process.

Step 21

address-family ipv4 [unicast] vrf vrf-name

Example:


Router(config)# address-family ipv4 vrf scada

Enters the address family submode for configuring routing protocols.

Step 22

redistribute connected

Configures the router to redistribute routes from one routing domain into another routing domain

Step 23

neighbor { ip-address | ipv6-address% | peer-group-name } remote-as autonomous-system-number [ alternate-as autonomous-system-number ... ]

Example:


Router(config-router-af)# neighbor 10.1.1.2 remote-as 1111

Adds an entry to the BGP or multiprotocol BGP neighbor table.

Step 24

neighbor { ip-address | peer-group-name | ipv6-address% } activate Router(config-router-af)# neighbor 10.1.1.2 activate

Enables the exchange of information with a Border Gateway Protocol (BGP) neighbor.

Step 25

exit-address-family

Exits address-family configuration mode.

Step 26

end

Exit configuration mode.

Step 27

linecode {ami | b8zs | hdb3}

Selects the linecode type.

  • ami—Specifies Alternate Mark Inversion (AMI) as the linecode type. Valid for T1 and E1 controllers.

  • b8zs—Specifies binary 8-zero substitution (B8ZS) as the linecode type. Valid for sonet controller only. This is the default for T1 lines.

  • hdb3—Specifies high-density binary 3 (hdb3) as the linecode type. Valid for E1 controller only. This is the default for E1 lines.

Configuring a Raw Socket Client with VRF Lite

Use the following steps to configure the Cisco ASR 903 Router as a Raw Socket client using VRF Lite.

SUMMARY STEPS

  1. configure terminal
  2. vrf definition vrf-name
  3. rd route-distinguisher
  4. address-family ipv4 [unicast]
  5. route-target [import | export | both] route-target-ext-community
  6. route-target [import | export | both] route-target-ext-community
  7. exit-address-family
  8. interface serial slot/subslot/port
  9. vrf forwarding vrf-name [downstream vrf-name2]
  10. no ip address
  11. exit

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Enters configuration mode.

Step 2

vrf definition vrf-name

Example:


Router(config)# vrf definition scada

Configures a virtual routing and forwarding (VRF) routing table instance and enters VRF configuration mode.

Step 3

rd route-distinguisher

Example:


Router(config-vrf)# rd 100:3

Specifies a route distinguisher (RD) to distribute endpoint information in a Virtual Private LAN Service (VPLS) configuration.

Step 4

address-family ipv4 [unicast]

Enters the address family submode for configuring routing protocols.

Step 5

route-target [import | export | both] route-target-ext-community

Example:


Router(config-router-af)# route-target export 100:3

Configures the Virtual Private LAN Services (VPLS) virtual forwarding instance (VFI) to export routing information to the target VPN extended community.

Step 6

route-target [import | export | both] route-target-ext-community

Example:


Router(config-router-af)# route-target import 100:3

Configures the Virtual Private LAN Services (VPLS) virtual forwarding instance (VFI) to import routing information from the target VPN extended community.

Step 7

exit-address-family

Exits address-family configuration mode.

Step 8

interface serial slot/subslot/port

Enters configuration mode for the serial interface.

Step 9

vrf forwarding vrf-name [downstream vrf-name2]

Example:


Router(config-if)# vrf forwarding scada

Associates a Virtual Routing and Forwarding (VRF) instance or a virtual network with an interface.

Step 10

no ip address

Disables IP processing on the interface.

Step 11

exit

Exits interface configuration mode.


Note

  1. line [aux | console | tty | vty] line-ifc-number [ending-line-ifc-number]

    
    Router(config)# line 0/1/0
    

Identifies a specific line for configuration and enters line configuration collection mode.

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

    
    Router(config-line)# raw-socket tcp client 10.1.1.1 5000 172.1.1.1 9000
    

Initiates a Raw Socket TCP client session.

  1. exit

Exits line configuration mode.


Note

  1. interface GigabitEthernet slot /subslot /port

    
    Router(config)# interface GigabitEthernet0/0/0
    

Enters configuration mode on the Gigabit Ethernet interface.

  1. encapsulation dot1q vlan-id

    
    Router(config-if)# encapsulation dot1q 10
    

Enables IEEE 802.1Q encapsulation of traffic on the interface.

  1. vrf forwarding vrf-name [downstream vrf-name2]

    
    Router(config-if)# vrf forwarding scada
    

Associates a Virtual Routing and Forwarding (VRF) instance or a virtual network with an interface.

  1. ip address ip-address mask

    
    Router(config-if)# ip address 172.1.1.1 255.255.255.0
    

Specifies an IP address for the Gigabit Ethernet interface.

  1. exit

Exits interface configuration mode.

  1. router bgp autonomous-system-number

    
    Router(config-router)# router bgp 200
    

Configures a Border Gateway Protocol (BGP) routing process.

  1. address-family ipv4 [unicast] vrf vrf-name

    
    Router(config)# address-family ipv4 vrf scada
    

Enters the address family submode for configuring routing protocols.

  1. redistribute connected

Configures the router to redistribute routes from one routing domain into another routing domain

  1. neighbor { ip-address | ipv6-address% | peer-group-name } remote-as autonomous-system-number [ alternate-as autonomous-system-number ... ]

    
    Router(config-router-af)# neighbor 172.1.1.2 remote-as 1111
    

Adds an entry to the BGP or multiprotocol BGP neighbor table.

  1. neighbor { ip-address | peer-group-name | ipv6-address% } activate Router(config-router-af)# neighbor 172.1.1.2 activate

Enables the exchange of information with a Border Gateway Protocol (BGP) neighbor.

  1. exit-address-family

Exits address-family configuration mode.

  1. end

Exit configuration mode.

  1. linecode {ami | b8zs | hdb3}

Selects the linecode type.

  • ami—Specifies Alternate Mark Inversion (AMI) as the linecode type. Valid for T1 and E1 controllers.

  • b8zs—Specifies binary 8-zero substitution (B8ZS) as the linecode type. Valid for sonet controller only. This is the default for T1 lines.

  • hdb3—Specifies high-density binary 3 (hdb3) as the linecode type. Valid for E1 controller only. This is the default for E1 lines.

Line Commands

Table below summarizes commands that you can apply to lines.

Table 1. Line Commands
databits {5 | 6 | 7 | 8 }

Sets the number of data bits per character that are interpreted and generated by the router hardware. The default value is 8.

line [aux | console | tty |vty] | line-ifc-number [ending-line-ifc-number ]

Router(config)# line 0/1/0

Identifies a specific line for configuration and enters line configuration collection mode.

parity {none | even | odd | space | mark}

Configures the router to generate a parity bit. The default value is none.

raw-socket packet-length packet_size

Router(config-line)# raw-socket packet-length 32

Sets the packet length that the serial driver uses to packet size the serial bytes into TCP frames. Valid values are 2–1400 and indicate bytes.

Note 
The packet length must be configured, else the feature may not work.
raw-socket packet-timer packet_timer

Router(config-line)# raw-socket packet-timer 3

Sets the packet timer that the serial driver uses when packetizing serial bytes into TCP frames. Values are in milliseconds.

raw-socket special-char special_character

Router(config-line)# raw-socket special-char 10

(Optional) Sets the special character that triggers the packetization of incoming bytes.

raw-socket tcp idle-timeout session_timeout

Router(config-line)# raw-socket tcp idle-timeout 5

Sets the Raw Socket TCP session timeout for a line interface. By default, the session idle timeout is 5 minutes.

raw-socket tcp server port [ ip_address ]

Router(config-line)# raw-socket tcp server 5000 10.1.1.1

Starts the Raw Socket TCP server for a line interface.

speed {bps}

Configures the transmit and receive speed of a line interface. Valid values are in bps and include 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 32000, 8400, 48000, 56000, 57600, 64000, 72000, 115200, 128000, and 230400 bps.

The default value is 9600 bps.

stopbits { 1 | 1.5 | 2}

Sets the number of the stop bits transmitted per byte. The default value is 2.

linecode { ami | b8zs | hdb3}

Selects the linecode type.

  • ami—Specifies Alternate Mark Inversion (AMI) as the linecode type. Valid for T1 and E1 controllers.

  • b8zs—Specifies binary 8-zero substitution (B8ZS) as the linecode type. Valid for sonet controller only. This is the default for T1 lines.

  • hdb3—Specifies high-density binary 3 (hdb3) as the linecode type. Valid for E1 controller only. This is the default for E1 lines.

Troubleshooting Commands

You can use the following commands to display information for troubleshooting raw socket:

  • clear raw-socket tcp —Clears Raw Socket TCP statistics for a specific TTY interface or for all asynchronous interfaces.

  • debug raw-socket driver event —Enables Raw Socket driver event debugging.

  • debug raw-socket driver packet—Enables debugging for issues related to Raw Socket driver packets.

  • debug raw-socket tcp event —Enables debugging for issues related to Raw Socket TCP sessions

  • debug raw-socket tcp packet —raw TCP packets at the socket level

  • show raw-socket tcp detail —Displays the details of Raw Socket TCP activity, mainly for debugging purposes

  • show raw-socket tcp sessions —Displays Raw Socket TCP session details

  • show raw-socket tcp statistic —Displays Raw Socket TCP statistics for each asynchronous interface

Sample Show Command Output

The following examples contain output from these commands.

Router# show raw-socket tcp detail

--------------------------------------------- Line Registration and Connections -------------------------------------

Line 00, if: 0/0/0 tty: 3 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0 , socket: 0, l_ip: 10.0.0.68, l_port: 1 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 01, if: 0/0/1 tty: 4 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0 , socket: 1, l_ip: 10.0.0.68, l_port: 2 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 02, if: 0/0/2 tty: 5 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0 , socket: 2, l_ip: 10.0.0.68, l_port: 3 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 03, if: 0/0/3 tty: 6 , s erver status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0 , socket: 3, l_ip: 10.0.0.68, l_port: 4 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 04, if: 0/0/4 tty: 7 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0 , socket: 4, l_ip: 10.0.0.68, l_port: 5 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 05, if: 0/0/5 tty: 8 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0 , socket: 5, l_ip: 10.0.0.68, l_port: 6 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 06, if: 0/0/6 tty: 9 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0 , socket: 6, l_ip: 10.0.0.68, l_port: 7 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 07, if: 0/0/7 tty: 10 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0 , socket: 7, l_ip: 10.0.0.68, l_port: 8 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 08, if: 0/1/0 tty: 19 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0 , socket: 8, l_ip: 10.0.0.68, l_port: 9 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 09, if: 0/1/1 tty: 20 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0 , socket: 9, l_ip: 10.0.0.68, l_port: 10 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 10, if: 0/1/2 tty: 21 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0, socket: 10, l_ip: 10.0.0.68, l_port: 11 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 11, if: 0/1/3 tty: 22 , server status: off, socket: ---, listen port: -----, total sessions: 1

<--[out] Session 0, socket: 11, l_ip: 10.0.0.68, l_port: 12 , d_ip: 172.1.1.1, d_port: 1 w_err: 0

Line 12, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 13, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 14, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 15, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 16, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 17, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 18, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 19, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 20, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 21, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 22, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 23, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 24, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 25, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 26, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 27, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 28, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 29, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 30, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

Line 31, if: ----- tty: ---, server status: off, socket: ---, listen port: -----, total sessions: 0

--------------------------------------------------------- Socket Mapping ---------------------------------------------------

Socket status interface tty   hwidb      local_ip_addr local_port dest_ip_addr dest_port

[ 0] connected 0/0/0     3     29C1CA98   10.0.0.68       1     172.1.1.1 1

[ 1] connected 0/0/1     4     29C1D7FC   10.0.0.68       2     172.1.1.1 1

[ 2] connected 0/0/2     5     31156BBC   10.0.0.68       3     172.1.1.1 1

[ 3] connected 0/0/3     6     2A36BFF0   10.0.0.68       4      172.1.1.1 1

[ 4] connected 0/0/4     7     411EEE10   10.0.0.68       5      172.1.1.1 1

[ 5] connected 0/0/5     8     29C20C28   10.0.0.68       6     172.1.1.1 1

[ 6] connected 0/0/6     9     29C2198C   10.0.0.68       7      172.1.1.1 1

[ 7] connected 0/0/7     10    3115987C   10.0.0.68       8      172.1.1.1 1

[ 8] connected 0/1/0     19    2A36EE40   10.0.0.68       9      172.1.1.1 1

[ 9] connected 0/1/1     20    319D668C   10.0.0.68      10      172.1.1.1 1

[  10] connected 0/1/2     21    29C24388   10.0.0.68      11      172.1.1.1 1

[ 11] connected 0/1/3 22 41B40454 10.0.0.68 12 172.1.1.1 1

------------------------------------------------------ Configuration Event List --------------------------------------------

Event_addr initiator event_action   local_ip_addr local_port dest_ip_addr dest_port retry_count

0x30E28C2C 0/0/0    start client   ------           1          172.1.1.1        1          0

0x30E28BC4 0/0/1    start client   ------          2 172.1.1.1        1          0

0x30E28B5C 0/0/2    start client   ------          3 172.1.1.1        1          0

0x30E28AF4 0/0/3    start client   ------          4         172.1.1.1        1          0

0x30E28A8C 0/0/4 start client  ------          5            172.1.1.1        1          0

0x30E28A24 0/0/5 start client  ------            6          172.1.1.1        1          0

0x30E287B4 0/0/6 start client   ------          7            172.1.1.1        1          0

0x30E2881C 0/0/7 start client   ------          8            172.1.1.1        1    0

0x30E28884 0/1/0 start client   ------          9            172.1.1.1        1          0

0x30E288EC 0/1/1 start client   ------ 10           172.1.1.1       1 0

0x30E28954 0/1/2 start client   ------ 11           172.1.1.1       1 0

0x30E289BC 0/1/3 start client   ------ 12           172.1.1.1       1 0

Router# show raw-socket tcp sessions

-------------------------------------------------------------- TCP Sessions --------------------------------------------------------

Interface   tty socket    mode     local_ip_addr     local_port      dest_ip_addr      dest_port    up_time   idle_time/timeout

0/0/0 3 0 client 10.0.0.68 1 172.1.1.1 1 02:00:37 00:00:00/5 min

0/0/1 4 1 client 10.0.0.68 2 172.1.1.1 1 02:00:37 00:00:00/5 min

0/0/2 5 2 client 10.0.0.68 3 172.1.1.1 1 02:00:37 00:00:00/5 min

0/0/3 6 3 client 10.0.0.68 4 172.1.1.1 1 02:00:37 00:00:00/5 min

0/0/4 7 4 client 10.0.0.68 5 172.1.1.1 1 02:00:37 00:00:00/5 min

0/0/5 8 5 client 10.0.0.68 6 172.1.1.1 1 02:00:37 00:00:00/5 min

0/0/6 9 6 client 10.0.0.68 7 172.1.1.1 1 01:51:40 00:00:00/5 min

0/0/7  10 7 client 10.0.0.68 8 172.1.1.1 1 01:51:05 00:00:00/5 min

0/1/0  19 8 client 10.0.0.68 9 172.1.1.1 1 01:50:55 00:00:00/5 min

0/1/1  20 9 client 10.0.0.68    10 172.1.1.1 1 01:50:43 00:00:00/5 min

0/1/2  21      10 client 10.0.0.68   11 172.1.1.1 1 01:46:37 00:00:00/5 min

0/1/3  22      11 client 10.0.0.68  12 172.1.1.1 1 01:46:28 00:00:00/5 min

Router# show raw-socket tcp statistic

---------------------------------------------------- TCP-Serial Statistics ---------------------------------------------

Interface tty sessions tcp_in_bytes tcp_out_bytes tcp_to_tty_frames tty_to_tcp_frames

0/0/0      3 1 9471 287847 351 351

0/0/1  4 1 9471 287847 351 351

0/0/2  5 1 9471 287847 351 351

0/0/3  6 1 9471 287847 351 351

0/0/4  7 1 9471 287847 351 351

0/0/5  8 1 9471 287847 351 351

0/0/6  9 1 9471 287847 351 351

0/0/7   10 1 9471 287847 351 351

0/1/0   19 1 9471 287847 351 351

0/1/1   20 1 9471 287847 351 351

0/1/2   21 1 9471 287847 351 351

0/1/3   22 1 9471 287847 351 351

Example for Raw Socket Global Routing Table Sample Configuration

Server Configuration


interface Serial0/1/0
no ip address
!
line 0/1/0
 raw-socket tcp server 5000 10.1.1.1
 raw-socket packet-timer 3
 raw-socket tcp idle-timeout 5


interface Loopback0
 ip address 10.1.1.1 255.255.255.255

router isis grid-ops
  net 49.2222.0000.0000.0005.00
  passive-interface Loopback0

Client Configuration


interface Serial0/1/0
no ip address
!
interface Serial0/1/1
no ip address
!
line 0/1/0
 raw-socket tcp client 10.1.1.1 5000 2.2.2.2 9000
 raw-socket packet-length 32
 raw-socket tcp idle-timeout 5
!
line 0/1/1
 raw-socket tcp client 10.1.1.1 5000 2.2.2.2 9001
 raw-socket packet-length 32
 raw-socket tcp idle-timeout 5

interface Loopback0
 ip address 172.2.2.2 255.255.255.255

router isis grid-ops
  net 49.2222.0000.0000.0005.00
  passive-interface Loopback0

Example for Raw Socket MPLS VPN Sample Configuration

Server Configuration


interface Serial0/1/0
 vrf forwarding scada
no ip address
!
line 0/1/0
 raw-socket tcp server 5000 10.1.1.1
 raw-socket packet-timer 3
 raw-socket tcp idle-timeout 5

interface Loopback100
 vrf forwarding scada
 ip address 10.1.1.1 255.255.255.255

vrf definition scada
 rd 100:100
 !
 address-family ipv4
  route-target export 1111:101
  route-target import 1111:101
 exit-address-family

router bgp 1111
 !
 address-family vpnv4
 !
 address-family ipv4 vrf scada
  redistribute connected
 exit-address-family

Client Configuration


interface Serial0/1/0
 vrf forwarding scada
no ip address
!
interface Serial0/1/1
 vrf forwarding scada
no ip address
!
line 0/1/0
 raw-socket tcp client 10.1.1.1 5000 2.2.2.2 9000
 raw-socket packet-length 32
 raw-socket tcp idle-timeout 5
!
line 0/1/1
 raw-socket tcp client 10.1.1.1 5000 2.2.2.2 9001
 raw-socket packet-length 32
 raw-socket tcp idle-timeout 5

interface Loopback100
 vrf forwarding scada
 ip address 172.2.2.2 255.255.255.255

vrf definition scada
 rd 100:100
 !
 address-family ipv4
  route-target export 1111:101
  route-target import 1111:101
 exit-address-family

router bgp 1111
 !
 address-family vpnv4
 !
 address-family ipv4 vrf scada
  redistribute connected
 exit-address-family

Example for Raw Socket VRF Lite Sample Configuration

Server Configuration


interface Serial0/1/0
 vrf forwarding scada
no ip address
!
line 0/1/0
 raw-socket tcp server 5000 10.1.1.1
 raw-socket packet-timer 3
 raw-socket tcp idle-timeout 5

interface GigabitEthernet0/0.10
 encapsulation dot1q 10
 vrf forwarding scada
 ip address 10.1.1.1 255.255.255.0

vrf definition scada
 rd 100:100
 !
 address-family ipv4
  route-target export 100:101
  route-target import 100:101
 exit-address-family

router bgp 100
 address-family ipv4 vrf scada
  redistribute connected
  neighbor 10.1.1.2 remote-as 1111
  neighbor 10.1.1.2 activate
 exit-address-family

Client Configuration


interface Serial0/1/0
 vrf forwarding scada
no ip address
!
interface Serial0/1/1
 vrf forwarding scada
no ip address
!
line 0/1/0
 raw-socket tcp client 10.1.1.1 5000 20.1.1.1 9000
 raw-socket packet-length 32
 raw-socket tcp idle-timeout 5
!
line 0/1/1
 raw-socket tcp client 10.1.1.1 5000 20.1.1.1 9001
 raw-socket packet-length 32
 raw-socket tcp idle-timeout 5

interface GigabitEthernet0/0.10
 encapsulation dot1q 10
 vrf forwarding scada
 ip address 172.1.1.1 255.255.255.0

vrf definition scada
 rd 100:100
 !
 address-family ipv4
  route-target export 100:101
  route-target import 100:101
 exit-address-family

router bgp 200
 address-family ipv4 vrf scada
  redistribute connected
  neighbor 172.1.1.2 remote-as 1111
  neighbor 172.1.1.2 activate
 exit-address-family

Related Documentation

For more information about the Cisco ASR 903 Router, refer to the following documents: