使用GNS3进行子网及路由配置

拓扑图

一、基本配置

1.R1路由器的基本配置

  enable
  configure terminal
  interface f0/0
  ip address 192.168.10.1 255.255.255.224
  no shutdown
  interface f1/0
  ip address 202.100.10.1 255.255.255.252
  no shutdown

2.R2路由器的基本配置

  enable
  configure terminal
  interface f0/0
  ip address 202.100.10.2 255.255.255.252
  no shutdown
  interface f1/0
  ip address 202.100.20.1 255.255.255.252
  no shutdown

3.R3路由器的基本配置

  enable
  configure terminal
  interface f0/0
  ip address 192.168.20.1 255.255.255.224
  no shutdown
  interface f1/0
  ip address 202.100.20.2 255.255.255.252
  no shutdown

4.VPCS配置

VPCS1:ip 192.168.10.2/27 192.168.10.1

VPCS2:ip 192.168.20.2/27 192.168.20.1

5.连通性测试(失败,因为路由器上未添加路由)

VPCS1:ping 192.168.20.2  

VPCS2:ping 192.168.10.2  

二、静态路由配置(全局模式下完成)

1、R1静态路由配置

exit
ip route 0.0.0.0 0.0.0.0 202.100.10.2

2、R2静态路由配置

exit
ip route 192.168.10.0 255.255.255.224 202.100.10.1
ip route 192.168.20.0 255.255.255.224 202.100.20.2

3、R3静态路由配置

exit
ip route 0.0.0.0 0.0.0.0 202.100.20.1

4、查看路由表

1>查看R1路由器的路由表

R1#show  ip  route(共有3条路由:2条直连路由,1条静态默认路由)
C 192.168.10.0/27..........(C为直连路由)
C 202.100.10.0/30.............

S* 0.0.0.0/0.................(S*为静态默认路由)

2>查看R2路由器的路由表

R2#show  ip  route(共有4条路由:2条直连路由,2条静态路由)
C 202.100.10.0/30..........(C为直连路由)
C 202.100.20.0/30.............

S 192.168.10/27.................(S为静态路由)
S 192.168.20/27.................(S为静态路由)

3>查看R3路由器的路由表

R3#show  ip  route(共有3条路由:2条直连路由,1条静态默认路由)
C 192.168.20.0/27..........(C为直连路由)
C 202.100.20.0/30.............

S* 0.0.0.0/0.................(S*为静态默认路由)

三、连通性测试(成功,所有路由已添加)

VPCS1:ping 192.168.20.2  

VPCS2:ping 192.168.10.2  

四、路由跟踪测试

VPCS1:trace   192.168.20.2

VPCS2:trace   192.168.10.2

猜你喜欢

转载自blog.csdn.net/weixin_43625577/article/details/84639804