38
Lab 07 Cisco Routers

Lab 07 Cisco Routers. Project Proposals Due NOW! Will review after lecture Will discuss with team captain

Embed Size (px)

Citation preview

Page 1: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

Lab 07

Cisco Routers

Page 2: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

Project Proposals

Due NOW! Will review after lecture

Will discuss with team captain

Page 3: 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

Cisco router in this case Resetting a router from an unknown state Configuring a router Use of a router to connect different networks

Page 4: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

INSTALLING ADDITIONAL SOFTWARE PACKAGES

Page 5: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

PACKAGESLinux Tricks

Page 6: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 7: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 8: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Multiple installer vendors.

Single package format. Multiple installation formats.

Page 9: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 10: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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!

Page 11: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

APT-GET Syntax:

apt-get [options] [-o config=string] [-c=cfgfile] command [pkg] Installs dpkg packaged 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…

Page 12: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

/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 maindeb-src http://ftp.debian.org/debian/ lenny main

deb http://security.debian.org/ lenny/updates main contribdeb-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#

Page 13: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

Aptitude

Ncurses (cli “window”) front end Syntax:

aptitude install package

Page 14: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 15: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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?

Page 16: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

CISCO ROUTER LAB

Page 17: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 18: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 19: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

myrouter

Connect 3 or 4 Class C networks with a Cisco router

Class C PC192.168.10.2

Class C PC192.168.20.2

192.168.10.1 192.168.20.1

192.168.30.1 192.168.40.1Class C PC

192.168.30.2

Class C PC192.168.40.2

Class C PC192.168.40.3

Class C PC192.168.40.4

Switch

Page 20: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

Lab has 4 steps

1. Install, configure, and test the Minicom serial terminal (everyone)1. You will need Minicom for later labs2. Consider saving this VM for later use

2. Set up the Cisco router1. Reset to factory defaults2. 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

Page 21: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

MINICOMSerial terminal

Page 22: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 23: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 24: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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!

Page 25: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 26: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 27: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 28: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

CISCO ROUTER

Page 29: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 30: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 31: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 32: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 33: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 34: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 35: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 36: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 37: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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

Page 38: Lab 07 Cisco Routers. Project Proposals  Due NOW!  Will review after lecture Will discuss with team captain

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