Question: ( 4 ) ( 4 pts ) How to enable two machines located behind symmetric NATs to communicate with each other is a difficult problem.

(4)(4pts) How to enable two machines located behind symmetric NATs to communicate with
each other is a difficult problem. One way to tackle this problem is to exploit a behavior of
NATs: they often assign ports in a predicable way by just incrementing the port number when a
new entry is added to their translation tables.
We first deploy a server S, which has a public IP address, to help computers locating behind
symmetric NATs communicate with each other. Any computer which wants to use the service
will periodically open up a TCP connection with S and send in a packet to S. This allows S to
know the current IP addresses and port numbers they are using. Assume their current translated
IP addresses and ports recorded in S are (IP_a , Port_a) and (IP_b, Port_b).
Two computers A and B are located behind a symmetric NAT and A likes to set up a TCP
connection with computer B. It can use the following steps to do it.
(i) A sends a request to S with both A and B's name identities (note: Since A and B do not have
permanent identities at the network layer, we assume computers A and B have other identities at
the application layer, such as DNS names, they can use to identify themselves when they send
requests to S.
(ii) S sends a packet to A and B simultaneously to inform each other's current translated IP
address and port number: (IP_a , Port_a) and (IP_b, Port_b)..
(iii) Once A and B receive the message from S, they immediately send out a packet to each other.
Based on the port incrementing behavior of their NATs, Machine A should send its packet to
(IP_b, Port_b +1) and machine B should send its packet to (IP_a, Port_a +1).
Step (iii) will open up an entry in A's and B's NAT translation tables. The hope is that when the
packet from the other party arrives, the corresponding entry in their NATs' translated tables have
been opened up. If so, the arriving packet will be accepted by the NATs.
But if A's packet or B's packet arrive before the corresponding entry in the destination NAT's
entry is opened up, the packet will be dropped and the connection fails.
(a) Suppose we have the following delay information:
Delay between A and B=25ms(fixed)
Delay between S and A=40ms(fixed)
Delay between S and B=20ms(fixed)
Can the connection between A and B be set up successfully?
(b) Assume the delay between A and B is a random variable and uniformly distributed within the
range 10ms,25ms. What is the probability the above TCP setup is successful?
 (4)(4pts) How to enable two machines located behind symmetric NATs to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!