Sie sind auf Seite 1von 21

Switching Basics and

Intermediate Routing

SWITCHING
CONFIGURATION
1
STARTING THE SWITCH
2
`Physical startup of the Catalyst switch

- Central processing unit (CPU)


- Random access memory (RAM),
- An operating system several ports for the purpose
of connecting hosts
- Specialized ports for the purpose of management
3
`Switch LED Indicators: STAT

Off No link

Solid Green Link operational

Port is sending or receiving


Flashing Green
data

Alternating Green/Amber Link fault

Port is not forwarding becoz it


was disabled by management
Solid Amber or address violation, or
blocked by spanning tree
Protocol
4
`Switch LED Indicators: FDUP,100

Off Port is operating in half-duplex


FDUP

Green Port is operating in full-duplex

Off Port is operating at 10Mbps


100
Green Port is operating at 100Mbps
5
`Verifying Port Leds During Switch POST

• If the System LED is off but the switch is plugged


in, then POST is running.
• If the System LED is green, then POST was
successful.
• If the System LED is amber, then POST failed.
• POST failure is considered to be a fatal error.
• The Port Status LEDs turn amber for about 30
seconds as the switch discovers the network
topology and searches for loops.
• If the Port Status LEDs turn green, the switch has
established a link between the port and a target
6
`Viewing Initial Bootup Output From The Switch

• Use a rollover cable to connect the console port on


the back of the switch to a COM port on the back of
the computer
• Start HyperTerminal on the computer
• After the switch has booted and completed POST,
prompts for the System Configuration dialog are
presented
7
`Examining Help In The Switch CLI

• Switch>?
Exec commands:
access-enable Create a temporary Access-List entry
clear Reset functions
connect Open a terminal connection
disable Turn off privileged commands
disconnect Disconnect an existing network connection
enable Turn on privileged commands
exit Exit from the EXEC
help Description of the interactive help system
lock Lock the terminal
login Log in as a particular user
logout Exit from the EXEC
name-connection Name an existing network connection
ping Send echo messages
rcommand Run command on remote switch
--More--
8
`Switch Command Modes

• The User EXEC mode is recognized by its ending in


a greater-than character (>).
– The commands available in User EXEC mode are limited
to those that change terminal settings, perform basic
tests, and display system information.
• Privileged EXEC mode is also recognized by its
ending in a pound-sign character (#).
– The Privileged EXEC mode command set includes those
commands allowed in User EXEC mode, as well as the
configure command.
– The configure command allows other command modes
to be accessed.
9
CONFIGURING THE SWITCH
10
`Verifying The Catalyst Switch Default Configuration

• Show running-config
• Show interface FastEthernet 0/1
• Show vlan
• Show flash ( or dir flash:)
• Show version
11
`Configuring The Catalyst Switch

• Note
– Remove any existing VLAN information by deleting the
VLAN database file vlan.dat from the flash directory
– Erase the back up configuration file startup-config
– Reload the switch

• Catalyst 2900
– Delete flash:vlan.dat
– Erase startup-config
– reload
12
`Configuring The Catalyst Switch (cont)

• A switch should be given a hostname, and passwords should


be set on the console and vty lines
• switch(config)#hostname ALSwitch
• ALSwitch(config)#line console 0
• ALSwitch(config-line)#login
• ALSwitch(config-line)#password consolepass
• ALSwitch(config-line)#line vty 0 4
• ALSwitch(config-line)#login
• ALSwitch(config-line)#password telnetpass
• ALSwitch(config-line)#^Z
13
`Configuring The Catalyst Switch (cont)

• To allow the switch to be accessible by Telnet and


other TCP/IP applications, IP addresses and a
default gateway should be set
• ALSwitch(config)#interface vlan 1
• ALSwitch(config-if)#ip address 192.168.20.254
255.255.255.0
• ALSwitch(config)#ip default-gateway 192.168.20.1
14
`Configuring The Catalyst Switch (cont)

• The Fast Ethernet switch ports default to auto-


speed and auto-duplex
• ALSwitch(config)#interface f0/1
• ALSwitch(config-if)#duplex full
• ALSwitch(config-if)#speed 100
15
`Configuring The Catalyst Switch (cont)

• Intelligent networking devices can provide a web-


based interface for configuration and management
purposes
• ALSwitch(config)#ip http server
• Any additional software such as an applet, can be
downloaded to the browser from the switch
16
`Managing The MAC Address Table
• ALSwitch#show mac-address-table
Dynamic Address Count: 2
Secure Address Count: 0
Static Address (User-defined) Count: 0
System Self Address Count: 49
Total MAC addresses: 51
Maximum MAC addresses: 2048
Non-static Address Table:
Destination Address Address Type VLAN Destination Port
------------------- ------------ ---- --------------------
0000.3951.b2e3 Dynamic 1 FastEthernet0/5
0201.0000.0000 Dynamic 1 FastEthernet0/5
• ALSwitch#clear mac-address-table
17
`Configuring Static MAC Addresses

• It may be decided that it is desirable for a MAC


address to be permanently assigned to an interface
• To set a static MAC address entry for a switch:
• Switch(config)#mac-address-table static <mac-
address of host> interface FastEthernet
<Ethernet numer> vlan
• To remove this entry use the no form of the
command:
• Switch(config)#no mac-address-table static
<mac-address of host> interface FastEthernet
<Ethernet number> vlan <vlan name>
18
`Configuring Port Security

ALSwitch(config)#interface f0/2
ALSwitch(config-if)# switchport mode access
ALSwitch(config-if)#switchport port-security
ALSwitch(config-if)#switchport port-security maximum
{maximum_addresses}
ALSwitch(config-if)# switchport port-security mac-
address sticky
ALSwitch(config-if)#switchport port-security violation
{shutdown | restrict | protect}
19
` Verifying Switch configuration

Show port-security [interface interface-id]


[address]
Show interface [interface interface-id] [status]
Show run
Show start
20
`Summary
• Monitoring switch activity and status using LED indicators
• Examining the switch bootup output using HyperTerminal
• Using the help features of the command line interface
• Setting an IP address and default gateway for the switch to
allow connection and management over a network
• Setting interfaces for speed and duplex operation
• Examining and managing the switch MAC address table
• Configuring port security
• Managing configuration files and IOS images
• Performing password recovery on a switch
• Upgrading the IOS of a switch
21

Das könnte Ihnen auch gefallen