Re: ifcfg-ethX voodoo for a second IP on the same interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 20, 2012 at 9:34 PM, Ed Greshko <Ed.Greshko@xxxxxxxxxxx> wrote:
> On 04/21/2012 11:20 AM, Sam Varshavchik wrote:
>> For testing purposes I need to add a second IP address to eth0.
>>
>> eth0 is managed by NetworkManager, and uses dhcp.
>>
>> I know that if I get rid of NetworkManager and put static IP addresses in
>> ifcfg-eth0, I can also sprinkle some magic dust into ifcfg-eth0:1, and have the
>> second IP address come up together with the first one.
>>
>> This does not seem to work with a NetworkManager-managed DHCP-based interface.
>>
>> Basically, is there some voodoo I can throw in a file somewhere that would perform
>> the equivalent of:
>>
>> ip addr add 192.168.0.5 dev eth0 label eth0:1
>>
>> when eth0 comes up via DHCP, by NetworkManager?
>>
>
> Well.....  I think you can only do this with static IP addresses....
>
> But, all you have to do is modify /etc/sysconfig/network-scripts/ifcfg-whatever  to have
>
> IPADDR0=192.168.0.225
> IPADDR1=192.168.0.226
>
> for example....
>
> Then you'd see...
>
> 2: p2p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
>    link/ether 08:00:27:36:bf:b0 brd ff:ff:ff:ff:ff:ff
>    inet 192.168.0.225/24 brd 192.168.0.255 scope global p2p1
>    inet 192.168.0.226/24 brd 192.168.0.255 scope global secondary p2p1
>    inet6 fe80::a00:27ff:fe36:bfb0/64 scope link
>       valid_lft forever preferred_lft foreve
>
>
>
> --
> Never be afraid to laugh at yourself, after all, you could be missing out on the joke
> of the century. -- Dame Edna Everage

Then the documentation [1] is either wrong or did I completely read it wrong?


[1] http://docs.fedoraproject.org/en-US/Fedora/16/html/System_Administrators_Guide/s2-networkscripts-interfaces-alias.html
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux