首页 > 其他分享 >32 华三vlan案例+STP

32 华三vlan案例+STP

时间:2024-07-14 16:27:27浏览次数:17  
标签:VLAN 32 vlan 172.168 GigabitEthernet1 packet STP ms 56

32 华三vlan案例+STP


1 开启STP

显示根桥信息

查看stp中的接口角色

查看设备的根桥ID 最小的值是根网桥

原则一 网络初始化时,网络中所有的STP设备都认为自己是“根桥”,根桥ID为自身的设备ID。通过交换BPDU,设备之间比较根桥ID,网络中根桥ID最小的设备被选为根桥。

SW4 优先机 改为0

2 在同一网段PC机可以互通 ping 172.168.12.254/24 测试结果

[H3C]ping 172.168.12.1
Ping 172.168.12.1 (172.168.12.1): 56 data bytes, press CTRL_C to break
56 bytes from 172.168.12.1: icmp_seq=0 ttl=255 time=0.000 ms
56 bytes from 172.168.12.1: icmp_seq=1 ttl=255 time=0.000 ms
56 bytes from 172.168.12.1: icmp_seq=2 ttl=255 time=0.000 ms
56 bytes from 172.168.12.1: icmp_seq=3 ttl=255 time=0.000 ms
56 bytes from 172.168.12.1: icmp_seq=4 ttl=255 time=0.000 ms

--- Ping statistics for 172.168.12.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.000/0.000/0.000/0.000 ms
[H3C]%Jul 10 13:03:43:815 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 172.168.12.1: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.000/0.000/0.000/0.000 ms.

[H3C]ping 172.168.12.2
Ping 172.168.12.2 (172.168.12.2): 56 data bytes, press CTRL_C to break
56 bytes from 172.168.12.2: icmp_seq=0 ttl=255 time=3.000 ms
56 bytes from 172.168.12.2: icmp_seq=1 ttl=255 time=1.000 ms
56 bytes from 172.168.12.2: icmp_seq=2 ttl=255 time=2.000 ms
56 bytes from 172.168.12.2: icmp_seq=3 ttl=255 time=1.000 ms
56 bytes from 172.168.12.2: icmp_seq=4 ttl=255 time=1.000 ms

--- Ping statistics for 172.168.12.2 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/1.600/3.000/0.800 ms
[H3C]%Jul 10 13:03:48:731 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 172.168.12.2: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/1.600/3.000/0.800 ms.

[H3C]ping 172.168.12.3
Ping 172.168.12.3 (172.168.12.3): 56 data bytes, press CTRL_C to break
56 bytes from 172.168.12.3: icmp_seq=0 ttl=255 time=5.000 ms
56 bytes from 172.168.12.3: icmp_seq=1 ttl=255 time=2.000 ms
56 bytes from 172.168.12.3: icmp_seq=2 ttl=255 time=1.000 ms
56 bytes from 172.168.12.3: icmp_seq=3 ttl=255 time=1.000 ms
56 bytes from 172.168.12.3: icmp_seq=4 ttl=255 time=1.000 ms

--- Ping statistics for 172.168.12.3 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/2.000/5.000/1.549 ms
[H3C]%Jul 10 13:03:52:366 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 172.168.12.3: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/2.000/5.000/1.549 ms.

[H3C]ping 172.168.12.4
Ping 172.168.12.4 (172.168.12.4): 56 data bytes, press CTRL_C to break
56 bytes from 172.168.12.4: icmp_seq=0 ttl=255 time=6.000 ms
56 bytes from 172.168.12.4: icmp_seq=1 ttl=255 time=2.000 ms
56 bytes from 172.168.12.4: icmp_seq=2 ttl=255 time=1.000 ms
56 bytes from 172.168.12.4: icmp_seq=3 ttl=255 time=1.000 ms
56 bytes from 172.168.12.4: icmp_seq=4 ttl=255 time=2.000 ms

--- Ping statistics for 172.168.12.4 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/2.400/6.000/1.855 ms
[H3C]%Jul 10 13:03:55:857 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 172.168.12.4: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/2.400/6.000/1.855 ms.

[H3C]ping 172.168.12.5
Ping 172.168.12.5 (172.168.12.5): 56 data bytes, press CTRL_C to break
56 bytes from 172.168.12.5: icmp_seq=0 ttl=255 time=6.000 ms
56 bytes from 172.168.12.5: icmp_seq=1 ttl=255 time=2.000 ms
56 bytes from 172.168.12.5: icmp_seq=2 ttl=255 time=2.000 ms
56 bytes from 172.168.12.5: icmp_seq=3 ttl=255 time=2.000 ms
56 bytes from 172.168.12.5: icmp_seq=4 ttl=255 time=2.000 ms

--- Ping statistics for 172.168.12.5 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 2.000/2.800/6.000/1.600 ms
[H3C]%Jul 10 13:03:59:474 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 172.168.12.5: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 2.000/2.800/6.000/1.600 ms.

[H3C]ping 172.168.12.6
Ping 172.168.12.6 (172.168.12.6): 56 data bytes, press CTRL_C to break
56 bytes from 172.168.12.6: icmp_seq=0 ttl=255 time=4.000 ms
56 bytes from 172.168.12.6: icmp_seq=1 ttl=255 time=1.000 ms
56 bytes from 172.168.12.6: icmp_seq=2 ttl=255 time=2.000 ms
56 bytes from 172.168.12.6: icmp_seq=3 ttl=255 time=1.000 ms
56 bytes from 172.168.12.6: icmp_seq=4 ttl=255 time=1.000 ms

--- Ping statistics for 172.168.12.6 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/1.800/4.000/1.166 ms
[H3C]%Jul 10 13:04:02:586 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 172.168.12.6: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/1.800/4.000/1.166 ms.

[H3C]ping 172.168.12.7
Ping 172.168.12.7 (172.168.12.7): 56 data bytes, press CTRL_C to break

--- Ping statistics for 172.168.12.7 ---
1 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
[H3C]%Jul 10 13:04:07:976 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 172.168.12.7: 1 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.

3 在同一网段PC机可以互通 ping 172.168.13.254/24 测试结果

问题来了 为什么能通?


这是一个显示命令,用于查看交换机SW1-B上的所有VLAN配置信息。

  • VLAN ID: 1 表示该VLAN的唯一标识为1。
  • VLAN type: Static 表示该VLAN是静态VLAN,由管理员手动配置的。
  • Route interface: Not configured 表示该VLAN没有配置路由接口,无法进行跨VLAN通信。
  • Description: VLAN 0001 表示该VLAN的描述为"VLAN 0001"。
  • Name: VLAN 0001 表示该VLAN的名称也为"VLAN 0001"。
  • Tagged ports: None 表示该VLAN上没有配置Trunk端口,不能传递多个VLAN的数据。
  • Untagged ports: FortyGigE1/0/53 表示该VLAN上配置了一个Untagged端口,即FortyGigE1/0/53端口,该端口上的数据将属于该VLAN,不需要打上VLAN标签。

4   vlan的创建

  • Redirect it to a file - 这个选项允许用户将命令的输出重定向到一个文件中,而不是在终端上显示。
  • Redirect it to a file in append mode - 这个选项类似于上一个选项,但它会将输出追加到现有文件的末尾,而不是覆盖文件。
  • INTEGER<1-4094> - 这是一个参数,用户可以指定一个整数(1到4094之间),来显示特定VLAN的配置信息。
  • all - 显示所有VLAN的配置信息。
  • brief - 显示所有VLAN的简要信息。
  • dynamic - 显示动态VLAN的配置信息。
  • mapping - 显示VLAN映射信息,这可能包括VLAN ID与端口之间的映射关系。
  • reserved - 显示保留的VLAN配置信息。
  • static - 显示静态VLAN的配置信息。
  • | - 这个符号通常用于管道操作,允许用户将命令的输出作为另一个命令的输入。

删除 undo


[SW4-A]undo  vlan 12 to 17
You will delete all specified static VLANs except protocol reserved VLANs and the default VLAN. Continue? [Y/N]:y
[SW4-A]dis
[SW4-A]display  vl
[SW4-A]display  vlan al
[SW4-A]display  vlan all 
 VLAN ID: 1
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0001
 Name: VLAN 0001
 Tagged ports:   None
 Untagged ports: 
    FortyGigE1/0/53               FortyGigE1/0/54               
    GigabitEthernet1/0/1          GigabitEthernet1/0/2          
    GigabitEthernet1/0/3          GigabitEthernet1/0/4          
    GigabitEthernet1/0/5          GigabitEthernet1/0/6          
    GigabitEthernet1/0/7          GigabitEthernet1/0/8          
    GigabitEthernet1/0/9          GigabitEthernet1/0/10         
    GigabitEthernet1/0/11         GigabitEthernet1/0/12         
    GigabitEthernet1/0/13         GigabitEthernet1/0/14         
    GigabitEthernet1/0/15         GigabitEthernet1/0/16         
    GigabitEthernet1/0/17         GigabitEthernet1/0/18         
    GigabitEthernet1/0/19         GigabitEthernet1/0/20         
    GigabitEthernet1/0/21         GigabitEthernet1/0/22         
    GigabitEthernet1/0/23         GigabitEthernet1/0/24         
    GigabitEthernet1/0/25         GigabitEthernet1/0/26         
    GigabitEthernet1/0/27         GigabitEthernet1/0/28         
    GigabitEthernet1/0/29         GigabitEthernet1/0/30         
    GigabitEthernet1/0/31         GigabitEthernet1/0/32         
    GigabitEthernet1/0/33         GigabitEthernet1/0/34         
    GigabitEthernet1/0/35         GigabitEthernet1/0/36         
    GigabitEthernet1/0/37         GigabitEthernet1/0/38         
    GigabitEthernet1/0/39         GigabitEthernet1/0/40         
    GigabitEthernet1/0/41         GigabitEthernet1/0/42         
    GigabitEthernet1/0/43         GigabitEthernet1/0/44         
    GigabitEthernet1/0/45         GigabitEthernet1/0/46         
    GigabitEthernet1/0/47         GigabitEthernet1/0/48         
    Ten-GigabitEthernet1/0/49     
    Ten-GigabitEthernet1/0/50     
    Ten-GigabitEthernet1/0/51     
    Ten-GigabitEthernet1/0/52     

[SW4-A]

5 access接口增加对应对vlan操作  1:1关系 只能通过一个vlan编号

批量处理接口 对多个接口操作


单个vlan的接口增加对应端口简写

批量增加接口的简写处理简写


<H3C>ping 172.168.13.1
Ping 172.168.13.1 (172.168.13.1): 56 data bytes, press CTRL_C to break
56 bytes from 172.168.13.1: icmp_seq=0 ttl=255 time=0.000 ms
56 bytes from 172.168.13.1: icmp_seq=1 ttl=255 time=0.000 ms
56 bytes from 172.168.13.1: icmp_seq=2 ttl=255 time=0.000 ms
56 bytes from 172.168.13.1: icmp_seq=3 ttl=255 time=0.000 ms
56 bytes from 172.168.13.1: icmp_seq=4 ttl=255 time=0.000 ms

--- Ping statistics for 172.168.13.1 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.000/0.000/0.000/0.000 ms
<H3C>%Jul 10 13:57:51:079 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 172.168.13.1: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.000/0.000/0.000/0.000 ms.

<H3C>ping 172.168.13.2
Ping 172.168.13.2 (172.168.13.2): 56 data bytes, press CTRL_C to break
56 bytes from 172.168.13.2: icmp_seq=0 ttl=255 time=1.000 ms
56 bytes from 172.168.13.2: icmp_seq=1 ttl=255 time=2.000 ms
56 bytes from 172.168.13.2: icmp_seq=2 ttl=255 time=1.000 ms
56 bytes from 172.168.13.2: icmp_seq=3 ttl=255 time=0.000 ms
56 bytes from 172.168.13.2: icmp_seq=4 ttl=255 time=1.000 ms

--- Ping statistics for 172.168.13.2 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.000/1.000/2.000/0.632 ms
<H3C>%Jul 10 13:57:56:434 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 172.168.13.2: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.000/1.000/2.000/0.632 ms.
ping 172.168.13.3
Ping 172.168.13.3 (172.168.13.3): 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out

--- Ping statistics for 172.168.13.3 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
<H3C>%Jul 10 13:58:10:245 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 172.168.13.3: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet los

6 trunk 1:N的关系

trunk的接口增加配置

简写

[SW1-B]display  vlan all 
 VLAN ID: 1
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0001
 Name: VLAN 0001
 Tagged ports:   None
 Untagged ports: 
    FortyGigE1/0/53               FortyGigE1/0/54               
    GigabitEthernet1/0/1          GigabitEthernet1/0/2          
    GigabitEthernet1/0/3          GigabitEthernet1/0/4          
    GigabitEthernet1/0/5          GigabitEthernet1/0/6          
    GigabitEthernet1/0/7          GigabitEthernet1/0/8          
    GigabitEthernet1/0/9          GigabitEthernet1/0/10         
    GigabitEthernet1/0/11         GigabitEthernet1/0/12         
    GigabitEthernet1/0/13         GigabitEthernet1/0/14         
    GigabitEthernet1/0/15         GigabitEthernet1/0/16         
    GigabitEthernet1/0/17         GigabitEthernet1/0/18         
    GigabitEthernet1/0/19         GigabitEthernet1/0/20         
    GigabitEthernet1/0/21         GigabitEthernet1/0/22         
    GigabitEthernet1/0/23         GigabitEthernet1/0/24         
    GigabitEthernet1/0/25         GigabitEthernet1/0/26         
    GigabitEthernet1/0/27         GigabitEthernet1/0/28         
    GigabitEthernet1/0/29         GigabitEthernet1/0/30         
    GigabitEthernet1/0/31         GigabitEthernet1/0/32         
    GigabitEthernet1/0/33         GigabitEthernet1/0/34         
    GigabitEthernet1/0/35         GigabitEthernet1/0/36         
    GigabitEthernet1/0/37         GigabitEthernet1/0/38         
    GigabitEthernet1/0/39         GigabitEthernet1/0/40         
    GigabitEthernet1/0/41         GigabitEthernet1/0/42         
    GigabitEthernet1/0/43         GigabitEthernet1/0/44         
    GigabitEthernet1/0/45         GigabitEthernet1/0/46         
    GigabitEthernet1/0/47         GigabitEthernet1/0/48         
    Ten-GigabitEthernet1/0/49     
    Ten-GigabitEthernet1/0/50     
    Ten-GigabitEthernet1/0/51     
    Ten-GigabitEthernet1/0/52     

 VLAN ID: 12
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0012
 Name: VLAN 0012
 Tagged ports:   
    GigabitEthernet1/0/1          GigabitEthernet1/0/5          
    GigabitEthernet1/0/6          
 Untagged ports: None
               
 VLAN ID: 13
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0013
 Name: VLAN 0013
 Tagged ports:   
    GigabitEthernet1/0/1          GigabitEthernet1/0/5          
    GigabitEthernet1/0/6          
 Untagged ports: None

 VLAN ID: 14
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0014
 Name: VLAN 0014
 Tagged ports:   
    GigabitEthernet1/0/1          GigabitEthernet1/0/5          
    GigabitEthernet1/0/6          
 Untagged ports: None

 VLAN ID: 15
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0015
 Name: VLAN 0015
 Tagged ports:   
    GigabitEthernet1/0/1          GigabitEthernet1/0/5          
    GigabitEthernet1/0/6          
 Untagged ports: None

 VLAN ID: 16
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0016
 Name: VLAN 0016
 Tagged ports:   
    GigabitEthernet1/0/1          GigabitEthernet1/0/5          
    GigabitEthernet1/0/6          
 Untagged ports: None

 VLAN ID: 17
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0017
 Name: VLAN 0017
 Tagged ports:   
    GigabitEthernet1/0/1          GigabitEthernet1/0/5          
    GigabitEthernet1/0/6          
 Untagged ports: None

 VLAN ID: 18
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0018
 Name: VLAN 0018
 Tagged ports:   
    GigabitEthernet1/0/1          GigabitEthernet1/0/5          
    GigabitEthernet1/0/6          
 Untagged ports: None

 VLAN ID: 19
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0019
 Name: VLAN 0019
 Tagged ports:   
    GigabitEthernet1/0/1          GigabitEthernet1/0/5          
    GigabitEthernet1/0/6          
 Untagged ports: None

 VLAN ID: 20
 VLAN type: Static
 Route interface: Not configured
 Description: VLAN 0020
 Name: VLAN 0020
 Tagged ports:   
    GigabitEthernet1/0/1          GigabitEthernet1/0/5          
    GigabitEthernet1/0/6          
 Untagged ports: None

[SW1-B]

标签:VLAN,32,vlan,172.168,GigabitEthernet1,packet,STP,ms,56
From: https://blog.csdn.net/qq_56248592/article/details/140321020

相关文章

  • 打卡信奥刷题(322)用Scratch图形化工具信奥P2735 [普及组/提高组] [USACO3.4] 网 Electr
    [USACO3.4]网ElectricFences题目描述在本题中,格点是指横纵坐标皆为整数的点。为了圈养他的牛,农夫约翰(FarmerJohn)建造了一个三角形的电网。他从原点(0,0)牵出一根通电的电线,连接格点(n,m)(0<=n<32000,0<m<32000),再连接格点(p,0)(p>0),最后回到原点。牛可以在不碰到电网的情......
  • STM32串口通信概念介绍2
    STM32串口通信(1) 硬件接线说明采用4针的串口(TXD、RXD、GND、VCC),然后通过CH340芯片进行转换,就可以直接通过USB口转串口的方式达到和计算机通信的目的。如果采用有线方式与PC机进行通信,则需要用到CH340转换芯片,数据会通过USART1串口传输。(1) 串口通信参数串口通信属于全双......
  • 针对特种stm32F4板子的串口接线
    硬件接线说明直接采用4针的串口(TXD、RXD、GND、VCC),然后通过CH340芯片进行转换,就可以直接通过USB口转串口的方式达到和计算机通信的目的。如果采用有线方式与PC机进行通信,则需要用到CH340转换芯片,数据会通过USART1串口传输。如果采用无线方式与手机进行通信,则不需要用到CH......
  • 代码随想录算法训练营第10天|232. 用栈实现队列,225. 用队列实现栈,20. 有效的括号,1047.
    学习任务:Leetcode232.用栈实现队列Leetcode225.用队列实现栈Leetcode20.有效的括号Leetcode1047.删除字符串中的所有相邻重复项Leetcode232.用栈实现队列难度:简单|相关标签:栈、设计、队列题目:请你仅使用两个栈实现先入先出队列。队列应当支持一般队列支......
  • Linux hwspinlock子系统(STM32MP157 HSEM)
    hwspinlock(硬件自旋锁)是Linux内核中的一个同步机制,它提供了一种在多核处理器系统中保护共享资源的方法。hwspinlock分为三部分:hwspinlockcore提供注册注销以及对hwspinlock获取和释放接口。hwspinlockController驱动。hwspinlockClient驱动,使用hwspinlock提供的同步机制......
  • STM32F407外设ADC配置流程及代码示例
    STM32F407外设ADC配置流程及代码示例STM32的ADC(模拟-数字转换器)是STM32微控制器系列中集成的一个关键外设,用于将模拟信号(如温度、压力、光强等传感器输出的电压或电流信号)转换为数字信号,以便微控制器能够处理和分析这些信号。ADC配置流程:时钟配置:启用GPIOF和ADC的时钟。这是......
  • [lnsyoj300/luoguP3224/HNOI2012]永无乡
    题意给定\(n\)个集合,每个集合最开始只包含数\(a_i\),然后进行\(m\)次合并操作。具体地,每次操作将数\(a_i\)所在的集合与数\(a_j\)所在的集合合并。接下来,进行\(q\)次操作,每次操作可能为合并操作与查询操作,合并操作与上述相同,查询操作为查询数\(a_x\)所在的集合中第......
  • TTL 、RS232和RS485
    通信方式通信系统的分类1、按信道信号特征分类:模拟通信和数字通信2、按传输媒质分类:有线通信和无线通信3、按传输方式分类:基带传输和带通传输4、按通信业务分类:电话通信、数据通信、图像通信和遥控通信等5、按工作波段分类:长波通信、短波通信、微波通信和光通信等6、按复用......
  • stm32-时序图学习-温度传感器-DHT11
    目录温度传感器-DHT111.单总线协议:只有一条数据线,数据只能以比特流的方式传输,所以就会涉及到MSB(高位先出)还是LSB(低位先出),传输方向是半双工通信2.时序图主从机应答信号时序图第一步主机发送启动信号第二步从机发送响应信号DHT11发送的数据0的形式DHT11发送的数据1的形式......
  • 【免费】stm32单片机、PCB资料合集,上千种项目案例+源码+说明文档,各种毕业设计论文项目
    stm32单片机、PCB资料合集,上千种项目案例+源码+说明文档,各种毕业设计论文项目参考资料等等。。获取方式:https://pan.quark.cn/s/9ceaffb46008包含但不限于:stm32项目开发资料合集stm32项目开发资料合集单片机资料毕设论文等基于单片机的七彩炫光心形灯设计基于单片机的数字......