利用三层交换机实现Vlan间互通【行业相关】_第1页
利用三层交换机实现Vlan间互通【行业相关】_第2页
利用三层交换机实现Vlan间互通【行业相关】_第3页
利用三层交换机实现Vlan间互通【行业相关】_第4页
利用三层交换机实现Vlan间互通【行业相关】_第5页
已阅读5页,还剩29页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、实验六 利用三层交换机实现VLAN间互通,计算机网络技术,实验六 利用三层交换机实现VLAN间互通,实验背景,1,实验目标与实验设备,2,背景知识及技术原理,3,实验内容与步骤,4,2,特备参考,1、实验背景 公司现有1台三层交换机,要求你进行测试,该交换机的三层功能是否工作正常。 某企业有财务部、销售部和人事部三个主要部门,分处于不同的办公室,为了安全和便于管理对三个部门的主机进行了VLAN的划分,分别处于不同的VLAN,先由于业务的需求需要三个部门的主机都能够相互访问,获得相应的资源,三部门的交换机通过一台三层交换机进行了连接,实验六 利用三层交换机实现VLAN间互通,3,特备参考,2、实

2、验目标 理解三层交换机的基本原理 掌握三层交换机物理端口开启路由功能的配置方法 掌握交换机Tag VLAN的配置 掌握三层交换机基本配置方法 掌握三层交换机VLAN路由的配置方法 通过三层交换机实现VLAN间相互通信,实验六 利用三层交换机实现VLAN间互通,4,特备参考,3、实验设备 cisco 2960交换机2台 cisco 3560三层交换机1台 PC机10台或更多 直连线 交叉线 配置线,实验六 利用三层交换机实现VLAN间互通,5,特备参考,4、背景知识及技术原理 开启路由功能 Switch(config)#ip routing 配置三层交换机端口的路由功能 Switch (conf

3、ig)#interface fastEthernet 0/5 Switch (config-if)#no switchport Switch (config-if)#ip address 192.168.1.1 255.255.255.0 Switch (config-if)#no shutdown Switch (config-if)#end 三层交换机是带有三层路由功能的交换机,也就是交换机的端口既有三层路由功能,也具有二层交换功能。三层交换机端口默认为二层端口,如果需要启用三层功能就需要用no switchport命令关闭三层交换机指定端口的数据转发功能使其工作在路由模式,实验六 利用三

4、层交换机实现VLAN间互通,6,特备参考,4、背景知识及技术原理 三层交换机具备网络层的功能,实现VLAN相互访问的原理:利用三层交换机的路由功能,通过识别数据包的IP地址,查找路由表进行选路转发,三层交换机利用直连路由可以实现不同VLAN之间的相互访问。三层交换机给接口配置IP地址。采用SVI(交换虚拟接口)的方式实现VLAN间互连。SVI是指为交换机中的VLAN创建的虚拟接口,并且为其配置IP地址。 三层交换机将vlan做为一种接口对待,就象路由器上的一样,再在各接入VLAN的计算机上设置与所属VLAN的网络地址一致的IP地址,并且把默认网关设置为该VLAN的接口地址。这样,所有的VLAN

5、也可以互访了,实验六 利用三层交换机实现VLAN间互通,7,特备参考,5、实验步骤 新建packet tracer拓扑图 (1)在二层交换机上配置VLAN2、VLAN3,分别将端口2、端口3划分给VLAN2、VLAN3。 (2)将二层交换机与三层交换机相连的端口fa 0/1都定义为tag Vlan模式。 (3)在三层交换机上配置VLAN2、VLAN3,此时验证二层交换机VLAN2、VLAN3下的主机之间不能相互通信,实验六 利用三层交换机实现VLAN间互通,8,特备参考,5、实验步骤 (4)设置三层交换机VLAN间的通信,创建VLAN2,VLAN3的虚接口,并配置虚接口VLAN2、VLAN3的

6、IP地址。 (5)查看三层交换机路由表。 (6)将二层交换机VLAN2、VLAN3下的主机默认网关分别设置为相应虚拟接口的IP地址。 (7)验证二层交换机VLAN2,VALN3下的主机之间可以相互通信,实验六 利用三层交换机实现VLAN间互通,9,特备参考,在packet tracer中创建实验拓扑,打开packet tracer,添加两台2960交换机、一台3560交换机、10台PC机,其中八台PC分别与两台2960相连,其余两台与3560相连,两台2960之间用四条链路相连并设置为聚合链路,拓扑如下,实验六 利用三层交换机实现VLAN间互通,10,特备参考,实验步骤与内容,第一步:为每一台

