作者:最铁头的网工
来源:CSDN
文章属性:自创,如有抄袭必究
模拟器来自于新华三 HCL 实验室
点击了解更多技术资料和免费学习视频请加入讨论群:662736393
感谢关注铁头娃技术,联系QQ:3473067134
针对本知识点有问题,欢迎加Q一起讨论学习
配置过程:DOU音搜索>>>最铁头的网工
(1)实现上述组网二层广播域VLAN隔离和三层全网全连通。
(2) 分析Vlan10、 Vlan20的广播域大小及二层网络通信范围。
(3)分析PC1pingPC4的三层通信过程和二层通信过程。
(4)掌握层次化配置与排错在局域网项目中的运用。
(5)掌握三层逻辑拓扑与二层逻辑拓扑抽象。
(6)掌握广播域大小的判断及二层网络通信范围分析。
(7)掌握VLAN环境下的层次化数据流分析。
system-view
[H3C]hostname SW1
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) 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
[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]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
作者:铁头娃
来源:CSDN
文章属性:自创,如有抄袭必究
模拟器来自于新华三 HCL 实验室
点击了解更多技术资料和免费学习视频请加入讨论群:662736393
感谢关注铁头娃技术,联系QQ:1443262302
针对本知识点有问题,欢迎加Q一起讨论学习