ensp--VLAN配置

image-20230724162903847

image-20230724163153826

image-20230724163342438

1.access配置

image-20230724115259480

vlan 10
vlan batch 30 40 	//配置多个vlan

image-20230724144303083

image-20230724144320088

  • 查看vlan配置
display vlan

image-20230724144449146

  • 配置LSW1 e0/0/2 access接口
interface e0/0/2
port link-type access 
port default vlan 10

image-20230724144934764

image-20230724144949143

display vlan

image-20230724145052562

发现e0/0/0接入vlan10里

同理配置其他交换机和接口

image-20230724145508168

2.trunk配置

image-20230724142215159

1.配置s1和s2 access

image-20230724145911392

			//LSW4:e0/0/2
vlan batch 10 20
interface e0/0/2
port link-type access 
port default vlan 10
			LSW4:e0/0/3
q
interface e0/0/3
port link-type access 
port default vlan 20

image-20230724151238854

			//LSW5:e0/0/2
vlan batch 10 20
interface e0/0/2
port link-type access 
port default vlan 10
			LSW5:e0/0/3
q
interface e0/0/3
port link-type access 
port default vlan 20

image-20230724151351307

image-20230724151412350

2.汇聚交换机配置trunk

需要在LSW4:e0/0/1 LSW5:e0/0/1 LSW3:e0/0/1、0/0/2都配置trunk

				//LSW4:e0/0/1
interface e0/0/1
port link-type trunk 
port trunk allow-pass vlan 10 20
				//LSW5:e0/0/1
interface e0/0/1
port link-type trunk 
port trunk allow-pass vlan 10 20
				//LSW3:e0/0/1
interface g0/0/1
port link-type trunk 
port trunk allow-pass vlan 10 20
				//LSW3:e0/0/2
interface g0/0/2
port link-type trunk 
port trunk allow-pass vlan 10 20

image-20230724152153663

display vlan

image-20230724152541704

vlan10 :pc6 ping pc 8

image-20230724152914892

3.配置hybrid

image-20230724153959388

image-20230724154920854

		//LSW6:e0/0/4
vlan batch 10 20 30
interface e0/0/4
port link-type hybrid 
port hybrid pvid vlan 20
port hybrid untagged vlan 30 20
		//LSW6:e0/0/3
interface e0/0/3
port link-type hybrid 
port hybrid pvid vlan 10
port hybrid untagged vlan 30 10
		//LSW6:e0/0/1
interface e0/0/1
port link-type hybrid 
port hybrid pvid vlan 30
port hybrid untagged vlan 30 10 20
		//LSW6:e0/0/2
interface e0/0/2
port link-type hybrid 
port hybrid tagged vlan 30 10 20
display vlan

image-20230724165039720

		//LSW7:e0/0/3
vlan batch 10 20 30
interface e0/0/3
port link-type hybrid 
port hybrid pvid vlan 20
port hybrid untagged vlan 30 20
		//LSW7:e0/0/2
interface e0/0/2
port link-type hybrid 
port hybrid pvid vlan 10
port hybrid untagged vlan 30 10
		//LSW7:e0/0/1
interface e0/0/1
port link-type hybrid 
port hybrid tagged vlan 30 10 20
display vlan

image-20230724165141570

检验

  • vlan20 : 192.168.1.1

image-20230724165203730

image-20230724165225165

image-20230724165244708

  • vlan10 : 192.168.1.2

image-20230724165346499

  • vlan30 : 192.168.1.1

image-20230724165434287

image-20230724165512261

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

§666§

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值