Configuring the Serial Network Interface Module

About the Asynchronous/Synchronous Serial Network Interface Module

The 8-port Asynchronous/Synchronous Network Interface Module (NIM) IRM-NIM-RS232 provides asynchronous/synchronous serial connections supporting EIA-RS232 for the Cisco IR8340 Router.

The IR8340 router has two NIM slots, 0/2 and 0/3. The serial NIMs can be installed in these two slots.

Each RS-232 Serial Module has 8 serial interfaces. The interface numers are:

  • serial 0/2/0 - serial 0/2/7—If the serial module is in slot 0/2.

  • serial 0/3/0 - serial 0/3/7—If the serial module is in slot 0/3.

The following features are supported:

  • Supports DCE and DTE.

  • Each serial port can be configured as either Asynchronous or Synchronous mode.

  • A maximum speed of 256 kbps is supported for RS232 Synchronous port.

  • A maximum speed of 230.4 kbps is supported for Asynchronous port.

Configuring the Serial Interface to Sync or Async Mode

By using the Physical Layer mode option, you can configure the serial interface to Synchronous or Asynchronous mode as needed. By default it will be in Synchronous mode. Use the following commands to configure the serial interface:

interface serial slot/subslot/port

physical-layer {async |sync }

Router(config)#interface Serial0/3/0
Router(config-if)#physical-layer ?
  async  Configure asynchronous physical layer on serial interface
  sync   Configure synchronous physical layer on serial interface

Router(config-if)#

Configuring Synchronous Serial Ports

After the serial port mode is configured as synchronous mode, connect the DCE type serial cable to one side and DTE cable on the other side. The serial link will come up.

Checking DCE and DTE Cable Type

After the serial port mode is configured as Sync, connect the DCE type serial cable to one side and DTE cable on the other side. The serial link will come up. Use the following command to check cable type:

Router1#show controllers Serial 0/3/0

Serial0/3/0 - (IRM-NIM-RS232) is administratively down
 Encapsulation : HDLC
 Cable type: RS-232 DCE
 mtu 1500, max_buffer_size 1524, max_pak_size 1656 enc 132
 loopback: Off,  crc: 16, invert_data: Off
 nrzi: Off, idle char: Flag
 dce_terminal_timing_enable: Off ignore_dtr: Off
 tx_clockrate: 64000bps, rx_clockrate: 64000bps, serial_clock_index: 0
 serial_restartdelay:60000,  serial_restartdelay_def:60000

     RTS up, CTS down, DTR up, DCD down, DSR down

Router1#

Router2#show controllers Serial 0/3/1

Serial0/3/1 - (IRM-NIM-RS232) is administratively down
 Encapsulation : HDLC
 Cable type: RS-232 DTE
 mtu 1500, max_buffer_size 1524, max_pak_size 1656 enc 132
 loopback: Off,  crc: 16, invert_data: Off
 nrzi: Off, idle char: Flag
 tx_invert_clk: Off, ignore_dcd: Off
 tx_clockrate: 31998bps, rx_clockrate: 31998bps, rx_clock_threshold: 0
 serial_restartdelay:60000,  serial_restartdelay_def:60000

     RTS down, CTS down, DTR down, DCD down, DSR down

Router2#

The show interfaces serial0/3/0 controller command can also be used to check the cable type.

Specifying Synchronous Serial Encapsulation

The synchronous serial interfaces support the following serial encapsulation methods:

  • Frame-Relay

  • PPP (chap and pap)

  • HDLC (default)

Use the following command to configure synchronous serial encapsulation. To remove the configuration, use the no form of the command.

[no] encapsulation {frame-relay|ppp|hdlc}

DCE and DTE Configuration for HDLC Encapsulation

The following examples show the basic DCE and DTE configuration for HDLC encapsulation.

U1 configuration (DCE Side)
======================
U1#show running-config interface Serial0/3/1
Building configuration...
Current configuration : 99 bytes
!
interface Serial0/3/1
ip address 31.31.31.1 255.255.255.0
no keepalive
clock rate 256000
end

U1#show interfaces Serial0/3/1
Serial0/3/1 is up, line protocol is up
Hardware is IRM-NIM-RS232
Internet address is 31.31.31.1/24
MTU 1500 bytes, BW 256 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 2/255
Encapsulation HDLC, loopback not set
Keepalive not set
Last input 00:00:31, output 00:00:09, output hang never

U1#ping 31.31.31.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 31.31.31.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/8 ms
U2 configuration (DTE Side)
======================
U2#show running-config interface Serial0/3/1
Building configuration...
Current configuration : 80 bytes
!
interface Serial0/3/1
ip address 31.31.31.2 255.255.255.0
no keepalive
end

