• 【无标题】


    实验拓扑图:

                    

                    

    交换的最后一步配IP,配置路由第一步是配IP。

    实验思路:

    第一步写聚合: eth-trunk

            SW1

                    [sw1]int Eth-Trunk 0  
                    [sw1-Eth-Trunk0]trunkport g0/0/1

                    [sw1-Eth-Trunk0]trunkport g0/0/2

            SW2

                    [sw2]int Eth-Trunk 0  
                    [sw2-Eth-Trunk0]trunkport g0/0/1

                    [sw2-Eth-Trunk0]trunkport g0/0/2

    第二步:创建,划分VLAN,trunk干道

            SW1:

                    [sw1]port-group group-member g0/0/3 to g 0/0/4 Eth-Trunk --- 创建接口组

                    [sw1-port-group]port link-type trunk    ---连接类型trunk
    [sw1-GigabitEthernet0/0/3]port link-type trunk 
    [sw1-GigabitEthernet0/0/4]port link-type trunk 
    [sw1-Eth-Trunk0]port link-type trunk 
     
                    [sw1-port-group]port trunk allow-pass vlan 2  --- SW1允许VLAN2流量通过
    [sw1-GigabitEthernet0/0/3]port trunk allow-pass vlan 2
    [sw1-GigabitEthernet0/0/4]port trunk allow-pass vlan 2
    [sw1-Eth-Trunk0]port trunk allow-pass vlan 2

            SW2:

                    [sw2]port-group group-member g0/0/3 to g0/0/4 Eth-Trunk 0
                    [sw2-port-group]port link-type trunk 

    [sw2-GigabitEthernet0/0/3]port link-type trunk 
    [sw2-GigabitEthernet0/0/4]port link-type trunk 
    [sw2-Eth-Trunk0]port link-type trunk 

                    [sw2-port-group]port trunk allow-pass vlan 2
    [sw2-GigabitEthernet0/0/3]port trunk allow-pass vlan 2
    [sw2-GigabitEthernet0/0/4]port trunk allow-pass vlan 2
    [sw2-Eth-Trunk0]port trunk allow-pass vlan 2

            SW5:

                    [sw5]vlan 2
                    [sw5-vlan2]q
                    [sw5]int e0/0/2
                    [sw5-Ethernet0/0/2]port link-type access  
                    [sw5-Ethernet0/0/2]port default vlan 2
                    [sw5]port-group group-member e0/0/3 to e0/0/4

                    [sw5-port-group]port link-type trunk 
    [sw5-Ethernet0/0/3]port link-type trunk 
    [sw5-Ethernet0/0/4]port link-type trunk
     

                    [sw5-port-group]port trunk allow-pass vlan 2
    [sw5-Ethernet0/0/3]port trunk allow-pass vlan 2
    [sw5-Ethernet0/0/4]port trunk allow-pass vlan 2

    [sw5-port-group]

            SW6:

                    [sw6]vlan 2
                    [sw6-vlan2]q
                    [sw6]port-group group-member e0/0/3 to e0/0/4
                    [sw6-port-group]port link-type trunk 

    [sw6-Ethernet0/0/3]port link-type trunk 
    [sw6-Ethernet0/0/4]port link-type trunk   

                    [sw6-port-group]port trunk allow-pass vlan 2
    [sw6-Ethernet0/0/3]port trunk allow-pass vlan 2
    [sw6-Ethernet0/0/4]port trunk allow-pass vlan 2

                    [sw6]int e0/0/2

                    [sw6-Ethernet0/0/2]port link-type access    
                    [sw6-Ethernet0/0/2]port default vlan 2

     第三步:做STP

            SW1

                    [sw1]stp enable --- 启用stp协议
                    [sw1]stp mode  mstp    --- stp模式
                    [sw1]stp region-configuration ---stp配置
                    [sw1-mst-region]region-name a  -- stp名字
                    [sw1-mst-region]instance 1 vlan 1 ---主1放VLAN1
                    [sw1-mst-region]instance 2 vlan 2
                    [sw1-mst-region]active region-configuration ---激活配置

            SW2
                    [sw2]stp enable   
                    [sw2]stp mode mstp 
                    [sw2]stp region-configuration   
                    [sw2-mst-region]region-name a 
                    [sw2-mst-region]instance 1 vlan 1
                    [sw2-mst-region]instance 2 vlan 2
                    [sw2-mst-region]active region-configuration 

            SW5

                    [sw5]stp enable   
                    [sw5]stp mode mstp 
                    [sw5]stp region-configuration  
                    [sw5-mst-region]region-name a   
                    [sw5-mst-region]instance 1 vlan 1  
                    [sw5-mst-region]instance 2 vlan 2
                    [sw5-mst-region]active region-configuration

             SW6

                    [sw6]stp enable 
                    [sw6]stp mode mstp  
                    [sw6]stp region-configuration    
                    [sw6-mst-region]region-name a   
                    [sw6-mst-region]instance 1 vlan 1 
                    [sw6-mst-region]instance 2 vlan 2    
                    [sw6-mst-region]active region-configuration

            SW1

                    [sw1]stp instance 1 root primary

                    [sw1]stp instance 2 root secondary 

            SW2

                    [sw2]stp instance 2 root primary

                    [sw2]stp instance 1 root secondary 

            SW6

                    [sw6]port-group group-member e0/0/1 to e0/0/2
                    [sw6-port-group]stp edged-port enable 

    [sw6-Ethernet0/0/1]stp edged-port enable 
    [sw6-Ethernet0/0/2]stp edged-port enable 

           SW1

                    [sw1-Vlanif2]ip add 172.16.1.129 25

                    [sw1-Vlanif2]ip add 172.16.1.1 25    

            SW2

                    [sw2-Vlanif2]ip add 172.16.1.130 25

                    [sw2-Vlanif1]ip add 172.16.1.2 25

            SW1

                    [sw1-Vlanif1]vrrp vrid 1 virtual-ip 172.16.1.126

                    [sw1-Vlanif1]vrrp vrid 1 priority 105 --- 修改优先级

                    [sw1-Vlanif1]vrrp vrid 1 track interface GigabitEthernet 0/0/1 reduced 6 --- 坏了降6,让网关。

                    [sw1-Vlanif2]vrrp vrid  1 virtual-ip 172.16.1.254

                    SW2

                    [sw2-Vlanif1]vrrp vrid 1 virtual-ip 172.16.1.126

                    [sw2-Vlanif2]vrrp vrid 1 track interface g0/0/1 reduced 6

                    [sw2-Vlanif2]vrrp vrid  1 virtual-ip 172.16.1.254

    DHCP

            SW1

                    [sw1]dhcp enable 
                    [sw1]ip pool v1
        
        Info:It's successful to create an IP address pool.
                    [sw1-ip-pool-v1]network 172.16.1.0 mask 25
                    [sw1-ip-pool-v1]gateway-list 172.16.1.126 

                    [sw1-ip-pool-v1]dns-list 114.114.114.114 8.8.8.8

                    [sw1-Vlanif1]dhcp select global 

                    [sw1-Vlanif2]dhcp select global 

            SW2               

                    [sw2]dhcp enable 
                    [sw2]ip pool v1
        
        Info:It's successful to create an IP address pool.
                    [sw2-ip-pool-v1]network 172.16.1.0 mask 25
                    [sw2-ip-pool-v1]gateway-list 172.16.1.126 

                    [sw2-ip-pool-v1]dns-list 114.114.114.114 8.8.8.8

                    [sw2-Vlanif1]dhcp select global 

                    [sw2-Vlanif2]dhcp select global 

                    

     配IP

                    R1

                            [r1-GigabitEthernet0/0/0]ip add 12.0.0.1 24
                            [r1-GigabitEthernet0/0/1]ip add 172.16.0.1 30

                            [r1-GigabitEthernet0/0/2]ip add 172.16.0.5 30

                    R2

                            [isp]int g0/0/0
                    [isp-GigabitEthernet0/0/0]ip add 12.1.1.2 24
                    [isp-GigabitEthernet0/0/0]int l0
                    [isp-LoopBack0]ip add 2.2.2.2 24

            SW1

                    [sw1]vlan 99
                    [sw1-vlan99]int g0/0/5

                    [sw1-GigabitEthernet0/0/5]port link-type access 

                    [sw1-GigabitEthernet0/0/5]port default vlan 99

            SW2
                    [sw2]vlan 99
                    [sw2-vlan99]int V99
                    [sw2-Vlanif99]ip add 172.16.0.6 30

  • 相关阅读:
    笔记_Unity中的C#编程_112-116
    服务器数据恢复-服务器硬盘指示灯黄灯闪烁的数据恢复案例
    Aop天花板
    【数据库编程-SQLite3(二)】API-增删改查基础函数-(含源码)
    【Rust】001-基础语法:变量声明及数据类型
    POSIX线程使用signal模拟“中断“处理流程
    第二十篇-推荐-纯CPU(E5-2680)推理-llama.cpp-qwen1_5-72b-chat-q4_k_m.gguf
    Piramiko实现root权限登录
    vulnhub靶场之BLUESMOKE: DEVRANDOM2|bluesmoke
    Pandas数据分析系列9-数据透视与行列转换
  • 原文地址:https://blog.csdn.net/GaLeng_Yang/article/details/126158201