实现内网访外网模拟

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

20140917_练习2 实现内网访问internet服务器

1、试验拓扑工程图

路由器R1的配置如下:

Router>enable

Router#config ter

Enter configuration commands, one per line. End with CNTL/Z. Router(config)#host R1

R1(config)#inter f0/1

R1(config-if)#ip ad 200.0.0.1 255.255.255.0

R1(config-if)#no shut

R1(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

R1(config-if)#inter f0/0

R1(config-if)#ip ad 192.168.2.254 255.255.255.0

R1(config-if)#no shut

R1(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R1(config-if)#ip route 1.1.1.0 255.255.255.0 f0/1

R1(config)#do wr

Building configuration...

[OK]

R1(config)#inter f0/0

R1(config-if)#ip ad 192.168.1.254 255.255.255.0 //添加静态路由

R1(config-if)#do wr

Building configuration...

[OK]

R1(config-if)#

路由器R2的配置如下:

Router>enable

Router#config ter

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

Router(config)#host R2

R2(config)#inter f0/0

R2(config-if)#ip add 1.1.1.254 255.255.255.0

R2(config-if)#no shut

R2(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R2(config-if)#inter f0/1

R2(config-if)#ip add 200.0.0.2 255.255.255.0

R2(config-if)#no shut

R2(config-if)#

R2(config-if)#ip route 192.168.10.0 255.255.255.0 f0/1

R2(config)#do wr

Building configuration...

[OK]

R2(config)#ip route 192.168.1.0 255.255.255.0 f0/1 //添加静态路由

R2(config)#do wr

Building configuration...

[OK]

R2(config)#do ping 192.168.1.254 //测试PingR1网关!//

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.254, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms 3、PC1验证(Ping 1.1.1.1 Intenet):

4、PC2验证(Ping 1.1.1.1 Intenet):

相关文档
最新文档