[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
目标:使三个PC之间可以互相连接
先用文本把事先想好的ip地址填上去,之后在各设备中设置
设置路由器AR4的信息
<huawei>system-view 进入系统视图 [huawei]sysname R1 修改用户名 [R1]interface g0/0/0
进入g0/0/0的端口视图 [R1-GigabitEthernet0/0/0]ip address 192.168.1.254 24 设置IP地址
[R1-GigabitEthernet0/0/0]int g0/0/1 进入到g0/0/1的端口视图 [R1-GigabitEthernet0/0/1]ip
address 192.168.4.1 24 设置g0/0/1的IP地址
设置路由器AR2的信息
<huawei>system-view 进入系统视图 [huawei]sysname R2 修改用户名 [R2]interface g0/0/0
进入g0/0/0的端口视图 [R2-GigabitEthernet0/0/0]ip address 192.168.4.2 24 设置IP地址
[R2-GigabitEthernet0/0/0]int g0/0/2 进入到g0/0/2的端口视图 [R2-GigabitEthernet0/0/2]ip
address 192.168.3.254 24 设置g0/0/2的IP地址 [R2-GigabitEthernet0/0/2]int g0/0/1
进入到g0/0/1的端口视图 [R2-GigabitEthernet0/0/1]ip address 192.168.5.2 24 设置g0/0/1的IP地址
设置路由器AR3的信息
<huawei>system-view 进入系统视图 [huawei]sysname R3 修改用户名 [R3]interface g0/0/0
进入g0/0/0的端口视图 [R3-GigabitEthernet0/0/0]ip address 192.168.5.1 24 设置IP地址
[R3-GigabitEthernet0/0/0]int g0/0/1 进入到g0/0/1的端口视图 [R3-GigabitEthernet0/0/1]ip
address 192.168.2.254 24 设置g0/0/1的IP地址
先打通PC1和PC3的路由线路
在AR4中设置 [R1]ip route-static 192.168.3.0 24 192.168.4.2 在AR2中设置 [R2]ip
route-static 192.168.1.0 24 192.168.4.1
再打通PC2和PC3的路由线路
在AR3中设置 [R3]ip route-static 192.168.3.0 24 192.168.5.2 在AR2中设置 [R2]ip
route-static 192.168.2.0 24 192.168.5.1
最后打通PC1和PC2的路由线路
在AR4中设置 [R1]ip route-static 192.168.2.0 24 192.168.4.2 在AR3中设置 [R3]ip
route-static 192.168.1.0 24 192.168.5.2
现在所有的已设置完成,在各PC之间相互ping一下
PC1 ping PC2
PC1 ping PC3
PC2 ping PC3
成功,各PC间已可以相互通信