华为综合实验练习

标题 华为综合实验练习

拓扑图:
华为综合实验练习_第1张图片
创建多个vlan
[sw1]vlan batch 2 3
配置trunk
[sw1]interface GigabitEthernet 0/0/1
[sw1-GigabitEthernet0/0/1]port link-type trunk
[sw1-GigabitEthernet0/0/1]port trunk allow-pass vlan all
将接口加入vlan
[sw1]interface Ethernet 0/0/1
[sw1-Ethernet0/0/1]port link-type access
[sw1-Ethernet0/0/1]port default vlan 2
[sw1]interface Ethernet 0/0/2
[sw1-Ethernet0/0/2]port link-type access
[sw1-Ethernet0/0/2]port default vlan 3
查看vlan
[sw1]display vlan华为综合实验练习_第2张图片

配置子接口
开启默认
[r1]interface GigabitEthernet 0/0/0
[r1-GigabitEthernet0/0/0]undo shutdown
配置子接口
[r1]interface GigabitEthernet0/0/0.2
[r1-GigabitEthernet0/0/0.2]arp broadcast enable
[r1-GigabitEthernet0/0/0.2]dot1q termination vid 2
[r1-GigabitEthernet0/0/0.2]ip address 192.168.2.1 255.255.255.0
[r1-GigabitEthernet0/0/0.2]undo shutdown
[r1]interface GigabitEthernet0/0/0.3
[r1-GigabitEthernet0/0/0.3]arp broadcast enable
[r1-GigabitEthernet0/0/0.3]dot1q termination vid 3
[r1-GigabitEthernet0/0/0.3]ip address 192.168.3.1 255.255.255.0
[r1-GigabitEthernet0/0/0.3]undo shutdown
查看端口状态
[r1]display ip interface brief 华为综合实验练习_第3张图片 R1配置ip
[r1]interface GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.4.1 24
R2配置ip
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.4.2 24
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip address 192.168.5.1 24

PC1 ip地址
华为综合实验练习_第4张图片
PC2 ip地址
华为综合实验练习_第5张图片 配置静态路由
[r2]ip route-static 192.168.2.0 255.255.255.0 GigabitEthernet 0/0/1 192.168.4.1
[r2]ip route-static 192.168.3.0 255.255.255.0 GigabitEthernet 0/0/1 192.168.4.1
R1配置默认路由
[r1]ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet 0/0/1 192.168.4.2
Tenlet ip 网址
华为综合实验练习_第6张图片

Tenlet远程访问ping
华为综合实验练习_第7张图片
配置浮动路由
[r2]ip route-static 192.168.2.0 255.255.255.0 GigabitEthernet 0/0/2 192.168.6.1
preference 70
查看路由表
[r2]display ip routing-table

华为综合实验练习_第8张图片
R1配置浮动路由
[r1]ip route-static 192.168.3.0 255.255.255.0 GigabitEthernet 0/0/2 preference 7 0
down接口0/0/2
[r2]interface GigabitEthernet 0/0/2
[r2-GigabitEthernet0/0/2]shutdown
down接口ping
华为综合实验练习_第9张图片

你可能感兴趣的:(华为综合实验练习)