-
一、配置基本拓扑结构
一台主路由器、二台交换机、二台测试路由器,测试路由器充当电脑使用
-
二、配置接口IP地址
R1的接口:[R1-GigabitEthernet0/0/1] ip address 10.0.2.2 255.255.255.0
R2的接口:[R2-GigabitEthernet0/0/2]ip address 10.0.3.2 255.255.255.0
R3的接口:interface GigabitEthernet0/0/1
ip address 10.0.2.1 255.255.255.0
interface GigabitEthernet0/0/2
ip address 10.0.3.1 255.255.255.0
-
三、关闭S2的G0/0/4接口并S1、S2的G0/0/09接口加入VLAN3
[S2]interface GigabitEthernet 0/0/4
[S2-GigabitEthernet0/0/4]shutdown
[S2]interface GigabitEthernet 0/0/9
[S2-GigabitEthernet0/0/9]port link-type access
[S2-GigabitEthernet0/0/9]port default vlan 3
[S1]interface GigabitEthernet 0/0/9
[S1-GigabitEthernet0/0/9]port link-type access
[S1-GigabitEthernet0/0/9]port default vlan 3
-
四、将S1的G0/0/4接口改成TRUNK模式,允许通过VLAN2、VLAN3
[S1]interface GigabitEthernet 0/0/4
[S1-GigabitEthernet0/0/4]port default vlan 1
[S1-GigabitEthernet0/0/4]port link-type trunk
[S1-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 3
-
五、在R3上的G0/0/1接口上配置子接口,同时在子接口配置ip地址,把接口配置成Dot1q,终结以太网接子接口
[R4]inter GigabitEthernet 0/0/1.2
[R4-GigabitEthernet0/0/1.2]control-vid 20 dot1q-termination
[R4-GigabitEthernet0/0/1.2]dot1q termination vid 2
[R4-GigabitEthernet0/0/1.2]arp broadcast enable
[R4-GigabitEthernet0/0/1.2]ip address 10.0.20.1 24
[R4-GigabitEthernet0/0/1.2]inter GigabitEthernet 0/0/1.3
[R4-GigabitEthernet0/0/1.3]control-vid 30 dot1q-termination
[R4-GigabitEthernet0/0/1.3]dot1q termination vid 3
[R4-GigabitEthernet0/0/1.3]arp broadcast enable
[R4-GigabitEthernet0/0/1.3]ip address 10.0.30.1 24
-
六、更改R1、R2的IP地址和网关
[R1]inter GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]ip address 10.0.20.2 24
[R1-GigabitEthernet0/0/1]quit
[R1]undo ip route-static 0.0.0.0 0 10.0.2.1
[R1]ip route-static 0.0.0.0 0 10.0.20.1
[R2]interface GigabitEthernet 0/0/2
[R2-GigabitEthernet0/0/2]ip address 10.0.30.2 24
[R2-GigabitEthernet0/0/2]quit
[R2]undo ip route-static 0.0.0.0 0 10.0.3.1
[R2]ip route-static 0.0.0.0 0 10.0.30.1
-
七、验证实验结果
[R1]ping -c 1 10.0.30.2
PING 10.0.30.2: 56 data bytes, press CTRL_C to break
Reply from 10.0.30.2: bytes=56 Sequence=1 ttl=254 time=3 ms
--- 10.0.30.2 ping statistics ---
1 packet(s) transmitted
1 packet(s) received
0.00% packet loss
round-trip min/avg/max = 3/3/3 ms
相关文章
- 03-02单臂路由实验配置
- 03-02eNSP:实现不同网段不同vlan主机之间的互访(配置单臂路由)
- 03-02如何配置单臂路
- 03-02华为单臂路由配置
- 03-02单臂路由概述与配置实验(ensp华为模拟器)
- 03-02如何在华三交换机上配置简易的链路聚合
- 03-02trunk、三层交换机、链路捆绑、单臂路由综合实验
- 03-02计网实验 第八章 路由器单臂路由配置
- 03-02单臂路由简单基础配置
- 03-02华为vlan和单臂路由配置