Switch VLAN, TRUNK, VTP configuration

Source: Internet
Author: User
Tags md5 digest unsupported cisco switch

Switch VLAN, TRUNK ,VTP configuration

1. Configure the IP address of the CISCO two layer switch (Catalyst 2950 for example )

SW1 (config) #int vlan 1//Enter the management interface interface VLAN 1

SW1 (config-if) #ip address 11.1.1.2 255.255.255.0//Configure IP Address

SW1 (config-if) #no shutdown

SW1 (config-if) #exit

SW1 (config) #ip default-gateway 11.1.1.1//configuration gateway, which can be checked by show run

To view the configured IP address:

sw1#show int VLAN 1

Vlan1 is up, line protocol are up

Hardware is CPU Interface, address is 0008.20ff.6400 (BIA 0008.20ff.6400)

Internet address is 11.1.1. 2/24

2. Configure Port speed and duplex for the switch (speeds and Duplex)

SW1 (config) #interface FA0/1

SW1 (config-if) #speed {ten | | auto}//10m/100m/Adaptive

SW1 (config-if) #duplex {Auto | full | half}//Adaptive/Full duplex/half Duplex

In general, the port speed and duplex on both ends of the switch to match, so that the quality of communication can be guaranteed, in the same manufacturers of products

(for example, Cisco's switch Interconnect) port negotiation does not normally have any problem, can be checked by show interface

Look at the speed and duplex of the port. Typically in products from different manufacturers (for example, Cisco and Huawei Interconnect) if the port speed is detected by looking at

The degree and duplex mismatch can be resolved by manual configuration. :

To view the speed and duplex of a port via show interface:

Sw1#show Interfaces FastEthernet 0/24

FASTETHERNET0/24 is up, line protocol was up (connected)

Hardware is Fast Ethernet, address is 0008.20ff.6418 (BIA 0008.20ff.6418)

MTU bytes, BW 100000 Kbit, DLY usec,

Reliability 255/255, Txload 1/255, Rxload 1/255

Encapsulation ARPA, loopback not set

Keepalive Set (SEC)

Full-duplex, 100mb/s, media type is 100BaseTX

Input Flow-control is unsupported output Flow-control is unsupported

ARP Type:arpa, ARP Timeout 04:00:00

Last input 00:00:03, output 00:00:00, output hang never

Note: CISCO switch port default value: Auto-duplex, auto-speed, media type is 100BaseTX

Cisco devices Configure the port speedand Duplex (duplex) Commands:

SW1 (config) #interface fastethernet 0/24

SW1 (config-if) # speed?

Force 10M Mbps Operation----------------------------Note: forced speed

Operation---------------------------Note: Force speed is 100M

Auto Enable Auto Speed configuration-----------------Note: Rate Automatic protocol (default)

SW1 (config-if) #duplex ?

Auto Enable Auto Duplex configuration----------------Note: auto-Negotiate Duplex

Full Duplex Operation---------------------------Note: forced

Half Force Half-duplex Operation--------------------------Note: forced to half duplex

3. Set persistent MAC address but

SW1 (config) #mac-address-table static mac_addr {VLAN vlan_id} [interface int1 [int2... int15 ]]

SW1 (config) #mac-address-table static 1111.1111.a111 VLAN 1 interface F0/1

After configuration, show mac-address-table can see the statically added MAC address 1111.1111.a111

sw1#Show Mac-address-table

Vlan Mac Address Type Ports

---- ----------- -------- -----

All 000F.72DB.4EC0 STATIC CPU

1 1111.1111.a111 STATIC FA0/1

4. Manage MAC Address tables

Sw1#show mac-address-table

Mac Address Table

-------------------------------------------

Vlan Mac Address Type Ports

---- ----------- -------- -----

All 000F.72DB.4EC0 STATIC CPU

1 0000.0c3f.0b05 DYNAMIC FA0/12

1 0030.94e6.391d DYNAMIC FA0/11

1 00e0.b05a.5bfe DYNAMIC FA0/10

1 1111.1111.a111 STATIC FA0/1

5. Set the switch port access mode (three kinds) Access/dynamic/trunk

SW1 (config-if) #switchport mode?

Access Set trunking mode to ACCESS unconditionally

Dynamic Set trunking mode to dynamically negotiate access or trunk mode

Trunk Set trunking mode to TRUNK unconditionally

SW1 (config) #int fastethernet 0/1

SW1 (config-if) #switchport mode access//set FA0/1 to access mode

SW1 (config-if) #switchport mode trunk//set FA0/1 to trunk mode

SW1 (config-if) #switchport mode dynamic Auto//set FA0/1 for automatic direct negotiation mode (default)

Switch TRUNK port configuration :

1) General switch-to-switch port to be set to trunk mode

2) If the comb switch is connected to an unmanaged switch, the core switch port is set to access mode

Such as:

Configuration SW1:

SW1 (config) #int f0/24

SW1 (config-if) #no shutdown

SW1 (config-if) #switchport mode trunk//set FA0/24 to trunk mode

Configuration SW2:

SW2 (config) #int f0/24

SW2 (config-if) #no shutdown

SW2 (config-if) #switchport mode trunk//set FA0/24 to trunk mode

To verify the TRUNK command:

Show Interface Trunk

Show Interface F0/24 Switchport

sw1#Sho Run int f0/24

Interface FASTETHERNET0/24

Switchport mode Trunk

sw1#Show int trunk

Port Mode encapsulation Status Native VLAN

FA0/24 on 802.1q trunking 1

sw1#show int f0/24 Switchport

Name:fa0/24

Switchport:enabled

Administrative Mode:trunk

Operational Mode: Trunk

Administrative Trunking encapsulation:dot1q

Operational trunking Encapsulation: dot1q

Negotiation of Trunking:on

Access Mode vlan:1 (default)

Trunking Native Mode vlan:1 (default)

Voice Vlan:none

Administrative Private-vlan Host-association:none

Administrative Private-vlan Mapping:none

Administrative Private-vlan Trunk Native Vlan:none

Administrative Private-vlan Trunk encapsulation:dot1q

Administrative Private-vlan Trunk Normal Vlans:none

Administrative Private-vlan Trunk Private Vlans:none

Operational Private-vlan:none

Trunking VLANs Enabled:all

Pruning VLANs enabled:2-1001

Capture Mode Disabled

Capture VLANs Allowed:all

Protected:false

Appliance Trust:none

sw1#

SW2:

Sw2#sho Run int f0/24

Interface FASTETHERNET0/24

Switchport mode Trunk

End

sw2#show Int Trunk

Port Mode encapsulation Status Native VLAN

FA0/24 on 802.1q trunking 1

6. Configure VLANs

1). Create a VLAN

SW1 (config) #vlan 2//Create VLAN2

SW1 (config) #name VLAN2//named VLAN2, default is vlan002, naming is optional command

2). Join the port to the VLAN

SW1 (config-if) #switchport mode access//provisioning port for access mode

SW1 (config-if) #switchport access VLAN 2//Add port to Vlan2

3). Check the command

Switch#show VLAN

Example:

Create the VLAN2 command for Widom,

Create VLAN3 command for market

Add Port F0/4 to VLAN2

Sw1#config T

SW1 (config) #vlan 2

SW1 (Config-vlan) #name wisdom

SW1 (Config-vlan) #exit

SW1 (config) #vlan 3

SW1 (Config-vlan) #name Market

SW1 (Config-vlan) #exit

SW1 (config) #int FAS0/4

SW1 (config-if) #switchport mode access

SW1 (config-if) #switchport Access VLAN 2

Multiple ports can be added to the corresponding VLAN at the same time

SW1 (config) #interface range fastethernet 0/10–15//can add multiple ports to a VLAN at the same time

SW1 (Config-if-range) #switchport mode access

SW1 (config-if-range) #switchport access VLAN 3//Add port 10-15 to VLAN3

Sw1#show VLAN//Check VLAN information

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 Default Active FA0/1, FA0/5, FA0/6, FA0/7

FA0/8, FA0/9, FA0/16, FA0/17

FA0/18, Fa0/19, FA0/20, FA0/21

FA0/22, FA0/23, fa0/24

2 Wisdom Active FA0/4

3 Market Active FA0/10, FA0/11, FA0/12

FA0/13, FA0/14, FA0/15

sw1#

7. Configuring VTP----VTP technology makes it easy to lay out multiple VLANs in a large network .

Configuration steps for VTP:

1. Configure trunk (switch and switch ports to be set to trunk)

2. Configuring VTP DOMAIN

3. Configuring VTP MODE

4. Configure VLAN

5. Adding ports to VLANs

6. Check

Switch#show interface Xx/xx switchport//view trunk status of the corresponding interface

Switch#show VTP Status//view VTP State

switch#show VLAN //View VLAN

Configuration SW1:

Sw1#configure Terminal

SW1 (config) #interface fastethernet 0/24

SW1 (config-if) #switchport mode trunk

SW1 (config-if) #no shutdown

SW1 (config-if) #exit

SW1 (config) #vtp domain wisdom

Domain name already set to wisdom.

SW1 (config) #vtp mode server

Device mode already VTP SERVER.

SW1 (config) #vtp password Cisco

Setting device VLAN database password to Cisco

SW1 (config) #vtp pruning//configuration VTP pruning as long as the server side is configured on the line.

Pruning switched on

Sw1#sho VTP Status

VTP Version:2

Configuration Revision:1

Maximum VLANs Supported locally:64

Number of existing Vlans:5

VTP Operating Mode:server

VTP Domain Name:wisdom

VTP Pruning mode:enabled

VTP V2 mode:disabled

VTP Traps generation:disabled

MD5 digest:0xe8 0x5A 0x7d 0xb1 0x0E 0xBC 0xEB 0x1F

Configuration last modified by 11.1.1. 2 at 3-1-93 02:56:31

Local Updater ID is 11.1.1. 2 on Interface Vl1 (lowest numbered VLAN interface found)

Create VLAN2 VLAN3 VLAN4 VLAN5

SW1 (config) #vlan 2

SW1 (Config-vlan) #vlan 3

SW1 (Config-vlan) #vlan 4