7、计算机配好IP地址参数 cwb1:IP地址为10.1.1.2 子网掩码为255.255.255.0 默认网关为10.1.1.1 cwb2:IP地址为10.1.1.3 子网掩码为255.255.255.0 默认网关为10.1.1.1 cwb3:IP地址为10.1.1.4 子网掩码为255.255.255.0 默认网关为10.1.1.1 xsb1:IP地址为10.1.2.2 子网掩码为255.255.255.0 默认网关为10.1.2.1 xsb2:IP地址为10.1.2.3 子网掩码为255.255.255.0 默认网关为10.1.2.1 xsb3:IP地址为10.1.2.4 子网掩码为255.

8、255.255.0 默认网关为10.1.2.1 rsb1:IP地址为10.1.3.2 子网掩码为255.255.255.0 默认网关为10.1.3.1 rsb2:IP地址为10.1.3.3 子网掩码为255.255.255.0 默认网关为10.1.3.1,实验六 利用三层交换机实现VLAN间互通,11,特备参考,实验步骤与内容 续,第二步:分别修改交换机的主机名称 第一台交换机:Switch(config)#hostname sw2960-1 第二台交换机:Switch(config)#hostname sw2960-2 第三台交换机:Switch(config)#hostname sw356

9、0 第三步:分别为交换机配置管理地址 sw2960-1 (config)#interface vlan 1 sw2960-1 (config-if)#ip address 192.168.1.2 255.255.255.0 sw2960-1 (config-if)#no shutdown sw2960-2 (config)#interface vlan 1 sw2960-2 (config-if)#ip address 192.168.1.3 255.255.255.0 sw2960-2 (config-if)#no shutdown sw3560 (config)#interface vla

10、n 1 sw3560 (config-if)#ip address 192.168.1.1 255.255.255.0 sw3560 (config-if)#no shutdown,实验六 利用三层交换机实现VLAN间互通,12,特备参考,实验步骤与内容 续,第四步:分别配置管理员账号及密码 sw2960-1(config)#username aaa password aaa sw2960-1(config)#username bbb password bbb sw2960-2(config)#username aaa password aaa sw2960-1(config)#usernam

11、e bbb password bbb sw3560(config)#username aaa password aaa sw3560(config)#username bbb password bbb 第五步:分别为两台交换机配置vty本地登录验证 sw2960-1(config)#line vty 0 4 sw2960-1(config-line)#login local sw2960-2(config)#line vty 0 4 sw2960-2(config-line)#login local sw3560(config)#line vty 0 4 sw3560(config-line)

12、#login local,实验六 利用三层交换机实现VLAN间互通,13,特备参考,实验步骤与内容 续,第六步:分别设置进入特权模式的密码 sw2960-1(config)#enable secret 123456 sw2960-2(config)#enable secret 123456 sw3560(config)#enable secret 123456 第七步:在交换机上分别配置VLAN sw2960-1(config)#vlan 100 sw2960-1(config-vlan)#name cwb sw2960-1(config)#vlan 101 sw2960-1(config-v

13、lan)#name xsb sw2960-1(config)#vlan 102 sw2960-1(config-vlan)#name rsb sw2960-2(config)#vlan 100 sw2960-2(config-vlan)#name cwb sw2960-2(config)#vlan 101 sw2960-2(config-vlan)#name xsb sw2960-2(config)#vlan 102 sw2960-2(config-vlan)#name rsb sw3560(config)#vlan 100 sw3560 (config-vlan)#name cwb sw35

14、60(config)#vlan 101 sw3560 (config-vlan)#name xsb sw3560(config)#vlan 102 sw3560 (config-vlan)#name rsb,实验六 利用三层交换机实现VLAN间互通,14,特备参考,实验步骤与内容 续,第八步:进入接口模式,分别指定所属的VLAN sw2960-1(config)#interface fastEthernet 0/1 sw2960-1(config-if)#switchport access vlan 100 sw2960-1(config-if)#no shutdown sw2960-1(co

