Now, something that may be a stumbling block for you and often trips up engineers when they first start
out, is logging when they telnet to a router.
So in this example, I'm going to connect to the router
from my local Windows PC.
So I'm going to connect the router
to the outside world
and I'm just going to use my
local area connection card to connect GNS3 to the outside world
and then what I'll do is I'll connect the router to the cloud.
So on router 1 interface f0/1 this is the interface connected to the outside
world, I'm going to know shut the interface and type IP address DHCP so that the router gets an IP address
via DHCP.
So hopefully I should see a message stating that an address has been allocated.
In this case
you can see that an address level 6 in Syslog which is an informational message
shows me that an address has been assigned to the routers interface with this IP address.
So in windows
I'll telnet to the router,
I'm told that I need a password, so
Line VTY 084 login password Cisco, enable password Cisco, obviously in the real world you'll use a
better password than that
but that's fine for our demonstration, so show logging.
Now, according to this, I have debugging a level of monitoring on a monitor.
So let's check the debugging show debug, this is on the console.
You can see OSPF adjacency events, debugging is enabled.
So let's see if we get any output on our telnet session.
I'll shut down the interface on router 2 and then enable it.
So notice I'm getting debugged on the console but nothing is displayed on the telnet session, lots
of debugging on the console, nothing on the telnet session, and that's because you have to type
Terminal monitor or Termmon.
So term monitor or terminal monitor or termmon for short, any one of those options will do.
So let's try now shut the interface on router 2,
no shut it and notice, suddenly I'm seeing debugging messages on both the console as well as the
telnet session, so don't forget that you can set logging and
I'll do that through the console.
You can set the logging for a monitor line, but by default, the output is not displayed on your telnet
session.
You must type terminal monitor.
You don't have to do that on a console. So in router 2 if I type terminal monitor
notice, I'm told that the console already monitors you don't have to enable terminal monitor on the
console by default debugging and Syslog messages will be displayed on the console, but that won't be
displayed on a telnet line.
So as an example, if I press control zed or control Z on the terminal, so the VTY line, I see output
but if I type term no monitor
and do that again, control zed or control z
I don't see anything on the terminal line.
So Termmon, very important to remember that allows you to see debugging messages and console messages,
so Syslog messages on the VTY line, it's not there by default.