1 / 38

Lab 07

Lab 07. Cisco Routers. Project Proposals. Due NOW! Will review after lecture Will discuss with team captain. Overview: Why this lab. Linux tricks Package Management Systems Install new software (minicom) Cisco Router Using a serial terminal to configure a device

zack
Download Presentation

Lab 07

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lab 07 Cisco Routers

  2. Project Proposals • Due NOW! • Will review after lecture • Will discuss with team captain

  3. 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

  4. Installing additional software packages

  5. Linux Tricks Packages

  6. 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

  7. Package Management System • Aids in the installation, configuring, upgrading and removal of software packages • Several styles • Debian • dpkg – base tool • apt – cli interface • synaptic – gui interface • Red Hat • yum – base tool • Has a cli • PackageKit – gui interface • Plenty of other systems • Mandriva • MPM under dev. • Drakrpm • Slackware • pkgtool

  8. PMS vs. Installer

  9. Installing additional software in Debian • Three ways in Debian: • Apt • Set of commands to install/update/delete packages • Aptitude • Front end to Apt • Synaptic • GUI interface to Apt

  10. 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!

  11. APT-GET • Syntax: • apt-get [options] [-o config=string] [-c=cfgfile] command [pkg] • Installs dpkgpackaged files • .deb extension • To install a package • Need to know the package name • May need to have root authority • apt-get install pkgname • E.g. apt-get install apache2 • apt-get finds packages based on your sources list • /etc/apt/sources.list • There are other options to help installation and updating • apt-get update … • apt-get remove … • etc…

  12. /etc/apt/sources.list #cat sources.list # # deb cdrom:[Debian GNU/Linux 4.0 r0 _lenny_ - Official i386 DVD Binary-1 20070407-11:40]/ lennycontrib main deb cdrom:[Debian GNU/Linux 4.0 r0 _lenny_ - Official i386 DVD Binary-1 20070407-11:40]/ lennycontrib 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 #

  13. Aptitude • Ncurses (cli “window”) front end • Syntax: • aptitude install package

  14. 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

  15. 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?

  16. Cisco Router Lab

  17. 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

  18. Separate networks • Remember: If PCs are in different logical networks they cannot communicate • Pinging will not work even if they are on the same physical network • Electronic signal will be seen, but not responded to

  19. Connect 3 or 4 Class C networks with a Cisco router myrouter 192.168.10.1 192.168.20.1 Class C PC 192.168.20.2 Class C PC 192.168.10.2 192.168.30.1 192.168.40.1 Switch Class C PC 192.168.30.2 Class C PC 192.168.40.2 Class C PC 192.168.40.3 Class C PC 192.168.40.4

  20. Lab has 4 steps • Install, configure, and test the Minicom serial terminal (everyone) • You will need Minicom for later labs • Consider saving this VM for later use • Set up the Cisco router • Reset to factory defaults • Set initial configuration • Test to see if the router is routing • Optional: See if can hook two routers together to get all workstations to communicate • Save the configuration and test that it restarts with your last configuration

  21. Serial terminal Minicom

  22. Minicom • Minicom is: • Open source software • A text-based modem controller and terminal emulation program for Unix-like operating systems • Menu driven • Will only use the terminal emulation part

  23. 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: 9600 • Bits: 8 • Parity: N • Stop bits: 1 • 9600 8n1

  24. Minicom Hints • <ctrl>+A then Z • Shows help menu page • Can enter the letter for an option here • <ctrl>+A then (letter) • Directly does the letter option • Interesting Keys • <ctrl>+A then F • <break> • Special signal to get the attached serial device’s attention • <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!

  25. 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

  26. Notes/Warnings • Some workstations have two serial ports • ttyS1 and ttyS0 • Your VM will need to connect its virtual serial port to the workstations physical port • VMPlayer used to connect ttyS0 to ttyS0 and ttyS1 to ttyS1 • Last Debian/VMPlayer upgrade it switched on some VMs, e.g. ttyS0 was connected to ttyS1 • You may need to experiment to find which serial port on your VM is connected to the physical serial port on the VM

  27. 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

  28. Cisco Router

  29. 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

  30. Configure and Test router • Configure the router • Set up passwords • 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

  31. 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

  32. 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

  33. 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

  34. 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

  35. 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

  36. 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

  37. 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

  38. 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

More Related