To connect it to the network, you can configure your machine to use DHCP, or you can configure it to use the IP address as a fixed connection.

  • By using DHCP, your machine will be able to establish a network connection on all networks where DHCP operates. In this way, you can connect it to the network in the auditoria of the K.U.Leuven, to the dorm- and private residence network known as Kotnet, but also to cable networks like UPC and Telenet without having to change the network settings.

  • By using a fixed connection, your network connection does not depend on a DHCP server. Even if all such servers are down, your connection will still work (provided of course all routers and hubs are working correctly). Your machine is, however, only configured for 1 specific network and thus you need to change its configuration when connecting to another network (auditoria, at home, ...)

The disadvantage of either method is the negation of the advantage of the other ;-)

This page is structured in 2 parts : the first part describes what you need to connect you machine to the network. The second part describes how to do it for Linux/MacOS/Windows. You probably need to read the first part to be able to understand the second.


The What Part

DHCP

On some networks (e.g. the network of the department, but not the auditoria, nor Kotnet !), you need to inform the network administrators that you want to use DHCP for your machine. In that case, the hardware address (MAC address) of the network interface is needed to configure the DHCP server to serve your machine as well. The (hardware) MAC address is a 6 byte number, usually displayed in the form of xx:xx:xx:xx:xx:xx where x is a hexadecimal digit (0 to 9 and A to F).

When starting the network, either at boot time, or when inserting a network PCMCIA card, or when enabling a previously disabled network interface, your machine will contact the DHCP server and will receive a lease. Such a lease contains all information necessary to configure the networking.

If you want to change between networks, without shutting down your network interface or machine, you need to release the lease you received, plug in into the new network and apply for a (new) lease on that network.

When your network connection is not working as it should, applying for a (new) DHCP lease can be a good thing to try. The only situation when this is a bad idea, is when your network connection is still working (but why are you considering to re-apply ? You do have a networking problem don't you ?), but the DHCP server is not giving out leases any more (because it is down or having some other problem). In that case, you make things worse, because without a lease, you cannot connect to the network at all. In all other circumstances, re-applying for a lease might just solve your networking problem.

Fixed network connection

If you want to use your IP address as a fixed connection, you need to fill in the details for the configuration.

To be able to communicate with machines on other networks than the one your own machine is connected to, you need a gateway. A gateway is a device that connects networks. Without gateways, all networks would be islands. Gateways are easy to find on the department of Computer Science : on each network, the machine with IP-address 254 is the gateway to all other networks.

So if your own machine is connected to the network 134.58.xx.0 (i.e. if your own machine has an IP-address of the form 134.58.xx.yy), then the gateway you should use has the IP-address 134.58.xx.254. So this is the IP-address you should specify in the appropriate file or dialogue window.

Using any other IP-address will result in not being able to communicate with other machines than on your own network.

To be able to communicate with another machine, your machine must determine whether the other is on the same network or a different one. If it is on a different network, all communication should go via the gateway, otherwise contact can be made directly. Therefore a subnet mask must be given. With this mask, the network a machine belongs to can be derived from its IP-address. For all our networks, the subnet mask is 255.255.255.0 . You must specify this mask in the appropriate file or dialogue window.

Using any other subnet mask will result in being able to communicate with some machines but not with others, depending on their IP-address and the precise mask you are using.


The How Part

Linux

The IP and/or hardware/MAC address

In Linux, you can find the IP and/or hardware/MAC address using the ifconfig -a command. On ubuntu lshw -class network will list all interfaces and hardware/MAC addresses.

DHCP network connection

For Linux machines, you need to use a DHCP client such as pump, dhclient and/or dhcpcd. Most Linux distributions natively support DHCP, so there should be no problem configuring it to use it. Consult the documentation of your Linux, for the exact procedure to enable it.

On Debian Linux (2.2), a network interface is configured in /etc/network/interfaces. You configure such an interface for DHCP, by specifying it as :

    iface eth0 inet dhcp
At boot time, the startup script /etc/init.d/networking is executed. This script uses the ifup command to initialize and configure the network interfaces. The ifup command in its turn, consults the interfaces file to find out how exactly the interfaces are to be initialized. It then looks for one of several ways to use DHCP ... it uses what it finds. As long as you have one of the above dhcp clients installed, your interface will be initialized and configured with DHCP. Each of the dhcp clients have their own configuration files, in which you can specify details about the DHCP configuration. Usually, you do not need to change these configuration files. Consult the man pages for more information.

On Red Hat Linux, you can configure your network card to use DHCP using the linuxconf tool : select Networking, select DHCP and restart your networking, either by using the network script in /etc/rc.d/init.d or by rebooting the machine.

Consult following URL's for more info on DHCP for Red Hat Linux :

Releasing and renewing a DHCP lease

In Linux you do this by shutting down the network interface using a command like ifdown and then up again using ifup. This effectively renews the lease. There probably is a shortcut, but that would be dhcp client specific. Consult your DHCP documentation for the details.

MacOS

The IP and/or hardware/MAC address

In MacOS Classic, you can find the IP and/or hardware/MAC address using an application like Interarchy.

In MacOS X, you can find the IP and/or hardware/MAC address using the ifconfig -a command.

DHCP network connection

You select DHCP in the TCP/IP control panel.

Windows

The IP and/or hardware/MAC address

In Windows you can find the IP and/or hardware/MAC address with the ipconfig /all command, or in the network adapter details (Start Menu -> Control Panel -> Network).

DHCP network connection

For Windows, you need to configure the TCP/IP settings of your network interface (Start Menu -> Control Panel -> Network) :

  • Obtain an IP address automatically or from a DHCP Server.
  • You should not configure a gateway nor subnet mask.
  • Either configure to Obtain DNS server addresses automatically or just Enable DNS, but do not fill in any details, except the name of your machine; the DNS settings are obtained with DHCP as well.
Furthermore, there are a number of Windows specific settings to configure :
(the exact place to configure them, depends heavily on the specific Windows version, it is impossible to describe all the possibilities that are found in the various versions)
  • do not use an LMHOSTS file and do not use WINS, nor DHCP for WINS Resolution and do not specify WINS servers.
  • Make sure you Disable NetBIOS over TCP/IP, unless you want to connect to another machine using Windows Networking (e.g. a samba server or another Windows machine). In that case, you might also want to Enable DNS for Windows Resolution

Releasing and renewing a DHCP lease

In Windows, you can do this by issuing the commands ipconfig /release to release and ipconfig /renew to apply for a new lease. You must enter these commands in a command window.

For those who do not like to type in commands :

  • On Windows 9x, there is a graphical utility winipcfg, with which you can release or renew a DHCP lease.
  • On Windows 2000, you can Disable the network interface and then Enable it again to obtain a new lease (you can dis/enable the interface on the Properties window of My Network Places, by popping up the context menu with the right mouse button).
  • On Windows NT, apparently there is no graphical tool to obtain or release a DHCP lease.

Fixed network connection

For Windows, you need to configure the TCP/IP settings of your network interface (Start Menu -> Control Panel -> Network) :

  • You need to fill in the IP address, gateway and subnet mask settings explicitly.
    You get the IP address from the network administrator and the gateway and subnet mask can be found as described above in the What part.
  • For DNS, you need to fill in cs.kuleuven.be as the domain. The DNS servers you can use, are described in the DNS part of this guide.
  • Furthermore, there are a number of (Windows specific) settings you need to configure as well. Consult the part above about using DHCP in Windows.