-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to connect to multiple NSPs (Linux) #73
Comments
What happens if you specify
|
I can see I suppose there is a reason why on Linux by default the first socket is bound to BTW, I created a Wireshark dissector for NSP packets, it might be of use for some... |
By default it binds to broadcast address. What is your ifconfig? Are You can see if they bind to the port given
Think of it this way. cbsdk binds to an address, if that address is uniquely accessible through eth0 it means it binds to eth0. |
Sorry for butting in, especially since Linux networking is well outside my comfort zone, but is there any way to change the static ip of the second NSP? |
@cboulay You can ask Blackrock, or in the update package, there used to be a script/config that you could set another IP address to be used. |
OK, I assume there is a reason that under Linux it binds to .255, but on Windows it binds to .1. However, if it has to bind to .255 under Linux to work, then I see no way how the kernel could possibly know how to route outgoing packets – it has to pick the default interface. FWIW, the relevant lines of
Also
I don't seem to get open files with port 51001, only
but maybe I'm not fast enough. Not sure what you mean by 'separate name netmasks'. |
They are both eth0
|
hm. My understanding of networking is admittedly weak, but would they not have to be on a netmask that includes the NSPs (which sit at I will try to change the NSP's IP and network settings, that seems to be the sane way to go on Linux... |
Just a wee update:
Problem with that:
|
It is because Here is another thing to try:
Then use 192.168.137.17 Basically I am trying to route the broadcast address (on one of the interfaces) to a fixed destination. |
Also here:
are they both eth0? |
Thanks, your Re-route incoming bcast packets on
Add rule to route marked packets according to table 3:
Route all traffic through
Mark packets sent to
Haven't tested this with Is there a wiki to collect such bits of info? |
Thanks for the update! Yes there is a wiki, I will copy paste to the wiki the final solution. |
Not quite there yet … Also, you are right, I don't need to reroute
|
If I were you I would also look at creating a bridge for one of the NSPs, and give it a different IP address range. |
OK, I think I have a workable solution. It does involve a bit of networking foo, and I cannot claim to completely understand how the individual bits interact (especially Essentially, what we have to do is the following:
In particular, my
The first two lines add a new routing table, where all traffic defaults to interface Next,
i.e. packets to the second NSP get marked Finally, I created a file at
(make executable!) to load the Sources: Now, let's test the setup with code similar to
This should print Needless to say, it'd be great if someone with two NSPs and a Linux box could test & confirm this ... |
@dashesy I'm not quite sure I understand the bridge setup in this case. Which two networks would be bridged? Just trying to understand, as networking is something I have tried to stay clear of ... |
I have a Linux machine with two network cards dedicated to one NSP each.
eth0
has its IP set to192.168.137.1
, and I can connect to an NSP using the example code intestcbsdk.cpp
.eth2
is set to192.168.137.17
and connected to another NSP. However, I don't seem to be able to connect withcbSDK
.Here is what I've tried:
cbSdkOpen(inst, conType)
withinst=1
. This seems to connect to the NSP oneth0
.cbSdkOpen(0, conType); cbSdkOpen(1, conType);
The second call returns-8
.The second call returns
-30
.If this is documented somewhere, I missed it..
The text was updated successfully, but these errors were encountered: