Useful Switch Information
Useful Switch Information
More detailed information is available at
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/index.htm
Summary of Commands
The enable command
The show mac-address-table command
The show version command
The ping command
1
1
1
1
1
Command Details
The enable command
The MAC Address Table
The show version command
The ping command
2
2
3
4
6
Summary of Commands
This section tells you pretty much what you need to know for the next assignment. See the
section “Command Details” for detailed information.
The enable command
Use the enable command to change from user mode (mode 0) to privileged EXEC mode (level
15). After you type enable, the switch or router will ask for a password. In all cases, use the
password green.
The show mac-address-table command
Use show mac-address-table dynamic to view the mac-address-table entries on a switch. The
keyword dynamic limits the display to the MAC addresses that are learned as the switch
operates. These are the ones you need to see.
The show version command
The show version command provides information about software and hardware versions on the
switch. You can use the command show version | include Base to determine the MAC
address of the switch.
The ping command
ping <ip-address> or ping <switch-name> can be used to make sure the mac-address-tables
from the between the two switches (pinger and pingee) have entries for the both switches (they
are set for the pinger on the outgoing ping and for the pingee on the ping reply).
Command Details
The enable command
To enter privileged EXEC mode, or any other security level set by a system administrator, use
the enable EXEC command. Many commands will work only in privileged EXEC mode.
enable [level]
Syntax Description
level
(Optional) Privileged level on which to log in.
Command Modes
EXEC
Normal Usage for CSc72010 Class
Use this command to change from user mode (mode 0) to privileged EXEC mode (level 15).
After you type enable, the switch or router will ask for a password. In all cases, use the
password green.
Usage Guidelines
Entering privileged EXEC mode enables the use of privileged commands. Because many of the
privileged commands set operating parameters, privileged access should be password-protected
to prevent unauthorized use. If the system administrator has set a password with the enable
password global configuration command, you are prompted to enter it before being allowed
access to privileged EXEC mode. The password is case sensitive.
If an enable password has not been set, enable mode only can be accessed from the router
console.
Security levels can be set by an administrator using the enable password and privilege level
commands. Up to 16 privilege levels can be specified, using the numbers 0 through 15. Using
these privilege levels, the administrator can allow or deny access to specific commands.
Privilege level 0 is traditionally associated with normal EXEC mode, and privilege level 15 is
traditionally associated with privileged EXEC mode.
For more information on defined privilege levels, see the "Passwords and Privileges" chapters of
the Cisco IOS Security Configuration Guide and the Cisco IOS Security Command Reference
publications.
If a level is not specified when entering the enable command, the user will enter the default mode
of privileged EXEC (level 15).
The MAC Address Table
The MAC address table contains address information that the switch uses to forward traffic
between ports. All MAC addresses in the address table are associated with one or more ports.
The address table includes these types of addresses:
•
•
Dynamic address: a source MAC address that the switch learns and then ages when it is
not in use.
Static address: a manually entered unicast or multicast address that does not age and that
is not lost when the switch resets.
The address table lists the destination MAC address, the associated VLAN ID, and port number
associated .
Building the Address Table
With multiple MAC addresses supported on all ports, you can connect any port on the switch to
individual workstations, repeaters, switches, routers, or other network devices. The switch
provides dynamic addressing by learning the source address of packets it receives on each port
and adding the address and its associated port number to the address table. As stations are added
or removed from the network, the switch updates the address table, adding new dynamic
addresses and aging out those that are not in use.
The aging interval is configured on a per-switch basis. However, the switch maintains an address
table for each VLAN, and STP can accelerate the aging interval on a per-VLAN basis.
The switch sends packets between any combinations of ports, based on the destination address of
the received packet. Using the MAC address table, the switch forwards the packet only to the
port or ports associated with the destination address. If the destination address is on the port that
sent the packet, the packet is filtered and not forwarded. The switch always uses the store-andforward method: complete packets are stored and checked for errors before transmission.
Displaying Address Table Entries
You can display the MAC address table by using one or more of the privileged EXEC commands
described in Table 7-4. The most important command for class use will be show macaddress-table dynamic. This displays the MAC addresses that are learned as the switch
operates.
Table 7-4 Commands for Displaying the MAC Address Table
Command
show mac address-table address
Description
Displays MAC address table information for the
specified MAC address.
show mac address-table aging-time Displays the aging time in all VLANs or the specified
VLAN.
show mac address-table count
Displays the number of addresses present in all VLANs
or the specified VLAN.
show mac address-table dynamic
Displays dynamic MAC address table entries only.
show mac address-table interface
Displays the MAC address table information for the
specified interface.
show mac address-table multicast
Displays the Layer 2 multicast entries for all VLANs or
the specified VLAN.
show mac address-table static
Displays static MAC address table entries only.
show mac address-table vlan
Displays the MAC address table information for the
specified VLAN.
The show version command
Use the show version user EXEC command to display version information for the hardware and
firmware.
show version [ | {begin | exclude | include} expression]
Syntax Description
| begin
(Optional) Display begins with the line that matches the expression.
| exclude
(Optional) Display excludes lines that match the expression.
| include
(Optional) Display includes lines that match the specified expression.
expression
Expression in the output to use as a reference point.
Command Modes
User EXEC
Normal Class Usage
You can use the command show version | include Base to determine the MAC address of the
switch.
Usage Guidelines
Expressions are case sensitive. For example, if you enter | exclude output, the lines that contain
output are not displayed, but the lines that contain Output are displayed.
Examples
The following command will give you the MAC address of the switch you are using:
show version | include Base
The response to the command on hulk is:
Base ethernet MAC Address: 00:12:DA:A1:07:00
The following is sample output from the unmodified show version command:
IOS (tm) C3550 Software (C3550-I5Q3L2-M), Version 12.1(20)EA1a, RELEASE SOFTWARE
(fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Mon 19-Apr-04 21:50 by yenanh
Image text-base: 0x00003000, data-base: 0x008273B8
ROM: Bootstrap program is C3550 boot loader
hulk uptime is 2 days, 1 hour, 36 minutes
System returned to ROM by power-on
System image file is "flash:c3550-i5q3l2-mz.121-20.EA1a/c3550-i5q3l2-mz.121-20.EA1a.bin"
cisco WS-C3550-24-PWR (PowerPC) processor (revision J0) with 65526K/8192K bytes of
memory.
Processor board ID CAT0851Y0XC
Last reset from warm-reset
Bridging software.
Running Layer2/3 Switching Image
Ethernet-controller 1 has 12 Fast Ethernet/IEEE 802.3 interfaces
Ethernet-controller 2 has 12 Fast Ethernet/IEEE 802.3 interfaces
Ethernet-controller 3 has 1 Gigabit Ethernet/IEEE 802.3 interface
Ethernet-controller 4 has 1 Gigabit Ethernet/IEEE 802.3 interface
24 FastEthernet/IEEE 802.3 interface(s)
2 Gigabit Ethernet/IEEE 802.3 interface(s)
The password-recovery mechanism is enabled.
384K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 00:12:DA:A1:07:00
Motherboard assembly number: 73-8100-09
Power supply part number: 341-0029-03
Motherboard serial number: CAT08510KB4
Power supply serial number: DTH08503P1H
Model revision number: J0
Motherboard revision number: A0
Model number: WS-C3550-24PWR-EMI
System serial number: CAT0851Y0XC
Configuration register is 0x10F
The ping command
You can use ping <ip-address> on a switch just like you can use it on a host. Also, switches
respond to pings, so the switches can ping each other.
Normal class usage
ping <ip-address> or ping <switch-name> can be used to make sure the mac-address-tables
from the between the two switches (pinger and pingee) have entries for the both switches (they
are set for the pinger on the outgoing ping and for the pingee on the ping reply).
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising