RationalWiki:Internet relay chat

From RationalWiki
(Redirected from Internet relay chat)
Jump to: navigation, search
Someone is wrong on

The Internet

Icon internet.svg
Log in:

Contents

[edit] Before we bore you with details

Rationalwiki has its own IRC channel on freenode.net.

In your IRC client simply type /server irc.freenode.net some fascinating stuff may scroll on by; this will be the server's MOTD (message of the day). From there, type /join #rationalwiki and you too can chat with nearly NONE of our esteemed editors.

[edit] Technical information

IRC is an open protocol that uses Transmission Control Protocol. An IRC server can connect to other IRC servers to expand the IRC network. Users access IRC networks by connecting a client to a server. There are many client and server implementations, such as mIRC and the Bahamut IRCd. Most IRC servers do not require users to log in, but a user will have to set a nickname before being connected.

IRC was originally a plain text protocol (although later extended),[1] which on request was assigned port 194/TCP by "Internet Assigned Numbers Authority (IANA). However, the de facto has always been to run IRC on 6667/TCP and nearby port numbers to avoid having to run the IRCd software with superuser. It is possible (though quite inconvenient) to use IRC via a basic byte-stream client such as netcat or telnet.

The protocol specified that characters were 8 bit but did not specify the character encoding the text was supposed to use.[2] This can cause problems when users using different clients and/or different platforms want to converse.

All client-to-server IRC protocols in use today are descended from the protocol implemented in the irc2.8 version of the IRC2server, and documented in RFC 1459. Since RFC 1459 was published, the new features in the irc2.10 implementation led to the publication of several revised protocol documents; RFC 2810, RFC 2811, RFC 2812 and RFC 2813, however these protocol changes have not been widely adopted among other implementations.

Although many specifications on the IRC protocol have been published, there is no official specification, as the protocol remains dynamic. Virtually no clients and very few servers rely strictly on the above RFCs as a reference.

Microsoft made an extension for IRC in 1998[3] via the proprietary IRCX. They later stopped distributing software supporting IRCX, instead developing the proprietary MSN.

The standard structure of a network of IRC servers is a tree. Messages are routed along only necessary branches of the tree but network state is sent to every server and there is generally a high degree of implicit trust between servers. This architecture has a number of problems. A misbehaving or malicious server can cause major damage to the network, and any changes in structure, whether intentional or a result of conditions on the underlying network, require a net-split and net-join. This results in a lot of network traffic and spurious quit/join messages to users, and temporary loss of communication. Adding a server to a large network means a large background bandwidth load on the network and a large memory load on the server.

For a discussion of the evolution of server-side IRC protocols and the various IRCd incarnations, see the separate article on wp:IRC daemons.

[edit] Commands and replies

IRC is based on a line-based structure with the client sending single-line messages to the server, receiving replies to those messages and receiving copies of some messages sent by other clients. In most clients users can enter commands by prefixing them with /; depending on the command, these may either be passed directly to the server (generally used for commands the client does not recognize), passed to the server with some modification or handled entirely by the client.

Due to the nature of the protocol, it is impossible for automated systems to pair a sent command with its reply.

[edit] Channels

The basic means of communication in an established IRC session is a channel. Channels in a server can be displayed using the command /list [#string] [-min #] [-max #] that lists all currently available channels, optionally filtering for parameters (#string for the entire or part of the name, with wildcards, and #min / #max for number of users in the channel).

Users can join to a channel using the command /join #channelname and send messages to it, which are relayed to all other users on the same channel.

Channels that are available across an entire IRC network are prepended with a ' # ', while those local to a server use '&'. Other non-standard and less common channel types include '+' channels — 'modeless' channels without operators, and '!' channels, a form of timestamped channel on normally non-timestamped networks.

[edit] Modes

Users and channels may have modes, which are represented by single case-sensitive letters and are set using the mode command. User modes and channel modes are separate and can use the same letter to mean different things (e.g. usermode "i" is invisible mode whilst channelmode "i" is invite only). Modes are usually set and unset using the mode command which takes a target (user or channel), a set of modes to set (+) or unset (-) and any parameters the modes need.

Some but not all channel modes take parameters and some channel modes apply to a user on a channel or add or remove a mask (e.g. a ban mask) from a list associated with the channel rather than applying to the channel as a whole. Modes that apply to users on a channel have an associated symbol which is used to represent the mode in names replies (sent to clients on first joining a channel and use of the names command) and in most clients to represent it in this list of users in the channel.

In order to correctly parse incoming mode messages and track channel state the client must know which mode is of which type and for the modes that apply to a user on a channel which symbol goes with which letter. In early implementations of IRC this had to be hard-coded in the client but there is now a de-facto standard extension to the protocol which sends this information to the client at connect time.

There is a small design fault in IRC regarding modes that apply to users on channels, the names message used to establish initial channel state can only send one such mode per user on the channel, but multiple such modes can be set on a single user. For example, if a user holds both operator status (+o) and voice status (+v) on a channel, a new client will be unable to know the less precedented mode (voice). Workarounds for this are possible on both the client and server side but none are widely implemented.

Standard (rfc1459) modes
User modes Channel modes
Letter Description Letter Symbol Parameter Description
i Invisible — cannot be seen without a common channel or knowing the exact name o @ Name of affected user Channel operator — can change channel modes and kick users out of the channel among other things
s Receives server notices p None None Private channel — listed in channel list as "prv" according to rfc1459
w Receives wallops s None None Secret channel — not shown in channel list or user whois except to users already on the channel
o User is an IRC operator (ircop) i None None Invite only — users can only join if invited by a channel operator
t None None Topic only settable by channel operators
n None None Users not on the channel cannot send messages to it
m None None Channel is moderated (only those who hold operator or voice status on the channel can send messages to it)
l None Limit number Limits number of users able to be on channel (when full, no new users can join)
b None Ban mask (nick!user@host with wildcards allowed) Bans hostmasks from channel
v + Name of affected user Gives a user voice status on channel (see +m above)
k None New channel key Sets a channel key such that only users knowing the key can enter

Many IRCd programmers have added extra modes or modified the behavior of modes in the above list so it is strongly advisable to check the documentation of the IRC network or IRCd (though note that the network may have patched the IRCd) for more detailed information on what the modes do on a particular server or network.

[edit] IRC operators

There are also users whose privileges extend to whole servers or networks of servers; these are called IRC operator, sometimes shortened to IRCops. On some IRC implementations, IRC operators are also given channel operator status in every channel, although many people believe that administration of channels and administration of the network should be kept separate, and that IRC operator status does not confer the right to interfere with a particular channel's operation.

[edit] Attacks

Because IRC connections are usually unencrypted and typically span long time periods, they are an attractive target for malicious hackers. Because of this, careful security policy is necessary to ensure that an IRC network is not susceptible to an attack such as an IRC takeover war. IRC networks may also k-line or gline users or networks that have a harming effect.

A small number of IRC servers support SSL connections for security purposes. This helps stop the use of packet sniffer programs to obtain the passwords of IRC users, but has little use beyond this scope due to the public nature of IRC channels. SSL connections require both client and server support (which may require the user to install SSL binaries and IRC client specific patches or modules on their computers).

IRC served as an early laboratory for many kinds of Internet attacks, such as using fake Internet Control Message Protocol (ICMP) unreachable messages to break TCP-based IRC connections (nuking) to annoy users or facilitate takeovers.

[edit] Abuse prevention: timestamping vs. nick/channel delay protocol

One of the most contentious technical issues surrounding IRC implementations, which survives to this day, is the merit of "Nick/Channel Delay" vs. "Timestamp" protocols. Both methods exist to solve the problem of denial-of-service attacks, but take very different approaches.

The problem with the original IRC protocol as implemented was that when two servers split and rejoined, the two sides of the network would simply merge their channels. If a user could join on a "split" server, where a channel which existed on the other side of the network was empty, and gain operator status, they would become a channel operator of the "combined" channel after the netsplit ended; if a user took a nickname which existed on the other side of the network, the server would kill both users when rejoining.

This was often abused to "mass-kill" all users on a channel, thus creating "opless" channels where no operators were present to deal with abuse. Apart from causing problems within IRC, this encouraged people to conduct denial of service attacks against IRC servers in order to cause netsplits, which they would then abuse.

[edit] Nick/channel delay

The nick/channel delay (abbreviated ND/CD) solution to this problem was very simple. After a user signed off and the nickname became available, or a channel ceased to exist because all its users left (as often happens during a netsplit), the server would not allow any user to use that nickname or join that channel, respectively, until a certain period of time (the delay) had passed. The idea behind this was that even if a netsplit occurred, it was useless to an abuser because they could not take the nickname or gain operator status on a channel, and thus no collision of a nickname or 'merging' of a channel could occur. To some extent, this inconvenienced legitimate users, who might be forced to briefly use a different name (appending an underscore was popular) after rejoining.

[edit] Timestamping

The alternative, the timestamp or TS protocol, took a different approach. Every nickname and channel on the network was assigned a timestamp -- the date and time when it was created. When a netsplit occurred, two users on each side were free to use the same nickname or channel, but when the two sides were joined, only one could survive. In the case of nicknames, the newer user, according to their TS, was killed; when a channel collided, the members (users on the channel) were merged, but the channel operators on the "losing" side of the split lost their channel operator status.

TS is a much more complicated protocol than ND/CD, both in design and implementation, and despite having gone through several revisions, some implementations still have problems with "desyncs" (where two servers on the same network disagree about the current state of the network), and allowing too much leniency in what was allowed by the 'losing' side. Under the original TS protocols, for example, there was no protection against users setting bans or other modes in the losing channel which would then be merged when the split rejoined, even though the users who had set those modes lost their channel operator status. Some modern TS-based IRC servers have also incorporated some form of ND and/or CD in addition to timestamping in an attempt to further curb abuse.

Most networks today use the timestamping approach. The timestamp versus ND/CD disagreements caused several servers to split away from EFnet and form the newer IRCnet. After the split, EFnet moved to a TS protocol, while IRCnet used ND/CD.

[edit] Networks

There are thousands of running IRC networks in the world. They run various implementations of IRC servers, and are administered by various groups of IRC operators, but the protocol exposed to IRC users is very similar, and all IRC networks can be accessed by the same client software.

One can join servers by clicking on a irc://irc.network.example:port/channel web hyperlink.

The largest IRC networks have traditionally been grouped in The Big Four — a designation for networks that top the statistics. The Big Four networks change periodically, but due to the community nature of IRC there are a large number of other networks for users to choose from.

The Big Four:

  • EFnet
  • IRCnet
  • QuakeNet
  • Undernet

[edit] Uses of IRC

Much of IRC traffic is casual chat, often in channels where users have "known" each other for years[4]. Some is special-interest, such as channels exchanging tips on video gaming, etc.

Although the normal client-server-server-client traffic is strictly text only, binary files can be exchanged using either of two additional protocols: CTCP (Client-to-Client Protocol) and DCC (Direct Client Connection). Both of these bypass all IRC servers. IRC allows private or semi-private sub-groups, making it highly useful for business or technical information exchange.

It has to be said that these arrangements are also well suited for netsex.

[edit] Footnotes

  1. IRC RFC
  2. RFC 1459
  3. IRCX Protocol Addition Specification
  4. It's common in long-term, stable-population IRC channels to organize in-real-life meet-ups. These are sometimes known as "IRLs"

[edit] External links

Personal tools
Namespaces

Variants
Actions
Navigation
Community
Tools
support