【CCNA】之静态路由配置

  1. 配置PC1

Router>en     

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#hostname PC1

PC1(config)#int

PC1(config)#interface e0/0

PC1(config-if)#ip add 10.10.10.1 255.255.255.0

PC1(config-if)#no shut

PC1(config-if)#exit

PC1(config)#no ip routing

PC1(config)#ip def

PC1(config)#ip default-g

PC1(config)#ip default-gateway 10.10.10.254

PC1(config)#end

PC1#wr

配置PC2:

同PC1

配置R1

 

配置R3:

 

配置R2:

至此,所有的端口ip都已经配置完成了,并且测试了直连相通。

下面配置静态路由

R1:

目前R1只有本地(L)两个端口路由和直连路由(C)。

R2配置:

R3配置:

此时双向都配置完了,应该就能ping通了:

PC1上ping PC2:

下面清除上述配置,然后配置默认路由:

添加默认路由:

测试:

猜你喜欢

转载自blog.csdn.net/kadwf123/article/details/81879153