1. 作业要求:

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

2. 拓扑图如下:

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

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

R1(config)#int f0/0

R1(config-if)#ip add 192.168.3.1 255.255.255.0

R1(config-if)#no shut

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

用的是Host-only 到Vmware1 一台PC

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

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

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

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

桥接到本地连接!

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

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

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

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

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

开启远程桌面:

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

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

X p 作为192.168.3.0 网段的一台PC

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

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

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

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

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

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

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

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

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

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

转载于:https://blog.51cto.com/guojiping/958712

相关文章:

  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-07
  • 2021-06-04
  • 2021-11-29
猜你喜欢
  • 2021-09-07
  • 2021-11-12
  • 2021-06-02
  • 2021-11-25
  • 2022-01-03
  • 2021-11-02
相关资源
相似解决方案