SW1 (Config-vlan) #vlan 5

SW1 (Config-vlan) #

View revisions after creating VLANs on SW1:

sw1#show VTP status

VTP Version:2

Configuration Revision : 5

Maximum VLANs Supported locally:128

Number of existing Vlans:9

VTP Operating Mode:server

VTP Domain Name:wisdom

VTP Pruning mode:enabled

VTP V2 mode:disabled

VTP Traps generation:disabled

MD5 digest:0x9c 0x64 0xd6 0x44 0x5E 0x54 0x9E 0xFC

Configuration last modified by 11.1.1.2 at 3-1-93 02:59:04

Local Updater ID is 11.1.1.2 on interface Vl1 (lowest numbered VLAN interface found)

Check for VLAN created on switch SW1

Sw1#sho VLAN

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 Default Active FA0/1, FA0/5, FA0/6, FA0/7

FA0/8, FA0/9, FA0/16, FA0/17

FA0/18, Fa0/19, FA0/20, FA0/21

FA0/22, FA0/23, fa0/24

2 VLAN0002 Active

3 VLAN0003 Active

4 VLAN0004 Active

5 VLAN0005 Active

Check trunk port :

Sw1#show Interfaces FastEthernet 0/24 switchport

Name:fa0/24

Switchport:enabled

Administrative Mode:trunk

Operational Mode:trunk

Administrative Trunking encapsulation:dot1q

Operational Trunking encapsulation:dot1q

Negotiation of Trunking:on

Access Mode vlan:1 (default)

Trunking Native Mode vlan:1 (default)

Voice Vlan:none

Administrative Private-vlan Host-association:none

Administrative Private-vlan Mapping:none

Administrative Private-vlan Trunk Native Vlan:none

Administrative Private-vlan Trunk encapsulation:dot1q

Administrative Private-vlan Trunk Normal Vlans:none

Administrative Private-vlan Trunk Private Vlans:none

Operational Private-vlan:none

Trunking VLANs Enabled:all

Pruning VLANs enabled:2-1001

Capture Mode Disabled

Capture VLANs Allowed:all

Protected:false

Appliance Trust:none

Configuration SW2:

switch#

Switch#config T

Enter configuration commands, one per line. End with cntl/z.

SW2 (config) #hostname SW2

SW2 (config) #int fastethernet 0/24

SW2 (config-if) #switchport mode trunk

SW2 (config-if) #exit

SW2 (config) #vtp domain wisdom

Changing VTP domain name from test to Wisdom

SW2 (config) #vtp mode client

Setting device to VTP CLIENT mode.

SW2 (config) #vtp password Cisco

Setting device VLAN database password to Cisco

SW2 (config) #

To view the trunk status of f0/24 :

Sw2#show Interfaces FastEthernet 0/24 switchport

Name:fa0/24

Switchport:enabled

Administrative Mode:trunk

Operational Mode:trunk

Administrative Trunking encapsulation:dot1q

Operational Trunking encapsulation:dot1q

Negotiation of Trunking:on

Access Mode vlan:1 (default)

Trunking Native Mode vlan:1 (default)

Voice Vlan:none

Administrative Private-vlan Host-association:none

Administrative Private-vlan Mapping:none

Administrative Private-vlan Trunk Native Vlan:none

Administrative Private-vlan Trunk encapsulation:dot1q

Administrative Private-vlan Trunk Normal Vlans:none

Administrative Private-vlan Trunk Private Vlans:none

Operational Private-vlan:none

Trunking VLANs Enabled:all

Pruning VLANs enabled:2-1001

Capture Mode Disabled

Capture VLANs Allowed:all

Protected:false

Appliance Trust:none

To view the VTP status :

Sw2#show VTP Status

VTP Version:2

Configuration Revision:5

Maximum VLANs Supported locally:128

Number of existing Vlans:9

VTP Operating mode:client

VTP Domain Name:wisdom

VTP Pruning mode:enabled

VTP V2 mode:disabled

VTP Traps generation:disabled

MD5 digest:0x9c 0x64 0xd6 0x44 0x5E 0x54 0x9E 0xFC

Configuration last modified by 11.1.1. 2 at 3-1-93 02:59:04

----------Here you can see that the VLAN information for SW2 is synchronized from sw1-11.1.1.2.

Sw2#show VLAN

VLAN Name Status Ports

---- -------------------------------- --------- -------------------------------

1 Default Active FA0/2, FA0/3, FA0/4, FA0/5

FA0/6, FA0/7, FA0/8, FA0/9

FA0/10, FA0/11, FA0/12, FA0/13

FA0/14, FA0/15, FA0/16, FA0/17

FA0/18, Fa0/19, FA0/20, FA0/21

FA0/22, FA0/23, fa0/24

2 VLAN0002 Active

3 VLAN0003 Active

4 VLAN0004 Active

5 VLAN0005 Active

Experimental results:

The SW2 does not configure VLANs, and the VLAN information for SW1 has been synchronized. Experimental success

After SW2 synchronizes the VLAN of the VTP SERVER, the next operation is to add the appropriate port to the appropriate VLAN

Switch VLAN, TRUNK, VTP configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.