设为首页收藏本站language 语言切换
查看: 1688|回复: 2
收起左侧

[原创] 实验 16:交换综合实验

[复制链接]
发表于 2018-12-17 08:02:04 | 显示全部楼层 |阅读模式
实验 16:交换综合实验
实验目标:
        通过综合实验复习交换机的相关配置.
实验步骤:
        1.根据拓扑配置VLAN、中继等.
        2.在SW1、SW2之间配置2层以太信道.
        3.以太信道中继使用静态trunk模式,其他中继使用DTP动态主动模式.
        4.配置所有接入端口为快速端口并保护.
        5.开启端口安全,端口自动粘滞MAC地址.
        6.全网配置快速STP,并且通过控制根桥选举,实现STP的负载均衡.
        7.通过R1配置单臂路由实现VLAN间路由.
        8.配置3台接入层交换机可以互相telnet,用户名密码皆为ccna,特权密码为ccnp.
1.根据拓扑配置VLAN、中继等.
2.在SW1、SW2之间配置2层以太信道.
3.以太信道中继使用静态trunk模式,其他中继使用DTP动态主动模式.
VTP:专门对VLAN管理,其中就可以在服务器配置VLAN然后在PC同步.新版本PT cut了这个功能.
SW1(config)#inter f0/22
SW1(config-if)#swi mo dynamic desirable
SW1(config-if)#inter range f0/23-24
SW1(config-if-range)#swi mo tr
SW2(config-vlan)#inter f0/21
SW2(config-if)#swi mo dynamic des
SW2(config-if)#inter range f0/23-24
SW2(config-if-range)#swi mo tr
SW3(config-vlan)#inter range f0/21-22
SW3(config-if-range)#swi mo dy de
SW3(config-if-range)#inter range f0/1-3
SW3(config-if-range)#swi mo acc
SW3(config-if-range)#inter range f0/1-2
SW3(config-if-range)#swi acc vlan 2
SW3(config-if-range)#inter f0/3
SW3(config-if)#swi acc vlan 3
SW3#show vlan br
SW3#show inter tr
4.配置所有接入端口为快速端口并保护.
SW3(config)#inter range f0/1-3
SW3(config-if-range)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
host. Connecting hubs, concentrators, switches, bridges, etc... to this
interface  when portfast is enabled, can cause temporary bridging loops.
Use with CAUTION

%Portfast will be configured in 3 interfaces due to the range command
but will only have effect when the interfaces are in a non-trunking mode.
记得配合这条 SW3(config-if-range)#spanning-tree bpduguard enable
5.开启端口安全,端口自动粘滞MAC地址.
SW3(config-if-range)#inter range f0/1-3
SW3(config-if-range)#switchport port-security
SW3(config-if-range)#switchport port-security mac-address sticky
6.全网配置快速STP,并且通过控制根桥选举,实现STP的负载均衡.
SW1(config)#spanning-tree mode rapid-pvst
SW2(config)#span m r
SW3(config)#span m r
SW1(config-if-range)#channel-group 1 mode on
SW2(config-if-range)#channel-group 2 mode on
SW1(config)#spanning-tree vlan 2 root primary
SW1(config)#spanning-tree vlan 3 root secondary
SW2(config)#spanning-tree vlan 3 root primary
SW2(config)#spanning-tree vlan 2 root secondary
7.通过R1配置单臂路由实现VLAN间路由.
SW1(config)#inter g0/1
SW1(config-if)#swi mo tr
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#no ip domain-l
Router(config)#line con 0
Router(config-line)#logg syn
Router(config-line)#exec-t 0 0
Router(config-line)#exit
Router(config)#host R1
R1(config)#inter g0/0
R1(config-if)#no shutdown
R1(config-if)#inter g0/0.2
R1(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0.2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.2, changed state to up

R1(config-subif)#en do 2
R1(config-subif)#ip add 192.168.2.254 255.255.255.0
R1(config-subif)#inter g0/0.3
R1(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0.3, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0.3, changed state to up

R1(config-subif)#en do 3
R1(config-subif)#ip add 192.168.3.254 255.255.255.0
再给所有PC配置对应的IP and Gateway.测试VLAN间通信successfully.
8.配置3台接入层交换机可以互相telnet,用户名密码皆为ccna,特权密码为ccnp.
SW1(config)#inter vlan 1
SW1(config-if)#ip add 192.168.1.1 255.255.255.0
SW1(config-if)#no shut
SW1(config-if)#exit
SW1(config)#line vty 0 4
SW1(config-line)#login local
SW1(config-line)#exit
SW1(config)#username ccna password ccna
SW2(config)#inter vlan 1
SW2(config-if)#ip add 192.168.1.2 255.255.255.0
SW2(config-if)#exit
SW2(config)#line vty 0 4
SW2(config-line)#login local
SW2(config-line)#exit
SW2(config)#user
SW2(config)#username ccna pa
SW2(config)#username ccna password ccna
SW3(config)#inter vlan 1
SW3(config-if)#ip add 192.168.1.3 255.255.255.0
SW3(config-if)#no shut
SW3(config-if)#line vty 0 4
SW3(config-line)#login local
SW3(config-line)#exit
SW3(config)#user
SW3(config)#username ccna pa
SW3(config)#username ccna password ccna
SW3(config)#enable secret ccnp
SW1(config)#enable secret ccnp
SW2(config)#enable secret ccnp
SW3#telnet 192.168.1.1
Trying 192.168.1.1 ...Open


User Access Verification

Username: ccna

Password:
SW1>en
Password:
SW1#

实验16.JPG
您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-27 15:14 , Processed in 0.056921 second(s), 24 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表