02-28-2012 12:49 AM - edited 03-07-2019 05:13 AM
hi all,
if i have a side A with, lets make it simple, one pc (ip 192.168.1.10, GW 192.168.1.1, public fixed) and side B one ftp server (192.168.1.10, GW 192.168.1.1, piblic fixed). now i want to establish a ftp session between pc on side A and the ftp server, src ip would be 192.168.1.10 and dest. ip public ip from side B(lets assume i have a port forwarding on side B).
but how would the ip header look like for the communication from side B to side A?
first they are in the same ip subnet, would that work? and how does side B know about the public ip of side A?
tried to have a look with wireshark, but our ftp server is only accessable via ssh, so dont see much.
any ideas? thanks!
florian
Solved! Go to Solution.
02-28-2012 03:16 AM
so you mean that the src ip in the ip header on side A will be the public of side B and vice versa? i guessed so but was not sure.
Yes.
02-28-2012 02:58 AM
Hi
hope i understand you question correct.
You state they are in the same subnet. But these are private subnets, for internal use only and NAT is used for routing on Internet.
So how does side B know the public address of A? > Well, that public subnet is somewhere in the routing table on internet > BGP.
So if a packet from B is send to A, then the private address from B is NATted to a public ip, and then routed on the internet to site A.
On site A the packet destined for the host is again NATted from public to private 192.168.1.10
So I think the header in the packet arriving at te host on site A will have the public ip of site B.
02-28-2012 03:14 AM
hi,
thanks for your reply.
have to admit, totally forgot about the nat thing.
of course the private ip will get natted and therefor it should work even if both networks are in the same ip range.
so you mean that the src ip in the ip header on side A will be the public of side B and vice versa? i guessed so but was not sure.
florian
02-28-2012 03:16 AM
so you mean that the src ip in the ip header on side A will be the public of side B and vice versa? i guessed so but was not sure.
Yes.
02-28-2012 04:14 AM
thanks!
02-28-2012 05:42 AM
You re welcome!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide