s********k 发帖数: 6180 | 1 【 以下文字转载自 CS 讨论区 】
发信人: silverhawk (silverhawk), 信区: CS
标 题: 问一个NAT地址转换的问题?
发信站: BBS 未名空间站 (Thu Nov 27 21:36:38 2008)
NAT地址转换的机理是对内网(private network)的不同机子进行不同的port
forwarding吗?那假如在NAT里面有两台机子都对外面发送http(80)的邀请,在外面机
子看来,都看到NATrouter的ip(比如1.1.1.4),返回的包怎么被router正确发送到这
两个机子上的呢? | c*****i 发帖数: 631 | 2 source port is diff, eg, PC1 is 1.1.1.4:10001 and PC2 is 1.1.1.4:10002 | m********7 发帖数: 37 | 3 If your NAT's IP is 1.2.3.4 and if there are two hosts behind your NAT, 192.
168.0.1 and 192.168.0.2. Both using port 100 send a request to 74.125.19.
103:80 simultaneously, which we assume it is outside IP.
Now your NAT sets up and maintain a mapping table for some time to simulate
two applications using one IP sending two requests to this outside IP using
different ports as
192.168.0.1#100 --> 1.2.3.4:10001 --> 74.125.19.103:80
and
192.168.0.2#100 --> 1.2.3.4:10002 --> 74.125.19.103:80
Form 7 |
|