473,509 Members | 4,901 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Socket Bind(localEndPoint) <-- Virtual IP

Hi there,

Please find file for illustrating infrastructure -->
http://test.thipparath.com/GPRS/GPRS.jpg . Gateway receives packets
from Trucks for processing Route/GPS position. When Truck and Gateway
communicate in leased line, Gateway identifies different IP sent by
different truck. Where communicate over internet, NAT Server is used
for sending packets from different Trucks. Here is come to a problem
that Gateway unable to create individual Truck Session for tracking for

each truck GPS position because every packet received from internet is
Same IP address.
Hence, I would like to simulate NAT reverse translation function
(separate source IP in Packets to different IP according to data in
Packet). I decided to develop C# sockets offered in .NET framework. My
application will play 2 roles – 1) Act Server to listen inbound
packet from internet, 2) Act Client to forward captured packet to
Gateway with different IP as the following flows:
1) Create Asynchronous Socket for Listening
2) Reading data by Accepted Socket instance, analyze data ( data
contain SIM No for key ), Lookup Table in Database or Generate virtual
IP
3) Forward data with Different virtual IP
Problem Section (Sending data to Gateway)
// I want to generate virtual IP
IPAddress ipHostAddress = IPAddress.Parse(“192.XX.XX.XXX”);
IPEndPoint localEndPoint = new IPEndPoint(ipHostAddress,0);
Socket sender = new Socket(AddressFamily.InterNetwork,
SocketType.Stream,
ProtocolType.Tcp);
sender.Bind(localEndPoint); //  I can’t bind virtual IP
// ( Requsted address invalid in it context ) Socket Exception thrown
sender.Connect(remoteEndPoint);
I sincerely would like to know yours idea in the scenario like this. Is

there any other ways? Thanks in advance.

Feb 16 '06 #1
0 2135

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
1910
by: Thomas Zangl | last post by:
Hi! I have a class hierachie like this: // interface, abstract only class ISession { } // implements common parts of ISession
2
1930
by: Thomas Zangl | last post by:
Hi! First - thanks for your previous replies! After fixing the c'tor everything went fine until ... I added one more class in the hierachie. I have a class hierachie like this: //...
1
3996
by: Jonathan Woods | last post by:
Hi there, Please find file for illustrating infrastructure --> http://test.thipparath.com/GPRS/GPRS.jpg . Gateway receives packets from Trucks for processing Route/GPS position. When Truck and...
0
445
by: Jonathan Woods | last post by:
Hi there, Please find file for illustrating infrastructure --> http://test.thipparath.com/GPRS/GPRS.jpg . Gateway receives packets from Trucks for processing Route/GPS position. When Truck and...
6
1869
by: kikapu | last post by:
Hi to all, i have the following simple Socket Server code and a vb client that send to it some data using WinHttp. (very simple code, just open and send) The string is succesfully sent to the...
1
1814
by: RSecor | last post by:
# sysctl -a | grep somaxconn kern.ipc.somaxconn: 1024 # perl -MSocket -e'print SOMAXCONN; print "\n";' 128 Anyone have any ideas why one would be 1024 and the other only 128?
4
16052
by: O.B. | last post by:
I have a socket configured as TCP and running as a listener. When I close socket, it doesn't always free up the port immediately. Even when no connections have been made to it. So when I open...
6
3359
by: Gert Kok | last post by:
When fgets() reads a string that ands with <<<EOT, the string is truncated after << and a lot of following input is discarded. When <<<EOT is changed to <<< EOT, behaviour is as I expect it. ...
1
3338
Airslash
by: Airslash | last post by:
Hello, The problem is that my server is not receiving data. The code below are the various classes I designed around sockets. It will be big... I have run the code with the debugger, and I see...
0
7237
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7416
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7073
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
1
5062
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4732
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
443
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.