VLAN配置

题目要求:

配置:

  1. 配置二层:

Sw1:

[sw1]vlan batch 2 to 6

[sw1]int e 0/0/3

[sw1-Ethernet0/0/3]p l a

[sw1-Ethernet0/0/3]p d v 2

[sw1]int e 0/0/4

[sw1-Ethernet0/0/4]p h p v 3

[sw1-Ethernet0/0/4]p h u v 3 to 6

[sw1-Ethernet0/0/4]int e 0/0/2

[sw1-Ethernet0/0/2]p l t

[sw1-Ethernet0/0/2]p t a v 2 to 6

[sw1]int e 0/0/1

[sw1-Ethernet0/0/1]p h u v 3 to 6

[sw1-Ethernet0/0/1]port hybrid tagged v 2

Sw2

[sw2]vlan b 2 to 6

[sw2]int e 0/0/1

[sw2-Ethernet0/0/1]p l t

[sw2-Ethernet0/0/1]p t a v 2 to 6

[sw2-Ethernet0/0/1]int e 0/0/2

[sw2-Ethernet0/0/2]p l t

[sw2-Ethernet0/0/2]p t a v 2 to 6

[sw2]int e 0/0/3

[sw2-Ethernet0/0/3]p l a

[sw2-Ethernet0/0/3]p d v 2

[sw2-Ethernet0/0/3]int e 0/0/4

[sw2-Ethernet0/0/4]p h p v 4

[sw2-Ethernet0/0/4]p h u v 3 to 6

Sw3

[sw3]vlan b 2 to 6

[sw3]int e 0/0/1

[sw3-Ethernet0/0/1]p l t

[sw3-Ethernet0/0/1]p t a v 2 to 6

[sw3-Ethernet0/0/1]int e 0/0/2

[sw3-Ethernet0/0/2]p h p v 5

[sw3-Ethernet0/0/2]p h u v 3 to 5

[sw3-Ethernet0/0/2]int e 0/0/3

[sw3-Ethernet0/0/3]p h p v 6

[sw3-Ethernet0/0/3]p h u v 3 4 6

配三层:

配置地址:

[a1]int g 0/0/0

[a1-GigabitEthernet0/0/0]ip add 192.168.1.254 24

[a1-GigabitEthernet0/0/0]int g 0/0/0.1

[a1-GigabitEthernet0/0/0.1]ip add 192.168.2.254 24

[a1-GigabitEthernet0/0/0.1]dot1q termination vid 2

[a1-GigabitEthernet0/0/0.1]arp broadcast enable

配置DHCP

[a1]dhcp en

[a1]ip pool aa

[a1-ip-pool-aa]network 192.168.1.0 mask 24   

[a1-ip-pool-aa]gateway-list 192.168.1.254

[a1]ip pool bb

[a1-ip-pool-bb]network 192.168.2.0 mask 24

[a1-ip-pool-bb]gateway-list 192.168.2.254

[a1-GigabitEthernet0/0/0]dhcp select global

[a1-GigabitEthernet0/0/0]int g 0/0/0.1

[a1-GigabitEthernet0/0/0.1]dhcp select g

测试:

  • 10
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值