其他分享
首页 > 其他分享> > 单臂路由实例(单臂路由与三层交换)

单臂路由实例(单臂路由与三层交换)

作者:互联网

一、实验图

在这里插入图片描述

二、操作代码

可以操作分为两个部分:上半部分和下半部分

下半部分

SW1

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW1
[SW1]
[SW1]un in en
Info: Information center is disabled.
[SW1]vlan batch 10 20 30 40 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]port link-type access
[SW1-Ethernet0/0/1]port default vlan 10
[SW1-Ethernet0/0/1]un sh
Info: Interface Ethernet0/0/1 is not shutdown.
[SW1-Ethernet0/0/1]q
[SW1]int e0/0/2
[SW1-Ethernet0/0/2]p l a
[SW1-Ethernet0/0/2]p d v 20
[SW1-Ethernet0/0/2]q
[SW1]int e0/0/3
[SW1-Ethernet0/0/3]p l a
[SW1-Ethernet0/0/3]p d v 30
[SW1-Ethernet0/0/3]q
[SW1]int e0/0/4
[SW1-Ethernet0/0/4]p l t
[SW1-Ethernet0/0/4]p t a v a
[SW1-Ethernet0/0/4]q
[SW1]int e0/0/5
[SW1-Ethernet0/0/5]p l t
[SW1-Ethernet0/0/5]p t a v a
[SW1-Ethernet0/0/5]dis vlan

SW2

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys SW2
[SW2]
[SW2]un in en
Info: Information center is disabled.
[SW2]vlan batch 40 50
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2]int e0/0/1
[SW2-Ethernet0/0/1]p l a
[SW2-Ethernet0/0/1]p d v 40
[SW2-Ethernet0/0/1]q
[SW2]int e0/0/2
[SW2-Ethernet0/0/2]p l a 
[SW2-Ethernet0/0/2]p d v 50
[SW2-Ethernet0/0/2]q
[SW2]int e0/0/3
[SW2-Ethernet0/0/3]p l t
[SW2-Ethernet0/0/3]p t a v a

R1

<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]un in en
Info: Information center is disabled.
[R2]vlan batch 10 20 30 40 50
### 单臂路由
[R2]int g0/0/0.10
[R2]dot1q termination vid 10
[R2]ip add 192.168.1.1 24    ##网关
[R2]arp broadcast enable

[R2]int g0/0/0.20
[R2]dot1q t v 20
[R2]ip add 192.168.2.1 24
[R2]a b e

[R2]int g0/0/0.30
[R2]d t v 30
[R2]ip add 192.168.3.1 24
[R2]a b e

[R2]int g0/0/0.40
[R2]d t v 40
[R2]ip add 192.168.4.1 24
[R2]a b e

[R2]int g0/0/0.50
[R2]dot1q termination vid 50
[R2]ip add 192.168.5.1 24
[R2]a b e
[R2]q

R2]int g0/0/1
[R2]ip add 10.0.0.1 24
[R2]ip route-static 192.168.6.0 24 10.0.0.2


上半部分

R2

<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R2
[R2]un in en
Info: Information center is disabled.
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 10.0.0.2 24
[R2-GigabitEthernet0/0/0]q
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 192.168.6.1 24
[R2-GigabitEthernet0/0/1]ip route-static 192.168.2.0 24 10.0.0.1

标签:24,R2,int,Ethernet0,实例,SW1,SW2,路由,单臂
来源: https://blog.csdn.net/m0_61744194/article/details/121679197