vlan之间的通信(三层交换机)

拓补图:

【实验步骤】

LSW1配置:

The device is running!

<Huawei>

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]un in e

Info: Information center is disabled.

[Huawei]sys maluoying

[maluoying]vlan batch 10

Info: This operation may take a few seconds. Please wait for a moment...done.

[maluoying]int e0/0/1

[maluoying-Ethernet0/0/1]port link-type access

[maluoying-Ethernet0/0/1]port default vlan 10

[maluoying-Ethernet0/0/1]int e0/0/2

[maluoying-Ethernet0/0/2]port link-type access

[maluoying-Ethernet0/0/2]port default vlan 10

[maluoying-Ethernet0/0/2]int e0/0/2

[maluoying-Ethernet0/0/2]int e0/0/3

[maluoying-Ethernet0/0/3]port link-type trunk

[maluoying-Ethernet0/0/3]port trunk allow-pass vlan all

[maluoying-Ethernet0/0/3] User interface con0 is available

LSW2配置:

The device is running!

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]un in e

Info: Information center is disabled.

[Huawei]sys maluoying

[maluoying]vlan 20

[maluoying-vlan20]q

[maluoying]int e0/0/1

[maluoying-Ethernet0/0/1]port link-type access

[maluoying-Ethernet0/0/1]port default vlan 20

[maluoying-Ethernet0/0/1]int  e0/0/2

[maluoying-Ethernet0/0/2]port link-type access

[maluoying-Ethernet0/0/2]port default vlan 20

[maluoying-Ethernet0/0/2]int  e0/0/3

[maluoying-Ethernet0/0/3]port link-type trunk

[maluoying-Ethernet0/0/3]port trunk allow-pass vlan all

[maluoying-Ethernet0/0/3]

[maluoying-Ethernet0/0/3]User interface con0 is available

                              ^

Error: Unrecognized command found at '^' position.

[maluoying-Ethernet0/0/3]User interface con0 is available

                              ^

Error: Unrecognized command found at '^' position.

[maluoying-Ethernet0/0/3]

LSW3配置:

The device is running!

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]un in e

Info: Information center is disabled.

[Huawei]sys maluoying

[maluoying]vlan batch 10 20

Info: This operation may take a few seconds. Please wait for a moment...done.

[maluoying]int vlanif 10

[maluoying-Vlanif10]ip add 192.168.10.254 24

[maluoying-Vlanif10]int vlanif 20

[maluoying-Vlanif20]ip add 192.168.20.254 24

[maluoying-Vlanif20]int g0/0/1

[maluoying-GigabitEthernet0/0/1]port link-type trunk

[maluoying-GigabitEthernet0/0/1]port trunk allow-pass vlan all

[maluoying-GigabitEthernet0/0/1]int g0/0/1

[maluoying-GigabitEthernet0/0/1]int g0/0/2

[maluoying-GigabitEthernet0/0/2]port link-type trunk

[maluoying-GigabitEthernet0/0/2]port trunk allow-pass vlan all

[maluoying-GigabitEthernet0/0/2]disp this

#

interface GigabitEthernet0/0/2

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

return

[maluoying-GigabitEthernet0/0/2]q

<maluoying>disp ip routing-table

Route Flags: R - relay, D - download to fib

------------------------------------------------------------------------------

Routing Tables: Public

         Destinations : 6        Routes : 6        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0

      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0

   192.168.10.0/24  Direct  0    0           D   192.168.10.254  Vlanif10

 192.168.10.254/32  Direct  0    0           D   127.0.0.1       Vlanif10

   192.168.20.0/24  Direct  0    0           D   192.168.20.254  Vlanif20

 192.168.20.254/32  Direct  0    0           D   127.0.0.1       Vlanif20

<maluoying>

PC1配置:

PC2配置:

PC3配置:

PC4配置:

【实验记录】 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

南宫真汀

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值