Jaime Frutos Morales's blog

30/12/2010

How to connect to Cisco devices via serial port using GNU/Linux

Filed under: Linux, SysAdmin — acidborg @ 10:17

Description: to connect your computer to a Cisco device via its console port, you usually need a RJ45 rolled cable. You can use a RJ-45 to DB-9 Female if your computer has a serial port.

RJ-45 to DB-9 Female

To communicate through the serial port with the Cisco device, you need Minicom, a terminal emulator software.

Installation:

  • Debian/Ubuntu based distros: sudo apt-get install minicom
  • Red Hat/Fedora based distros: sudo yum install minicom

Steps:

  1. Check whether your serial port is detected by the kernel: dmesg | grep ttyS

    [ 0.485378] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    [ 0.485739] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
  2. Run Minicom: sudo minicom
  3. Press Ctrl+A Z to enter Minicom’s menu.
  4. Press O to enter configuration submenu.
  5. Enter the serial port setup.
  6. Set the serial device (/dev/ttyS0 in this example).
  7. Press E to set the “Bps/Par/Bits”.
  8. Press C (9600 bps) and Q (8-N-1).
  9. Set software flow control to NO.
  10. Save the configuration as “cisco” (for example)
  11. Press Q to quit Minicom
  12. Run Minicom with the new configuration: sudo minicom cisco

Tip: if you need to send a “Break” through Minicom (on a password recovery operation, for example), use Ctrl+A F .

Advertisements

3 Comments

  1. you can also use screen:

    $ screen /dev/ttyS0 9600

    Comment by natxo — 30/12/2010 @ 10:58

    • I didn’t know screen could do that. Thanks for the comment.

      Comment by acidborg — 30/12/2010 @ 11:34

  2. Wow! This can be 1 of the top blogs I’ve actually arrive throughout on this subject. Merely Magnificent

    Comment by ptz ip camera — 12/01/2011 @ 09:28


RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Blog at WordPress.com.

%d bloggers like this: