Chapter 11 Lab

advertisement
Cisco IOS
Router1
Boot-up
If you see such a message, the router is ready to enter Setup Mode. We will never be using setup mode.
When you are being prompted to answer this question, answer “n” and press return. If you accidentally
press “y” and enter Setup Mode, press and hold down the control key and press C (CTRL-C). Wait a few
seconds, and then press Enter.
System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)
Copyright (c) 2000 by cisco Systems, Inc.
PT 1001 (PTSC2005) processor (revision 0x200) with 60416K/5120K bytes of memory
Self decompressing the image :
######################### [OK]
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
1
Cisco Internetwork Operating System Software
IOS (tm) PT1000 Software (PT1000-I-M), Version 12.2(28), RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 27-Apr-04 19:01 by miwang
PT 1001 (PTSC2005) processor (revision 0x200) with 60416K/5120K bytes of memory
--- System Configuration Dialog --Continue with configuration dialog? [yes/no]: n
.
Processor board ID PT0123 (0123)
PT2005 processor: part number 0, mask 01
Bridging software.
X.25 software, Version 3.0.0.
4 FastEthernet/IEEE 802.3 interface(s)
2 Low-speed serial(sync/async) network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read/Write)
%LINK-5-CHANGED: Interface
%LINK-5-CHANGED: Interface
%LINK-5-CHANGED: Interface
%LINK-5-CHANGED: Interface
%LINK-5-CHANGED: Interface
<some output omitted>
FastEthernet0/0,
FastEthernet1/0,
FastEthernet4/0,
FastEthernet5/0,
FastEthernet0/0,
changed
changed
changed
changed
changed
state
state
state
state
state
to
to
to
to
to
up
up
up
up
administratively
Press RETURN to get started!
User mode and Privilege Mode
You should now be at the User Mode with the prompt:
Router>
User mode will allow you to view the state of the router, but will not allow you to modify its
configuration.
Use the “?” to view the list of available commands or command options
Router>?
Exec commands:
<1-99>
Session number to resume
connect
Open a terminal connection
disconnect Disconnect an existing network connection
<some output omitted>
Options:
a)
b)
c)
Press the Space Bar to scroll a “screen’s worth” of more commands.
Press the Enter or Return key to scroll down just one line of the list.
Press any other key to halt the list output.
Now lets enter Privilege Mode (or enable mode) which does allow you to modify the router’s
configuration.
2
Router>enable
Router#?
Exec commands:
<1-99>
Session number to resume
clear
Reset functions
clock
Manage the system clock
configure
Enter configuration mode
<rest of output omitted>
Router#disable
Router>
Router>enable
Configuration Files
To view the current configuration of the router (which resides in RAM) known as the running-config:
Router# show running-config
You will notice that this contains the actual commands that are either default commands or
were used to configure the router. When you make changes to the router, those changes
are stored in the running-config file.
Router# show startup-config
This will show the saved configuration in NVRAM. If the running-configuration has not been
saved, the startup-config file will be empty.
Router#show running-config
Building configuration...
Current configuration : 539 bytes
!
version 12.2
no service password-encryption
!
hostname Router
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet1/0
no ip address
duplex auto
speed auto
shutdown
!
interface Serial2/0
no ip address
shutdown
!
interface Serial3/0
no ip address
shutdown
!
interface FastEthernet4/0
3
no ip address
duplex auto
speed auto
shutdown
!
interface FastEthernet5/0
no ip address
duplex auto
speed auto
shutdown
!
ip classless
!
line con 0
line vty 0 4
login
!
!
end
Router#show startup-config
startup-config is not present
Router#
Show Commands
Lets take a look at some of the show commands.
Router#show ?
access-lists
arp
cdp
clock
controllers
debugging
flash:
frame-relay
history
hosts
interfaces
ip
protocols
running-config
sessions
startup-config
tcp
users
version
List access lists
Arp table
CDP information
Display the system clock
Interface controllers status
State of each debugging option
display information about flash: file system
Frame-Relay information
Display the session command history
IP domain-name, lookup style, nameservers, and host table
Interface status and configuration
IP information
Active network routing protocols
Current operating configuration
Information about Telnet connections
Contents of startup configuration
Status of TCP connections
Display information about terminal lines
System hardware and software status
4
Router#show interfaces
FastEthernet0/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 00e0.f787.c671 (bia 00e0.f787.c671)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
FastEthernet1/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 0007.ec74.0308 (bia 0007.ec74.0308)
..<rest of output omitted>
Router#show interfaces fastethernet1/0
FastEthernet1/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 0007.ec74.0308 (bia 0007.ec74.0308)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set
..<rest of output omitted>
Router#show inter fa1/0
FastEthernet1/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 0007.ec74.0308 (bia 0007.ec74.0308)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set
..<rest of output omitted>
5
Global Configuration Mode
Router#configure terminal
Enter configuration commands, one per line.
End with CNTL/Z.
Router(config)#hostname Router1
Router1(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Router1#show running-config
Building configuration...
Current configuration : 540 bytes
!
version 12.2
no service password-encryption
!
hostname Router1
!
<rest of output omitted>
Passwords
The privilege mode password requires someone to enter a password when entering privilege mode
with the enable command.
Router1#configure terminal
Enter configuration commands, one per line.
End with CNTL/Z.
Router1(config)#enable secret class
Router1(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
6
Router1#disable
Router1>enable
Password: class
Router1#
The console password requires someone to enter a password before accessing the router using the
console port.
Router1#config t
Enter configuration commands, one per line.
End with CNTL/Z.
Router1(config)#line console 0
Router1(config-line)#password cisco
Router1(config-line)#login
Router1(config-line)#exit
Router1(config)#exit
%SYS-5-CONFIG_I: Configured from console by console
Router1#exit
Router1 con0 is now available
Press RETURN to get started.
User Access Verification
Password: cisco
Router1>ena
Password: class
The vty password requires someone to enter a password before accessing the router remotely
using telnet.
Router1#config t
Enter configuration commands, one per line.
End with CNTL/Z.
Router1(config)#line vty 0 4
Router1(config-line)#password cisco
Router1(config-line)#login
Router1(config-line)#end
%SYS-5-CONFIG_I: Configured from console by console
7
Router1#show running-config
Building configuration...
<output omitted>
!
hostname Router1
!
!
enable secret 5 $1$1M6Q$MQHR3QjyNb2vGlJcv31g50
!
<output omitted>
!
line con 0
password cisco
login
line vty 0 4
password cisco
login
!
!
end
This will copy the current running-config file (in RAM) to the startup-config file in NVRAM.
Now if the router is rebooted (or loses power and powered back up) the changes you made
to the router have been saved. The startup-config is copied to the running-config during the
reboot process.
Router1#show startup-config
startup-config is not present
Router1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Router1#show startup-config
Using 628 bytes
!
version 12.2
no service password-encryption
!
hostname Router1
!
!
enable secret 5 $1$1M6Q$MQHR3QjyNb2vGlJcv31g50
!
<rest of output omitted>
8
Router Interface Configuration
Router1#show ip interface brief
Interface
IP-Address
FastEthernet0/0
unassigned
FastEthernet1/0
unassigned
Serial2/0
unassigned
Serial3/0
unassigned
FastEthernet4/0
unassigned
FastEthernet5/0
unassigned
OK?
YES
YES
YES
YES
YES
YES
Router1#config t
Enter configuration commands, one per line.
Method
manual
manual
manual
manual
manual
manual
Status
administratively
administratively
administratively
administratively
administratively
administratively
down
down
down
down
down
down
Protocol
down
down
down
down
down
down
End with CNTL/Z.
Router1(config)#interface serial 2/0
Router1(config-if)#ip address 192.168.1.1 255.255.255.252
Router1(config-if)#clock rate 64000
Router1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router1(config-if)#exit
Router1(config)#interface fa 1/0
Router1(config-if)#ip address 172.16.0.1 255.255.0.0
Router1(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state
to up
Router1(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
Router1#show ip interface brief
Interface
IP-Address
FastEthernet0/0
unassigned
FastEthernet1/0
172.16.0.1
Serial2/0
192.168.1.1
Serial3/0
unassigned
FastEthernet4/0
unassigned
FastEthernet5/0
unassigned
OK?
YES
YES
YES
YES
YES
YES
Router1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
9
Method
manual
manual
manual
manual
manual
manual
Status
administratively
up
down
administratively
administratively
administratively
Protocol
down down
up
down
down down
down down
down down
Dynamic Routing Protocol Configuration (RIP)
Router1#configure terminal
Enter configuration commands, one per line.
Router1(config)#router rip
Router1(config-router)#network 172.16.0.0
Router1(config-router)#192.168.1.0
^
% Invalid input detected at '^' marker.
End with CNTL/Z.
Router1(config-router)#network 192.168.1.0
Router1(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console
Router1#copy running startup
Destination filename [startup-config]?
Building configuration...
[OK]
Router1#show startup
<output omitted>
!
router rip
network 172.16.0.0
network 192.168.1.0
!
<rest of output omitted>
Router1#
Router2
System Bootstrap, Version 12.1(3r)T2, RELEASE SOFTWARE (fc1)
Copyright (c) 2000 by cisco Systems, Inc.
PT 1001 (PTSC2005) processor (revision 0x200) with 60416K/5120K bytes of memory
Self decompressing the image :
######################### [OK]
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
<rest of output omitted>
10
Router>enable
Router#config t
Enter configuration commands, one per line.
End with CNTL/Z.
Router(config)#hostname Router2
Router2(config)#enable secret class
Router2(config)#line console 0
Router2(config-line)#password cisco
Router2(config-line)#login
Router2(config-line)#exit
Router2(config)#line vty 0 4
Router2(config-line)#password cisco
Router2(config-line)#login
Router2(config-line)#exit
Router2(config)#interface serial 2/0
Router2(config-if)#ip address 192.168.1.2 255.255.255.252
Router2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
Router2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
Router2(config-if)#exit
Router2(config)#interface fa 0/0
Router2(config-if)#ip address 172.30.2.1 255.255.255.0
Router2(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state
to up
Router2(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console
Router2#config t
Enter configuration commands, one per line.
End with CNTL/Z.
Router2(config)#router rip
Router2(config-router)#network 192.168.1.0
Router2(config-router)#network 172.30.0.0
Router2(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console
11
Router2#show running-config
Building configuration...
!
<some output omitted>
version 12.2
!
hostname Router2
!
!
enable secret 5 $1$hBFp$99ZeRwek.rxK7mBgbEuH01
!
interface FastEthernet0/0
ip address 172.30.2.1 255.255.255.0
duplex auto
speed auto
!
interface Serial2/0
ip address 192.168.1.2 255.255.255.252
!
interface Serial3/0
no ip address
shutdown
!
router rip
network 172.30.0.0
network 192.168.1.0
!
ip classless
!
!
line con 0
password cisco
login
line vty 0 4
password cisco
login
!
end
Router2#show startup-config
startup-config is not present
Router2#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
Router2#
12
Switches
The IOS commands are the same for both routers and switches regarding the configuration of:
o user and privilege modes
o hostnames
o privilege password
o console password
o telnet (vty) password
o running-config and startup-config files
o help (?) command
o show commands
Differences:
o switches are layer 2 devices and routers are layer 3 devices
o switches do not do routing
o no “router rip”
o switch ports are not network interfaces
o interfaces do not have ip addresses/subnet masks
o switches have MAC-Address tables
o port to source MAC address mappings
Switch>
Switch>enable
Switch#show running-config
Building configuration...
Current configuration : 863 bytes
!
version 12.1
no service password-encryption
!
hostname Switch
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface Vlan1
no ip address
shutdown
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
!
end
Switch#show mac-address-table
Mac Address Table
------------------------------------------Vlan
---1
1
Mac Address
-----------
Type
--------
Ports
-----
0060.7038.4d01
00e0.8f1b.2a01
DYNAMIC
DYNAMIC
Fa0/3
Fa0/2
14
Switch#?
Exec commands:
<1-99>
Session number to resume
clear
Reset functions
clock
Manage the system clock
configure
Enter configuration mode
connect
Open a terminal connection
copy
Copy from one file to another
debug
Debugging functions (see also 'undebug')
delete
Delete a file
dir
List files on a filesystem
disable
Turn off privileged commands
disconnect Disconnect an existing network connection
enable
Turn on privileged commands
erase
Erase a filesystem
exit
Exit from the EXEC
logout
Exit from the EXEC
no
Disable debugging informations
ping
Send echo messages
reload
Halt and perform a cold restart
resume
Resume an active network connection
setup
Run the SETUP command facility
show
Show running system information
telnet
Open a telnet connection
traceroute Trace route to destination
undebug
Disable debugging functions (see also 'debug')
vlan
Configure VLAN parameters
write
Write running configuration to memory, network, or terminal
Switch#
Host Computers


Configure all host computers with their proper IP address, subnet mask and
default gateway information.
Host computers should now be able to ping all other host computers.
15
Download