计算机网络-ensp默认路由和静态路由实例

2023-06-23 16:51:58

使用ensp默认路由和静态路由实例,具体拓扑图如下图所示:

0.0.0.0 同时 IP 地址也是全 0,即 0.0.0.0/0。用于默认路由。

网络拓扑图

R1接口配置

sys

sysn R1

int g0/0/0

ip add 191.28.53.1 24

int g0/0/1

ip add 192.168.0.254 24

undo shu

#

R2接口配置

sys

sysn R2

int g0/0/0

ip add 191.28.53.2 24

int g0/0/1

ip add 190.28.53.1 24

undo shu

#

R3接口配置

sys

sysn R3

int g0/0/0

ip add 10.13.185.254 24

int g0/0/1

ip add 190.28.53.2 24

undo shu

#

R1上设置路由:

ip route-static 0.0.0.0 0 191.28.53.2

//这里使用了默认路由

R2上设置路由:

[R2]ip route-static 192.168.0.0 24 191.28.53.1

[R2]ip route-static 10.13.185.0 24 190.28.53.2

R3上设置路由

[R3]ip route-static 0.0.0.0 0 190.28.53.1

查询R3路由表

[R3]dis ip routing-table

查询R2路由表