永发信息网

【急`在线等】vlan命令的解析

答案:2  悬赏:50  手机版
解决时间 2021-04-14 08:38
  • 提问者网友:浮克旳回音
  • 2021-04-14 01:06

!进人配置模式

switch # config t

! 配置设备名

switch(config) # hostname bangonglou

!配置特权模式口令

bangonglou(config) # enable password test

bangonglou(config) # enable secret test

!进人V'I'Y配置模式

bangonglou(config) # line vty 0 4

!配置登录提示

bangonglou(config-line) # login

!配里用户级口令

bangonglou(config-line) # password test

bangonglou(config-line) # exit

(2)第二层的配制

!配置设备名称

Console>(enable) set system name C4006-L2

!配置设备登录口令

C6509-L2>(enable)set password

Enter old password:

Enter new password:test

Retype new password:test

!配置进入特权模式口令

C6509-L2>(enable)set enablepass

Enter old password:

!设备口令

Enter new password:test

Retype new password:test

!配置管理接口地址

C6509-L2>(enable)set interface sc0 192.168.40.1 255.255.255.0

!配置VTP模式

C6509-L2>(enable)set vtp mode server

配置VLAN,其名字使用拼音

C6509-L2>(enable)set vlan 1 name wangluozhongxin

C6509-L2>(enable)set vlan 24 name bangonglou

C6509-L2>(enable)set vlan 25name jifang

C6509-L2>(enable)set vlan 26 name jiaoxuelou

C6509-L2>(enable)set vlan 27 name yuanchengfenxiao

!关闭相应端口的trunk模式

C6509-L2>(enable)set trunk 1/1 off dotlq 1一1005

C6509-L2>(enable)set trunk 1/2 off dotlq 1一1005

C6509-L2>(enable)set trunk 2/1 off dotlq 1一1005

C6509-L2>(enable)set trunk 2/2 off dotlq 1一1005

!把端口分配给相应的VLAN

C6509-L2>(enable)set vlan 1 2/4-8

C6509-L2>(enable)set vlan 24 2/9-24

C6509-L2>(enable)set vlan 25 2/25-34

C6509-L2>(enable)set vlan 26 1/2

C6509-L2>(enable)set vlan 27 2/3

(2)第3层的配置

Console>(enable) session 2

Router(config) # hostname C4006-L3

C6509-L3(config) # enable password test

C6509-L3 (config) # enable secret test

C6509-L3 (config) # line vty 0 4

C4006-L3(config) # login

C6509-L3 (config-line) # password test

C6509-L3 (config-line) # exit

!建立虚拟端口

C6509-L3 (config) # interface port-channel 1

C6509-L3 (config) # interface g3

C6509-L3 (config-if) # channel-group 1

C6509-L3 (config) # interface g4

C6509-L3 (config-if) # channel-group 1

!配置VLAN1的接口地址

C6509-L3 (config) # interface port-channel1.1

C6509-L3 (config-subif) # encapsulation dot 1 Q 1

C6509-L3 (config-subif) # ip address 210.47.224.2 255.255.255.0

C6509-L3 (config-subif) # no shutdown

C6509-L3 (config-subif) # exit

!配置VLAN24的接口地址

C6509-L3 (config) # interface port-channel1.2

C6509-L3 (config-subif) # encapsulation dot 1 Q 24

C6509-L3 (config-subif) # ip address 210.47.223.2 255.255.255.0

C6509-L3 (config-subif) # no shutdown

C4006-L3(config-subif) # exit

!配置VLAN24的接口地址

C6509-L3 (config) # interface port-channel1.3

C6509-L3 (config-subif) # encapsulation dot 1 Q 25

C6509-L3 (config-subif) # ip address 210.47.230.2 255.255.255.0

C6509-L3 (config-subif) # no shutdown

C6509-L3 (config-subif) # exit

!配置VLAN26的接口地址

C6509-L3 (config) # interface port-channel1.4

C6509-L3 (config-subif) # encapsulation dot 1 Q 26

C6509-L3 (config-subif) # ip address 210.47.222.2 255.255.255.0

C6509-L3 (config-subif) # no shutdown

C6509-L3 (config-subif) # exit

!配置VLAN27的接口地址

C6509-L3 (config) # interface port-channel1.5

C6509-L3 (config-subif) # encapsulation dot 1 Q 27

C6509-L3 (config-subif) # ip address 210.47.223.69 255.255.255.0

C6509-L3 (config-subif) # no shutdown

C6509-L3 (config-subif) # exit

最佳答案
  • 五星知识达人网友:一叶十三刺
  • 2021-04-14 02:18

听清楚的吗,都有注释你问的到底是什么?

全部回答
  • 1楼网友:一叶十三刺
  • 2021-04-14 03:14

这怎么可能是华为的交换机呢从名称就显示出来了的嘛,cisco的C6509交换机的嘛!

我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