多臂单臂路由
Posted 大大大S
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了多臂单臂路由相关的知识,希望对你有一定的参考价值。
多臂单臂路由
小技巧:在做配置之前可以在系统视图下使用命令:undo info-center enable关闭信息提示(显示命令执行或者相关配置生效或者设备一些状态变化情况),这样子敲出来的命令就很简洁啦~
[Huawei]undo info-center enable //简写:un in en
Info: Information center is disabled. //系统提示:信息中心已无效
如果要重新启用,还是在系统视图下使用命令:info-center enable命令;
[Huawei]info-center enable
Info: Information center is enabled. //系统提示:信息中心已生效
- 实验拓扑图
(1)多臂路由
(2)实验要求
多臂路由配置,使得两个VLAN能够通信。
(3)配置
交换机S2:
[S2]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[S2]interface Ethernet0/0/1
[S2-Ethernet0/0/1]port link-type access
[S2-Ethernet0/0/1]port default vlan 10
[S2-Ethernet0/0/1]int e0/0/2
[S2-Ethernet0/0/2]port link-type access
[S2-Ethernet0/0/2]port default vlan 20
[S2-Ethernet0/0/2]int e0/0/3
[S2-Ethernet0/0/3]port link-type access
[S2-Ethernet0/0/3]port default vlan 10
[S2-Ethernet0/0/3]int e0/0/4
[S2-Ethernet0/0/4]port link-type access
[S2-Ethernet0/0/4]port default vlan 20
<S2>save //最后记得保存哈
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Now saving the current configuration to the slot 0.
Save the configuration successfully.
路由器R2:
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 10.0.0.99 24
[Huawei-GigabitEthernet0/0/0]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 172.16.1.99 24
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]q
<Huawei>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait........
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
测试:通过配置两个不同VLAN的PC实现通信
(4)单臂路由
(5)实验要求
1.修改交换机名称为S1,路由器名称为R1
2.在AR1上配置子接口 G0/0/0.1 G0/0/0.2 G0/0/0.3
3.分别在子接口上做适当配置,使得3个VLAN之间能够通信
(6)配置
交换机S1:
<S1>system-view
[S1]undo info-center enable
Info: Information center is disabled.
Enter system view, return user view with Ctrl+Z.
[S1]vlan batch 10 20 30
[S1]int e0/0/1
[S1-Ethernet0/0/1]port link-type access
[S1-Ethernet0/0/1]port default vlan 10
[S1-Ethernet0/0/1]int e0/0/2
[S1-Ethernet0/0/2]port link-type access
[S1-Ethernet0/0/2]port default vlan 20
[S1-Ethernet0/0/2]int e0/0/3
[S1-Ethernet0/0/3]port link-type access
[S1-Ethernet0/0/3]port default vlan 30
[S1-Ethernet0/0/3]int e0/0/4
[S1-Ethernet0/0/4]port link-type trunk
[S1-Ethernet0/0/4]port trunk allow-pass vlan 10 20 30
[S1-Ethernet0/0/4]q
[S1]q
<S1>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Now saving the current configuration to the slot 0.
Save the configuration successfully.
路由器R1:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
[R1]undo info-center enable
Info: Information center is disabled.
[R1]interface GigabitEthernet 0/0/0.1
[R1-GigabitEthernet0/0/0.1]dot1q termination vid 10
[R1-GigabitEthernet0/0/0.1]ip address 10.0.0.99 24
[R1-GigabitEthernet0/0/0.1]int g0/0/0.2
[R1-GigabitEthernet0/0/0.2]dot1q termination vid 20
[R1-GigabitEthernet0/0/0.2]ip address 172.16.1.99 24
[R1-GigabitEthernet0/0/0.2]int g0/0/0.3
[R1-GigabitEthernet0/0/0.3]dot1q termination vid 30
[R1-GigabitEthernet0/0/0.3]ip address 192.168.1.99 24
[R1-GigabitEthernet0/0/0.3]q
注意!!!要记得在子接口使用命令:arp broadcast enable
开启ARP功能
[R1]interface g0/0/0.1
[R1-GigabitEthernet0/0/0.1]arp broadcast enable
[R1-GigabitEthernet0/0/0.1]int g0/0/0.2
[R1-GigabitEthernet0/0/0.2]arp broadcast enable
[R1-GigabitEthernet0/0/0.2]int g0/0/0.3
[R1-GigabitEthernet0/0/0.3]arp broadcast enable
[R1-GigabitEthernet0/0/0.3]q
[R1]q
<R1>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait........
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
测试通过配置三个不同VLAN的PC实现通信
以上是关于多臂单臂路由的主要内容,如果未能解决你的问题,请参考以下文章