Accessing a Cisco Router
Pages: 1, 2, 3
When you're finished and wish to end the minicom session, press Control-A, let go of the Control key, then press "Q". You'll want to choose "Yes" to
leave without reset. If you ever need to access the Cisco router again
using minicom, simply type:
minicom cisco
to initiate the connection.
Now let's try ecu:
cd /usr/ports/comms/ecu
make install clean
When you build this port, it automagically answers the following for you:
If you execute ecu with uid set to uucp lines, then
uucp will be able to access any serial line owned
by the user or owned by uucp. In addition, you need
not provide for world-write access to the UUCP
lock directory. Answer 'n' if you are not sure.
Do you wish to run ecu setuid to uucp? ([y],n)?
What do you want for a default tty? [cuaa0]
What do you want for a default bit rate? [9600]
What do you want for default parity ([n],e,o)?
Where do you want the public executables
placed? [/usr/local/bin]
Where do you want the ECU library
placed? [/usr/local/lib/ecu]
How many seconds should the built-in dialer wait
for carrier? [60]
What is the maximum number of screen
lines (>= 24)? [50]
What is the maximum number of screen
columns ($gt;= 80)? [80]
<snip$gt;
===$gt; SECURITY NOTE:
This port has installed the following binaries
which execute with increased privileges.
1143290 592 -rws--x--x 1 uucp bin 292948 Oct 4
12:48 /usr/local/bin/ecu
If there are vulnerabilities in these programs
there may be a security risk to the system. FreeBSD
makes no guarantee about the security of
ports included in the Ports Collection. Please type
'make deinstall' to deinstall the port if this is
a concern.
Like the minicom utility, ecu lets you create and save an entry. I'll create the entry as follows:
ecu
^D to enter phone directory
a to add an entry
Enter new directory entry name: cisco
arrow down to device and type in: cuaa1
press END key to accept
press Enter to dial
type y to save entry
Connecting to cisco
on /dev/cuaa1 at 9600 baud (14:38:22)
CONNECT 9600
When I press Enter, I'll receive my router$gt; prompt. This program has a comprehensive help system which can be accessed by pressing the Home key
and typing:
help
When you're finished using ecu, press the Home key and then type:
EX
Again, if you ever need to use ecu again, you can now access the router
directly using:
ecu cisco
Let's move on to kermit:
cd /usr/ports/comms/kermit
make install clean
To use kermit, type the following:
kermit
SET LINE /dev/cuaa1
SET CARRIER-WATCH OFF
connect
then press the Enter key to get the router$gt; prompt. When you're finished with
your kermit session, hold down the Control key while pressing the \ key, then
let go and press the Shift key while pressing "C". Your prompt will now look
like this:
C-Kermit$gt;
and you can type "quit" to leave "kermit":
C-Kermit$gt; quit
Closing /dev/cuaa1...OK
The last port we'll take a look at is the one that is used from an X Windows session:
cd /usr/ports/comms/seyon
make install clean
Once the build is finished, start an X Windows session and open up an
xterm window and become the superuser. If you type the following within the
xterm window
su
Password:
seyon -modems /dev/cuaa1
two windows will open up that look like this.
One of the windows shows your connection to the router, while the other
window contains the seyon commands. When you're finished with the
router, you can press the exit option with your mouse to end your session.
If you've ever used any of these utilities before, or have followed along by building them for yourself, you'll realize that each of the utilities discussed in this article has far greater capabilities than I've mentioned. Even though I've concentrated on using them to access a Cisco router, these utilities provide powerful serial port communications. If you want to explore their other possibilities, every utility I've demonstrated does have an extensive man page for your perusal.
Dru Lavigne is a network and systems administrator, IT instructor, author and international speaker. She has over a decade of experience administering and teaching Netware, Microsoft, Cisco, Checkpoint, SCO, Solaris, Linux, and BSD systems. A prolific author, she pens the popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics.
Read more FreeBSD Basics columns.
Return to the BSD DevCenter.