Configuration Example


Virtual LANs


Virtual LANs (VLANs) enable network managers to group users logically rather than by physical location.

With VLANs, switches can support more than one subnet (or VLAN) on each switch, and can give routers and switches the opportunity to support multiple subnets on a single physical link. Layer 3 switching software supports VLAN frame encapsulation through implementation of the Inter-Switch Link (ISL) protocol and the IEEE 802.1Q standard. ISL is a Cisco protocol for interconnecting multiple switches and maintaining VLAN information as traffic travels between switches. The IEEE 802.1Q standard provides a method for secure bridging of data across a shared backbone.


Command

Purpose

Switch# configure terminal

Switch(config)#

Enters global configuration mode.

Switch(config)# interface {gigabitethernet fastethernet} card/subcard/port.subinterface

Switch(config-subif)#

Enters subinterface configuration mode.

Switch(config-subif)#

encapsulation isl vlan-id


or

Switch(config-subif)# encap dot1q

vlan-id native

Specifies ISL encapsulation for the Ethernet frames sent from this subinterface, with a header that maintains the specified VLAN ID between network nodes.

or

Specifies 802.1Q encapsulation for Ethernet frames sent from the subinterface, with a header that maintains the specified native VLAN ID between network nodes.

Switch(config-subif)# bridge-group bridge-group

Assigns the subinterface a bridge group number.

Switch(config-subif)# interface {gigabitethernet fastethernet} card/subcard/port

Switch(config-if)#

Enters interface configuration mode to configure the Ethernet main interface.

Switch(config-if)# bridge-group bridge-group

Assigns the main interface to the bridge group.

Switch(config-if)# exit

Returns to global configuration mode.

Switch(config)# bridge bridge-group protocol ieee

Specifies that the bridge group will use the IEEE Ethernet Spanning Tree Protocol.



5-5

Example

Switch> enable

Switch# configure terminal

Switch(config)# interface gigabitethernet 0/0/1.1

Switch(config-subif)# encapsulation isl 50

Switch(config-subif)# bridge-group 1

Switch(config-subif)# interface gigabitethernet 11/0/0

Switch(config-if)# bridge-group 1

Switch(config-if)# exit

Switch(config)# bridge 1 protocol ieee

Switch(config)# interface fastethernet 10/0/1.2

Switch(config-subif)# encapsulation isl 100

Switch(config-subif)# bridge-group 2

Switch(config-subif)# interface fastethernet 9/0/2

Switch(config-if)# bridge-group 2

Switch(config-if)# exit

Switch(config)# bridge 2 protocol ieee

Switch(config)# exit

Switch# copy system:running-config nvram:startup-config



Verifying

Switch# show vlan 50

Virtual LAN ID: 50 (Inter Switch Link Encapsulation)

vLAN Trunk Interface: GigabitEthernet0/0/1.

Protocols Configured: Address: Received: Transmitted:

Bridging Bridge Group 1 0

Switch# more system:running-config

!

<Information deleted>

!

interface GigabitEthernet0/0/1.1

encapsulation isl 50

no ip redirects

no ip route-cache

bridge-group 1

!

<Information deleted>


Ether-Channel

EtherChannel is a logical aggregation of multiple Ethernet interfaces. EtherChannel is designed primarily for host-to-switch connectivity or Inter-Switch Link (ISL) switch-to-switch connectivity.


Configuring a Fast EtherChannel (FEC) or a Gigabit EtherChannel (GEC) consists of the following two-step process:

Step 1: Create an EtherChannel interface (port channel) and assign a network address.

Step 2: Assign the Fast Ethernet or Gigabit Ethernet interfaces (up to four) to the port channel.


When assigning interfaces to a specific port channel, the interfaces must all be Fast Ethernet, Gigabit Ethernet, or Enhanced Gigabit Ethernet. You cannot mix interface types within a single port-channel.


Command

Purpose

Switch> enable

Enters privileged EXEC mode.

Switch# configure terminal

Switch(config)#

Enters global configuration mode.

Switch(config)# interface port-channel channel-number

Switch(config-if)#

Creates the EtherChannel interface and enters interface configuration mode. The channel number can be from 1 to 64 for FECs and GECs.

Switch(config-if)# ip address ip-address subnet-mask

Assigns an IP address and subnet mask to the EtherChannel interface.

Switch(config-if)# no shutdown

Enables the EtherChannel interface.

Switch(config-if)# exit

Switch(config)#

Exits interface configuration mode. Optionally, you can remain in interface configuration mode and enable other supported interface commands to meet

your requirements.

Switch(config)# interface {gigabitethernet fastethernet} card/subcard/port

Switch(config-if)

Enters interface configuration mode.

Switch(config-if)# no ip address

Disables the IP address.

Note If the Fast Ethernet or Gigabit Ethernet interface already exists and has an IP address assigned,

you must disable it before performing the next step.

The Ethernet interface uses the IP address assigned to the EtherChannel interface.

Switch(config-if)# channel-group channel-number

Assigns the Fast Ethernet or Gigabit Ethernet interfaces to the EtherChannel. The channel number must be the same channel number you assigned to the

EtherChannel interface.

Switch(config-if)# exit

Switch(config)#

Returns to global configuration mode. Repeat Steps 7 through 9 to add up to four Fast Ethernet or Gigabit Ethernet interfaces to the Fast EtherChannel.

Switch(config)# end

Switch#

Returns to privileged EXEC mode.

Switch# copy system:running-config nvram:startup-config

Saves your configuration changes to NVRAM.



Example

Switch> enable

Switch# configure terminal

Switch(config)# interface port-channel 5

Switch(config-if)# ip address 209.165.200.225 255.255.255.224

Switch(config-if)# no shutdown

Switch(config-if)# exit

Switch(config)# interface fastethernet 0/0/0

Switch(config-if)# no ip address

Switch(config-if)# channel-group 5

Switch(config-if)# end

Switch# copy system:running-config nvram:startup-config