View previous topic :: View next topic |
Author |
Message |
exodist Tux's lil' helper


Joined: 27 Jul 2004 Posts: 100
|
Posted: Mon Jun 04, 2007 10:05 pm Post subject: Games on network cannot detect games hosted on same network |
|
|
I work at a charter school, we allow students to play games here, but the district forbids us from doing it on the same IP scheme that is normally used.
To solve this problem we make it so that only games on linux can be played, at the moment we have quake 3, unreal tournament, tremulous and a couple others.
When someone loads a game a perl script brings down eth0 and brings it back up with a new ip address different from the district scheme.
Doing it this way means games cannot detect running servers. you can still play if you manually connect to the ip address, and this has been okay until now because the game mode we have uses static ip's.
However now we are trying to make starcraft work via wine. We can make it run just fine in every way except like others it cannot detect hosted games, this is a problem here because you cannot manually connect to an ip, or if you can we cannot figure it out.
I have tried having the script remove the /etc/resolv.conf file
I have tried installing bind and having named run on system startup
No idea where to go now.
Ip scheme:
192.168.93.x |
|
Back to top |
|
 |
Ken69267 Developer


Joined: 08 Apr 2007 Posts: 111 Location: #gentoo-pr0n
|
Posted: Mon Jun 04, 2007 11:18 pm Post subject: |
|
|
I suggest asking the wine people or looking at http://appdb.winehq.org
I know that my CNC3 networking problem will probably never be fixed  _________________ !snack |
|
Back to top |
|
 |
exodist Tux's lil' helper


Joined: 27 Jul 2004 Posts: 100
|
Posted: Tue Jun 05, 2007 2:10 am Post subject: |
|
|
it is not a wine problem, it is a network issue. Because UT, quake3, and tremulous are all native versions, and they also can not see game servers. |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23192
|
Posted: Tue Jun 05, 2007 4:49 am Post subject: |
|
|
Could you post the output of ip addr show; ip route show both on the normal network and on the gaming configuration? /sbin/ip is part of the sys-apps/iproute2 package. |
|
Back to top |
|
 |
exodist Tux's lil' helper


Joined: 27 Jul 2004 Posts: 100
|
Posted: Tue Jun 05, 2007 3:49 pm Post subject: |
|
|
Regular:
Code: |
Workstation home # ip addr show; ip route show
1: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:13:20:73:67:47 brd ff:ff:ff:ff:ff:ff
inet 10.20.67.20/20 brd 10.20.79.255 scope global eth0
inet 192.168.93.14/24 brd 192.168.93.255 scope global eth0:1
2: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
192.168.93.0/24 dev eth0 proto kernel scope link src 192.168.93.14 |
10.20.64.0/20 dev eth0 proto kernel scope link src 10.20.67.20
127.0.0.0/8 dev lo scope link
default via 10.20.64.1 dev eth0
[/code]
Game mode:
Code: |
Workstation home # /usr/local/bin/stationgame.pl "ip addr show; ip route show"
Entering game mode:
Testing...
Running game:
1: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:13:20:73:67:47 brd ff:ff:ff:ff:ff:ff
inet 192.168.93.14/24 brd 192.168.93.255 scope global eth0
2: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
192.168.93.0/24 dev eth0 proto kernel scope link src 192.168.93.14
127.0.0.0/8 dev lo scope link
Leaving game mode...
Leaving...
|
the stationgame.pl script basically connects to a server process I have going that is another perl script, here is what that script does to start game mode, $Request[4] is the static ip address (192.168.93.x)
Code: |
system("killall dhcpcd");
system("ifconfig eth0:1 down");
system("ifconfig eth0 down");
unlink("/etc/resolv.conf");
system("ifconfig eth0 $Request[4] netmask 255.255.255.0");
|
When gamemode ends this is done:
Code: |
system("ifconfig eth0 down");
system("dhcpcd -t 10 -d eth0");
system("ifconfig eth0:1 $Request[4] netmask 255.255.255.0");
|
|
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23192
|
Posted: Wed Jun 06, 2007 4:12 am Post subject: |
|
|
That looks OK. When in game mode, does broadcasting work?
What is the rationale behind playing with interface addresses instead of just configuring the gateway to disallow passing traffic to other subnets during the time a system is in game mode? |
|
Back to top |
|
 |
exodist Tux's lil' helper


Joined: 27 Jul 2004 Posts: 100
|
Posted: Wed Jun 06, 2007 4:22 am Post subject: |
|
|
I have no control over the gateway, and the switch at our school has a direct lien to the district switch, if a loopback occurs (net cable plugged back into the same switch) it brings all the schools in the district down, so we need to use a seperate subnet so the switch does not send those packets on automatically. |
|
Back to top |
|
 |
exodist Tux's lil' helper


Joined: 27 Jul 2004 Posts: 100
|
Posted: Wed Jun 06, 2007 4:25 am Post subject: |
|
|
another note, I tried making ipx work for starcraft, as soon as ipx was configured properly I got shouts from around the building that the computers were locked, when I shut off the system I was testing they came back up, started it up again they went down, effected the whole district because of switch directly connected, so it is critical, and ipx is a no go. (we are on a novell network)
I am not the district tech guy, and I do not touch the district servers, yet I am responsible for all the stations at the school. as well I teach technology (including linux and perl classes I created) |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23192
|
Posted: Thu Jun 07, 2007 2:03 am Post subject: |
|
|
That is an amazingly fragile network. It should not be possible to bring everyone down with one incorrectly placed network cable.
As I said in my prior post, does broadcasting work in game mode? What about in normal mode? Starcraft uses UDP broadcasts to find its peers. If the switch is not passing broadcasts, that will break Starcraft. I suspect most other games are similar in their use of broadcast for peer discovery. Even if broadcasting does not work, all is not lost. If that turns out to be the case, I can elaborate on how to work around it. |
|
Back to top |
|
 |
Monkeh Veteran


Joined: 06 Aug 2005 Posts: 1656 Location: England
|
Posted: Thu Jun 07, 2007 4:46 am Post subject: |
|
|
Use a VPN? |
|
Back to top |
|
 |
|