# Router issues - two devices (PS2s) accessing same port range

## AvantLegion

My situation (problem does not immediately involve Gentoo, but the solution may very well): I have two PlayStation 2 machines sharing a single cable modem connection via a hardware router (SMC Barricade). With a particular game (SOCOM 2: US Navy SEALs, for the record), both machines are able to connect and play online together fine - however, voice chat is a problem. Both can transmit fine, and can hear the other fine, but incoming voice chat from the outside goes to either one client or the other, never both. 

I believe this is probably because the two clients are trying to access the same port range (6000-6999) for voice chat, and for each port, one simply "wins" out over another (usually, the client to connect online first gets most of the voice chat).

I have a feeling there's not much I can do using my SMC Barricade. I do, however, have a LAN file server (running Gentoo - there's where that comes in) that could easily be used as a router, were I to have a reasonable expectation of doing so resulting in a method of solving this problem. 

If anyone has any ideas for fixing this, I am all ears.

----------

## AvantLegion

Someone at least has to have a clue if I'm barking up the wrong tree with my "two machines accessing same port range" theory or not.

Is that something that could cause problems like I'm having here?

----------

## NeddySeagoon

AvantLegion,

You are quite right - but its a little more complex.

Your hardware router is doing Network Address Translation (NAT) to allow your one real IP address to be shared. Ports can only be routed to a single machine.

Using Gentoo won't fix this. The two PS2 need to use different ports or have different real (routable) IP addresses.

Regards,

NeddySeagoon

----------

## AvantLegion

Here's what I'm wondering, though.

Is there a way to "map" each machine's attempt at the ports to a different port range?

Reportedly, the game sends voice chat to the ports that the connections originate from. The PS2s just try and use the same range, and can't be altered themselves.

But is it possible for a router to, say, map one PS2's 6000-6999 range to, say, 50000-50999, and the other's to another high range? And then, when the data from the remote location comes back to those originating ports, map them back to each PS2's 6000-6999 range?

Am I asking to break concrete rules here?

----------

## SkizoidMan

 *NeddySeagoon wrote:*   

> 
> 
> Using Gentoo won't fix this. The two PS2 need to use different ports or have different real (routable) IP addresses.
> 
> 

 

Yep.

Most probably the voice chat is running over UDP; you can test this with Ethereal. This confuses the kernel NAT no end..

If this is the case, there is a solution but it's not for the faint of heart!

Get rid of your router and put the Gentoo box in its place. Configure a dhcp server on your LAN interface, and set up dhcp, NAT and firewall on your external interface. Then, you need to run a UDP port forwarder capable of delivering to multiple destinations. Configure it to listen to the voice chat ports, and send the incoming datagrams to both PS2s. 

I think it can be done, with a lot of patience. Will need some serious NAT tweaking, though.

----------

## SkizoidMan

 *AvantLegion wrote:*   

> Here's what I'm wondering, though.
> 
> Is there a way to "map" each machine's attempt at the ports to a different port range?
> 
> 

 

Can you run tEthereal when only one PS is on and everything works OK, and post here the traces?

This way we might get a clue..

----------

## AvantLegion

Yes, it is UDP. My apologies for not stating that explicitly.

I will get the Gentoo box running as the router tonight, and post what you need. I've actually been wanting to make the Gentoo box a router for a while, but never had a compelling reason to until now.

----------

## AvantLegion

Took me a bit longer than I hoped to get the Gentoo box routing, but it's routing now. Compiling ethereal so I can post those traces......

----------

## AvantLegion

Here's what the logs look like (stripped out the time #s at the beginning of the lines):

(192.168.8.168 is the IP that the PS2 pulled from DHCP from the Gentoo box)

```
192.168.8.168 -> 66.168.5.34  UDP Source port: 3658  Destination port: 3658

160.33.33.156 -> 192.168.8.168 TCP 10080 > 31964 [PSH, ACK] Seq=3815376050 Ack=2053091435 Win=24580 Len=79

192.168.8.168 -> 160.33.33.156 TCP 31964 > 10080 [ACK] Seq=2053091435 Ack=3815376129 Win=32041 Len=0

160.33.33.156 -> 192.168.8.168 TCP 10080 > 31964 [PSH, ACK] Seq=3815376129 Ack=2053091435 Win=24580 Len=86
```

Lots of lines with the TCP 10080 > 31964 and the TCP 31964 > 10080. 

From what I've read, TCP ports 10070-10080 are supposed to be opened for gameplay. 

What was unexpected, though, is that at no point in my logging could I find any traffic for UDP ports 6000-6999. Instead, I saw those UDP 3658 lines sprinked in there. I began to suspect that that's for voice chat.

To try and help confirm this, I logged some traffic from the game lobby, where voice chat is regular and there aren't a ton of gameplay packets being thrown back and forth:

```

68.66.191.180 -> 192.168.8.168 UDP Source port: 13847  Destination port: 3658

192.168.8.168 -> 67.165.247.135 UDP Source port: 3658  Destination port: 3658

192.168.8.168 -> 68.66.191.180 UDP Source port: 3658  Destination port: 13847

151.196.53.23 -> 192.168.8.168 UDP Source port: 3658  Destination port: 3658

68.66.191.180 -> 192.168.8.168 UDP Source port: 13847  Destination port: 3658

151.196.53.23 -> 192.168.8.168 UDP Source port: 3658  Destination port: 3658

151.196.53.23 -> 192.168.8.168 UDP Source port: 3658  Destination port: 3658

68.66.191.180 -> 192.168.8.168 UDP Source port: 13847  Destination port: 3658

[...]

192.168.8.168 -> 24.233.142.109 UDP Source port: 3658  Destination port: 61505

67.165.247.135 -> 192.168.8.168 UDP Source port: 3658  Destination port: 3658

192.168.8.168 -> 192.168.0.103 UDP Source port: 3658  Destination port: 3658

192.168.8.168 -> 24.233.142.109 UDP Source port: 3658  Destination port: 61505

192.168.8.168 -> 192.168.0.103 UDP Source port: 3658  Destination port: 3658

192.168.8.168 -> 24.233.142.109 UDP Source port: 3658  Destination port: 61505

```

Lots and lots of lines like that, with a tiny bit of traffic on 10800 sprinked in (which, I'm figuring, is for the lobby stuff like the list of players on each team and their "ready" status). 

I'm not sure what that "192.168.0.103" IP is - it's not a device on my local network. Perhaps it's an issue with someone else's router? My friend (who was the one playing while I was logging all of this) noted that there were a few incoming voice transmissions where the audio didn't actually come through - which is the problem we've had with almost all voice chat when both of our systems are online (one person would receive it, the other would see the icon on-screen indicating incoming voice chat from someone, but would not get the audio). 

From this, I'm thinking that stuff I read online about ports 6000-6999 was flat out wrong (or simply applied to the original SOCOM and not to SOCOM 2). It seems voice chat is related to port 3658. I'm not a TCP/IP expert, but I am a computer science student and can understand anything a kind soul might explain to me.  :Smile: 

----------

## AvantLegion

Now, here are the results with 2 players

(1st PS2: 192.168.8.168,  2nd PS2: ".169)

```

192.168.8.168 -> 160.33.33.127 TCP 43464 > 10080 [ACK] Seq=3208811173 Ack=1335939822 Win=32120 Len=0

192.168.8.169 -> 160.33.33.127 TCP 11178 > 10080 [ACK] Seq=2679651109 Ack=1397833574 Win=32120 Len=0

160.33.33.127 -> 192.168.8.168 TCP 10080 > 43464 [PSH, ACK] Seq=1335939822 Ack=3208811173 Win=25384 Len=31

160.33.33.127 -> 192.168.8.169 TCP 10080 > 11178 [PSH, ACK] Seq=1397833574 Ack=2679651109 Win=24475 Len=17

192.168.8.168 -> 160.33.33.127 TCP 43464 > 10080 [ACK] Seq=3208811173 Ack=1335939853 Win=32120 Len=0

192.168.8.169 -> 160.33.33.127 TCP 11178 > 10080 [ACK] Seq=2679651109 Ack=1397833591 Win=32120 Len=0

160.33.33.127 -> 192.168.8.168 TCP 10080 > 43464 [PSH, ACK] Seq=1335939853 Ack=3208811173 Win=25384 Len=55

160.33.33.127 -> 192.168.8.169 TCP 10080 > 11178 [PSH, ACK] Seq=1397833591 Ack=2679651109 Win=24475 Len=55

192.168.8.168 -> 160.33.33.127 TCP 43464 > 10080 [ACK] Seq=3208811173 Ack=1335939908 Win=32120 Len=0

192.168.8.169 -> 160.33.33.127 TCP 11178 > 10080 [ACK] Seq=2679651109 Ack=1397833646 Win=32120 Len=0

160.33.33.127 -> 192.168.8.168 TCP 10080 > 43464 [PSH, ACK] Seq=1335939908 Ack=3208811173 Win=25384 Len=17

160.33.33.127 -> 192.168.8.169 TCP 10080 > 11178 [PSH, ACK] Seq=1397833646 Ack=2679651109 Win=24475 Len=17

192.168.8.168 -> 160.33.33.127 TCP 43464 > 10080 [ACK] Seq=3208811173 Ack=1335939925 Win=32120 Len=0

192.168.8.169 -> 160.33.33.127 TCP 11178 > 10080 [ACK] Seq=2679651109 Ack=1397833663 Win=32120 Len=0

```

Both PS2s played the game fine, each using TCP 10080 (am I to understand correctly that the "43464 > 10080" indicates a port being forwarded to/from?)

Revealing of the chat problem, however, are entries like this:

```

192.168.8.169 -> 192.168.2.33 UDP Source port: 3658  Destination port: 3658

192.168.8.169 -> 24.119.0.209 UDP Source port: 3658  Destination port: 3658

[...]

192.168.8.168 -> 192.168.2.33 UDP Source port: 3658  Destination port: 3658

192.168.8.168 -> 24.119.0.209 UDP Source port: 3658  Destination port: 3658

[...]

192.168.8.169 -> 192.168.2.33 UDP Source port: 3658  Destination port: 3658

192.168.8.169 -> 24.119.0.209 UDP Source port: 3658  Destination port: 3658

```

Nothing logged on port 3658 UDP originated from the outside. Everything originated from one of the two PS2s. Conversely, neither of us heard ANY voice chat, except each other. This pretty much makes it clear to me that port 3658 UDP is the "voice chat port". As seen in the previous message, when only one PS2 is playing, voice chat is received just fine.

So, any ideas on how to get these two devices fighting over this port to play nice? The SMC router that the Gentoo box replaced seemed to tie-break by allowing one device to use the connection, so one person would get any given voice chat transmission. Is there any way to rig things so that each PS2 can receive the incoming traffic?

----------

## AvantLegion

Reader's Digest Version:

Two devices (PlayStation 2s) are sharing a single cable modem connection via NAT through my Gentoo box (iptables). When online, both are trying to get traffic from UDP 3658 simultaneously. When only one device is online, the traffic gets through OK. But when both are online, neither is able to get any of the UDP 3658 traffic (which is voice chat).

tEthereal logs are posted in messages above.

There's no way to change the port that the PS2s use for voice chat, but is there a way, with iptables or some such, to make it so that each system can get the traffic on that port?

(read above posts for more complete/accurate description)

[forgive the glorified bump - don't mean to be obnoxious, just hoping the people that were offering to help get a chance to see this]

----------