U2#show interfaces Serial0/3/1
Serial0/3/1 is up, line protocol is up
Hardware is IRM-NIM-RS232
Internet address is 31.31.31.2/24
MTU 1500 bytes, BW 2000 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set
Keepalive not set
Last input 00:00:33, output 00:00:10, output hang never

U2#ping 31.31.31.1
*Jan 26 15:29:49.206 IST: %LINK-3-UPDOWN: Interface Serial0/3/6, changed state to down
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 31.31.31.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 7/8/9 ms

DCE and DTE Configuration for PPP (CHAP) Encapsulation

The following examples show the basic DCE and DTE configuration for PPP (CHAP) encapsulation.

U1 configuration (DCE side)
=================================
U1#show running-config interface Serial0/3/2
Building configuration...
Current configuration : 118 bytes
!
interface Serial0/3/2
ip address 32.32.32.1 255.255.255.0
encapsulation ppp
no keepalive
clock rate 256000
end
U1#show interfaces Serial0/3/2
Serial0/3/2 is up, line protocol is up
Hardware is IRM-NIM-RS232
Internet address is 32.32.32.1/24
MTU 1500 bytes, BW 256 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, LCP Open
Open: IPCP, CDPCP, loopback not set
Keepalive not set
Last input 00:00:13, output 00:00:13, output hang never

===configuration for ppp-chap authentication=======
U1(config)#username u1 secret userpassword
U1#show running-config interface Serial0/3/1
Building configuration...
Current configuration : 143 bytes
!
interface Serial0/3/1
ip address 31.31.31.2 255.255.255.0
encapsulation ppp
no keepalive
ppp authentication chap
clock rate 256000
end

U1#ping 32.32.32.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 32.32.32.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/8 ms
U2 configuration (DTE Side)
======================
U2#show running-config interface Serial0/3/2
Building configuration...
Current configuration : 99 bytes
!
interface Serial0/3/2
ip address 32.32.32.2 255.255.255.0
encapsulation ppp
no keepalive
end

U2#show interfaces Serial0/3/2
Serial0/3/2 is up, line protocol is up
Hardware is IRM-NIM-RS232
Internet address is 32.32.32.2/24
MTU 1500 bytes, BW 2000 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, LCP Open
Open: IPCP, CDPCP, loopback not set
Keepalive not set
Last input 00:00:08, output 00:00:15, output hang never

===configuration for ppp-chap authentication=======
U2(config)#username U1 secret userpassword
U2#show running-config interface Serial0/3/1
Building configuration...
Current configuration : 124 bytes
!
interface Serial0/3/1
ip address 31.31.31.2 255.255.255.0
encapsulation ppp
no keepalive
ppp authentication chap
end

U2#ping 32.32.32.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 32.32.32.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/9 ms

DCE and DTE Configuration for PPP (PAP) Encapsulation

The following examples show the basic DCE and DTE configuration for PPP (PAP) encapsulation.

U1 configuration (DCE side)
=================================
U1#show running-config interface Serial0/3/2
Building configuration...
Current configuration : 118 bytes
!
interface Serial0/3/2
ip address 32.32.32.1 255.255.255.0
encapsulation ppp
no keepalive
clock rate 256000
end
U1#show interfaces Serial0/3/2
Serial0/3/2 is up, line protocol is up
Hardware is IRM-NIM-RS232
Internet address is 32.32.32.1/24
MTU 1500 bytes, BW 256 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, LCP Open
Open: IPCP, CDPCP, loopback not set
Keepalive not set
Last input 00:00:13, output 00:00:13, output hang never

===configuration for ppp-pap authentication=======
U1(config)#username u1 secret userpassword
U1#show running-config interface Serial0/3/1
Building configuration...
Current configuration : 181 bytes
!
interface Serial0/3/1
ip address 31.31.31.1 255.255.255.0
encapsulation ppp
ppp authentication pap
ppp pap sent-username Sumatra-1 password 0 userpassword
clock rate 256000
end
U1#

U1#ping 32.32.32.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 32.32.32.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/8 ms
U2 configuration (DTE Side)
======================
U2#show running-config interface Serial0/3/2
Building configuration...
Current configuration : 99 bytes
!
interface Serial0/3/2
ip address 32.32.32.2 255.255.255.0
encapsulation ppp
no keepalive
end

U2#show interfaces Serial0/3/2
Serial0/3/2 is up, line protocol is up
Hardware is IRM-NIM-RS232
Internet address is 32.32.32.2/24
MTU 1500 bytes, BW 2000 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, LCP Open
Open: IPCP, CDPCP, loopback not set
Keepalive not set
Last input 00:00:08, output 00:00:15, output hang never

===configuration for ppp-pap authentication=======
U2(config)#username U1 secret userpassword
U2#show running-config interface Serial0/3/1
Building configuration...
Current configuration : 176 bytes
!
interface Serial0/3/1
ip address 31.31.31.2 255.255.255.0
encapsulation ppp
no keepalive
ppp authentication pap
ppp pap sent-username Sumatra-2 password 0 userpassword
end
U2

U2#ping 32.32.32.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 32.32.32.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/9 ms

DCE and DTE Configuration for Frame Relay Encapsulation

The following examples show the basic DCE and DTE configuration for Frame Relay encapsulation.

U1 configuration (DCE side)
=================================
U1#show running-config interface Serial0/3/3
Building configuration...
Current configuration : 158 bytes
!
interface Serial0/3/3
ip address 33.33.33.1 255.255.255.0
encapsulation frame-relay
no keepalive
clock rate 256000
frame-relay interface-dlci 100
end
U1#show interfaces Serial0/3/3
Serial0/3/3 is up, line protocol is up
Hardware is IRM-NIM-RS232
Internet address is 33.33.33.1/24
MTU 1500 bytes, BW 256 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation FRAME-RELAY, loopback not set
Keepalive not set
FR SVC disabled, LAPF state down
Broadcast queue 0/64, broadcasts sent/dropped 1/0, interface broadcasts 0
Last input 00:00:16, output 00:00:16, output hang never

U1#ping 33.33.33.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 33.33.33.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/9 ms
U2 configuration (DTE Side)
======================
U2#show running-config interface Serial0/3/3
Building configuration...
Current configuration : 139 bytes
!
interface Serial0/3/3
ip address 33.33.33.2 255.255.255.0
encapsulation frame-relay
no keepalive
frame-relay interface-dlci 100
end
U2#show interfaces Serial0/3/3
Serial0/3/3 is up, line protocol is up
Hardware is IRM-NIM-RS232
Internet address is 33.33.33.2/24
MTU 1500 bytes, BW 2000 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation FRAME-RELAY, loopback not set
Keepalive not set
FR SVC disabled, LAPF state down
Broadcast queue 0/64, broadcasts sent/dropped 1/0, interface broadcasts 0
Last input 00:05:05, output 00:05:05, output hang never

U2#ping 33.33.33.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 33.33.33.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/8 ms

Serial Synchronous Show and Debug Commands

This section provides show and debug commands of the serial synchronous interfaces.

  1. Connect to the NIM console using Telnet or Secure Shell (SSH) and open a session to the device using the hw-module session slot/subslot command in privileged EXEC mode.

    To exit the session, press Ctrl-a and Ctrl-q from your keyboard.

  2. show platform hardware subslot slot-number module device ge-stats

  3. show platform hardware subslot slot-number module host-if status

  4. show platform hardware subslot slot-number module host-if statistics

  5. show platform hardware subslot slot-number module device ?

    • help: the current information

    • scc-info: module serial information

    • scc-stats: module serial stats

    • scc-stats-p<x>: module serial port stats

    • ge-info: module ge information

    • ge-stats: module ge stats

    • fpga: module fpga information

    • fpga-p<x>: module fpga port information

    • fc-p<x>: module port flow control information

    • mempool: module mempool information

  6. debug hw-module subslot slot-number ?

    • commands: Control plane configuration and commands

    • errors: Error handling and race conditions

    • events: Control plane event notifications

    • ha: SPA Specific HA

    • interrupts: Interrupt handling

    • obfl: SPA Specific OBFL (on-board failure logging)

    • oir: SPA OIR information

    • periodic: Periodic processing (for example, plugin_one_sec)

  7. show monitor event-trace spa all

  8. Use show diag subslot slot-number eeprom detail to check NIM eeprom contents

Configuring Asynchronous Serial Ports

Configure the serial interface to Asynchronous mode by using these commands:

Router(config)#interface Serial0/3/0
Router(config-if)#physical-layer async

Specifying Asynchronous Serial Encapsulation

The asynchronous serial interfaces support the following serial encapsulation methods:

  • Block Serial tunneling (BSTUN)

  • Raw socket TCP (Raw-TCP)

  • Raw socket UDP (Raw-UDP)

  • SCADA

Use the following command to configure asynchronous serial encapsulation. To remove the configuration, use the no form of the command.

[no] encapsulation {bstun|raw-tcp|raw-udp|scada}

Example

Router(config)#interface Serial0/3/0
Router(config-if)#physical-layer async
Router(config-if)#encapsulation raw-tcp
Router(config-if)#end
Router#show running-config interface Serial0/3/0
Building configuration...

Current configuration : 89 bytes
!
interface Serial0/3/0
 physical-layer async
 no ip address
 encapsulation raw-tcp
end

Router# 

Encapsulation methods are set according to the type of protocol or application you configure in the Cisco IOS software.