Cisco configuring: VLAN Trunking Protocol and Inter-VLAN Communication

This article provides information and commands concerning the following topics:


Tip

The default mode is dependent on the platform. For the 2960/9200 series, the default mode is dynamic auto.

Tip

On a 2960/9200 series switch, the default for all ports is to be an access port. However, with the default DTP mode being dynamic auto, an access port can be converted into a trunk port if that port receives DTP information from the other side of the link and that other side is set to trunk or desirable. It is therefore recommended that you hard-code all access ports as access ports with the switchport mode access command. This way, DTP information will not inadvertently change an access port to a trunk port. Any port set with the switchport mode access command ignores any DTP requests to convert the link.

Tip

VLAN Trunking Protocol (VTP) domain names must match for a DTP to negotiate a trunk.

Depending on the series of switch that you are using, you may have a choice as to what type of VLAN encapsulation you want to use: the Cisco proprietary Inter-Switch Link (ISL) or the IEEE Standard 802.1Q (dot1q). The 2960 and 9200 series of switches only support dot1q trunking.

Caution

Cisco ISL has been deprecated. Depending on the age and model of your Cisco switch, you may be able to change the encapsulation type between dot1q and ISL.

Tip

With the switchport trunk encapsulation negotiate command set, the preferred trunking method is ISL.

Caution

The 2960, 2960-x, and 9200 series of switches support only dot1q trunking.

VTP is a Cisco proprietary protocol that allows for VLAN configuration (addition, deletion, or renaming of VLANs) to be consistently maintained across a common administrative domain.

Note

Only VLANs included in the pruning-eligible list can be pruned. VLANs 2 through 1001 are pruning eligible by default on trunk ports. Reserved VLANs and extended-range VLANs cannot be pruned. To change which eligible VLANs can be pruned, use the interface-specific switchport trunk pruning vlan command:

Click here to view code image

Switch(config-if)# switchport trunk pruning vlan remove 4,20-30
! Removes VLANs 4 and 20-30
Switch(config-if)# switchport trunk pruning vlan except 40-50
! All VLANs are added to the pruning list except for 40-50

Caution

Due to the inherent risk in having VTP servers overwrite each other and cause VLANs to disappear, Cisco recommends as a best practice deploying VTP in transparent mode. If you are going to use a client/server model, use Version 3 and the use of a VTPv3 primary server to prevent accidental database overwrites.

Note

If trunking has been established before VTP is set up, VTP information is propagated throughout the switch fabric almost immediately. However, because VTP information is advertised only every 300 seconds (5 minutes), unless a change has been made to force an update, it can take several minutes for VTP information to be propagated.

Note

The networks of the VLANs are directly connected to the router. Routing between these networks does not require a dynamic routing protocol. In a more complex topology, these routes need to either be advertised with whatever dynamic routing protocol is being used or be redistributed into whatever dynamic routing protocol is being used.

Note

Routes to the networks associated with these VLANs appear in the routing table as directly connected networks.

Note

In production environments, VLAN 1 should not be used as the management VLAN because it poses a potential security risk; all ports are in VLAN 1 by default, and it is an easy mistake to add a nonmanagement user to the management VLAN.

Note

Rather than using an external router to provide inter-VLAN communication, a multilayer switch can perform the same task through the use of a switched virtual interface (SVI).

Note

For an SVI to go to up/up and be added to the routing table, the VLAN for the SVI must be created, an IP address must be assigned, and at least one interface must support it.

  • Although most older routers (routers running IOS 12.2 and earlier) support both ISL and dot1q, some switch models support only dot1q, such as the 2960, 2960-x, and 9200 series. Check with the version of IOS you are using to determine whether ISL or dot1q is supported.

    • ISL will probably not be an option, as it has been deprecated for quite some time.

    • If you need to use ISL as your trunking protocol, use the command encapsulation isl x, where x is the number of the VLAN to be assigned to that subinterface.

  • Recommended best practice is to use the same number as the VLAN number for the subinterface number. It is easier to troubleshoot VLAN 10 on subinterface fa0/0.10 than on fa0/0.2

Figure 10-1 illustrates the network topology for the configuration that follows, which shows how to configure inter-VLAN communication using commands covered in this article. Some commands used in this configuration are from other posts.

Вас заинтересует / Intresting for you:

Configuring a Cisco Router: fi...
Configuring a Cisco Router: fi... 1341 views Валерий Павлюков Sun, 06 Feb 2022, 18:18:52
Cisco Discovery Protocol (CDP)...
Cisco Discovery Protocol (CDP)... 1009 views Валерий Павлюков Sat, 05 Feb 2022, 17:35:12
Cisco: Resetting Switch Config...
Cisco: Resetting Switch Config... 1711 views Андрей Волков Mon, 15 Feb 2021, 19:13:09
Cisco: Shortcuts for Entering ...
Cisco: Shortcuts for Entering ... 1646 views Андрей Волков Wed, 17 Feb 2021, 15:59:18
Comments (0)
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Suggested Locations