用SNAT实现多条链路的地址转换功能!

1. 作业要求:

实现SNAT 功能 利用基于端口的NAPT方法来弥补IP不够用不能上网的缺陷!

2. 拓扑图如下:

clip_image002

3.配置及必要的说明信息:

R1(config)#int f0/0

R1(config-if)#ip add 192.168.3.1 255.255.255.0

R1(config-if)#no shut

clip_image004

用的是Host-only 到Vmware1 一台PC

clip_image006

clip_image008

R1(config)#int s1/0

R1(config-if)#ip add 192.168.4.2 255.255.255.0

R1(config-if)#no shut

R1(config-if)#int s1/1

R1(config-if)#ip add 192.168.5.2 255.255.255.0

R1(config-if)#no shut

R2(config)#int s1/0

R2(config-if)#ip add 192.168.4.1 255.255.255.0

R2(config-if)#no shut

R2(config-if)#int loopback 1

R2(config-if)#ip add 192.168.1.1 255.255.255.0

R3(config)#int s1/1

R3(config-if)#ip add 192.168.5.1 255.255.255.0

R3(config-if)#no shut

R3(config-if)#int f

R3(config-if)#int f0/0

R3(config-if)#ip add 192.168.2.1 255.255.255.0

R3(config-if)#no shut

R1#ping 192.168.5.1

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 32/36/56 ms

R1#ping 192.168.4.1

Type escape sequence to abort.

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

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 32/52/80 ms

clip_image010

桥接到本地连接!

C:\Documents and Settings\Administrator>ipconfig /all

clip_image012

clip_image014

clip_image016

R1(config)#ip route 192.168.1.0 255.255.255.0 192.168.4.1

R1(config)#ip route 192.168.2.0 255.255.255.0 192.168.5.1

R1(config)#int f0/0

R1(config-if)#ip nat inside

R1(config-if)#int s1/0

R1(config-if)#ip nat outside

R1(config-if)#int s1/1

R1(config-if)#ip nat outside

R1(config-if)#end

R1(config)#access-list 101 permit ip 192.168.3.0 0.0.0.255 192.168.1.0 0.0.0.255

R1(config)#access-list 102 permit ip 192.168.3.0 0.0.0.255 192.168.2.0 0.0.0.255

R1(config)#ip nat inside source list 101 interface s1/0 overload

R1(config)#ip nat inside source list 102 interface s1/1 overload

4.测试:

Window server2003

开启远程桌面:

clip_image018

clip_image020

X p 作为192.168.3.0 网段的一台PC

开始-------运行 输入:mstsc

clip_image022

clip_image024

R1#show ip nat translations

Pro Inside global Inside local Outside local Outside global

tcp 192.168.5.2:1102 192.168.3.10:1102 192.168.2.12:3389 192.168.2.12:3389

tcp 192.168.5.2:1103 192.168.3.10:1103 192.168.2.12:3389 192.168.2.12:3389

clip_image026

clip_image028

clip_image030

R1#show ip nat translations

Pro Inside global Inside local Outside local Outside global

icmp 192.168.4.2:512 192.168.3.10:512 192.168.1.1:512 192.168.1.1:512

icmp 192.168.5.2:512 192.168.3.10:512 192.168.2.1:512 192.168.2.1:512

icmp 192.168.5.2:512 192.168.3.10:512 192.168.2.12:512 192.168.2.12:512

clip_image032

为了便于理解,附加上此图!

你可能感兴趣的:(border,target,上网,blank,的)