实验9:综合小实验2

实验要求:

1、聚合链路采用trunk链路

2、配置S1交换机为STP的服务器,其余交换机为VTP的客户端

3、在S22上配置端口安全性,最大安全地址数量为1,违例处理方式为protect

4、在路由器R上增加一个环回口,代表外网

5、为了更好地理解静态路由及VLAN的工作原理,要求VLAN 2和VLAN 3用二层交换数据

6、从S1交换机所有子网到达vlan 4必须经过trunk链路聚合

7、从S1交换机所有子网到达VLAN 5必须经过路由器R

8、用tracert跟踪路径,并说明之

 

  1. 配置PC

    配置IP地址、子网掩码、网关

  2. 配置S22

    Switch> en     
    Switch# configure terminal   
    Switch(config)# vlan 2     
    Switch(config-vlan)# ex
    Switch(config)# vlan 3
    Switch(config-vlan)# ex
    Switch(config)# interface F0/1   
    Switch(config-if)# switchport mode trunk               
    Switch(config-if)# ex
    Switch(config)# interface F0/2
    Switch(config-if)# switchport mode access
    Switch(config-if)# switchport access vlan 2
    Switch(config-if)# ex
    Switch(config)# interface F0/3
    Switch(config-if)# switchport mode access
    Switch(config-if)# switchport access vlan 3
    
  3. 配置S33

    Switch> en     
    Switch# configure terminal   
    Switch(config)# vlan 2     
    Switch(config-vlan)# ex
    Switch(config)# vlan 3
    Switch(config-vlan)# ex
    Switch(config)# interface F0/1   
    Switch(config-if)# switchport mode trunk               
    Switch(config-if)# ex
    Switch(config)# interface F0/2
    Switch(config-if)# switchport mode access
    Switch(config-if)# switchport access vlan 2
    Switch(config-if)# ex
    Switch(config)# interface F0/3
    Switch(config-if)# switchport mode access
    Switch(config-if)# switchport access vlan 3
    
  4. 配置S44

    Switch> en     
    Switch# configure terminal   
    Switch(config)# vlan 4
    Switch(config-vlan)# ex
    Switch(config)# interface F0/1   
    Switch(config-if)# switchport mode trunk               
    Switch(config-if)# ex
    Switch(config)# interface F0/2
    Switch(config-if)# switchport mode access
    Switch(config-if)# switchport access vlan 4
    
  5. 配置S55

    Switch> en     
    Switch# configure terminal   
    Switch(config)# vlan 5
    Switch(config-vlan)# ex
    Switch(config)# interface F0/1   
    Switch(config-if)# switchport mode trunk               
    Switch(config-if)# ex
    Switch(config)# interface F0/2
    Switch(config-if)# switchport mode access
    Switch(config-if)# switchport access vlan 5
    
  6. 配置S1

    Switch> en     
    Switch# configure terminal  
    Switch(config)# ip routing
    Switch(config)# vlan 2     
    Switch(config-vlan)# ex
    Switch(config)# vlan 3
    Switch(config-vlan)# ex
    Switch(config)# interface F0/1  
    Switch(config-if)# no switchport
    Switch(config-if)# ip address 192.168.11.2 255.255.255.0
    Switch(config-if)# no shutdown 
    Switch(config-if)# ex
    Switch(config)# interface F0/2
    Switch(config-if)# switchport trunk encapsulation dot1q  
    Switch(config-if)# switchport mode trunk
    Switch(config-if)# ex
    Switch(config)# interface range F0/3-4  
    Switch(config-if-range)# switchport trunk encapsulation dot1q  
    Switch(config-if-range)# switchport mode trunk
    Switch(config-if-range)# channel-protocol lacp      
    Switch(config-if-range)# channel-group 1 mode active  
    Switch(config-if-range)# no shutdown   
    Switch(config-if-range)# ex
    Switch(config)# interface port-channel 1
    Switch(config-if-range)# switchport trunk encapsulation dot1q  
    Switch(config-if-range)# switchport mode trunk
    Switch(config-if)# no shutdown
    Switch(config)# interface vlan 1
    Switch(config-if)# ip address 192.168.1.1 255.255.255.0
    Switch(config-if)# ex
    Switch(config)# interface vlan 2
    Switch(config-if)# ip address 192.168.2.1 255.255.255.0
    Switch(config-if)# ex
    Switch(config)# interface vlan 3
    Switch(config-if)# ip address 192.168.3.1 255.255.255.0
    Switch(config-if)# ex
    Switch(config)# vtp mode server
    Switch(config)# vtp domain cisco
    Switch(config)# vtp password 12345
    
  7. 配置S2

    Switch> en     
    Switch# configure terminal  
    Switch(config)# ip routing
    Switch(config)# vlan 4     
    Switch(config-vlan)# ex
    Switch(config)# vlan 5
    Switch(config-vlan)# ex
    Switch(config)# interface F0/1  
    Switch(config-if)# no switchport
    Switch(config-if)# ip address 192.168.22.2 255.255.255.0
    Switch(config-if)# no shutdown 
    Switch(config-if)# ex
    Switch(config)# interface F0/2
    Switch(config-if)# switchport trunk encapsulation dot1q  
    Switch(config-if)# switchport mode trunk
    Switch(config-if)# ex
    Switch(config)# interface F0/3
    Switch(config-if)# switchport trunk encapsulation dot1q  
    Switch(config-if)# switchport mode trunk
    Switch(config-if)# ex
    Switch(config)# interface F0/4
    Switch(config-if)# switchport trunk encapsulation dot1q  
    Switch(config-if)# switchport mode trunk
    Switch(config-if)# ex
    Switch(config)# interface range F0/5-6  
    Switch(config-if-range)# switchport trunk encapsulation dot1q  
    Switch(config-if-range)# switchport mode trunk
    Switch(config-if-range)# channel-protocol lacp      
    Switch(config-if-range)# channel-group 1 mode active  
    Switch(config-if-range)# no shutdown   
    Switch(config-if-range)# ex
    Switch(config)# interface port-channel 1
    Switch(config-if-range)# switchport trunk encapsulation dot1q  
    Switch(config-if-range)# switchport mode trunk
    Switch(config-if)# no shutdown
    Switch(config)# interface vlan 1
    Switch(config-if)# ip address 192.168.1.254 255.255.255.0
    Switch(config-if)# ex
    Switch(config)# interface vlan 2
    Switch(config-if)# ip address 192.168.2.254 255.255.255.0
    Switch(config-if)# ex
    Switch(config)# interface vlan 3
    Switch(config-if)# ip address 192.168.3.254 255.255.255.0
    Switch(config-if)# ex
    Switch(config)# interface vlan 4
    Switch(config-if)# ip address 192.168.4.1 255.255.255.0
    Switch(config-if)# ex
    Switch(config)# interface vlan 5
    Switch(config-if)# ip address 192.168.5.1 255.255.255.0
    Switch(config-if)# ex
    Switch(config)# vtp mode client
    Switch(config)# vtp domain cisco
    Switch(config)# vtp password 12345
    
  8. 配置路由器

    Router> en
    Router# configure terminal
    Router(config)# interface G0/0
    Router(config-if)# ip address 192.168.11.1 255.255.255.0
    Router(config-if)# no shutdown
    Router(config-if)#ex
    Router(config)# interface G0/1
    Router(config-if)# ip address 192.168.22.1 255.255.255.0
    Router(config-if)# no shutdown
    Router(config-if)#ex
    Router(config)# interface loopback0
    Router(config-if)# ip address 1.1.1.1 255.255.255.0
    Router(config-if)# no shutdown
    
  9. 配置S22的端口安全

    Switch> en     
    Switch# configure terminal
    Switch(config)# interface F0/2
    Switch(config-if)# switchport port-security    
    Switch(config-if)# switchport port-security maximum 1   
    Switch(config-if)# switchport port-security violation protect
    Switch(config-if)# ex
    Switch(config)# interface F0/3
    Switch(config-if)# switchport port-security    
    Switch(config-if)# switchport port-security maximum 1   
    Switch(config-if)# switchport port-security violation protect
    

    以上把各个设备的基本端口配置完成,下面开始配置符合题意的路由

  10. 实现题目6的路由

    //S1
    Switch> en     
    Switch# configure terminal
    Switch(config)# ip route 192.168.4.0 255.255.255.0 vlan 1
    
    //S2
    Switch> en     
    Switch# configure terminal
    Switch(config)# ip route 192.168.2.0 255.255.255.0 vlan 1
    Switch(config)# ip route 192.168.3.0 255.255.255.0 vlan 1
    
    
  11. 实现题目7和全网互通

    //S1
    Switch> en     
    Switch# configure terminal
    Switch(config)# ip route 0.0.0.0 0.0.0.0 192.168.11.1
    
    //S2
    Switch> en     
    Switch# configure terminal
    Switch(config)# ip route 0.0.0.0 0.0.0.0 192.168.22.1
    
    //Router
    Router> en
    Router# configure terminal
    Router(config)# ip route 192.168.2.0 192.168.22.2
    Router(config)# ip route 192.168.3.0 192.168.22.2
    Router(config)# ip route 192.168.4.0 192.168.11.2
    Router(config)# ip route 192.168.4.0 192.168.11.2
    
  12. 实验验证

    用PC0 tracert 各个PC测试互通

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值