[Techtalk] communicating with a switch
Maria Blackmore
mariab at cats.meow.at
Tue Jun 3 23:52:23 EST 2003
On Tue, 3 Jun 2003, Hamster wrote:
> I have a have a cisco switch that I want to communicate with using the
> console cable.
Cool
> The console cable is plugged into COM2 (I believe this is ttyS1) of my linux
> box. The settings it needs are 8N1 no flow control.
Indeed, this is correct.
The important thing to remember is 9600 baud :)
> Right. So how do I now actually communicate with it? I'm ashamed to say I
> only know how to get it working using the win Hyperterm programme.
Well, you need to put it on a nice couch, dim the lights, some sort of
fragrant oil might help, you need to relax it, and ask it to tell you
about it's mother
> Back on my linux box, I've installed the programme minicom, but I cant
> work out how to tell it to use a direct connection rather than talk
> through a modem.
the switch will probably have come with a serial cable, it could take one
of two forms, either form is a kind of pale blue.
The first form is a 9pin sub-D connector to an RJ45 connector, and then a
pale blue, flat "rollover" cable, with an RJ45 connector on each end.
This is to connect the adapter to the switch. If you look at the colours
of the wires, you'll see it's called a rollover cable because the wires at
one end are in the reverse order of the wires at the other, in other words
it's been rolled over.
The second form is a piece of flat cable, with an RJ45 connector at one
end and a 9 pin sub D at the other, if you plug it in, it should "just
work". This isn't as flexible since you can't do as many funky things
with it, but it reduces the number of calls the Cisco TAC have to field
because someone's tried to use the wrong cable.
> Can anyone shed some light on how to do this? Either through minicom or a
> completely different method.
minicom is a bit weird, but works.
First of all, as root, start minicom with "minicom -s". This should give
you a screen that looks like this:
http://cats.meow.at/~mariab/minicom/minicom1.jpg You mentioned that you
plugged it into the second serial port, or /dev/ttyS1, so now you go to
"Serial port setup", and get a screen like this:
http://cats.meow.at/~mariab/minicom/minicom2.jpg
To edit the serial port, press "a" and then type in the correct device,
and press enter, you also need to change the port settings, so press "e",
which will give you a sub menu, like this:
http://cats.meow.at/~mariab/minicom/minicom3.jpg
We need 9600 8N1, so typing "eq" should do that, and then press enter to
exit. Lastly, to be in the safe side, we need to use "f" and "g" to make
sure that both hardware and software flow control are off. After all this
you should end up with something a little like
http://cats.meow.at/~mariab/minicom/minicom4.jpg, you may need "c" and
"d" to ensure that the callin and callout program entries are
blank. Press enter or escape to exit that menu, and you'll be back to
http://cats.meow.at/~mariab/minicom/minicom1.jpg at this point you can
chose "Save setup as dfl" and then "Exit from Minicom" though you may
wish to test the settings work by chosing "exit", at which point you'll be
able to talk to the switch, pressing enter a couple of times should grab
it's attention.
Minicom is now setup, you should now make sure that your regular user has
read/write permission to the serial port device, and then whenever you
start minicom it should now be in a position to talk to the switch
straight away.
tada!
Maria
More information about the Techtalk
mailing list