Hi,
I would like to ask&know how the GGSN holds and finds pdp contexts for icmp packets that have same source and destination address on the downlink?
For example, if there are two hosts having same IP address behind two different network pinging same destination address and they are encapsulated at SGSN and then one GGSN receives both and saves the packet, decapsulates and sends to the destination. On the downlink destination responds to the two ping packets (they are different because they have different identifier in icmp packet), but then how does GGSN finds the pdp contexts again to encapsulate these packets and send back to the two SGSNs? The pdp context doesnt include thse icmp identifiers. There is no sockets either since icmp doesnt have sockets. On the downlink, when there are two icmp packets recieved by GGSN, there is only icmp identfier that distinguish each other, but this identifier is not in the pdp context.
Would someone help me figure out this? Thank you all
Hi firat,
I didn't understand fully the configuration you are describing. Something like this?
Host1 --SGSN1--\GGSN--Server Host2 --SGSN2--/
Where Host1 has been assigned IP1 and Host2 has been assigned IP2, both assigned by GGSN where IP1 != IP2. Let's assume the server IP is IPs and the GGSN public uplink (non-GTP) IP is IPg.
As far as I understand, it works as follow:
- Case without NAT between GGSN and Server: Host1 sends ICMP packet with saddr=IP1 daddr=IPs, which gets encapsulated through GTP and GGSN decapsulates it. Same for Host2 but in this case the packet will have saddr=IP2. As there's no NAT (eg. host clients are assigned a public IP), the server receives 2 ICMP packets with different saddr, and when answering back using the original saddr now as daddr. As GGSN keeps track of the saddr assigned to each pdp context, when it receives a packet from the uplink (non-GTP side), it matches the daddr of the packet against the saddr of the active pdp ctx to find to which pdp ctx should forward the packet.
- Case with NAT between GGSN and Server: Almost the same but with extra steps done by the NAT. When the GGSN sends the packet saddr=IP1 daddr=IPs to the server, the NAT changes saddr=IP1->IPg. It does the same for saddr=IP2, but the NAT keeps track of the binding. When the response is received from the server, the NAT converts back IPg->IP1 and GGSN can again track the pdp ctx as described in the previous case.
osmocom-net-gprs@lists.osmocom.org