LAN Switching
LAN Switching
1
LAN Switching
Catalyst 3550 L2/L3
• L3 Features
L2 Vs. L3 Interfaces
IP Unicast Routing
Switch Virtual Interface (SVI)
Fallback Bridging
• Configuration Example:
–Create VLAN interface and assign IP address to it
Switch(config)#interface vlan 1
Switch(config-if)#ip address 10.1.1.1 255.255.255.0
Switch(config-if)#no shut
–Configure IP default-gateway if necessary (when IP routing
is disabled)
Switch(config)#ip default-gateway 10.1.1.254
• By default, only VLAN 1 exists on the switch, and all ports on the switch are
assigned to it
• Must be in VTP Server or Transparent mode to add/delete VLANs
• Normal-range VLANs (1 ~ 1005) are stored in ‘vlan.dat’ located on ‘flash:’,
while extended-range VLANs (1006 ~ 4094) are stored in ‘running-config’.
• Deleting ‘vlan.dat’ will remove all non-default VLANs, but will only take effect
after reload
• Creating new VLAN
– In VLAN Configuration Mode (Old Method)
– In IOS “config-vlan” Mode (New Method)
• Configuration Example:
Switch#vlan database
Switch(vlan)#vtp domain CCIE
Changing VTP domain name from NULL to CCIE
Switch(vlan)#vtp password CISCO
Setting device VLAN database password to CISCO.
Switch(vlan)#vtp <server/client/transparent>
Setting device to VTP <SERVER/CLIENT/TRANSPARENT> mode.
Switch(vlan)#exit
• Configuration Example:
Switch(config)#vtp domain CCIE
Changing VTP domain name from NULL to CCIE
Switch(config)#vtp password CISCO
Setting device VLAN database password to CISCO.
Switch(config)#vtp mode <server/client/transparent>
Setting device to VTP <SERVER/CLIENT/TRANSPARENT> mode
When you save VTP information in the switch startup configuration file and reboot the
switch, the switch configuration is determined as follows:
• If the VTP mode is transparent in the startup configuration and the VLAN database
and the VTP domain name from the VLAN database matches that in the startup
configuration file, the VLAN database is ignored (cleared), and the VTP and VLAN
configurations in the startup configuration file are used. The VLAN database revision
number remains unchanged in the VLAN database.
• If the VTP mode or domain name in the startup configuration do not match the VLAN
database, the domain name and VTP mode and configuration for the first 1005 VLANs
use the VLAN database information.
• If the switch is running IOS release 12.1(9)EA1 or later and you use an older
configuration file to boot up the switch, the configuration file does not contain VTP or
VLAN information, and the switch uses the VLAN database configurations.
• If the switch is running an IOS release earlier than 12.1(9)EA1 on the switch and you
use a configuration file from IOS release 12.1(9)EA1 or later to boot up the switch, the
image on the switch does not recognize VLAN and VTP configurations in the
configuration file, so the switch uses the VLAN database configuration.
• AUTO: DTP frames are both sent/received. Will negotiate trunking with
neighboring switch.(willing/ listens)
• DESIRABLE (Default): communication to the neighboring switch via
DISL/DTP that it is capable of an ISL/dot1Q trunk and would like the
neighboring switch to also be one.(will / listens)
• ON: automatically enables ISL trunking regardless of the state of the
neighboring switch.(will / listens)
• Nonegotiate: DISL/DTP is not spoken with the neighboring switch and
automatically enables ISL trunking.(will / does not listen)
• OFF: ISL/dot1Q is not allowed on this port regardless of the trunking mode
on the neighboring switch
Protected: false
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled
• ON: Can form a channel only when the link partner is also
configure in ON mode. PAgP packets are not sent.
• AUTO: Can form a channel only when the link partner is
configured in DESIRABLE mode. Under AUTO mode, a port does
not initiate negotiation
• DESIRABLE: (recommended) Can form a channel when the link
partner is configured in either AUTO or DESIRABLE modes
• OFF: Can not form a channel with any port
• To sum up, the only valid modes combinations are
ON/ON, DESIRABLE/DESIRABLE, DESIRABLE/AUTO
• Configuration Example:
Switch(config)#interface range gigabitEthernet 0/1 – 2
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport access vlan 400
Switch(config-if-range)#channel-group 10 mode desirable
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1
Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Gi0/1 SC U6/S7 H 30s 1 128 Any 17
Partner's information:
VLAN0400
Spanning tree enabled protocol ieee
Root ID Priority 33168
Address 0002.4b28.dc00
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
• L2 Interfaces:
Default port state
Learn MAC address based on SA on incoming frames
Participate in STP and send out BPDU
Can be either Access or Trunk port
• L3 Interfaces:
Configure via “Switch(config-if)#no switchport”
Act like regular router interfaces
• Configuration Example:
Switch(config)#interface vlan 400
Switch(config-if)#ip address 200.1.1.1 255.255.255.0
Switch(config-if)#no shut
DSCP bits in the ToS byte of an IPv4 packet:
Queue/
Schedule
Classification/
Policing Marking
Reclassification Congestion
Control
Switch(config)#mls qos
Switch(config)#access-list 1 permit 10.1.0.0 0.0.255.255
Switch(config)#mac access-list extended maclist2
Switch(config-ext-macl)#permit 0001.0000.0003 0.0.0 0002.0000.0003 0.0.0
Switch(config-ext-macl)#permit 0001.0000.0004 0.0.0 0002.0000.0004 0.0.0 aarp
Switch(config)#exit
Switch(config)#class-map ipclass1
Switch(config-cmap)#match access-group 1
Switch(config-cmap)#policy-map flow1t
Switch(config-pmap)#class ipclass1
Switch(config-cmap-c)#trust ip-precedence
Switch(config-cmap-c)#police 48000 26000 exceed-action drop
Switch(config-cmap-c)#class macclass2 access-group name maclist2
Switch(config-cmap-c)#set ip dscp 45
Switch(config-cmap-c)# interface gigabitethernet0/1
Switch(config-if)# service-policy input flow1t
2,3 2/1
4,5 3/1
6,7 4/1
qid-weights 3 - 2
4 - 3
1 - 25 5 - 4
6 - 4
2 - 25 7 - 4
3 - 25
4 - 50
• Configuration Example:
Switch(config)#mls qos min-reserve 8 150
Switch(config)##int fast 0/1
Switch(config-if)#wrr-queue min-reserve 4 8