ensp静态路由

拓扑图

PC
名称接口IP地址网关子网掩码
PC1Ethernet 0/0/1192.168.10.1192.168.10.2255.255.255.252
PC2Ethernet 0/0/1192.168.20.1192.168.20.2255.255.255.252
PC3Ethernet 0/0/1192.168.30.1192.168.30.2255.255.255.252
路由器
名称接口IP地址子网掩码
R1Ethernet 0/0/0192.168.10.2255.255.255.252
Ethernet 0/0/1192.168.40.1255.255.255.252
GE 0/0/0192.168.50.1255.255.255.252
R2Ethernet 0/0/0192.168.40.2255.255.255.252
Ethernet 0/0/1192.168.20.2255.255.255.252
R3Ethernet 0/0/0192.168.50.2255.255.255.252
Ethernet 0/0/1192.168.60.1255.255.255.252
R4Ethernet 0/0/0192.168.60.2255.255.255.252
Ethernet 0/0/1192.168.30.2255.255.255.252

一、基础配置

给PC配置静态IP

 给路由器配置IP

R1

<Huawei>sys                                                                        //进入系统视图
[Huawei]sys R1                                                                    //修改name
[R1]int e0/0/0                                                                       //进入接口视图
[R1-Ethernet0/0/0]ip add 192.168.10.2 30                          //为接口配置IP
[R1-Ethernet0/0/0]int e0/0/1
[R1-Ethernet0/0/1]ip add 192.168.40.1 30
[R1-Ethernet0/0/1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.50.1 30

R2

<Huawei>sys
[Huawei]sys R2
[R2]int e0/0/0
[R2-Ethernet0/0/0]ip add 192.168.40.2 30
[R2-Ethernet0/0/0]int e0/0/1
[R2-Ethernet0/0/1]ip add 192.168.20.2 30

R3

<Huawei>sys
[Huawei]sys R3
[R3]int e0/0/0
[R3-Ethernet0/0/0]ip add 192.168.50.2 30
[R3-Ethernet0/0/0]int e0/0/1
[R3-Ethernet0/0/1]ip add 192.168.60.1 30

R4

<Huawei>sys
[Huawei]sys R4
[R4]int e0/0/0
[R4-Ethernet0/0/0]ip add 192.168.60.2 30
[R4-Ethernet0/0/0]int e0/0/1
[R4-Ethernet0/0/1]ip add 192.168.30.2 30

测试PC1 ping PC2或PC3 ping不通

 二、配置静态路由

R1

配置静态路由              目标       子网      下一跳

[R1]ip route-static 192.168.20.0 30 192.168.40.2

[R1]ip route-static 192.168.30.0 30 192.168.50.2

R2

[R2]ip route-static 192.168.10.0 30 192.168.40.1

[R1]ip route-static 192.168.30.0 30 192.168.40.1

R3

[R3]ip route-static 192.168.30.0 30 192.168.60.2

[R3]ip route-static 192.168.10.0 30 192.168.50.1

[R3]ip route-static 192.168.20.0 30 192.168.50.1

R4

[R4]ip route-static 192.168.10.0 30 192.168.60.1

[R4]ip route-static 192.168.20.0 30 192.168.60.1

测试PC互ping,全通。

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值