Configure
In this section, you are presented with the information to configure the features described in this document.
Note: To find additional information on the commands used in this document, use the Command Lookup Tool ( registered customers only) .
Network Diagram
This document uses the network setup shown in the diagram below.

Configurations
This document uses the configurations shown below.
Note: Router models with certain network modules may have different minimum Cisco IOS versions that support ISL trunking.
Catalyst 3512-XL
Cisco 2600 Router
802.1Q Configuration on the Router for Cisco IOS Versions Earlier than 12.1(3)T
switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.switch(config)#hostname 3512xl3512xl(config)#enable password mysecret3512xl(config)#line vty 0 43512xl(config-line)#login3512xl(config-line)#password mysecret3512xl(config-line)#exit3512xl(config)#no logging console3512xl(config)#^Z!-- Set the IP address and default gateway for VLAN1 for management purposes.3512xl#configure terminalEnter configuration commands, one per line. End with CNTL/Z.3512xl(config)#int vlan 13512xl(config-if)#ip address 10.10.10.2 255.255.255.03512xl(config-if)#exit3512xl(config)#ip default-gateway 10.10.10.13512xl(config)#end!-- Set the VTP Mode.!-- In our example, we have set the mode to be transparent.!-- Depending on your network, set the VTP Mode accordingly.!-- For details on VTP,!-- refer to!-- Creating and Maintaining VLANs on Catalyst 2900XL and 3500XL Switches.3512xl#vlan database3512xl(vlan)#vtp transparentSetting device to VTP TRANSPARENT mode.!-- Adding VLAN2. VLAN1 already exists by default.3512xl(vlan)#vlan 2VLAN 2 added:Name: VLAN00023512xl(vlan)#exitAPPLY completed.Exiting....!-- Enable trunking on the interface fastEthernet 0/1.3512xl#configure terminalEnter configuration commands, one per line. End with CNTL/Z.3512xl(config)#int fastEthernet 0/13512xl(config-if)#switchport mode trunk!-- Enter the trunking encapsulation as either isl3512xl(config-if)#switchport trunk encapsulation isl!-- or as dot1q:3512xl(config-if)#switchport trunk encapsulation dot1q!-- In case of 2940/2950 series switches, none of the above two commands are used,!-- 2940/2950 series switches only support 802.1q encapsulation which is configured automatically,!-- when trunking is enabled on the interface by using switchport mode trunk command.!-- In case of dot1q, you need to make sure that!-- the native VLAN matches across the link.!-- On 3512XL, by default, the native VLAN is 1.!-- Depending on your network needs, you may change!-- the native VLAN to be other than VLAN1,!-- but it is very important that you change the native VLAN!-- on the router accordingly.!-- You may change the native VLAN, if needed, by using the following command:!-- 3512xl(config-if)#switchport trunk native vlan!-- Allow all VLANs on the trunk.3512xl(config-if)#switchport trunk allowed vlan all3512xl(config-if)#exit!-- The following set of commands will place FastEthernet 0/2!-- into VLAN2 and enable portfast on the interface.3512xl(config)#int fastEthernet 0/23512xl(config-if)#switchport access vlan 23512xl(config-if)#spanning-tree portfast3512xl(config-if)#exit!-- FastEthernet 0/3 is already in VLAN1 by default.!-- Enable portfast on the interface.3512xl(config)#int fastEthernet 0/33512xl(config-if)#spanning-tree portfast3512xl(config-if)#^Z!-- For details on why to enable portfast,!-- refer to:!-- Using PortFast and Other Commands to Fix Workstation Startup Connectivity Delays.!-- Remember to save the configuration.3512xl#write memoryBuilding configuration...3512xl#--------------------------------------------------------------------------------3512xl#show running-configBuilding configuration...Current configuration:!version 12.0no service padservice timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname 3512xl!no logging consoleenable password mysecret!!!!!ip subnet-zero!!!interface FastEthernet0/1switchport mode trunk!!-- If 802.1Q is configured,!-- you will instead see the following output!-- under interface FastEthernet0/1:!-- interface FastEthernet0/1!-- switchport trunk encapsulation dot1q!-- switchport mode trunk!interface FastEthernet0/2switchport access vlan 2spanning-tree portfast!interface FastEthernet0/3spanning-tree portfast!interface FastEthernet0/4!interface FastEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0/10!interface FastEthernet0/11!interface FastEthernet0/12!interface GigabitEthernet0/1!interface GigabitEthernet0/2!interface VLAN1ip address 10.10.10.2 255.255.255.0no ip directed-broadcastno ip route-cache!ip default-gateway 10.10.10.1!line con 0transport input nonestopbits 1line vty 0 4password mysecretloginline vty 5 15login!end

0 comments:
Post a Comment