We've got a problem to open a TCP connection between 2 android phones
using GPRS network.
After a deep troubleshooting we found out that due to subnet mask /30
any user won't be able to communicate with a user who has an IP that
correspond to his broadcast IP.
let me explain by this following sample:

user A got IP@ 10.200.46.2 from GGSN
user B got IP@ 10.200.46.3 from GGSN

The android phone set a subnet mask 10.200.46.0/30 for both of them
which means
Network   10.200.46.0
host         10.200.46.1
host         10.200.46.2
broadcast 10.200.46.3

Routing stack info on the phone:
10.200.46.0/30 dev rmnet0  src 10.200.46.2
default via 10.200.46.1 dev rmnet0
 rmnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
qlen 1000
    link/ether b6:dc:ae:0e:f4:90 brd ff:ff:ff:ff:ff:ff
    inet 10.200.46.2/30 brd 10.200.46.3 scope global rmnet0

since user A has 10.200.46.3 as broadcast TCP connection won't be open
towards user B.
Same problem will happen for these following IPs (4,5,6) with 7 and
(8,9,10) with 11 and so on.
By changing the subnet mask to /32 resolved the problem
we came up to this routing info:

default via 10.200.46.2 dev rmnet0
 rmnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
qlen 1000
    link/ether b6:dc:ae:0e:f4:90 brd ff:ff:ff:ff:ff:ff
    inet 10.200.46.2/32 scope global rmnet0

2 questions:
How Android phone is setting these subnet masks, what is the Algorithm
and and where is it?
Why Android phone doesn't set the subnet mask to /32  in case of GPRS
network ?
that should be the case because during a PDP context create procedure,
the GGSN provides an IP address for the device via the End User
Address Information Element (EUA IE) in the 3GPP specifications and
optionally DNS server addresses via the Protocol Configuration Options
Information Element (PCO IE). However, you can notice the network
subnet is not provided by the GGSN. This is standard procedure.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to