Configuring cisco catalyst / router

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

# connect to the catalyst
telnet 192.168.200.250

# 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'
enable
    ena
# 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:
exit
end conf mode with:
end

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

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

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

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

conf t
in Fa0/1
shutdown
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>
end

# 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
end

# 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 10.1.1.1 255.255.255.0
exit
# 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):
http://www.cisco.com/univercd/cc/td/doc/product/lan/cat2950/1216ea2b/scg/swgstp.htm

Understanding and Tuning Spanning Tree Protocol Timers:
http://www.cisco.com/warp/public/473/122.html
Dette indlæg blev udgivet i Cisco, Knowledge Base, Networking. Bogmærk permalinket.

Skriv et svar