PDA

View Full Version : ok so i have a networking problem I think.


Davood
11-24-2012, 02:08 PM
Here is the situation

I have a pretty beefy computer acting as the host - if i run eqemu, i can run it out of a vm successfully, even multiple VMs work sucessfully, but no configuration i've tried was able to let me run it from teh host itself?!?!?! wtf right?

here is the configuration

INTERNET -> (2 external ips) -> switch -> 2 routers -> 2 switches -> server (2 nics)

Server has 2 nics, and is connected to both external ips.
If I load two VMs and setup eqemu for each of the external ips, I can run two servers, players can connect to both and it all works great.

If I try and run one server off of the host directly, players are able to connect sometimes, but mostly I get a stream state closed, unable to identify connection before it closed type error messsages.

SOME people can still connect though, which makes it annoying, what is wrong? I don't know. The reason I want to run out of the host is that it seems that the VM is making looting lag really bad for some reason, but running off a "sortof stand alone" box and looting (and other stuff) is instant

If anyone has tips for optimizing my vm (or teachign my noober ass to use linux) that would probably be sufficient

my "server" is windows 7 ultimate, and the VMs ive been succesfull with are win xp 32bit and win7 64bit

Right now i am running the server from a computer that only has one nic and things are lightning fast, but i dont want the additional electricity usage.

trevius
11-24-2012, 02:42 PM
So, you have 2 VMs each on the same server and with unique LAN addresses, and you also have a unique LAN address for the server itself?

I assume you are using port range forwarding in your routers to forward to your 2 VM addresses? You won't be able to run the 2 VMs and your server at the same time, as that would require 3 public addresses since you can only port forward to 1 address at a time per network. If you switch your port forwarding to point to your server on one of your networks, then it should work. You just won't be able to run both of your VMs at the same time as well.

Davood
11-24-2012, 02:48 PM
i think I miscommunicated. (I am familiar with networking enough to know that i need an ext ip for each server)
2 vms running on server -> i kill one of them and use the external ip for host
i go to router config and reroute everything from that ext ip to the host local ip
unable to get that ip working for host with eqemu

that is the problem.

Davood
11-24-2012, 02:50 PM
and as i said before SOME people can connect, it is not consistent, and not based on specific client, some SoF SoD and titanium peopel can connect and others cannot

trevius
11-24-2012, 02:54 PM
I don't know why some would be able to connect and others not. It is the same network that was working for your VMs, so the only factors here are your network config (mainly port range forwarding), and your server config file. Maybe post your server config file (minus any passwords)? If you are setting the IP fields that have a comment above them not to change them, then that could definitely cause odd issues. I do networking for a living, so I am sure we can figure this out :)

Davood
11-24-2012, 03:50 PM
Thanks for the offer of help

I work on databases and embarrassingly i don't know much about networking beyond some basic things i've tickled my way into.

Before we begin, I am using DD-WRT version 24-sp2 for my router

My server local lan address for the nic I want to use is
192.168.2.113

In my Router
The router ip address is
192.168.2.1

I have port forwarded the following
port 9000, 7778 to 192.168.2.113

I have port range forwarded the following to
Ports 7002 to 7500 to 192.168.2.113

My External Ip address for that adapter is:
173.34.35.197

Here is a copy (EDITED HEAVILY) of my server config.. minus some details like db name, users and passwords.


<?xml version="1.0">
<server>
<world>
<shortname>MDB</shortname>
<longname>[FV] Alakamin -zTEST UNSTABLE CAN YOU CONNECT???</longname>