15、nfig)#interface fastEthernet 0/2 sw2960-1(config-if)#switchport access vlan 100 sw2960-1(config-if)#no shutdown sw2960-1(config)#interface fastEthernet 0/3 sw2960-1(config-if)#switchport access vlan 101 sw2960-1(config-if)#no shutdown sw2960-1(config)#interface fastEthernet 0/4 sw2960-1(config-if)#s

16、witchport access vlan 102 sw2960-1(config-if)#no shutdown,实验六 利用三层交换机实现VLAN间互通,15,特备参考,实验步骤与内容 续,第八步:进入接口模式,分别指定所属的VLAN sw2960-2(config)#interface fastEthernet 0/1 sw2960-2(config-if)#switchport access vlan 101 sw2960-2(config-if)#no shutdown sw2960-2(config)#interface fastEthernet 0/2 sw2960-2(conf

17、ig-if)#switchport access vlan 101 sw2960-2(config-if)#no shutdown sw2960-2(config)#interface fastEthernet 0/3 sw2960-2(config-if)#switchport access vlan 100 sw2960-2(config-if)#no shutdown sw2960-2(config)#interface fastEthernet 0/4 sw2960-2(config-if)#switchport access vlan 102 sw2960-2(config-if)#

18、no shutdown,实验六 利用三层交换机实现VLAN间互通,16,特备参考,实验步骤与内容 续,第八步:进入接口模式,分别指定所属的VLAN sw3560(config)#interface fastEthernet 0/1 sw3560(config-if)#switchport access vlan 1 sw3560(config-if)#no shutdown sw3560(config)#interface fastEthernet 0/2 sw3560(config-if)#switchport access vlan 102 sw3560(config-if)#no shu

19、tdown,实验六 利用三层交换机实现VLAN间互通,17,特备参考,实验步骤与内容 续,第九步:分别在两台交换机上配置TRUNK和聚合端口 sw2960-1(config)#interface range fastEthernet 0/21 - fastEthernet 0/24 sw2960-1(config-if-range)#switchport mode trunk sw2960-1(config-if-range)#switchport trunk allowed vlan all sw2960-1(config-if-range)#channel-group 1 mode on

20、sw2960-1(config-if-range)#no shutdown sw2960-2(config)#interface range fastEthernet 0/21 - fastEthernet 0/24 sw2960-2(config-if-range)#switchport mode trunk sw2960-2(config-if-range)#switchport trunk allowed vlan all sw2960-2(config-if-range)#channel-group 1 mode on sw2960-2(config-if-range)#no shut

21、down,实验六 利用三层交换机实现VLAN间互通,18,特备参考,实验步骤与内容 续,第十步:为3560交换机的VLAN配置IP地址 sw3560(config)#interface vlan 100 sw3560(config-if)#ip address 10.1.1.1 255.255.255.0 sw3560(config-if)#no shutdown sw3560(config)#interface vlan 101 sw3560(config-if)#ip address 10.1.2.1 255.255.255.0 sw3560(config-if)#no shutdown

22、sw3560(config)#interface vlan 102 sw3560(config-if)#ip address 10.1.3.1 255.255.255.0 sw3560(config-if)#no shutdown,实验六 利用三层交换机实现VLAN间互通,19,特备参考,实验步骤与内容 续,第十一步:分别为2960交换机的配置默认网关 sw2960-1(config)#ip default-gateway 192.168.1.1 sw2960-2(config)#ip default-gateway 192.168.1.1 第十二步:为3560交换机的配置默认网络 sw356

23、0(config)#ip default-network 192.168.1.1,实验六 利用三层交换机实现VLAN间互通,20,特备参考,实验步骤与内容 续,第十三步:验证 在cw1的CMD窗口执行:ping 10.1.1.3 ping 10.1.2.3 ping 192.168.1.3 第十四步:分别保存配置 sw2960-1#write 或 sw2960-1#write memory 或 sw2960-1#copy running-config startup-config sw2960-2#write 或 sw2960-2#write memory 或 sw2960-2#copy ru

24、nning-config startup-config sw3560#write memory 或 sw3560#copy running-config startup-config,实验六 利用三层交换机实现VLAN间互通,21,特备参考,实验总结,3、全局配置模式下的配置命令: 先看一下全局配置模式下都能使用哪些命令 Switch(config)#? 进入接口配置模式 Switch(config)#interface fastEthernet 0/1 提示:返回全局配置模式用exit,用end或Ctrl+z可直接退到特权模式。 进入接口配置模式配置vlan接口属性 Switch(confi

