Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

VTP configuration of Cisco Packer Trace

2025-02-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

VTP understands:

In a switched network with multiple switches, the same VLAN is usually configured on multiple switches, and the same configuration is made for multiple interfaces. For the need to do the same configuration for multiple interfaces, through fast interface configuration, it can be easily achieved and improve work efficiency. For the same VLAN configuration on multiple switches, it is realized through VTP.

In order to configure the same VLAN on multiple switches, VTP is accomplished by propagating the VLAN of one switch to other switches. After receiving the VLAN information, the other switches update their VLAN database to achieve synchronization.

To send your own VLAN information to the network, the switch must be configured to support both Trunk,IEEE 802.1Q and ISL, and the VLAN message can be received through the switch connected to the Trunk. VTP manages the switches in the network through domains. The VLAN information sent by any switch can only be propagated in one domain. Only switches in the same domain can receive this VLAN information, and update their VLAN database according to the received VLAN information. Whether the switch is in the same domain is distinguished by the domain name. For example, the domain name ccie and the domain name ccie belong to the same domain, while the domain name ccie and the domain name cisco belong to different domains. The domain name of the default switch is empty, but the most important thing to keep in mind is that if your domain name is empty, it is the same as any non-empty domain name, that is, if the other party has a domain name but does not have a domain name, then you belong to the same domain as the other party.

The experimental environment is as follows:

To achieve the goal:

1. Configure VTP Server on the CoreSW core layer 3 switch, create VLAN2\ VLAN3, and assign IP segments: 192.168.2.0\ 192.168.3.0.

2. Configure VTP CLIENT on the SW1 and SW2 switches, and divide the port F0Unix3 of each switch into VLAN2 and F0Unix4 into VLAN3.

3. Set the IP address of each PC as follows:

PC0: 192.168.2.2 Universe 24 Gateway: 192.168.2.1

PC1: 192.168.3.2 Universe 24 Gateway: 192.168.3.1

PC2: 192.168.2.3 Universe 24 Gateway: 192.168.2.1

PC3: 192.168.3.3 Universe 24 Gateway: 192.168.3.1

4. Enable the routing function on the CoreSW switch and configure the routing exchange protocol to make the data of each VLAN communicate with each other.

5. Test whether the data between each VLAN is interoperable.

Experimental steps: (follow the steps to achieve the goal)

1. Configure VTP Server on the CoreSW core layer 3 switch, create VLAN2\ VLAN3, and assign IP segments: 192.168.2.0\ 192.168.3.0.

Switch >

Switch > enable

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch (config) # hostname CoreSW

CoreSW (config) # exit

CoreSW#

% SYS-5-CONFIG_I: Configured from console by console

CoreSW#vlan database

% Warning: It is recommended to configure VLAN from config mode

As VLAN database mode is being deprecated. Please consult user

Documentation for configuring VTP/VLAN in config mode.

CoreSW (vlan) # vtp domain senya

Domain name already set to senya.

CoreSW (vlan) # vtp server

Device mode already VTP SERVER.

CoreSW (vlan) # exit

APPLY completed.

Exiting....

CoreSW#

CoreSW#conf t

Enter configuration commands, one per line. End with CNTL/Z.

CoreSW (config) # int fa0/1

CoreSW (config-if) # switchport trunk encapsulation dot1q

CoreSW (config-if) # switchport mode trunk

CoreSW (config-if) #

% LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

% LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

CoreSW (config-if) # exit

CoreSW (config) # int fa0/2

CoreSW (config-if) # switchport trunk encapsulation dot1q

CoreSW (config-if) # switchport mode trunk

CoreSW (config-if) #

% LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down

% LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up

CoreSW (config) # int vlan 2

CoreSW (config-if) # ip add 192.168.2.1 255.255.255.0

CoreSW (config-if) # no shutdown

CoreSW (config-if) # exit

CoreSW (config) # int vlan 3

CoreSW (config-if) # ip add 192.168.3.1 255.255.255.0

CoreSW (config-if) # no shutdown

2. Configure VTP CLIENT on the SW1 and SW2 switches, and divide the port F0Unix3 of each switch into VLAN2 and F0Unix4 into VLAN3.

SW1:

Switch > enable

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch (config) # hostname SW1

SW1 (config) # exit

SW1#

% SYS-5-CONFIG_I: Configured from console by console

SW1#

SW1#vlan database

% Warning: It is recommended to configure VLAN from config mode

As VLAN database mode is being deprecated. Please consult user

Documentation for configuring VTP/VLAN in config mode.

SW1 (vlan) # vtp domain senya

Domain name already set to senya.

SW1 (vlan) # vtp client

Device mode already VTP CLIENT.

SW1 (vlan) # exit

APPLY completed.

Exiting....

SW1#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, Gig1/1

Gig1/2

2 VLAN0002 active

3 VLAN0003 active

4 VLAN0004 active

SW1 (config) # int fa0/3

SW1 (config-if) # switchport mode access

SW1 (config-if) # switchport access vlan 2

SW1 (config-if) # exit

SW1 (config) # int fa0/4

SW1 (config-if) # switchport mode access

SW1 (config-if) # switchport access vlan 3

SW2: (the same procedure as SW1 is omitted)

3. Set the IP address of each PC as follows: (omit)

PC0: 192.168.2.2 Universe 24 Gateway: 192.168.2.1

PC1: 192.168.3.2 Universe 24 Gateway: 192.168.3.1

PC2: 192.168.2.3 Universe 24 Gateway: 192.168.2.1

PC3: 192.168.3.3 Universe 24 Gateway: 192.168.3.1

4. Enable the routing function on the CoreSW switch and configure the routing exchange protocol to make the data of each VLAN communicate with each other.

CoreSW#conf t

Enter configuration commands, one per line. End with CNTL/Z.

CoreSW (config) # ip routing

CoreSW (config) # router rip

CoreSW (config-router) # ver 2

CoreSW (config-router) # no au

CoreSW (config-router) # no auto-summary

CoreSW (config-router) # net 192.168.2.0

CoreSW (config-router) # net 192.168.3.0

CoreSW (config-router) # exit

5. Test whether the data between each VLAN is interoperable.

Question: if I add a host to SW1 or SW2 and set the IP address to 192.168.2.5, will this host PING the host to VLAN3? the result will not work, and the VLAN2 host 192.168.2.2 on the same switch is also PING impassable.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report