1.测试拓扑:
R2 (FTP Client 202.100.1.2/24)-------------------(202.100.1.2/24) R1 (10.1.1.1/24)---------------------(10.1.1.18/24)FTP Server
参考链接:http://www.zhangdaqian.net/blog/atpat中对于ftp的处理,以及pat后的非标准21-ftp端口设置.htm
2.测试目标:
通过测试,理解FTP的两种模式:被动模式,主动模式
A.被动模式:
command :Client (源端口>tcp 1024) ------>FTP Server (目标端口tcp 21)
data:Client (目标端口>tcp 1024) ------ > FTP Server (源端口>tcp 1024)
B.主动模式:
command :Client (源端口>tcp 1024) ------>FTP Server (目标端口tcp 21)
data:Client (目标端口>tcp 1024) <------ FTP Server (源端口tcp 20)
3.基本配置:
A.R1:
config t
interface Ethernet0/0
ip address 202.100.1.1 255.255.255.0
no shutdown
interface Ethernet0/1
ip address 10.1.1.1 255.255.255.0
no shutdown
B.R2:
config t
interface Ethernet0/0
ip address 202.100.1.2 255.255.255.0
no shutdown
C.FTP服务器:
IP:10.1.1.18/25
GW:10.1.1.1
4.R1路由器PAT配置:
A.先只配置静态PAT
config t
interface Ethernet0/0
ip nat outside
interface Ethernet0/1
ip nat inside
ip nat inside source static tcp 10.1.1.18 21 interface e0/0 21