[Linux-users] 2 IP's on the same network card
Bill Campbell
linux-sxs
Tue Aug 28 07:31:52 PDT 2007
On Tue, Aug 28, 2007, Dirk Moolman wrote:
>
>-----Original Message-----
>From: linux-users-bounces at pananix.com
>[mailto:linux-users-bounces at pananix.com] On Behalf Of Bill Campbell
>Sent: 28 August 2007 02:57 PM
>To: linux-users at linux-sxs.org
>Subject: Re: [Linux-users] 2 IP's on the same network card
>
>>On Tue, Aug 28, 2007, Dirk Moolman wrote:
>>>Just a question - how do I make a network setting, like the eth0:1
>that
>>>I created below, permanent ? .... so that it stays when I reboot the
>>>server
>
>
>>The SuSE way to do this is ``yast2 lan'', edit the interface, go
>>to the Advanced tab, and create an alias.
>
>On one of my existing servers (installed by someone else before my
>time), there are interfaces eth0, and also eth0:1 - the latter is not
>defined as an alias.
If it's a SuSE system newer than 9.0 Pro any eth0:x interface has
been created manually, not with yast2.
The applicable scripts are under /etc/sysconfig/network with
names related to the Mac address(es) of the NICs. Aliases appear
in these files as lines like this for the alias guardian.
IPADDR_guardian='192.136.111.16'
NETMASK_guardian='255.255.255.0'
One can manually edit the script, then do an ``ifup eth0'' which
will add new aliases.
The ``ip'' command can be used to manipulate aliases as well, but
these won't be effective on boot.
>I created an alias on the new server I am working on, but then it
>doesn't show in the ifconfig output...
Use ``ip addr list'' to list all addresses or ``ip addr list dev eth0''
to list only those for eth0.
Bill
--
INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
During times of universal deceit, telling the truth becomes
a revolutionary act. --George Orwell
More information about the Linux-users
mailing list