This month we complete our three-month theme of configuring a router for manageability.
Last month we discussed route caching, the loopback interface, SNMP configuration, time and NTP, and using syslog to capture router console messages.
This month: converting names to addresses: host table and DNS. Then a couple of words about CDP and passwords. Central control of passwords across multiple routers or NAS's brings us to XTACACS, with a brief nod to TACACS+. We'll finish with some random related ideas on things you might want to configure into your Cisco routers.
ip host new_york_router a.b.c.d e.f.g.h i.j.k.lPut at least your major routers and servers into each router, and keep this list updated as you add new devices. It's well worth the effort the day your network goes down!
ip host chicago_router a.b.c.g m.n.o.p
ip domain-name foo.comIf one or more DNS servers are available, configure the router with their addresses:
ip name-server a.b.c.dIf no DNS server is available, it is useful to turn off DNS name resolution with
ip name-server a.b.c.g
no ip domain-lookupThis speeds response in case of router command typos.
Leave CDP enabled, it may be very useful to future network management tools.
It is simpler to administer passwords, especially on access servers, using a central server mechanism, such as XTACACS or TACACS+, below. One-time passwords are valuable protection against password capture and re-use. Generally a mechanism such as the SecureID card is used for this, in conjuction with a form of TACACS.
The "service password-encryption" form of encryption is not secure, nor was it ever intended to be. I've heard there is a C program out on the Internet that breaks old-style encrypted passwords.
The new command to use is "enable secret", which overrides any configured enable password. Thus minimal but reasonable password protection consists of:
enable secret myEnableSecret
enable password anotherSecret
line console 0
login
password xxxx
line aux 0
login
password xxxx
line vty 0 4
login
password yyyy
Start by turning on extended TACACS mode:
tacacs-server extendedThen tell the router the address(es) of the TACACS servers:
tacacs-server host A.B.C.DTell the router to use TACACS to authenticate enabled mode access, with the configured enable password as fallback if the TACACS server is inaccessible:
tacacs-server host E.F.G.H
enable use-tacacsSimilarly, if the TACACS server fails to respond, users may use a local password or the configured enable password to login to the router:
tacacs-server authenticate enable
enable last-resort password
tacacs-server last-resort passwordOptions for authenticating users before they can use certain commands at the router EXEC prompt.
tacacs-server authenticate connectionOptions for logging what users do:
tacacs-server authenticate enable
! if SLIP is to be authenticated:
tacacs-server authenticate slip
! if CHAP is not used with PPP:
ppp use-tacacs
tacacs-server notify connectionAnd what EXEC connections do we want to use (X)TACACS to authenticate:
tacacs-server notify enable
! if SLIP or PPP are to be used:
tacacs-server notify slip
! if you care to log logouts (for connect time
! computation):
tacacs-server notify logout
line console 0If you don't want Telnet (as on a firewall router), put "no exec" on the vty's. If nothing is on the AUX port, "no exec" prevents people from connecting up and trying to log in.
login tacacs
line aux 0
no exec
line vty 0 4
login tacacs
Here's an example:
access-list 1 permit a.b.c.0 0.0.0.255The exec-timeout command specifies 5 minutes of idleness before you are automatically logged off. The default is 10. You can specify no automatic logout with "exec-timeout 0 0". But then someone else may have enabled router access from a terminal you once logged onto. The cautious may wish to specify
access-list 1 permit a.b.g.0 0.0.0.255
line vty 0 4
access-class 1 in
login
password xxx
exec-timeout 5 0
exec-timeout 1 0
no ip source-routeIf you feel the urge (need?) to configure "boot system" commands, always establish a fallback boot image from ROM. That way if flash is empty or some problem occurs, the router may be able to boot an older image from ROM.
boot system flash slot0:I generally prefer to NOT specify any boot system commands, and to set the configuration register to do the equivalent for me:
boot system rom
config-register 0x2102If you wish to slightly reduce LAN traffic, and are not in a DEC environment, turn off MOP:
interface ethernet 0It is generally unnecessary to alter the default buffers and buffer pools (buffers min-free, buffers max-free, etc.) Cisco would like to know about it if you do have to alter them, because they're trying to make the right things happen automatically. If you do specify buffers commands, be aware that it can drastically affect the performance of your router.
no mop enabled
I hope this helps. If I've left your favorite configuration command out, I'm sure you'll let me know (please do)!
Dr. Peter J. Welcher (CCIE #1773, CCSI #94014) is a Senior Consultant with Chesapeake NetCraftsmen. NetCraftsmen is a high-end consulting firm and Cisco Premier Partner dedicated to quality consulting and knowledge transfer. NetCraftsmen has nine CCIE's, with expertise including large network high-availability routing/switching and design, VoIP, QoS, MPLS, network management, security, IP multicast, and other areas. See http://www.netcraftsmen.net for more information about NetCraftsmen. Pete's links start at http://www.netcraftsmen.net/welcher . New articles will be posted under the Articles link. Questions, suggestions for articles, etc. can be sent to pjw@netcraftsmen.net .