2 Login Server & 1 Game Server (4 local)

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
iratushka
Posts: 7
Joined: Tue Jul 28, 2009 9:27 am

2 Login Server & 1 Game Server (4 local)

Post by iratushka »

we have two servers, each with two ip addresses 4 subnet. On the first server is running one LoginServer and one GameServer everything works fine. On the problem appeared to give access to the game from the other two subnets, there is a second server had the same two subnets (two ip addresses) probyval LoginServer put on a second machine but the server does not wish to work with two or LoginServer's connected to a local or remote. Can any way how to teach GameServer join the two LoginServer's? or may suggest another solution to the problem?

Sorry for bad English put a message in the original Russian.
имеем два сервера, на каждом по два ip адреса 4 подсети. На первом сервере запущен один LoginServer и один GameServer все работает отлично. По появилась задача дать доступ к игре из двух других подсетей там стоит второй сервер у него тоже две подсети (два ip адреса), пробывал поставить LoginServer на вторую машину но сервер не желает работать с двумя LoginServer's подключается или к локальному или к удаленному. Можно ли каким либо образом научить GameServer подключатся к двум LoginServer's? или можете подсказать другое решение проблемы?

Простите за плохой Английский приложил сообщение на оригинальном русском.
Vapulabe
Posts: 271
Joined: Wed Mar 19, 2008 10:16 am

Re: 2 Login Server & 1 Game Server (4 local)

Post by Vapulabe »

AFAIK, the game server connects on the login server (and can only make a connection to ONE server).
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: 2 Login Server & 1 Game Server (4 local)

Post by _DS_ »

My LS is highly modded, so i cant show a patch. Here is the part of code:
L2LoginClient.java:

Code: Select all

	public String getServerAddress()	{		byte addr[] = getConnection().getInetAddress().getAddress(); 		if ((addr[0] & 255) == 192 && (addr[1] & 255) == 168 && (addr[2] & 240) == 16)		{			return "game-1.l2";		}		if ((addr[0] & 255) == 192 && (addr[1] & 255) == 168 && (addr[2] & 192) == 192)		{			return "game-2.l2";		}		if ((addr[0] & 255) == 192 && (addr[1] & 255) == 168)		{			return "game-int.l2";		}		if ((addr[0] & 255) == xx && (addr[1] & 255) == yy && (addr[2] & 128) == 128)		{			return "game-fos.l2";		}		if ((addr[0] & 255) == 10)		{			return "game-corbina.l2";		}		return "game-ext.l2";	} 
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
iratushka
Posts: 7
Joined: Tue Jul 28, 2009 9:27 am

Re: 2 Login Server & 1 Game Server (4 local)

Post by iratushka »

Can I get GameServer work with two LoginServer's? my knowledge of programming in java is very small could prompt people in the know that it is necessary to finish or change the code GameServer?
Можно ли заставить GameServer работать с двумя LoginServer's? мои познания программирования на java очень малы может знающие люди подскажут что надо дописать или изменить в коде GameServer?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: 2 Login Server & 1 Game Server (4 local)

Post by jurchiks »

I don't get it, why do you need 2 loginservers?
you have 1 gameserver, it needs only 1 loginserver, you only need the login IP to connect, where is the problem?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
levonti
Posts: 1
Joined: Thu Jan 07, 2010 10:31 am

Re: 2 Login Server & 1 Game Server (4 local)

Post by levonti »

I have 1 game server and 1 login server. I have 4 ip. How do gameserver to work with 4 IP from different subnet? Through NAT login server is connected, then connect to the gameserver is on the ip listed in the config file. How to make loginserver pass to connect to gameserver the IP behind NAT.
or How to configure 2 external IP gameserver.
Or how to make loginserver instead of the IP transfer hostname?

Russian:
Как настроить gameserver для работы с 4 IP с разных подсетей? Через NAT login server соединяется, далее к gameserver идет соединение по ip указанному в конфиге. Как заставить loginserver передавать для соединения к gameserver тот IP за NAT?
Или проще - как настроить 2 xternal IP gameserver
Или как заставить loginserver вместо IP передавать hostname?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: 2 Login Server & 1 Game Server (4 local)

Post by jurchiks »

Или как заставить loginserver вместо IP передавать hostname?

read the configs, it says that you can put either an IP, or a hostname
though, if i understand correctly, why is your loginserver separate from gameserver??

so basically, you have a server (let's make it ls and gs on one pc), all you need is to configure the right external/internal IPs

gameserver config/server.properties
GameserverHostname =*
LoginHost = 127.0.0.1
InternalHostname = your LAN ip, for your network players, if any
ExternalHostname = the ip for those "out there", not from your network

loginserver.properties
InternalHostname = your LAN ip, for your network players, if any
ExternalHostname = the ip for those "out there", not from your network
# RouterHostname = if you have it, read the description and set it, if necassary (don't forget to remove the bracket)
LoginserverHostname = *
LoginHostname = 127.0.0.1

that's what it should be, if you have login/game server on one PC, don't make yourself problems by trying something stupid like separating login/game server, if you don't know how to do it

P.S. yeah, i know, there are too many IP settings, especially the login/gameserverHostname one, makes no sense to me...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Post Reply