拓扑图
如下图所示,需要让PC1、PC2、Web Server、DNS Server、ISP路由器之间互通。那么该如何进行配置呢?这次我们采用rip协议进行配置。
配置
配置ip地址
首先将PC1、PC2、Web Server、DNS Server、ISP路由器的ip地址配好
ISP路由器配置如下
The device is running!
//进入系统
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
//关闭提示
[Huawei]un in en
Info: Information center is disabled.
//将设备重命名为ISP
[Huawei]sys ISP
//进入s0/0/2端口
[ISP]int s0/0/2
//设置端口ip
[ISP-Serial0/0/2]ip add 200.10.10.2 30
然后再配置R1、R2、R3路由器
R1路由器配置如下
The device is running!
//进入系统
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
//关闭提示
[Huawei]un in en
Info: Information center is disabled.
//将设备重命名为R1
[Huawei]sys R1
//进入端口
[R1]int g0/0/1
//设置端口ip
[R1-GigabitEthernet0/0/1]ip add 192.168.11.254 24
//进入端口
[R1-GigabitEthernet0/0/1]int s0/0/2
//设置端口ip
[R1-Serial0/0/2]ip add 92.168.0.9 30
//进入端口
[R1-Serial0/0/2]int s0/0/0
//设置端口ip
[R1-Serial0/0/0]ip add 192.168.0.5 30
R2路由器配置如下
The device is running!
//进入系统
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
//关闭提示
[Huawei]un in en
Info: Information center is disabled.
//将设备重命名为R2
[Huawei]sys R2
//进入端口
[R2]int g0/0/1
//配置ip
[R2-GigabitEthernet0/0/1]ip add 192.168.14.254 24
//进入端口
[R2-GigabitEthernet0/0/1]int s0/0/1
//配置ip
[R2-Serial0/0/1]ip add 192.168.0.14 30
//进入端口
[R2-Serial0/0/1]int s0/0/2
//配置ip
[R2-Serial0/0/2]ip add 192.168.0.10 30
R3路由器配置如下
The device is running!
//进入系统
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
//关闭提示
[Huawei]un in en
Info: Information center is disabled.
//将设备重命名为R3
[Huawei]sys R3
//进入端口
[R3]int s0/0/1
//配置端口ip
[R3-Serial0/0/1]ip add 192.168.0.13 30
//进入端口
[R3-Serial0/0/1]int s0/0/2
//配置端口ip
[R3-Serial0/0/2]ip add 200.10.10.1 30
//进入端口
[R3-Serial0/0/2]int g0/0/1
//配置端口ip
[R3-GigabitEthernet0/0/1]ip add 192.168.23.254 24
//进入端口
[R3-GigabitEthernet0/0/1]int s0/0/0
//配置端口ip
[R3-Serial0/0/0]ip add 192.168.0.6 30
配置路由协议
ISP路由器配置如下
//配置rip协议
[ISP]rip
//指定rip版本为2
[ISP-rip-1]version 2
//指定直连网段地址
[ISP-rip-1]network 200.10.10.0
//退出
[ISP-rip-1]q
//退出
[ISP]q
//保存配置
<ISP>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]
Error: Please choose 'YES' or 'NO' first before pressing 'Enter'. [Y/N]:y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 17......
Save the configuration successfully.
R1路由器配置如下
//配置rip协议
[R1]rip
//指定rip版本为2
[R1-rip-1]version 2
//指定直连网段地址
[R1-rip-1]network 192.168.11.0
[R1-rip-1]network 192.168.0.0
//退出
[R1-rip-1]q
//退出
[R1]q
//保存配置
<R1>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]
Error: Please choose 'YES' or 'NO' first before pressing 'Enter'. [Y/N]:y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 17.
Save the configuration successfully.
R2路由器配置如下
//配置rip协议
[R2]rip
//指定rip版本为2
[R2-rip-1]version 2
//指定直连网段地址
[R2-rip-1]network 192.168.14.0
[R2-rip-1]network 192.168.0.0
//退出
[R2-rip-1]q
//退出
[R2]q
//保存配置
<R2>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 17.
Save the configuration successfully.
R3路由器配置如下
//配置rip协议
[R3]rip
//指定rip版本为2
[R3-rip-1]version 2
//指定直连网段地址
[R3-rip-1]network 200.10.10.0
[R3-rip-1]network 192.168.0.0
[R3-rip-1]network 192.168.23.0
//退出
[R3-rip-1]q
//退出
[R3]q
//保存配置
<R3>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Now saving the current configuration to the slot 17.
Save the configuration successfully.
测试
使用PC1 ping ISP路由器测试,可以连通
使用PC1 ping PC2测试,可以连通
使用PC1 ping Web Server和DNS Server均可以连通
其他设备互ping均可以连通。实验成功!
完结~