实验环境
实验需求
- 规划并配置IP地址
- 实现三个pc之间互通,R3和R1之间实现等价路由
- pc1可以访问192.168.100.1吗?为什么?如果不可以,请实现互通
- 在R2上添加4个环回口模拟多个公网设备,地址随便配置,通过在R3和R1上配置静态默认路由实现PC1和PC5可以正常访问
实验步骤
配置R1路由及PC1
sysname R1
interface g0/0/0
ip address 192.168.66.254 255.255.255.0
interface g/0/0/1
ip address 192.168.200.2 255.255.255.0
配置pc1
配置R2路由及PC2
1. sysname R2 // 命名
2. interface g0/0/0 // 进入接口
3. ip address 192.168.200.1 255.255.255.0 // 配置ip
4. interface g/0/0/1
5. ip address 192.168.200.1 255.255.255.0
6. interface g/0/0/2
7. ip address 192.168.60.254 255.255.255.0
配置pc2
配置R3路由及PC3
1. sysname R3 // 命名
2. interface g0/0/0 // 进入接口
3. ip address 192.168.200.1 255.255.255.0 // 配置ip
4. interface g/0/0/1
5. ip address 192.168.200.1 255.255.255.0
进行下一跳
R1
ip route-static 192.168.88.1 24 192.168.200.1 // 配置静态路由
ip route-static 192.168.60.1 24 192.168.200.1
display ip routing-table // 查看路由表
R2
ip route-static 192.168.66.1 24 192.168.200.2
ip route-static 192.168.88.1 24 192.168.100.2
display ip routing-table
R3:
ip route-static 192.168.66.1 24 192.168.100.3
ip route-static 192.168.60.1 24 192.168.100.3
display ip routing-table
实现三个PC之间互通
PC1 ping PC2
PC1 ping PC3
PC2 ping PC3
pc1访问192.168.100.1:
配置达到网段192.168.100.0的静态路由
扫描二维码关注公众号,回复:
13554544 查看本文章
[AR1]ip route-static 192.168.100.0 255.255.255.0 192.168.200.1
AR1\AR2配置静态默认路由实现pc1 pc2的访问
在AR3上建立四个环回口:
[AR3-LoopBack1]ip address 1.2.34.2 8
[AR3-LoopBack2]ip address 3.4.34.6 8
[AR3-LoopBack3]ip address 2.3.34.6 8
[AR3-LoopBack4]ip address 4.5.34.6 8
在AR1上配置默认路由
[AR1]ip route-static 0.0.0.0 0.0.0.0 192.168.200.2
在AR2上配置默认路由
[AR2]ip route-static 0.0.0.0 0.0.0.0 192.168.100.3
Pc1的访问
Pc2的访问