第一步:先将需要的设备添加上
![](https://i-blog.csdnimg.cn/blog_migrate/48e3ee40d91b772ba963d6c788d0640c.png)
第二步:开始配置内网
1.配置R1路由器
<Huawei>system-view
Huawei]sysname R1
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]ip address 172.16.1.1 24
[R1]interface g0/0/1
[R1-GigabitEthernet0/0/1]ip address 16.1.1.1 24
[R1]interface g0/0/2
[R1-GigabitEthernet0/0/2]ip address 67.1.1.1 24
//配置dhcp 建立地址池
[R1]ip pool 1
[R1-ip-pool-1]network 172.16.1.0 mask 24
[R1-ip-pool-1]gateway-list 172.16.1.1
[R1-ip-pool-1]dns-list 8.8.8.8 114.114.114.114
[R1]interface g0/0/0
[R1-GigabitEthernet0/0/0]dhcp select global
//配置静态ip路由
[R1]ip route-static 12.1.1.0 24 16.1.1.2
[R1]ip route-static 13.1.1.0 24 16.1.1.2
[R1]ip route-static 21.1.1.0 24 16.1.1.2
[R1]ip route-static 24.1.1.0 24 16.1.1.2
[R1]ip route-static 34.1.1.0 24 16.1.1.2
[R1]ip route-static 43.1.1.0 24 16.1.1.2
[R1]ip route-static 45.1.1.0 24 16.1.1.2
//配置静态汇总路由
[R1]ip route-static 192.168.0.0 22 16.1.1.2
//查看路由条目
[R1]display ip routing-table
//配置缺省路由
[R1]ip route-static 0.0.0.0 0 67.1.1.2
1.1测试R1连通性![](https://i-blog.csdnimg.cn/blog_migrate/6a31f9a0b1f2dbbbf9a7f3e61608048b.png)
![](https://i-blog.csdnimg.cn/blog_migrate/bbebce0dd30504464226ed9363cfd68f.png)
2.配置R2路由器
<Huawei>system-view
Huawei]sysname R2
[R2]interface g0/0/0
[R2-Gigabit