Lab 07 Cisco Routers Project Proposals Due NOW! Will review after lecture Will discuss with team captain Captain must remain until review Overview: Why this lab Linux tricks Package Management Systems Install new software (minicom) Cisco Router Using a serial terminal to configure a device Cisco router in this case Resetting a router from an unknown state Configuring a router Use of a router to connect different networks INSTALLING ADDITIONAL SOFTWARE PACKAGES Linux Tricks PACKAGES Packages Used to “package” software for Linux distributions Vary by distribution type Debian APT (Advanced Package Management Tool) .deb files Red Hat RPM (RPM Package Management) Originally Red Hat Package Management) .rpm files Package Management System Aids in the installation, configuring, upgrading and removal of software packages Several styles Debian dpkg – base tool apt – cli interface Aptitude – high level cli interface synaptic – gui interface yum – base tool Red Hat Has a cli PackageKit – gui interface Plenty of other systems Mandriva MPM under dev. Drakrpm pkgtool Slackware PMS vs. Installer Package Management System Installer Typically part of the operating system. Each product comes bundled with its own installer. Uses a single installation database. Performs its own installation, sometimes recording information about that installation in a registry. Can verify and manage all packages on the system. Only works with its bundled product. Single package management system Multiple installer vendors. vendor. Single package format. Multiple installation formats. Installing additional software in Debian Base: dpkg Basic low level system Creates, installs, maintains .deb packages Three popular “high level” options in Debian: APT Advanced Package Tool Set of commands to install/update/delete packages apt-get – the main command Has several options Aptitude Interactive front end Synaptic GUI interface APT Advanced Package Tool Several tools in system Apt-setup Apt-spy Helps generate sources.list Apt-cache Searches for packages Apt-get Installs, maintains and removes Many more! APT-GET Syntax: apt-get [options] [-o config=string] [-c=cfgfile] command [pkg] .deb extension Need to know the package name Installs/maintains dpkg packaged files To install a package apt-get install pkgname May need to have root authority E.g. apt-get install apache2 apt-get finds packages based on your sources list /etc/apt/sources.list apt-get update … apt-get remove … etc… There are other options to help installation and updating /etc/apt/sources.list #cat sources.list # # deb cdrom:[Debian GNU/Linux 4.0 r0 _lenny_ - Official i386 DVD Binary-1 20070407-11:40]/ lenny contrib main deb cdrom:[Debian GNU/Linux 4.0 r0 _lenny_ - Official i386 DVD Binary-1 20070407-11:40]/ lenny contrib main deb http://ftp.debian.org/debian/ lenny main deb-src http://ftp.debian.org/debian/ lenny main deb http://security.debian.org/ lenny/updates main contrib deb-src http://security.debian.org/ lenny/updates main contrib deb http://backports.sipo.nl lenny-backports main non-free deb http://www.backports.org/debian lenny-backports main contrib non-free # Aptitude ncurses APT front end cli “window” Interactive Syntax: aptitude install package Synaptic GUI interface to install packages Under: System Administration May be 1000’s of packages Can do a search to limit choices To install: Scroll to package to install Click on the S box for that package Check Mark for installation Click on Mark in the next window Click on Apply back in the Synaptic Package Manager window Important Note! To install packages your workstation must be in the same network as the package repository hades.lab Think! How do you easily get an address that is in the hades.lab domain? CISCO ROUTER LAB Cisco Router Lab Overview Use a Cisco router to connect 3 or 4 different networks Different Class C networks E.g. 192.168.10.0 192.168.20.0 192.168.30.0 192.168.40.0 Use Debian workstations Separate networks Remember: If PCs are in different logical networks they are not allowed to communicate with each other Pinging will not work even if they are on the same physical network Electronic signal will be seen, but not responded to Connect 3 or 4 Class C networks with a Cisco router Class C PC 192.168.10.2 Class C PC 192.168.30.2 192.168.10.1 192.168.20.1 (192.168.20.0 NW) (192.168.10.0 NW) Class C PC 192.168.20.2 myrouter 192.168.30.1 192.168.40.1 Switch (192.168.30.0 NW) (192.168.40.0 NW) Class C PC 192.168.40.2 Class C PC Class C PC 192.168.40.3 192.168.40.4 Lab has 4 steps 1. Install, configure, and test the Minicom serial terminal (everyone) 1. You will need Minicom for later labs 2. Consider saving this VM for later use 2. Set up the Cisco router 1. Reset to factory defaults 2. Set initial configuration 3. Test to see if the router is routing 1. Optional: See if can hook two routers together to get all workstations to communicate 4. Save the configuration and test that it restarts with your last configuration Serial terminal MINICOM Minicom Minicom is: Open source software A text-based modem controller and terminal emulation program for Unix-like operating systems Menu driven This lab will only use the terminal emulation part Minicom Must configure the terminal to communicate to the serial device Need to set device to communicate to the serial port on the Cisco router Speed: Bits: Parity: Stop bits: 9600 8 N 1 9600 8n1 Typical default for current serial interfaces Minicom Hints <ctrl>+A then Z Shows help menu page Can enter the letter for an option here Directly does that letter option <ctrl>+A then F <ctrl>+A then (letter) Interesting Keys <break> Special signal to get the attached serial device’s attention “Space” for a “long” time (typically 0.1 to 0.5 sec) <ctrl>+A then W Toggle line-wrap Continues long text on the following line This is important for this lab! Important: Don’t forget to release the <ctrl> before hitting the second character! Minicom Hints Must have root authority to run Minicom Or belong to a group allowed r/w access to the serial port To run minicom type minicom in an appropriate terminal The first time minicom is run you may need to start it in setup mode: minicom –s The virtual serial port may be either: /dev/ttyS0 /dev/ttyS1 Notes/Warnings Note: Some of your PCs at home might have two serial ports ttyS1 and ttyS0 Beware if you use the VM on a home system Misc: Many other alternatives to minicom screen Full screen (text) window manager Can be used as a serial terminal also screen /dev/ttyUSB0 9600 Will control a USB serial device at 9600 bps Used by the “Pros” putty Cross platform Windows version available “GUI” Multi protocol serial ssh telnet CISCO ROUTER Reset router When you get the router it will be in an unknown state Settings? Passwords? Etc… Need to reset the router to the factory original settings Not as simple as an easy-to-push reset button There is no reset button! There is a specific reset sequence Done via a serial port Configure and Test router Configure the router Set up passwords Remember to change the default immediately Set up the 3 or 4 ports with IP addresses E.g. 192.168.11.1 192.168.12.1 192.168.13.1 Etc… For the 3rd octet use then number of the workstation that will attach to it Configure and Test router Explore the router Unprivileged mode Basic commands to see router's state Use “disable” to return to unprivileged mode Privileged mode Can change router state Has several sub modes Use “enable” to enter <ctrl>-Z will exit sub states Configure and Test router Default router settings Will monitor its ports Automatically build routing tables In this lab we will not do a customized routing table The router will build its own tables Hook up VMs with appropriate network addresses to the correct ports VM address must be in the same network as the router port they are connected to The Cisco 1841 will create its own routing tables Your VMs must know where there router is Look at the previous lab, it has the basis to configure this Advanced: Connect 2 routers together Disconnect a workstation from each of the routers Connect routers with a cable Reconfigure router ports Test that all can ping Document for bonus points Save Configuration After configuration: If the router is power cycled It will resume its last saved state Need to save the configuration you just set up Do this as the last item Equipment etiquette Return equipment Routers back to bench Power cords to storage Cables back to storage Hook the PC back to lab network Log off Power workstation down Pro Note Many sysadmins prefer the screen command Screen is a screen manager with terminal emulation capability It is more difficult to set up Lightweight and “easy” to use If you know how Last Notes Minicom Connect workstation serial port and router Turn router on Should see intelligible messages if Minicom is configured correctly If not, double check Minicom’s settings The lab has an example dialog Do not use verbatim! Use as a template to guide you Change the IP addresses for your use Change the names to your names Deliverable Lab report answering the questions and ** items Include introductory and conclusion Must have cover sheet! Do not document text areas with screen captures! Cut and paste Redirect output to file