IP Aliasing with Linux 2.0.0 ifconfig error

IP Aliasing with Linux 2.0.0 ifconfig error

Post by ste.. » Tue, 01 Oct 1996 04:00:00



Tried adding alias IP addresses. Using Linux 2.0.0 with kernel
recompiled for IP aliasing. /proc/net/aliases and
/proc/net/alias_types exist. However when typing suggested command
line from NET-2-HOWTO receive error message- "net_alias_dev_create ...
unregistered family type" or words to that effect.

IP support for eth0 appears to work fine for all tested network
functions.

Need to support at least 5 IP addresses. eth0 is a NE2000 ethernet
card.

I believe that the error may be improper command line or improper
version of ifconfig.

Any tips would be useful.


Excerpt NET-2-HOWTO (5/96)

  13.11.2.1.  Configuring IP_ALIAS for 1.3.50++

       # ifconfig eth0:0 192.168.1.1
       # route add -host 192.168.1.1 dev eth0:0

  Note that aliases start at '0'. So eth0:1 would be the second alias
  for the physical eth0 device.

  To delete an alias you again use the ifconfig command as follows:

       # ifconfig eth0:0- 0

  The '-' character signifies to the kernel that the alias should be
  deleted and all routes and arp entries that point to it should be
  deleted.

 
 
 

IP Aliasing with Linux 2.0.0 ifconfig error

Post by ste.. » Tue, 01 Oct 1996 04:00:00


never mind. i figured it out.


>Tried adding alias IP addresses. Using Linux 2.0.0 with kernel
>recompiled for IP aliasing. /proc/net/aliases and
>/proc/net/alias_types exist. However when typing suggested command
>line from NET-2-HOWTO receive error message- "net_alias_dev_create ...
>unregistered family type" or words to that effect.

>IP support for eth0 appears to work fine for all tested network
>functions.

>Need to support at least 5 IP addresses. eth0 is a NE2000 ethernet
>card.

>I believe that the error may be improper command line or improper
>version of ifconfig.

>Any tips would be useful.




 
 
 

1. Getting an error when using ifconfig to add an IP alias.

I am trying to setup a web site with virtual hosts. I saw a post from Ed
Bardsley on 12/13/99 about IP Multiplexing (IP aliasing), and it looks like
what I need to do to complete this task.  When I tried to enter the
following:
ifconfig xl0 inet 192.168.1.39 netmask 255.255.255.0 alias
I get the following error
ifconfig: ioctl (SIOCAIFADDR): File exists.
I looked in the /etc/rc.conf file and am a bit confused.  The file looks
like it stored all my mistakes while I was trying to get the networking
setup.  It says at the top ....

#THis file now contains just the overrides from /etc/defaults/rc.conf
#please make all changes to this file.

here are a couple of lines from that file....
# -- sysinstall generated deltas -- #
ifconfig_xl0="inet 192.168.1.38  netmask 255.255.255.0"
hostname="perk.miis.edu"
linux_enable="YES"
defaultrouter="172.16.1.1"
network_interfaces="xl0 lo0"
ifconfig_ppp0="inet 192.168.1.38  netmask 255.255.255.0"
ifconfig_xl0="inet 192.168.1.38  netmask 255.255.255.0"
hostname="perk.miis.edu"
defaultrouter="172.16.1.1"
network_interfaces="ppp0 xl0 lo0"
# -- sysinstall generated deltas -- #
ifconfig_xl0="inet   netmask 255.255.255.0"
defaultrouter="192.168.1.1"
hostname="perk.miis.edu"
# -- sysinstall generated deltas -- #
ifconfig_xl0="inet 192.168.1.38  netmask 255.255.255.0"
defaultrouter="192.168.1.1"
hostname="perk.miis.edu"
# -- sysinstall generated deltas -- #
ifconfig_xl0="inet 192.168.1.38  netmask 255.255.255.0"
defaultrouter="192.168.1.1"
hostname="www.atmontereybay.com"

I went into the /etc/defaults/rc.conf and it looks more like a rc.conf I've
seen in the past, but this file tells me I shouldn't edit it.  ( I think I
know where the changes would go in that file)

Did I screw something up?

2. Need help with AIX PS/2 and TCP/IP

3. ifconfig eth0:0 gets error - IP aliasing broken

4. kernel 2.4.2 and linux internet gateway

5. Script problem with ifconfig, to do IP aliasing.

6. Info on configuring my gateway, please

7. TCP/IP aliases & ifconfig under Solaris

8. khtml patch to allow links to reload page (patch for KHTML part)

9. ?:Kernel V2.2.-IP Alias-eth0:0 Is Invisible To 'ifconfig"?

10. Need Multi-IP ifconfig alias patch

11. Smart ifconfig? (aliasing 2 IP's)

12. Strange ifconfig/ip-alias behavior

13. How to identify if an IP is aliased or not from ifconfig command ?