25、g)#interface vlan 1 进入连续的一组接口进行配置 Switch(config)#interface range fastEthernet 0/1 - fastEthernet 0/5 配置交换机名称 Switch(config)#hostname SwitchA /把交换机名称改为了SwitchA,在第一台2960交换机上的配置 Switchenable /进入特权模式 Switch#conf t /进入全局配置模式 Switch(config)#hostname sw2960-1 sw2960-1(config)#interface vlan 1 sw2960-1(conf

26、ig-if)#ip address 192.168.1.200 255.255.255.0 sw2960-1(config-if)#no shutdown sw2960-1(config-if)#exit sw2960-1(config)#username aaa password aaa sw2960-1(config)#username bbb password bbb sw2960-1(config)#line vty 0 4 sw2960-1(config-line)#login local sw2960-1(config-if)#exit sw2960-1(config)#enabl

27、e secret 123456 sw2960-1(config)#vlan 100,3、全局配置模式下的配置命令(续): 为交换机配置远程登录口令 Switch(config)#line vty 0 4 /进入虚拟终端,可设定0到15共16个,这里为5个 Switch(config-line)#password # /设置登录口令 Switch(config-line)#login /允许登录 Switch(config-line)#exec-timeout 5 0 /设置超时时间为5分0秒 设置远程登录进入特权模式的密码 Switch(config)#enable secret 123456

28、 /需在全局配置模式下使用enable命令 或Switch(config)#enable password 123456 提示:enable password设置的密码在配置文件中是以明文形式保存的,而enable secret是以加密保存的,不易被人破解具有较高的安全性,所以一般采用这种方式设置特权模式口令,实验六 利用三层交换机实现VLAN间互通,22,特备参考,实验总结,3、全局配置模式下的配置命令: 先看一下全局配置模式下都能使用哪些命令 Switch(config)#? 进入接口配置模式 Switch(config)#interface fastEthernet 0/1 提示:返回全

29、局配置模式用exit,用end或Ctrl+z可直接退到特权模式。 进入接口配置模式配置vlan接口属性 Switch(config)#interface vlan 1 进入连续的一组接口进行配置 Switch(config)#interface range fastEthernet 0/1 - fastEthernet 0/5 配置交换机名称 Switch(config)#hostname SwitchA /把交换机名称改为了SwitchA,在第一台2960交换机上的配置 sw2960-1(config-vlan)#name cwb sw2960-1(config-if)#exit sw296

30、0-1(config)#vlan 101 sw2960-1(config-vlan)#name xsb sw2960-1(config)#vlan 102 sw2960-1(config-vlan)#name rsb sw2960-1(config-if)#exit sw2960-1(config)#interface fastEthernet 0/1 sw2960-1(config-if)#switchport access vlan 100 sw2960-1(config-if)#no shutdown sw2960-1(config-if)#exit sw2960-1(config)#i

31、nterface fastEthernet 0/2 sw2960-1(config-if)#switchport access vlan 100 sw2960-1(config-if)#no shutdown sw2960-1(config-if)#exit sw2960-1(config)#interface fastEthernet 0/3,3、全局配置模式下的配置命令(续): 为交换机配置远程登录口令 Switch(config)#line vty 0 4 /进入虚拟终端,可设定0到15共16个,这里为5个 Switch(config-line)#password # /设置登录口令 S

32、witch(config-line)#login /允许登录 Switch(config-line)#exec-timeout 5 0 /设置超时时间为5分0秒 设置远程登录进入特权模式的密码 Switch(config)#enable secret 123456 /需在全局配置模式下使用enable命令 或Switch(config)#enable password 123456 提示:enable password设置的密码在配置文件中是以明文形式保存的,而enable secret是以加密保存的,不易被人破解具有较高的安全性,所以一般采用这种方式设置特权模式口令,实验六 利用三层交换机实

33、现VLAN间互通,23,特备参考,实验总结,3、全局配置模式下的配置命令: 先看一下全局配置模式下都能使用哪些命令 Switch(config)#? 进入接口配置模式 Switch(config)#interface fastEthernet 0/1 提示:返回全局配置模式用exit,用end或Ctrl+z可直接退到特权模式。 进入接口配置模式配置vlan接口属性 Switch(config)#interface vlan 1 进入连续的一组接口进行配置 Switch(config)#interface range fastEthernet 0/1 - fastEthernet 0/5 配置交

