alias.rst 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ===========
  3. IP-Aliasing
  4. ===========
  5. IP-aliases are an obsolete way to manage multiple IP-addresses/masks
  6. per interface. Newer tools such as iproute2 support multiple
  7. address/prefixes per interface, but aliases are still supported
  8. for backwards compatibility.
  9. An alias is formed by adding a colon and a string when running ifconfig.
  10. This string is usually numeric, but this is not a must.
  11. Alias creation
  12. ==============
  13. Alias creation is done by 'magic' interface naming: eg. to create a
  14. 200.1.1.1 alias for eth0 ...
  15. ::
  16. # ifconfig eth0:0 200.1.1.1 etc,etc....
  17. ~~ -> request alias #0 creation (if not yet exists) for eth0
  18. The corresponding route is also set up by this command. Please note:
  19. The route always points to the base interface.
  20. Alias deletion
  21. ==============
  22. The alias is removed by shutting the alias down::
  23. # ifconfig eth0:0 down
  24. ~~~~~~~~~~ -> will delete alias
  25. Alias (re-)configuring
  26. ======================
  27. Aliases are not real devices, but programs should be able to configure
  28. and refer to them as usual (ifconfig, route, etc).
  29. Relationship with main device
  30. =============================
  31. If the base device is shut down the added aliases will be deleted too.