Configuring cisco catalyst / router

# Cisco configuration:
# Indendted commands are short forms of normal commands

# connect to the catalyst

# or connect console cable and fire up hyperterminal
bps:          9600
Databit:         8
Parity:       none
Stop Bit:        1
Flow control: none
# press enter a couple of times

# log in as 'root'
# give enable pass

# To configure interfaces, go to terminal config mode:
configure terminal
    conf t

# Then enter interface config mode:
interface FastEthernet0/1
    in Fa0/1
# make changes and go back to general conf mode:
end conf mode with:

# To setup passwords go to terminal config:
conf t
enable password <password>
# or
enable password 0 <password>

# to enable telnet access configure the VTY line
conf t
line vty 0 4
password <password>

# to change ip, go to interface config mode on vlan 1:
conf t
in vlan 1
# now enter the designated ip:
ip address
# exit to general conf and enter the gateway:
ip default-gateway

# to enable or disable an interface, use the shutdown command

conf t
in Fa0/1
no shutdown

# to setup new vlan instances:
# For catalyst:
# enter the vlan database:
vlan database
# add new vlans:
vlan <id> name <name>
# where ID = 2-68 and name = vlan name or VLAN00<ID>
# delete a vlan:
no vlan <id>

# to move a port to a vlan:
# enter interface configuration mode:
conf t
in Fa0/1
# define vlan membership for this port, and give static access to vlan id:
# (the port can only access one vlan)
switchport mode access
switchport access vlan <vlanid>
# define vlan membership for this port, and give multi access to vlan ids:
# (the port can access more vlans. conficts with 802.1Q trunks)
#  You cannot have multi-VLAN and trunk ports configured on the same switch
switchport mode multi
switchport multi vlan <vlanid>, <vlanid>
# define a trunk
switchport mode trunk
switchport trunk encapsulation (isl|dot1q)
# dot1q / 802.1Q is useable with linux / bsd
# disable some vlans over the trunk:
switchport trunk allowed vlan remove vlan-list
# setup the non-tagged traffic vlan:
switchport trunk native vlan <vlan id>
# non tagged traffic and tagged traffic can coexist nicely.
# disable a trunk:
no switchport mode

# Vlan for routers:
# Create first sub interface for FastEthernet0/0
conf t
interface FastEthernet0/0.1
# set vlan tag id to 10
encapsulation dot1q 10
# set ip address
ip address
# repeat with fa0/0.2 and so forth...

# how to setup portfast (and disable STP)
# go to interface config mode for the port
# then do:
spanning-tree portfast
    sp portfast

# show spanning tree protocol details:
# all ports:
show spanning-tree
    sh sp

# per port:
show spanning-tree interface FastEthernet0/1
    sh sp in Fa0/1

# per vlan:
show spanning-tree vlan 1
    sh sp vl 1

# For each VLAN, the switch with the highest switch priority (the lowest
# numerical priority value) is elected as the root switch. If all switches are
# configured with the default priority (32768), the switch with the lowest MAC
# address in the VLAN becomes the root switch.

# show list of interfaces:
show interface
    sh in

# show list of vlans
show vlan
    sh vl

# save settings
copy runnin-config startup-config

# Important links:

Configuring STP (Spanning Tree Protocol):

Understanding and Tuning Spanning Tree Protocol Timers:
Dette indlæg blev udgivet i Cisco, Knowledge Base, Networking. Bogmærk permalinket.

Skriv et svar