Page 1 of 1

Linking Servers

Posted: Mon Aug 23, 2004 11:49 am
by AzzKikr
I've had an offer to link a server with mine.

Now, I've got 3 questions about this:

1.) If I set up a hostname e.g. irc.domain.com, how do I get it so that users connection to irc.domain.com get loadbalanced/split between server1.domain.com and server2.domain.com?

2.) I've got the link blocks going as follows:
link server2.domain.com
{
username *;
hostname server1.domain.com;
bind-ip *;
port 7028;
password-connect "meh";
password-receive "meh";
class servers;


};

link server1.domain.com
{
username *;
hostname server2.domain.com;
bind-ip *;
port 7028;
password-connect "meh";
password-receive "meh";
class servers;


};
Are these link blocks OK? Or do I need to change them?

3.) In the servers respective unrealircd.conf's, do I have to set duplicate O-lines in each? Or just set the O-lines in one, and leave it at that?

Any general hints are appreciated :)

-A.

Posted: Mon Aug 23, 2004 12:03 pm
by Ron2K
  1. You would set up some sort of DNS round-robin.
  2. The link blocks look OK, but for link::hostname it is preferable to use IP addresses. (Read the docs; they'll tell you why.)
  3. This is best explained by way of example. If you are an op on server 1 and server 1 links to server 2, you can still oper up if you connect to server 1. However, you cannot oper up on server 2 unless you have an oper block on that server. (There was a discussion on here not too long ago about having global oper blocks - search the forums, I'm too lazy.)
EDIT: Just read through your link blocks again, the following corrections are required:

Code: Select all

link server1.domain.com {
   ...
   hostname server1.domain.com; [preferably the IP]
   ...
}
Ditto for the other server.

I'm a bloody idiot for not picking this up earlier...

Posted: Mon Aug 23, 2004 6:47 pm
by aquanight
HUh? Why would you put link:: and link::hostname to be the same? That would make the server link to itself (impossible).

Posted: Tue Aug 24, 2004 12:08 am
by AngryWolf
Relax, aquanight, Ron2k is right this time. :)
me { name <local-name>; ...; }; link <remote-name> { hostname <remote-address>; port <remote-port>; ...; };

Posted: Tue Aug 24, 2004 1:47 am
by katsklaw
aquanight wrote:HUh? Why would you put link:: and link::hostname to be the same? That would make the server link to itself (impossible).
Not impossible an example would be as if Services was connecting to an IRCd on the same IP or 2 IRCd's on the same IP but different ports.

Posted: Tue Aug 24, 2004 2:16 am
by jewles
And FYI, not really sure if this was covered, but looking over your example. when you create a link block you want to link to the same server in the block for exmaple, in server1's config file you should have link for

Code: Select all

link server2.domain.com 
{ 
username *; 
hostname server2.domain.com; 
bind-ip *; 
port 7028; 
password-connect "meh"; 
password-receive "meh"; 
class servers; 
};
and in the server2's config file

Code: Select all

link server1.domain.com 
{ 
username *; 
hostname server1.domain.com; 
bind-ip *; 
port 7028; 
password-connect "meh"; 
password-receive "meh"; 
class servers; 
};
Actually the best way with doing o:lines is by Remote Includes. Having one set of o:lines on a server and include that file with all servers... so you only have to update one file... I included this setup for o:lines, set, u:line, and various other blocks that could be remote. time saver!

Posted: Tue Aug 24, 2004 5:22 am
by aquanight
AngryWolf wrote:Relax, aquanight, Ron2k is right this time. :)
me { name <local-name>; ...; }; link <remote-name> { hostname <remote-address>; port <remote-port>; ...; };
D'OH! *beats up self and throws self into a nearby waste recepticle*

I feel so stupid now :cry: