【新华三】网络工程师 H3C设备-如何配置单臂路由,实现不同网段通信?来~轻松掌握单臂路由技术原理!

Deadly 提交于 2020-12-05 16:52:20

1.1 组网一:新华三单臂路由组网实验

1.1.1 实验拓扑图

看完记得点赞加关注!!!谢谢!
v2-dd09c6c01a56ee866911aaeaa955e517_720w.png

1.1.2.实验任务与实验目标

(1)实现上述组网二层广播域VLAN隔离和三层全网全连通。
(2) 分析Vlan10、 Vlan20的广播域大小及二层网络通信范围。
(3)分析PC1pingPC4的三层通信过程和二层通信过程。
(4)掌握层次化配置与排错在局域网项目中的运用。
(5)掌握三层逻辑拓扑与二层逻辑拓扑抽象。
(6)掌握广播域大小的判断及二层网络通信范围分析。
(7)掌握VLAN环境下的层次化数据流分析。





1.1.3. 基本信息配置

system-view
[H3C]hostname SW1

1.1.4. VLAN配置

SW1配置
[SW1]vlan 10 // 创建 vlan 10
[SW1-vlan10]port GigabitEthernet 1/0/2 // 将接口加入 vlan 10
[SW1]interface GigabitEthernet 1/0/2 // 进入接口 1/0/2
[SW1-GigabitEthernet1/0/2]port link-type access // 配置为 access 模式



[SW1]interface GigabitEthernet 1/0/3 // 创建 vlan 20
[SW1]interface GigabitEthernet 1/0/3 // 进入接口 1/0/3
[SW1-GigabitEthernet1/0/2]port link-type access // 配置为 access 模式

SW2配置
[SW2]vlan 10 // 创建 vlan 10
[SW2-vlan10]port GigabitEthernet 1/0/2 // 将接口加入 vlan 10
[SW2]interface GigabitEthernet 1/0/2 // 进入接口 1/0/2
[SW2-GigabitEthernet1/0/2]port link-type access // 配置为 access 模式
[SW2]vlan 20 // 创建 vlan 20
[SW2]interface GigabitEthernet 1/0/3 // 进入接口 1/0/3
[SW2-GigabitEthernet1/0/3]port link-type access // 配置为 access 模式






1.1.5. Trunk 配置

(1) SW1——SW2 的 Trunk 链路调测

SW1配置
[SW1]interface GigabitEthernet 1/0/1
[SW1-GigabitEthernet1/0/1]port link-type trunk 接口配置为Trunk口
[SW1-GigabitEthernet1/0/1]port trunk permit vlan all 允许所有VLAN通过


SW2配置
[SW2]interface GigabitEthernet 1/0/1
[SW2-GigabitEthernet1/0/1]port link-type trunk 接口配置为Trunk口
[SW2-GigabitEthernet1/0/1]port trunk permit vlan all 允许所有VLAN通过


查看Access与Trunk接口信息
[H3C]display int brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
InLoop0 UP UP(s) –
MGE0/0/0 DOWN DOWN –
NULL0 UP UP(s) –
REG0 UP – –








Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
FGE1/0/53 DOWN 40G A A 1
FGE1/0/54 DOWN 40G A A 1
GE1/0/1 UP 1G(a) F(a) T 1
GE1/0/2 DOWN auto A A 10
GE1/0/3 DOWN auto A A 20
GE1/0/4 UP 1G(a) F(a) A 1
GE1/0/5 DOWN auto A A 1
GE1/0/6 DOWN auto A A 1












1.1.6.三层接口配置及链路测试

[SW1]interface GigabitEthernet 1/0/4
[SW1-GigabitEthernet1/0/4]port link-type trunk
[SW1-GigabitEthernet1/0/4]port trunk permit vlan all

SW1的上连接口配置(本步任务:配置SW1的上连接口。)
查看SW1上行接口信息
[SW1]display interface GigabitEthernet 1/0/4
GigabitEthernet1/0/4
Current state: UP
Line protocol state: UP
IP packet frame type: Ethernet II, hardware address: ac7c-6103-0100
Description: GigabitEthernet1/0/4 Interface
Bandwidth: 1000000 kbps
Loopback is not set
1000Mbps-speed mode, full-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
Maximum frame length: 9216
Allow jumbo frames to pass
Broadcast max-ratio: 100%
Multicast max-ratio: 100%
Unicast max-ratio: 100%
PVID: 1
MDI type: Automdix
Port link-type: Trunk
VLAN Passing: 1(default vlan), 10, 20
VLAN permitted: 1(default vlan), 2-4094
Trunk port encapsulation: IEEE 802.1q
Port priority: 2
Last link flapping: 0 hours 14 minutes 40 seconds
Last clearing of counters: Never

























单臂路由配置(本步任务:配置RTA的三层接口及子接口。)

[RTA]interface GigabitEthernet 0/0 进入物理接口
[RTA-GigabitEthernet0/0]no ip address 关闭物理IP地址
[RTA-GigabitEthernet0/0]no shutdown 激活物理端口
[RTA]interface GigabitEthernet 0/0.1 进入子接口
[RTA-GigabitEthernet0/0.1]ip address 192.168.10.254 24 配置子接口IP地址
[RTA-GigabitEthernet0/0.1]vlan-type dot1q vid 10
//封装dot1q, vlan id 10,对应vlan 10, vlan 10的路由点。
[RTA-GigabitEthernet0/0.1]no shutdown
RTA]interface GigabitEthernet 0/0.2
[RTA-GigabitEthernet0/0.2]ip address 192.168.20.254 24
[RTA-GigabitEthernet0/0.2]vlan-type dot1q vid 20
[RTA-GigabitEthernet0/0.2]no shutdown
//封装dot1q, vlan id 20,对应vlan 20, vlan 20的路由点。











[RTA]display ip interface brief 查看子接口地址
*down: administratively down
(s): spoofing (l): loopback
Interface Physical Protocol IP Address Description
GE0/0 up up – –
GE0/0.1 up up 192.168.10.254 –
GE0/0.2 up up 192.168.20.254 –
GE0/1 down down – –
GE0/2 down down – –
GE5/0 down down – –
GE5/1 down down – –
GE6/0 down down – –
GE6/1 down down – –
Ser1/0 down down – –
Ser2/0 down down – –
Ser3/0 down down – –
Ser4/0 down down – –















[H3C]display ip routing-table //查看路由表,其中会有两条路由

Destinations : 16 Routes : 16

Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.10.0/24 Direct 0 0 192.168.10.254 GE0/0.1
192.168.10.0/32 Direct 0 0 192.168.10.254 GE0/0.1
192.168.10.254/32 Direct 0 0 127.0.0.1 InLoop0
192.168.10.255/32 Direct 0 0 192.168.10.254 GE0/0.1
192.168.20.0/24 Direct 0 0 192.168.20.254 GE0/0.2
192.168.20.0/32 Direct 0 0 192.168.20.254 GE0/0.2
192.168.20.254/32 Direct 0 0 127.0.0.1 InLoop0
192.168.20.255/32 Direct 0 0 192.168.20.254 GE0/0.2
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0















PC配置IP地址和网关


20200401095507929.png

20200401095515485.png

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!