H3C vlan基础配置实验
实验拓扑
实验需求
1、按图示为PC配置IP地址
2、SW1和SW2上分别创建vlan10和vlan20,要求PC1和PC3属于vlan10,PC2和PC4属于vlan20
3、SW1和SW2相连的接口配置为trunk类型,允许vlan10和vlan20通过
4、测试效果,同一vlan的PC可以互通,不同vlan的PC无法互通
实验步骤
SW1创建vlan,配置接口
#
sysname SW1
#
vlan 10
#
vlan 20
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk permit vlan 10 20
#
interface GigabitEthernet1/0/2
port link-mode bridge
port access vlan 10
#
interface GigabitEthernet1/0/3
port link-mode bridge
port access vlan 20
SW2创建vlan,配置接口
#
sysname SW2
#
vlan 10
#
vlan 20
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk permit vlan 10 20
#
interface GigabitEthernet1/0/2
port link-mode bridge
port access vlan 10
#
interface GigabitEthernet1/0/3
port link-mode bridge
port access vlan 20
PC配置IP(略)
实验验证
同一vlan的PC可以互通,不同vlan的PC无法互通
PC1 ping测试(同vlan可互通,不同vlann无法互通)
[H3C]ping 192.168.1.1 Ping 192.168.1.1 (192.168.1.1): 56 data bytes, press CTRL_C to break 56 bytes from 192.168.1.1: icmp_seq=0 ttl=255 time=0.000 ms 56 bytes from 192.168.1.1: icmp_seq=1 ttl=255 time=0.000 ms 56 bytes from 192.168.1.1: icmp_seq=2 ttl=255 time=0.000 ms 56 bytes from 192.168.1.1: icmp_seq=3 ttl=255 time=0.000 ms 56 bytes from 192.168.1.1: icmp_seq=4 ttl=255 time=0.000 ms
--- Ping statistics for 192.168.1.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]%Jan 15 13:00:15:328 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.1.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 192.168.1.2
Ping 192.168.1.2 (192.168.1.2): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.1.2: icmp_seq=0 ttl=255 time=2.000 ms
56 bytes from 192.168.1.2: icmp_seq=1 ttl=255 time=1.000 ms
56 bytes from 192.168.1.2: icmp_seq=2 ttl=255 time=1.000 ms
56 bytes from 192.168.1.2: icmp_seq=3 ttl=255 time=1.000 ms
56 bytes from 192.168.1.2: icmp_seq=4 ttl=255 time=1.000 ms--- Ping statistics for 192.168.1.2 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 1.000/1.200/2.000/0.400 ms
[H3C]%Jan 15 13:00:18:248 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.1.2: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 1.000/1.200/2.000/0.400 ms.[H3C]ping 192.168.2.1
Ping 192.168.2.1 (192.168.2.1): 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 192.168.2.1 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
[H3C]%Jan 15 13:00:34:791 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.2.1: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.[H3C]ping 192.168.2.2
Ping 192.168.2.2 (192.168.2.2): 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 192.168.2.2 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
[H3C]%Jan 15 13:00:48:161 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.2.2: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.
PC2 Ping测试(同vlan可互通,不同vlann无法互通)
[H3C]ping 192.168.2.1 Ping 192.168.2.1 (192.168.2.1): 56 data bytes, press CTRL_C to break 56 bytes from 192.168.2.1: icmp_seq=0 ttl=255 time=0.000 ms 56 bytes from 192.168.2.1: icmp_seq=1 ttl=255 time=0.000 ms 56 bytes from 192.168.2.1: icmp_seq=2 ttl=255 time=0.000 ms 56 bytes from 192.168.2.1: icmp_seq=3 ttl=255 time=0.000 ms 56 bytes from 192.168.2.1: icmp_seq=4 ttl=255 time=0.000 ms
--- Ping statistics for 192.168.2.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]%Jan 15 13:03:03:995 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.2.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 192.168.2.2
Ping 192.168.2.2 (192.168.2.2): 56 data bytes, press CTRL_C to break
56 bytes from 192.168.2.2: icmp_seq=0 ttl=255 time=2.000 ms
56 bytes from 192.168.2.2: icmp_seq=1 ttl=255 time=0.000 ms
56 bytes from 192.168.2.2: icmp_seq=2 ttl=255 time=1.000 ms
56 bytes from 192.168.2.2: icmp_seq=3 ttl=255 time=2.000 ms
56 bytes from 192.168.2.2: icmp_seq=4 ttl=255 time=1.000 ms--- Ping statistics for 192.168.2.2 ---
5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.000/1.200/2.000/0.748 ms
[H3C]%Jan 15 13:03:08:669 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.2.2: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.000/1.200/2.000/0.748 ms.[H3C]ping 192.168.1.1
Ping 192.168.1.1 (192.168.1.1): 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 192.168.1.1 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
[H3C]%Jan 15 13:03:23:248 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.1.1: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.[H3C]ping 192.168.1.2
Ping 192.168.1.2 (192.168.1.2): 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 192.168.1.2 ---
5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss
[H3C]%Jan 15 13:03:39:192 2024 H3C PING/6/PING_STATISTICS: Ping statistics for 192.168.1.2: 5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss.
实验附件
标签:H3C,56,vlan,bytes,packet,实验,192.168,time,0.000 From: https://www.cnblogs.com/caomojian/p/18008450/h3c-vlan-basic-configuration-experiment-1qbon