34、换机名称 Switch(config)#hostname SwitchA /把交换机名称改为了SwitchA,在第一台2960交换机上的配置 sw2960-1(config-if)#switchport access vlan 101 sw2960-1(config-if)#no shutdown sw2960-1(config-if)#exit sw2960-1(config)#interface fastEthernet 0/4 sw2960-1(config-if)#switchport access vlan 102 sw2960-1(config-if)#no shutdown sw

35、2960-1(config-if)#exit sw2960-1(config)# interface range fastEthernet 0/21 - fastEthernet 0/24 sw2960-1(config-if-range)# switchport mode trunk sw2960-1(config-if-range)# switchport trunk allowed vlan all sw2960-1(config-if-range)#channel-group 1 mode on sw2960-1(config-if-range)#no shutdown sw2960-

36、1(config-if-range)#exit sw2960-1(config-if)#exit sw2960-1(config)#ip default-gateway 192.168.1.1 sw2960-1(config)#exit sw2960-1#write,3、全局配置模式下的配置命令(续): 为交换机配置远程登录口令 Switch(config)#line vty 0 4 /进入虚拟终端,可设定0到15共16个,这里为5个 Switch(config-line)#password # /设置登录口令 Switch(config-line)#login /允许登录 Switch(co

37、nfig-line)#exec-timeout 5 0 /设置超时时间为5分0秒 设置远程登录进入特权模式的密码 Switch(config)#enable secret 123456 /需在全局配置模式下使用enable命令 或Switch(config)#enable password 123456 提示:enable password设置的密码在配置文件中是以明文形式保存的,而enable secret是以加密保存的,不易被人破解具有较高的安全性,所以一般采用这种方式设置特权模式口令,实验六 利用三层交换机实现VLAN间互通,24,特备参考,实验总结,3、全局配置模式下的配置命令: 先看

38、一下全局配置模式下都能使用哪些命令 Switch(config)#? 进入接口配置模式 Switch(config)#interface fastEthernet 0/1 提示:返回全局配置模式用exit,用end或Ctrl+z可直接退到特权模式。 进入接口配置模式配置vlan接口属性 Switch(config)#interface vlan 1 进入连续的一组接口进行配置 Switch(config)#interface range fastEthernet 0/1 - fastEthernet 0/5 配置交换机名称 Switch(config)#hostname SwitchA /把交

39、换机名称改为了SwitchA,在第一台2960交换机上的配置 Switchenable /进入特权模式 Switch#conf t /进入全局配置模式 Switch(config)#hostname sw2960-2 sw2960-2(config)#interface vlan 1 sw2960-2(config-if)#ip address 192.168.1.200 255.255.255.0 sw2960-2(config-if)#no shutdown sw2960-2(config-if)#exit sw2960-2(config)#username aaa password aa

40、a sw2960-2(config)#username bbb password bbb sw2960-2(config)#line vty 0 4 sw2960-2(config-line)#login local sw2960-2(config-if)#exit sw2960-2(config)#enable secret 123456 sw2960-2(config)#vlan 100,3、全局配置模式下的配置命令(续): 为交换机配置远程登录口令 Switch(config)#line vty 0 4 /进入虚拟终端,可设定0到15共16个,这里为5个 Switch(config-li

41、ne)#password # /设置登录口令 Switch(config-line)#login /允许登录 Switch(config-line)#exec-timeout 5 0 /设置超时时间为5分0秒 设置远程登录进入特权模式的密码 Switch(config)#enable secret 123456 /需在全局配置模式下使用enable命令 或Switch(config)#enable password 123456 提示:enable password设置的密码在配置文件中是以明文形式保存的,而enable secret是以加密保存的,不易被人破解具有较高的安全性,所以一般采用这

42、种方式设置特权模式口令,实验六 利用三层交换机实现VLAN间互通,25,特备参考,实验总结,3、全局配置模式下的配置命令: 先看一下全局配置模式下都能使用哪些命令 Switch(config)#? 进入接口配置模式 Switch(config)#interface fastEthernet 0/1 提示:返回全局配置模式用exit,用end或Ctrl+z可直接退到特权模式。 进入接口配置模式配置vlan接口属性 Switch(config)#interface vlan 1 进入连续的一组接口进行配置 Switch(config)#interface range fastEthernet 0/