<!-- Only specify these two if you really think you need to. (read: You don't) -->
<address>173.34.35.197</address>
<localaddress>192.168.2.113</localaddress>

<!-- Loginserver information. Defaults shown -->
<loginserver>
<host>eqemulator.net</host>
<port>5998</port>
<account>UNDISCLOSED</account>
<password>UNDISCLOSED</password>
</loginserver>

<!-- Server status. Default is unlocked -->
<!--<locked/>-->
<!-- <unlocked/> -->

<!-- Sets the ip/port for the tcp connections. Both zones and console (if enabled). Defaults are shown -->
<tcp ip="192.168.1.106" port="9000" telnet="enabled"/>

<!-- Sets the shared key used by zone/launcher to connect to world -->
<key>UNDISCLOSED</key>

<!-- Enable and set the port for the HTTP service. Defaults are shown -->
<http port="9080" enabled="false" mimefile="mime.types" />
</world>

<!-- Chatserver (channels) information. Defaults shown -->
<chatserver>
<host>173.34.35.197</host>
<port>7778</port>
</chatserver>

<!-- Mailserver (in-game mail) information. Defaults shown -->
<mailserver>
<host>173.34.35.197v</host>
<port>7778</port>
</mailserver>

<zones>
<defaultstatus>0</defaultstatus>

<!-- Sets port range for world to use to auto configure zones -->
<ports low="7002" high="7500"/>
</zones>

<!-- Database configuration, replaces db.ini. Defaults shown -->
<database>
<host>192.168.2.113</host>
<port>3306</port>
<username>UNDISCLOSED</username>
<password>UNDISCLOSED</password>
<db>UNDISCLOSED</db>
</database>

<!-- Launcher Configuration -->
<launcher>
<!-- <logprefix>logs/zone-</logprefix> -->
<!-- <logsuffix>.log</logsuffix> -->
<!-- <exe>zone.exe or ./zone</exe> -->
<!-- <timers restart="10000" reterminate="10000"> -->
</launcher>

<!-- File locations. Defaults shown -->
<files>
<!-- <spells>spells_us.txt</spells> -->
<!-- <opcodes>opcodes.conf</opcodes> -->
<!-- <logsettings>log.ini</logsettings> -->
<!-- <eqtime>eqtime.cfg</eqtime> -->
</files>
<!-- Directory locations. Defaults shown -->
<directories>
<!-- <maps>Maps</maps> -->
<!-- <quests>quests</quests> -->
<!-- <plugins>plugins</plugins> -->
</directories>
</server>

Davood
11-24-2012, 03:50 PM
I'm running a bunch of other stuff on there too, but none of it uses port 9000 and i have tried with none of it running.. i can list it all if you like.

Davood
11-24-2012, 03:52 PM
i loaded the server so people can try and connect to it... ill be back in a few hours after i run some errands to try and resolve this.

thanks in advance for your help... you have been an outstanding member of the community i enjoy following your advice and faqs (I like to read faqs, i am not fond of committing the crime of PEBCAK if i can avoid it by RTFM).

Davood
11-24-2012, 07:08 PM
whoops had the telnet / 9000 ip wrong in the pasted config. fixed it

i had pasted it in while i was editing and forgot to repaste because i was distracted.

trevius
11-25-2012, 12:18 PM
Have you tried commenting these lines out?

<!-- Only specify these two if you really think you need to. (read: You don't) -->
<address>173.34.35.197</address>
<localaddress>192.168.2.113</localaddress>

Those aren't needed if you aren't running your own login server.

Also, you mentioned that you were using port forwarding for 9000 and 7778. You should only be using port range forwarding. Port forwarding is for forwarding 1 port to another, like if you wanted to convert port 9000 to port 21 or something. Port range forwarding is for forwarding a range of ports (or a single port) to a specific IP.

Davood
11-25-2012, 12:39 PM
aha....

no im not using my own login server

ok... ill comment those two lines out and update the router to use port range forwarding

then ill see if people can connect.


thanks.

Davood
11-26-2012, 04:59 PM
ok so now players trying to connect to teh test server are all unable to connect.

and on the server side, i am not seeing any error messages or connect messages.

trevius
11-27-2012, 01:34 AM
You might want to check port 9000 and make sure it is pointed to the right IP on your 173.34.35.197 network. Since you have 2 NICs, maybe you have the wrong IP? Have you checked "ipconfig /all" from command prompt? I tried to connect to your test server with wireshark running and the sniffer log only showed my repeated connection attempts to your server on port 9000 with no response back.

lerxst2112
11-27-2012, 02:32 AM
Seems like a simple test of disabling one network card and seeing if it works would narrow the problem down quite a bit.

Davood
11-27-2012, 01:23 PM
Ok ill try disabling a nic. when i get home.. if that works.. which i hope it doesnt... then what do i do?
Also the ip settings all seem to be right. ill post them when i get home.

Davood
11-27-2012, 11:10 PM
the ip has changed for 192.168.2.x so don't get all excited noticing its 2.100 instead of 2.113 now :P

also i found dmz was on for some reason to an ip address not in use (old ip).. i disabled dmz dunno what problems that might have been causing...

ipconfig /all
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\davood>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : EXAserver
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : phub.net.cable.rogers.com

Ethernet adapter Local Area Connection 2:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller #2
Physical Address. . . . . . . . . : 00-24-1D-CC-53-8C
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::2ded:467f:1e8b:6d75%12(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.106(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : November-22-12 3:55:58 PM
Lease Expires . . . . . . . . . . : November-28-12 6:06:50 AM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 301999133
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-12-AA-9A-4E-00-24-1D-CC-53-8E

DNS Servers . . . . . . . . . . . : 192.168.1.1
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . : phub.net.cable.rogers.com
Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
Physical Address. . . . . . . . . : 00-24-1D-CC-53-8E
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::9446:e111:7f33:6eb3%11(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.2.100(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : November-24-12 3:39:22 PM
Lease Expires . . . . . . . . . . : November-28-12 3:39:21 AM
Default Gateway . . . . . . . . . : 192.168.2.1
DHCP Server . . . . . . . . . . . : 192.168.2.1
DHCPv6 IAID . . . . . . . . . . . : 234890269
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-12-AA-9A-4E-00-24-1D-CC-53-8E

DNS Servers . . . . . . . . . . . : 64.71.255.198
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter VirtualBox Host-Only Network:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
Physical Address. . . . . . . . . : 08-00-27-00-98-CD
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::5541:6f7f:6d02:e9d1%21(Preferred)
Autoconfiguration IPv4 Address. . : 169.254.233.209(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 503840807
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-12-AA-9A-4E-00-24-1D-CC-53-8E

DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{5A3669EC-A8C3-4251-A290-4E4C0A71DD04}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Local Area Connection* 12:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.phub.net.cable.rogers.com:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : phub.net.cable.rogers.com
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{8161418A-9F8D-419C-BBF6-B18DBB28E0BE}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

C:\Users\davood>

eqemu config:

<?xml version="1.0">
<server>
<world>
<shortname>MDB</shortname>
<longname>[FV] Alakamin-TEST UNSTABLE CAN YOU CONNECT???</longname>

<!-- Only specify these two if you really think you need to. (read: You don't) -->
<address>173.34.35.197</address>
<localaddress>192.168.2.100</localaddress>

<!-- Loginserver information. Defaults shown -->
<loginserver>
<host>eqemulator.net</host>
<port>5998</port>
<account></account>
<password></password>
</loginserver>

<!-- Server status. Default is unlocked -->
<!--<locked/>-->
<!-- <unlocked/> -->

<!-- Sets the ip/port for the tcp connections. Both zones and console (if enabled). Defaults are shown -->
<tcp ip="192.168.2.100" port="9000" telnet="enabled"/>

<!-- Sets the shared key used by zone/launcher to connect to world -->
<key>??????????????</key>

<!-- Enable and set the port for the HTTP service. Defaults are shown -->
<http port="9080" enabled="false" mimefile="mime.types" />
</world>

<!-- Chatserver (channels) information. Defaults shown -->
<chatserver>
<host>173.34.35.197</host>
<port>7778</port>
</chatserver>

<!-- Mailserver (in-game mail) information. Defaults shown -->
<mailserver>
<host>173.34.35.197</host>
<port>7778</port>
</mailserver>

<zones>
<defaultstatus>0</defaultstatus>

<!-- Sets port range for world to use to auto configure zones -->
<ports low="7002" high="7500"/>
</zones>

<!-- Database configuration, replaces db.ini. Defaults shown -->
<database>
<host>192.168.2.100</host>
<port>3306</port>
<username>??????????</username>
<password>??????????</password>
<db>????????????????</db>
</database>

<!-- Launcher Configuration -->
<launcher>
<!-- <logprefix>logs/zone-</logprefix> -->
<!-- <logsuffix>.log</logsuffix> -->
<!-- <exe>zone.exe or ./zone</exe> -->
<!-- <timers restart="10000" reterminate="10000"> -->
</launcher>

<!-- File locations. Defaults shown -->
<files>
<!-- <spells>spells_us.txt</spells> -->
<!-- <opcodes>opcodes.conf</opcodes> -->
<!-- <logsettings>log.ini</logsettings> -->
<!-- <eqtime>eqtime.cfg</eqtime> -->
</files>
<!-- Directory locations. Defaults shown -->
<directories>
<!-- <maps>Maps</maps> -->
<!-- <quests>quests</quests> -->
<!-- <plugins>plugins</plugins> -->
</directories>
</server>



Router config:
All of these are port range forwarded to 192.168.2.100 as line items in my router config

7002-7500
5998-5999
9000-9000
7778-7778

Davood
11-27-2012, 11:12 PM
oh and commenting out those "two lines" just made it so that i would receive no notification of a failed connection attempt by a player, and they would be stuck trying to connect for 15 minutes before getting booted.

trevius
11-28-2012, 04:20 AM
Do you have any other PCs in your 192.168.2.x network that you could try connecting to your test server from? That will verify that it at least works for connecting as it will bypass any port or routing issues from the external network as it connects locally.

I have never tried a dual NIC and dual ISP setup for EQEmu, so I am not completely sure what other problems that might cause that could be different than the standard ones.

With your 2 LANs being in separate IP space now, that should reduce some potential routing issues. I am just not sure how the server decides which NIC to use offhand. I assume it would just be listening on port 9000 for any connection to come in and when one does, it would just reply through the same NIC it came from. It sounds like it could be getting confused on which NIC to use. Did you try disabling your other NIC yet to see what happens?

Having a DMZ set on your test server's network could definitely cause some issues. That is basically like having all ports forwarded to 1 IP, so if the IP for the DMZ was pointing to somewhere other than your test server, it would probably override your port range forwarding settings and cause connections to fail.

Since you have a special network setup, you may be one of those special cases that does require those IP fields to be set in your config. Everything looks correct as far as I can tell.

What I don't get is that you said some users can connect and others cannot. If even 1 person can connect, all should be able to. If they aren't, maybe it is something on their end or something else with the setup on your server. Maybe I can try connecting when you have it set the way you did and see what the sniffer shows if I fail to connect.

jsr
11-28-2012, 09:23 AM
I've had similar symptoms (some players can connect, others can't) problem in the past when I didn't have the full range of 7000-7100 forwarded. Unfortunately I don't know enough about it to speculate 'why' :)

Davood
11-28-2012, 09:51 AM
It works locally.

Davood
11-28-2012, 09:53 AM
I tried netstat /anb
Port 9000 is being listened to by 0.0.0.0 can i force he two nics to listen to 9000 separately?

Davood
11-28-2012, 09:55 AM
Also im gonna resarch the ip of the people that DID get in... maybe they are my neighbors

Caryatis
11-28-2012, 10:36 AM
Why do you have such a fucked up network setup? If you can't support it, you shouldn't run it.

Davood
11-28-2012, 01:44 PM
Why do you have such a fucked up network setup? If you can't support it, you shouldn't run it.

hello good sir, your feedback is helpful and creatively inciteful (pun intended).

actually, my network setup works great! and if your familiar with networks and computers, you will note that it isnt strange at all, in fact it is quite a normal setup for a network of this size (20+ devices on the local network).

all of the other services (video,cctv,ftp,www,etc) whether run off teh host or in a VM running on it work very well, nobody has connectivity issues, and it is just this particular locus of interest that is problematic.

my eqemu server is running just fine, but on another box (not preferred) that is all, i started this post out of pure selfish greed to keep more of my money in the bank and not pay for electricity of another computer (my backup server), that is all.

Davood
11-28-2012, 01:58 PM
ok so i checked out the random people who are able to connect, they live all over the US, and i am in canada.. so wtf right?

lerxst2112
11-28-2012, 07:03 PM
I didn't really dig through the code that much, but it looks like all of the sockets are bound using INADDR_ANY which should listen on all interfaces. Packets sent on a socket bound with INADDR_ANY usually go through the lowest numbered interface, so if that's not the same address you're expecting to receive on the NAT could be screwing it up. That's why I recommended disabling one of the cards to test if that works.

I'd also recommend setting up static addresses in your router so you don't need to change your config every time a DHCP address changes.

Davood
11-29-2012, 12:56 AM
lerxst2112,

your suggestions are excellent.. tomorrow night i will have time to try it out.

I will start by disabling a nic, and then if that doesn't work. ill switch which one is disabled.

from another thread

c0crete suggested
netstat -an | find /i "9000"

here is the output from that if you are curious:

TCP 0.0.0.0:9000 0.0.0.0:0 LISTENING
TCP 192.168.2.100:9000 192.168.2.100:17865 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17866 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17870 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17873 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17875 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17877 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17879 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17881 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17883 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17886 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17888 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17890 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17892 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17894 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17896 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17898 ESTABLISHED
TCP 192.168.2.100:9000 192.168.2.100:17900 ESTABLISHED
TCP 192.168.2.100:17865 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17866 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17870 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17873 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17875 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17877 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17879 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17881 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17883 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17886 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17888 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17890 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17892 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17894 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17896 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17898 192.168.2.100:9000 ESTABLISHED
TCP 192.168.2.100:17900 192.168.2.100:9000 ESTABLISHED
UDP 0.0.0.0:9000 *:*


something is definately messed up with having two nics IMHO, becaue when routing to a VM running on that same box , eqemu runs fine with the two external ip addresses each routed to their own VM

Davood
11-29-2012, 07:41 PM
So like as of today my network has changed its mind
everyone who tried has connected.and played on my test server
wtf right?

trevius
12-01-2012, 08:55 PM
I don't know what IP you had the DMZ pointed to before, but disabling that may have very well fixed your issue.

Noport
12-02-2012, 12:09 AM
Davood follow this post http://www.eqemulator.org/forums/showthread.php?t=35057

Davood
12-07-2012, 10:04 AM
Ok its back.

No explanation some people.can connect others cannot

i give up. im gonna keep the main server on a separate box and run the test server in a vm

Davood
07-20-2015, 10:19 AM
oops necroed an old thread by accident