打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
vlan划分实例


 
 

 

3560-24ps 三层交换机配置:

core#show run

Building configuration...

 

Current configuration : 1322 bytes

!

version 12.2

no service password-encryption

!

hostname core

!

!

!

!

!

ip ssh version 1

!

port-channel load-balance src-mac

!

interface FastEthernet0/1

 switchport mode trunk    (配置f0/1trunk)

!

interface FastEthernet0/2

 switchport access vlan 2  (配置f0/2vlan 2)

!

interface FastEthernet0/3

 switchport mode trunk

 

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 FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

interface FastEthernet0/21

!

interface FastEthernet0/22

!

interface FastEthernet0/23

 switchport mode trunk

!

interface FastEthernet0/24

!

interface GigabitEthernet0/1

!

interface GigabitEthernet0/2

!

interface Vlan1

 no ip address

 shutdown

!

interface Vlan2

 ip address 192.168.1.254 255.255.255.0 (配置vlan 2 IP地址)

!

 

interface Vlan3

 ip address 192.168.2.254 255.255.255.0 vlan 3 IP 地址)

!

interface Vlan4

 ip address 192.168.3.254 255.255.255.0

!

ip classless

 

line con 0

line vty 0 4

 login

!

!

end

 

 

core#show vtp sta 

VTP Version                     : 2

Configuration Revision          : 12

Maximum VLANs supported locally : 1005

Number of existing VLANs        : 8

VTP Operating Mode              : Server

VTP Domain Name                 : abc

VTP Pruning Mode                : Disabled

VTP V2 Mode                     : Disabled

VTP Traps Generation            : Disabled

MD5 digest                      : 0x9F 0xDF 0x07 0xA4 0xD7 0x51 0x52 0x0A

Configuration last modified by 0.0.0.0 at 3-1-93 00:00:00

Local updater ID is 192.168.1.254 on interface Vl2 (lowest numbered VLAN interface found)

 

配置VTP模式,vtp domain name abc  mode: Server

 

 

 

 

 

2960 -24 SW2 交换机的配置:

Switch>en

Switch#show run

Building configuration...

 

Current configuration : 1000 bytes

!

version 12.2

no service password-encryption

!

hostname Switch

!

!

!

interface FastEthernet0/1

!

interface FastEthernet0/2 (配置f0/2trunk模式)

 switchport mode trunk

!

interface FastEthernet0/3

!

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 FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22  (配置f0/22端口属于vlan 3)

 switchport access vlan 3

!

interface FastEthernet0/23  (配置f0/23端口属于vlan 3)

 

 switchport access vlan 3

!

interface FastEthernet0/24

!

interface GigabitEthernet1/1

!

interface GigabitEthernet1/2

!

interface Vlan1

 no ip address

 shutdown

!

line con 0

!

line vty 0 4

 login

line vty 5 15

 login

!

!

end

 

 

 

witch#show vtp stat

VTP Version                     : 2

Configuration Revision          : 12

Maximum VLANs supported locally : 255

Number of existing VLANs        : 8

VTP Operating Mode              : Client

VTP Domain Name                 : abc

VTP Pruning Mode                : Disabled

VTP V2 Mode                     : Disabled

VTP Traps Generation            : Disabled

MD5 digest                      : 0x9F 0xDF 0x07 0xA4 0xD7 0x51 0x52 0x0A

Configuration last modified by 0.0.0.0 at 3-1-93 00:00:00

配置vtp modeClient

VTP Domain Nameabc

 

 

2960 -24 SW3 交换机的配置:

 

 

Switch>en

Switch#show run

Building configuration...

 

Current configuration : 1000 bytes

!

version 12.1

no service password-encryption

!

hostname Switch

!

!

!

interface FastEthernet0/1

!

interface FastEthernet0/2

!

interface FastEthernet0/3

 switchport mode trunk

!

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 FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22

 switchport access vlan 4

!

interface FastEthernet0/23

 switchport access vlan 4

!

interface FastEthernet0/24

!

interface GigabitEthernet1/1

!

interface GigabitEthernet1/2

!

interface Vlan1

 no ip address

 shutdown

!

line con 0

!

line vty 0 4

 login

line vty 5 15

 login

!

!

end

 

 

Switch#show vtp sta

VTP Version                     : 2

Configuration Revision          : 12

Maximum VLANs supported locally : 255

Number of existing VLANs        : 8

VTP Operating Mode              : Client

VTP Domain Name                 : abc

VTP Pruning Mode                : Disabled

VTP V2 Mode                     : Disabled

VTP Traps Generation            : Disabled

MD5 digest                      : 0x9F 0xDF 0x07 0xA4 0xD7 0x51 0x52 0x0A

Configuration last modified by 0.0.0.0 at 3-1-93 00:00:00

 

IP地址配置:

Server0:

      IP地址:  192.168.1.1

      子网掩码:255.255.255.0

      默认网关:192.168.1.254

PC0:

IP地址:  192.168.2.1

      子网掩码:255.255.255.0

      默认网关:192.168.2.254

 

PC2:

IP地址:  192.168.2.2

      子网掩码: 255.255.255.0

      默认网关:192.168.2.254

 

 

 

PC1:

 

IP地址:  192.168.3.1

      子网掩码:255.255.255.0

      默认网关:192.168.3.254

PC3:

    

IP地址:  192.168.3.2

      子网掩码: 255.255.255.0

      默认网关: 192.168.3.254

 

经测试3vlan互相能ping通。

 

OK! 实验到此结束。

 

 

 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
VTP协议实验详细配置步骤
[转载](二)基于三层交换机的HSRP、vlan、端口聚合
VLAN配置实例(一)
《转载》三层交换机配置DHCP实例配置
网络工程师成长日记357-某城市烟草局项目
CISCO3560 VLAN配置实例
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服