Re: Sub Interfacing

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: George Toft
Date:  
To: plug-discuss
Subject: Re: Sub Interfacing
Kevin Brown wrote:
>>> I have been looking for some information on sub interfacing a network
>>> card. I know the card can handle it because there is already eth0:0,
>>> eth0:1, and eth0:2, I just haven't done this before.
>
>
>> Easy way: ifconfig eth0:5 123.34.56.78 netmask 255.255.255.0 up
>> (I chose :5 just because - it can be any number. I also choce a bogus
>> IP address.)
>
>
> 123.34.56.78 is a valid IP address, per se...


Valid, yes, but most likely bogus in this application :)


>> Unfortunately, if you want to make it survive a reboot, or a network
>> init script invocation, you need to add it to the
>> distribution-specific network configurations. Debian is different
>> that RH/Mandrake.
>>
>> Just in case you are using RH:
>> cd /etc/sysconfig/networl-scripts
>> cp ifcfg-eth0 ifcfg-eth0:5
>> vi ifcfg-eth0:5
>
>
> Nice thing about the RH config file naming, you don't have the name the
> file after the device. RH network scripts use the DEVICE= line to
> determine what device to change, so you could call the file ifcfg-domain
> and then invoke it with "ifup domain" and RH will know to use that file
> and device eth0:5.
>
> This is useful as you can then name the files to help you remember what
> they are for (such as if you have virtual adapters for FTP, HTTP, IRC,
> etc...).
>
>> Change it as shown:
>> DEVICE=eth0:5
>> BOOTPROTO=static
>> BROADCAST=123.34.56.255
>> IPADDR=123.34.56.78
>> NETMASK=255.255.255.0
>> NETWORK=123.34.56.0
>> ONBOOT=yes
>> TYPE=Ethernet



I've seen weird things happen when the name of the file is not the same
as the DEVICE= name, so I prefer to keep them the same. A couple of us
were quite amused when we had an interface called eth0:1.bak because
someone saved a backup copy of ifcfg-eth0:1 (called ifcfg-eth0:1.bak)
in the /etc/sysconfig dir and it had the same IP address as eth0:1.

This was on RHAS 2.1 - maybe things have improved since then.

--
George Toft, CISSP, MSIS
AGD,LLC
www.agdllc.com
623-203-1760
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss