华为交换机s3700 vlan划分教程

优质老薛主机推荐:15%终身付款折扣:xwseo15 25%首次付款折扣 : xwseo115 点击下图进入购买

华为交换机s3700 vlan划分

项目要求:

操作的实验项目是华为的交换机s3700,要求进行vlan的划分,要求如下:

pc1 可以ping通 pc3 pc5

pc2 可以ping通 pc4 pc5

pc5  可以ping通pc1和pc2

交换机lsw1的操作配置命令如下:

The device is running!

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]dis cu
[Huawei]dis current-configuration
#
sysname Huawei
#
vlan batch 10 20 30
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface Ethernet0/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10 30
#
interface Ethernet0/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20 30
#
interface Ethernet0/0/3
#
interface Ethernet0/0/4
#
interface Ethernet0/0/5
#
interface Ethernet0/0/6
#
interface Ethernet0/0/7
#
interface Ethernet0/0/8
#
interface Ethernet0/0/9
#
interface Ethernet0/0/10
#
interface Ethernet0/0/11
#
interface Ethernet0/0/12
#
interface Ethernet0/0/13
#
interface Ethernet0/0/14
#
interface Ethernet0/0/15
#
interface Ethernet0/0/16
#
interface Ethernet0/0/17
#
interface Ethernet0/0/18
#
interface Ethernet0/0/19
#
interface Ethernet0/0/20
#
interface Ethernet0/0/21
#
interface Ethernet0/0/22
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20 30
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
port-group link-t
#
return
[Huawei]

交换机lsw2的操作配置命令如下:

The device is running!

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]dis cu
#
sysname Huawei
#
vlan batch 10 20 30
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
vlan 10
description this is vlan 20
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface Ethernet0/0/1
#
interface Ethernet0/0/2
#
interface Ethernet0/0/3
port link-type access
port default vlan 10
#
interface Ethernet0/0/4
port link-type access
port default vlan 20
#
interface Ethernet0/0/5
port hybrid pvid vlan 30
port hybrid untagged vlan 10 20 30
#
interface Ethernet0/0/6
#
interface Ethernet0/0/7
#
interface Ethernet0/0/8
#
interface Ethernet0/0/9
#
interface Ethernet0/0/10
#
interface Ethernet0/0/11
#
interface Ethernet0/0/12
#
interface Ethernet0/0/13
#
interface Ethernet0/0/14
#
interface Ethernet0/0/15
#
interface Ethernet0/0/16
#
interface Ethernet0/0/17
#
interface Ethernet0/0/18
#
interface Ethernet0/0/19
#
interface Ethernet0/0/20
#
interface Ethernet0/0/21
port link-type trunk
port trunk allow-pass vlan 10 20 30
#
interface Ethernet0/0/22
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
port-group defau
#
port-group trunk
#
return
[Huawei]

pc1的ping如下:

Welcome to use PC Simulator!

PC>ping 192.168.10.20

Ping 192.168.10.20: 32 data bytes, Press Ctrl_C to break
From 192.168.10.10: Destination host unreachable
From 192.168.10.10: Destination host unreachable
From 192.168.10.10: Destination host unreachable
From 192.168.10.10: Destination host unreachable
From 192.168.10.10: Destination host unreachable

— 192.168.10.20 ping statistics —
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss

PC>ping 192.168.10.30

Ping 192.168.10.30: 32 data bytes, Press Ctrl_C to break
From 192.168.10.30: bytes=32 seq=1 ttl=128 time=62 ms
From 192.168.10.30: bytes=32 seq=2 ttl=128 time=47 ms
From 192.168.10.30: bytes=32 seq=3 ttl=128 time=62 ms
From 192.168.10.30: bytes=32 seq=4 ttl=128 time=62 ms
From 192.168.10.30: bytes=32 seq=5 ttl=128 time=62 ms

— 192.168.10.30 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 47/59/62 ms

PC>ping 192.168.10.40

Ping 192.168.10.40: 32 data bytes, Press Ctrl_C to break
From 192.168.10.10: Destination host unreachable
From 192.168.10.10: Destination host unreachable
From 192.168.10.10: Destination host unreachable
From 192.168.10.10: Destination host unreachable
From 192.168.10.10: Destination host unreachable

— 192.168.10.40 ping statistics —
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss

PC>ping 192.168.10.50

Ping 192.168.10.50: 32 data bytes, Press Ctrl_C to break
From 192.168.10.50: bytes=32 seq=1 ttl=128 time=31 ms
From 192.168.10.50: bytes=32 seq=2 ttl=128 time=62 ms
From 192.168.10.50: bytes=32 seq=3 ttl=128 time=78 ms
From 192.168.10.50: bytes=32 seq=4 ttl=128 time=62 ms
From 192.168.10.50: bytes=32 seq=5 ttl=128 time=46 ms

— 192.168.10.50 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 31/55/78 ms

PC>

赞 (0)
分享到:更多 ()