
- 配置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:

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



添加默认路由:



测试:

本文介绍了如何为PC配置网络参数,并通过设置静态路由和默认路由实现两台PC之间的网络通信。文章详细展示了配置步骤及验证过程。
369

被折叠的 条评论
为什么被折叠?



