Difference between revisions of "AutoIP Howto"

 
(One intermediate revision by one other user not shown)
Line 55: Line 55:
===IPzator===
===IPzator===
This method listens on the attached network and tries to find:
This method listens on the attached network and tries to find:
* the network address of the attached network, 8-bit netmask is assumed
* the network address of the attached network, netmask is assumed from the network adddress (A, B and C class network)
* a free IP address on this network
* a free IP address on this network


Line 63: Line 63:


'''NOTE:''' If an IP address is assigned by IPzator but this address is used by some other host on the network, which is not active or switched off, an IP address collision can occur if the inactive host becomes on-line.
'''NOTE:''' If an IP address is assigned by IPzator but this address is used by some other host on the network, which is not active or switched off, an IP address collision can occur if the inactive host becomes on-line.
We send an ARP to ourselves ("gratitious arp") every 3 minutes to detect IP address conflicts and also inform others automatically about the IP (if they listen).
If there is another device answering to this request, we instantly go off the network, the LEDs show 5x green blinking (and red LED is typically on), after 15 seconds, the device reboots, in the hope to get a different IP address from a DHCP server.


===AutoIP===
===AutoIP===

Latest revision as of 12:41, 1 September 2010

Static IP vs. automatic IP

There are two ways of configuring IP parameters of a device: static and dynamic configuration.

Static IP address

The simplest (but not always the easiest) method is to assign a static IP address. You need to set the following parameters in the Network section of the WEB UI of the device:

  • IP address
  • netmask
  • gateway
  • primary DNS server
  • secondary (backup) DNS server

The first two (bold) parameters are the minimum for communication within a LAN. If the device needs an access to the outside world, the gateway must be configured as well. If you are using name addresses, one or better both DNS servers must be configured.

Benefits of a static IP address configuration

  • the address does not change
  • no special server is needed

Disadvantages

  • you need to configure every device separately - which can be a problem with a large number of units
  • no simple way of management - if you need to change the address you have to go to every single device
  • more addresses needed if clients "come and go" - this may be a problem if there is only a limited number of IP addresses available

Automatic IP address assignment using a server

Alternatively, one or more of the above parameters can be assigned automatically using a central server.

There are two common methods/protocols for automatic assignment of an IP address using a central server: the older BOOTP and widely used DHCP.

With DHCP typically all the above network parameters (IP address, netmask, gateway, DNS servers) are set, whereas BOOTP can set only the IP address and gateway address.

Benefits

  • centralised management
  • almost zero configuration at the client
  • dynamic configuration - the client can come and go (e.g. a laptop)

Disadvantages

  • requires a server - a problem if the server is down
  • the address may change (depends on the configuration of the server) - this can be a problem if the unit is accessed "from the outside world"

Combined solution: "static" dynamic addresses

A DHCP server can be configured to assign always the same address to a specific client. The client identifies itself with its Ethernet MAC address.

This method combines the benefits of both solutions: a simple central management and at the same time an address which does not change


AutoIP and IPzator

If there is no DHCP/BOOTP server available the IP address can be "guessed" using one of the methods: AutoIP or IPzator

Both these methods attempt to discover a free IP address on the network if all the above methods have failed. They should not be used as a primary configuration but only as a fail-over mechanism!

These methods are not 100% reliable and can cause an IP address collision on the network.

IPzator

This method listens on the attached network and tries to find:

  • the network address of the attached network, netmask is assumed from the network adddress (A, B and C class network)
  • a free IP address on this network

It sets the IP address and the netmask (always 255.255.255.0). The gateway address and the DNS address are left intact.

NOTE: It may take up to 3 minutes to find a free address!

NOTE: If an IP address is assigned by IPzator but this address is used by some other host on the network, which is not active or switched off, an IP address collision can occur if the inactive host becomes on-line.

We send an ARP to ourselves ("gratitious arp") every 3 minutes to detect IP address conflicts and also inform others automatically about the IP (if they listen). If there is another device answering to this request, we instantly go off the network, the LEDs show 5x green blinking (and red LED is typically on), after 15 seconds, the device reboots, in the hope to get a different IP address from a DHCP server.

AutoIP

Automatically assigns a free IP address in the network 169.254.0.0/16. It sets the IP address and the netmask (always 255.255.0.0). Gateway address and DNS address are left intact.

This is the last method used if all the above methods fail.

How to configure

A static IP address is simply configured by filling the four IP address fields and the other network parameters in the network configuration of a device.

An automatic IP address is selected by setting the IP address to 0.0.0.0.


NOTE: If automatic IP address is configured, netmask, gateway address (DHCP or BOOTP only) and DNS server addresses (DHCP only) are overwritten.

Auto IP discovery order

The four mentioned methods of obtaining an IP address automatically are executed in the following order:

  1. BOOTP
  2. DHCP
  3. IPzator
  4. AutoIP

The first successful method stops the process.

Selecting specific auto IP methods

Each of the above methods can be enabled or disabled. By default all are enabled. A method is disabled by setting a specific bit in the third field of the IP address:

  • “0.0.1.0” to disable AutoIP
  • “0.0.2.0” to disable DHCP
  • “0.0.4.0” to disable BOOTP
  • “0.0.8.0” to disable IPzator

Examples:

  • “0.0.3.0” disables AutoIP and DHCP
  • “0.0.11.0” disables all but BOOTP

ATTENTION: “0.0.15.0” disables all discovery functions which locks you out unless you reset the device to factory defaults by pressing the reset button for about 10 seconds.

Automatic IP address configuration notes

If you configure a device to automatically obtain an IP address you should know that:

  • if the device is not connected to the network or the network is lost at the boot-up time it might take up to 5 minutes before the unit becomes ready!


Back to FAQ