home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1996 November / PCO96_11.ISO / linux / docs / kernel-2.0 / networ~1 / alias.txt < prev    next >
Encoding:
Text File  |  1996-09-20  |  3.2 KB  |  93 lines

  1. NET_ALIAS device aliasing v0.4x
  2. ===============================
  3.   The main step taken in versions 0.40+ is the implementation of a
  4.   device aliasing mechanism that creates *actual* devices.
  5.   This development includes NET_ALIAS (generic aliasing) plus IP_ALIAS
  6.   (specific IP) support.
  7.  
  8. Features
  9. --------
  10. o  ACTUAL alias devices created & inserted in dev chain
  11. o  AF_ independent: net_alias_type objects. Generic aliasing engine.
  12. o  AF_INET optimized
  13. o  hashed alias address lookup
  14. o  net_alias_type objs registration/unreg., module-ables.
  15. o  /proc/net/aliases & /proc/net/alias_types entries
  16.  
  17. o IP alias implementation: static or runtime module.
  18.  
  19. Usage (IP aliasing)
  20. -------------------
  21.   A very first step to test if you are running a net_alias-ed kernel
  22.   is to check /proc/net/aliases & /proc/net/alias_types entries:
  23.      # cat /proc/net/alias*
  24.  
  25.   For IP aliasing you must have IP_ALIAS support included by
  26.   static linking ('y' to 2nd question above), or runtime module
  27.   insertion ('m' to 2nd q. above):
  28.      # insmod /usr/src/linux/modules/ip_alias.o (1.3.xx)
  29.      # insmod /usr/src/ip_alias/ip_alias.o      (1.2.xx) see above.
  30.  
  31. o Alias creation.
  32.   Alias creation is done by 'magic' iface naming: eg. to create a
  33.   200.1.1.1 alias for eth0 ...
  34.   
  35.     # ifconfig eth0:0 200.1.1.1  etc,etc....
  36.                    ~~ -> request alias #0 creation (if it not exists) for eth0
  37.     and routing stuff also ...
  38.     # route add -host 200.1.1.1 dev eth0:0  (if same IP network as
  39.                         main device)
  40.    
  41.     # route add -net 200.1.1.0 dev eth0:0   (if completely new network wanted
  42.                         for eth0:0)
  43.  
  44. o Alias deletion.
  45.   Also done by magic naming, eg:
  46.  
  47.     # ifconfig eth0:0-  0  (maybe any address)
  48.                    ~~~ -> will delete alias (note '-' after dev name)
  49.   alias device is closed before deletion, so all network stuff that
  50.   points to it (routes, arp entries, ...) will be released.
  51.                         
  52. Alias (re-)configuring
  53.   Aliases *are* devices, so you configure and refer to them as usual (ifconfig,
  54.   route, etc).
  55.   
  56. o Procfs entries
  57.   2 entries are added to help fetching alias runtime configuration:
  58.   a) /proc/net/alias_types
  59.      Will show you alias_types registered (ie. address families that
  60.      can be aliased).
  61.      eg. for IP aliasing with 1 alias configured:
  62.  
  63.      # cat /proc/net/alias_types
  64.      type    name            n_attach
  65.      2       ip              1      
  66.      
  67.   b) /proc/net/aliases
  68.      Will show aliased devices info, eg (same as above):
  69.  
  70.      # cat /proc/net/aliases
  71.      device           family address                                
  72.      eth0:0           2      200.1.1.1
  73.  
  74. Relationship with main device
  75. -----------------------------
  76.   - On main device closing, all aliases will be closed and freed.
  77.   - Each new alias created is inserted in dev_chain just before next
  78.     main device (aliases get 'stacked' after main_dev), eg:
  79.       lo->eth0->eth0:0->eth0:2->eth1->0
  80.     If eth0 is unregistered, all it aliases will also be:
  81.       lo->eth1->0     
  82.  
  83. Contact
  84. -------
  85. Please finger or e-mail me:
  86.    Juan Jose Ciarlante <jjciarla@raiz.uncu.edu.ar>
  87.    
  88.                    
  89. ; local variables:
  90. ; mode: indented-text
  91. ; mode: auto-fill
  92. ; end:
  93.