43、1 - fastEthernet 0/5 配置交换机名称 Switch(config)#hostname SwitchA /把交换机名称改为了SwitchA,在第一台2960交换机上的配置 sw2960-2(config-vlan)#name cwb sw2960-2(config-if)#exit sw2960-2(config)#vlan 101 sw2960-2(config-vlan)#name xsb sw2960-2(config)#vlan 102 sw2960-2(config-vlan)#name rsb sw2960-2(config-if)#exit sw2960-2(c

44、onfig)#interface fastEthernet 0/1 sw2960-2(config-if)#switchport access vlan 100 sw2960-2(config-if)#no shutdown sw2960-2(config-if)#exit sw2960-2(config)#interface fastEthernet 0/2 sw2960-2(config-if)#switchport access vlan 100 sw2960-2(config-if)#no shutdown sw2960-2(config-if)#exit sw2960-2(confi

45、g)#interface fastEthernet 0/3,3、全局配置模式下的配置命令(续): 为交换机配置远程登录口令 Switch(config)#line vty 0 4 /进入虚拟终端,可设定0到15共16个,这里为5个 Switch(config-line)#password # /设置登录口令 Switch(config-line)#login /允许登录 Switch(config-line)#exec-timeout 5 0 /设置超时时间为5分0秒 设置远程登录进入特权模式的密码 Switch(config)#enable secret 123456 /需在全局配置模式下使

46、用enable命令 或Switch(config)#enable password 123456 提示:enable password设置的密码在配置文件中是以明文形式保存的,而enable secret是以加密保存的,不易被人破解具有较高的安全性,所以一般采用这种方式设置特权模式口令,实验六 利用三层交换机实现VLAN间互通,26,特备参考,实验总结,3、全局配置模式下的配置命令: 先看一下全局配置模式下都能使用哪些命令 Switch(config)#? 进入接口配置模式 Switch(config)#interface fastEthernet 0/1 提示:返回全局配置模式用exit,用

47、end或Ctrl+z可直接退到特权模式。 进入接口配置模式配置vlan接口属性 Switch(config)#interface vlan 1 进入连续的一组接口进行配置 Switch(config)#interface range fastEthernet 0/1 - fastEthernet 0/5 配置交换机名称 Switch(config)#hostname SwitchA /把交换机名称改为了SwitchA,在第一台2960交换机上的配置 sw2960-2(config-if)#switchport access vlan 101 sw2960-2(config-if)#no shu

48、tdown sw2960-2(config-if)#exit sw2960-2(config)#interface fastEthernet 0/4 sw2960-2(config-if)#switchport access vlan 102 sw2960-2(config-if)#no shutdown sw2960-2(config-if)#exit sw2960-2(config)# interface range fastEthernet 0/21 - fastEthernet 0/24 sw2960-2(config-if-range)# switchport mode trunk

49、sw2960-2(config-if-range)# switchport trunk allowed vlan all sw2960-2(config-if-range)#channel-group 1 mode on sw2960-2(config-if-range)#no shutdown sw2960-2(config-if-range)#exit sw2960-2(config-if)#exit sw2960-2(config)#ip default-gateway 192.168.1.1 sw2960-2(config)#exit sw2960-2#write,3、全局配置模式下的

50、配置命令(续): 为交换机配置远程登录口令 Switch(config)#line vty 0 4 /进入虚拟终端,可设定0到15共16个,这里为5个 Switch(config-line)#password # /设置登录口令 Switch(config-line)#login /允许登录 Switch(config-line)#exec-timeout 5 0 /设置超时时间为5分0秒 设置远程登录进入特权模式的密码 Switch(config)#enable secret 123456 /需在全局配置模式下使用enable命令 或Switch(config)#enable passwor

51、d 123456 提示:enable password设置的密码在配置文件中是以明文形式保存的,而enable secret是以加密保存的,不易被人破解具有较高的安全性,所以一般采用这种方式设置特权模式口令,实验六 利用三层交换机实现VLAN间互通,27,特备参考,实验总结,3、全局配置模式下的配置命令: 先看一下全局配置模式下都能使用哪些命令 Switch(config)#? 进入接口配置模式 Switch(config)#interface fastEthernet 0/1 提示:返回全局配置模式用exit,用end或Ctrl+z可直接退到特权模式。 进入接口配置模式配置vlan接口属性

