Sunteți pe pagina 1din 63

Cisco Devices

The Command-Line Interface


Shortcuts for Entering Commands

Using the [tab] Key to Complete Commands

Using the Question Mark for Help

enable Command

exit Command
disable Command

logout Command

Setup Mode

Keyboard Help
show Commands

Configuring a Router
Configuring a Single Cisco Router
Router Modes

Entering Global Configuration Mode

Configuring a Router Name


Configuring Passwords

Password Encryption

Configuring a Serial Interface

Configuring a Fast Ethernet Interface


Creating a Message-of-the-Day Banner

Creating a Login Banner

Setting the Clock Time Zone

Assigning a Local Host Name to an IP Address

The no ip domain-lookup Command


The logging synchronous Command

The exec-timeout Command

Saving Configurations

Erasing Configurations

show Commands
EXEC Commands in Configuration Mode: The do Command
Configuration Example: Basic Router Configuration

Boston Router
Routing
Static Routing
Configuring a Static Route on a Router

Static Routes and Administrative Distance (Optional)


Router(config)#ip route 172.16.20.0 255.255.255.0 172.16.10.2 permanent
Router(config)#ip route 172.16.20.0 255.255.255.0 172.16.10.2 200
Configuring a Default Route on a Router

Verifying Static Routes


Router#show ip route

Configuration Example: Static Routes


Boston Router

Buffalo Router

Bangor Router
RIP
The ip classless Command

RIP Routing: Mandatory Commands

RIP Routing: Optional Commands


Troubleshooting RIP Issues

Configuration Example: RIPv2 Routing


Cancun Router

Acapulco Router

Mazatlan Router
EIGRP
Configuring Enhanced Interior Gateway Routing Protocol (EIGRP)

EIGRP Auto-Summarization
Load Balancing: variance

Bandwidth Use
Authentication

Verifying EIGRP
Troubleshooting EIGRP

Configuration Example: EIGRP

Austin Router
Houston Router
Single Area OSPF
Configuring OSPF: Mandatory Commands

Using Wildcard Masks with OSPF Areas

Configuring OSPF: Optional Commands

Loopback Interfaces
Router ID

DR/BDR Elections

Modifying Cost Metrics


Authentication: Simple

Authentication: Using MD5 Encryption


Timers

Propagating a Default Route

Verifying OSPF Configuration


Troubleshooting OSPF

Configuration Example: Single Area OSPF


Austin Router

Houston Router
Galveston Router
Switching
Configuring a Switch
Help Commands

Command Modes

Verifying Commands
Resetting Switch Configuration

Setting Host Names

Setting Passwords
Setting IP Addresses and Default Gateways

Setting Interface Descriptions

Setting Duplex Operation


Setting Operation Speed

Managing the MAC Address Table

Configuring Static MAC Addresses

Switch Port Security


Verifying Switch Port Security
Sticky MAC Addresses
Configuration Example
VLANs
Creating Static VLANs

Using VLAN Configuration Mode


Using VLAN Database Mode

Assigning Ports to VLANs

Using the range Command

Verifying VLAN Information


Saving VLAN Configurations

Erasing VLAN Configurations


Configuration Example: VLANs
VLAN Trunking Protocol and Inter-
VLAN Routing
Dynamic Trunking Protocol (DTP)

Setting the Encapsulation Type


VLAN Trunking Protocol (VTP)
Using VLAN Database Mode
Verifying VTP

Inter-VLAN Communication Using an External Router:

Router-on-a-Stick
Inter-VLAN Communication Tips

Router(config)#interface fastethernet 0/0


Router(config­if)#encapsulation dot1q 1 native
Router(config­if)#ip address 192.168.1.1 255.255.255.0
Router(config­if)#interface fastethernet 0/0.10
Router(config­subif)#encapsulation dot1q 10
Router(config­subif)#ip address 192.168.10.1 255.255.255.0

Configuration Example: Inter-VLAN Communication

ISP Router
CORP Router
L2Switch1 (Catalyst 2960)
STP and EtherChannel
Spanning Tree Protocol

Enabling Spanning Tree Protocol

Configuring the Root Switch


Configuring a Secondary Root Switch

Configuring Port Priority

Configuring the Path Cost


Configuring the Switch Priority of a VLAN

Configuring STP Timers

Verifying STP
Optional STP Configurations
PortFast

BPDU Guard

Changing the Spanning-Tree Mode

Different types of spanning tree can be configured on a Cisco switch. The options vary
according to the platform:
• Per-VLAN Spanning Tree (PVST)—There is one instance of spanning tree for each
VLAN. This is a Cisco proprietary protocol.
• Per-VLAN Spanning Tree Plus (PVST+)—Also Cisco proprietary. Has added
extensions to the PVST protocol.
• Rapid PVST+—This mode is the same as PVST+ except that it uses a rapid
convergence based on the 802.1w standard.
• Multiple Spanning Tree Protocol (MSTP)—IEEE 802.1s. Extends the 802.1w
Rapid Spanning Tree (RST) algorithm to multiple spanning trees. Multiple VLANs
can map to a single instance of RST. You cannot run MSTP and PVST at the same
time.
Extended System ID

Enabling Rapid Spanning Tree

Troubleshooting Spanning Tree


Configuration Example: STP

Core Switch (2960)


Distribution 1 Switch (2960)

Distribution 2 Switch (2960)


EtherChannel

EtherChannel provides fault-tolerant, high-speed links between switches, routers, and


servers. An EtherChannel consists of individual Fast Ethernet or Gigabit Ethernet links
bundled into a single logical link. If a link within an EtherChannel fails, traffic previously
carried over that failed link changes to the remaining links within the EtherChannel.

Interface Modes in EtherChannel

Guidelines for Configuring EtherChannel

Configuring Layer 2 EtherChannel


Verifying EtherChannel

Configuration Example: EtherChannel


Core (2960)
ALSwitch1 (2960)
ALSwitch2 (2960)
Extending the LAN
Implementing a Wireless LAN