52、Switch(config)#interface vlan 1 进入连续的一组接口进行配置 Switch(config)#interface range fastEthernet 0/1 - fastEthernet 0/5 配置交换机名称 Switch(config)#hostname SwitchA /把交换机名称改为了SwitchA,在3560交换机上的配置 Switchenable /进入特权模式 Switch#conf t /进入全局配置模式 Switch(config)#hostname sw3560 sw3560(config)#interface vlan 1 sw3560(c

53、onfig-if)#ip address 192.168.1.1 255.255.255.0 sw3560(config-if)#no shutdown sw3560(config-if)#exit sw3560(config)#username aaa password aaa sw3560(config)#username bbb password bbb sw3560(config)#line vty 0 4 sw3560(config-line)#login local sw3560(config-if)#exit sw3560(config)#enable secret 123456

54、 sw3560(config)#vlan 100 sw3560(config-vlan)#name cwb sw3560 (config-if)#exit sw3560(config)#vlan 101,3、全局配置模式下的配置命令(续): 为交换机配置远程登录口令 Switch(config)#line vty 0 4 /进入虚拟终端,可设定0到15共16个,这里为5个 Switch(config-line)#password # /设置登录口令 Switch(config-line)#login /允许登录 Switch(config-line)#exec-timeout 5 0 /设置超

55、时时间为5分0秒 设置远程登录进入特权模式的密码 Switch(config)#enable secret 123456 /需在全局配置模式下使用enable命令 或Switch(config)#enable password 123456 提示:enable password设置的密码在配置文件中是以明文形式保存的,而enable secret是以加密保存的,不易被人破解具有较高的安全性,所以一般采用这种方式设置特权模式口令,实验六 利用三层交换机实现VLAN间互通,28,特备参考,实验总结,3、全局配置模式下的配置命令: 先看一下全局配置模式下都能使用哪些命令 Switch(config)

56、#? 进入接口配置模式 Switch(config)#interface fastEthernet 0/1 提示:返回全局配置模式用exit,用end或Ctrl+z可直接退到特权模式。 进入接口配置模式配置vlan接口属性 Switch(config)#interface vlan 1 进入连续的一组接口进行配置 Switch(config)#interface range fastEthernet 0/1 - fastEthernet 0/5 配置交换机名称 Switch(config)#hostname SwitchA /把交换机名称改为了SwitchA,在3560交换机上的配置 sw35

57、60(config-vlan)#name xsb sw3560(config)#vlan 102 sw3560(config-vlan)#name rsb sw3560(config-if)#exit sw3560 (config)#interface fastEthernet 0/1 sw3560(config-if)#switchport access vlan 1 sw3560 (config-if)#no shutdown sw3560(config-if)#exit Sw3560 (config)#interface fastEthernet 0/2 sw3560(config-if

58、)#switchport access vlan 102 sw3560 (onfig-if)#no shutdown sw3560(config-if)#exit sw3560(config)#interface vlan 100 sw3560(config-if)#ip address 10.1.1.1 255.255.255.0 sw3560(config-if)#no shutdown sw3560(config-if)#exit sw3560(config-if)#exit sw3560(config)#interface vlan 101,3、全局配置模式下的配置命令(续): 为交换

59、机配置远程登录口令 Switch(config)#line vty 0 4 /进入虚拟终端,可设定0到15共16个,这里为5个 Switch(config-line)#password # /设置登录口令 Switch(config-line)#login /允许登录 Switch(config-line)#exec-timeout 5 0 /设置超时时间为5分0秒 设置远程登录进入特权模式的密码 Switch(config)#enable secret 123456 /需在全局配置模式下使用enable命令 或Switch(config)#enable password 123456 提示:

60、enable password设置的密码在配置文件中是以明文形式保存的,而enable secret是以加密保存的,不易被人破解具有较高的安全性,所以一般采用这种方式设置特权模式口令,实验六 利用三层交换机实现VLAN间互通,29,特备参考,实验总结,3、全局配置模式下的配置命令: 先看一下全局配置模式下都能使用哪些命令 Switch(config)#? 进入接口配置模式 Switch(config)#interface fastEthernet 0/1 提示:返回全局配置模式用exit,用end或Ctrl+z可直接退到特权模式。 进入接口配置模式配置vlan接口属性 Switch(confi

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论