Fedora Linux Support Community & Resources Center
Prev Previous Post   Next Post Next
  #1  
Old 18th June 2010, 11:48 PM
mdeggers Offline
Registered User
 
Join Date: Apr 2005
Posts: 14
linuxfedorafirefox
Trouble automating IP aliases

* Introduction

My system is F13 (upgraded from F11) with all of the latest patches
available. I haven't gone through and combined all of the rpmnew
configuration files, but none of them seem to address networking.

I'm trying to get subinterfaces (secondary IP addresses) to work in
Fedora 13. So far, I have been able to configure them on the command
line, but not to get them to persist on booting.

My base address for the NIC is: A.B.C.254. It is statically assigned.

* Question

Why can I not get any of the automated mechanisms to assign NIC
aliases? Here are the things I've tried:

* Using system-config-network with eth0:n as a nickname

Using system-config-network, I copied the existing interface and made
the following changes:

1. IP address changed
2. Device nickname as eth0:n
3. Activate device when parent device activates
4. Device Alias number n (where n is 0 or 1)
5. Added to default profile

Upon saving, this resulted in two files being created (ifcfg-eth0:0
and ifcfg-eth0:1). However, these could not be activated by doing
./ifup eth0:0 in the /etc/sysconfig/network-scripts directory.

* By hand using ifcfg-eth0:n

Editing the files based on several web pages to reduce the options
configured in the aliases produced the following file format:

DEVICE: eth0:n
IP_ADDRESS: A.B.C.n
NETMASK: 255.255.255.0
NETWORK: A.B.C.0

Using these files gave the same results as the system-config-network
files. The interfaces failed to appear on an ifconfig -a listing.

* Using system-config-network with ethn as a nickname

Using system-config-network, I copied the existing interface and made
the following changes:

1. IP address changed
2. Device nickname as ethn
3. Activate device when parent device activates
4. Device Alias number n (where n is 0 or 1)
5. Added to default profile

Upon saving, this resulted in two files being created (ifcfg-eth1
and ifcfg-eth2). When these were activated, they overwrote the
existing IP address for eth0. The result was that eth0 now had the IP
address listed in the ifcfg-eth2 file.

* By hand using ifcfg-ethn

I created the appropriate files by hand, with reduced configuration
options. Upon using ./ifup ethn from within the
/etc/sysconfig/network-scripts, the IP address of eth0 was replaced by
the IP address given in ethn.

* Using rc.local

I then tried modifying /etc/rc.local to contain the following lines:

/sbin/ifconfig eth0:0 A.B.C.n netmask 255.255.255.0 up
/sbin/ifconfig eth0:1 A.B.C.m netmask 255.255.255.0 up

This failed to result in eth0:0 or eth0:1 being available on reboot.

* Command line per reboot

This is the only option that seems to work. As root after each reboot
I can do the following:

/sbin/ifconfig eth0:0 A.B.C.n netmask 255.255.255.0 up
/sbin/ifconfig eth0:1 A.B.C.m netmask 255.255.255.0 up

This results in two aliases that are visible (and ping-able) as shown
by ifconfig -a.

[root@phoenix ~]# ifconfig eth0:0 A.B.C.253 netmask 255.255.255.0 up
[root@phoenix ~]# ifconfig eth0:1 A.B.C.252 netmask 255.255.255.0 up
[root@phoenix ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:07:E9:00:DB:84
inet addr:A.B.C.254 Bcast:A.B.C.255 Mask:255.255.255.0
inet6 addr: fe80::207:e9ff:fe00:db84/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:640656 errors:2 dropped:0 overruns:0 frame:2
TX packets:413185 errors:30 dropped:0 overruns:0 carrier:30
collisions:0 txqueuelen:1000
RX bytes:847804784 (808.5 MiB) TX bytes:34830037 (33.2 MiB)

eth0:0 Link encap:Ethernet HWaddr 00:07:E9:00:DB:84
inet addr:A.B.C.253 Bcast:A.B.C.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

eth0:1 Link encap:Ethernet HWaddr 00:07:E9:00:DB:84
inet addr:A.B.C.252 Bcast:A.B.C.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

How do I get this result automatically for every reboot?

Thanks for any info.
Reply With Quote
 

Tags
network, persistent

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with automating some terminal commands Enigma 2100 Using Fedora 3 8th December 2006 08:53 PM
Automating the keyring prdufresne Servers & Networking 16 6th November 2006 11:57 PM
Automating User Additions rob2000007 Using Fedora 6 24th October 2005 10:29 PM
Automating tasks cutesneakers Using Fedora 2 22nd July 2005 05:21 PM
Automating SCP between two remote Hosts? Quella Using Fedora 7 20th May 2005 10:27 AM


Current GMT-time: 10:59 (Friday, 28-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Anand Prakash Yoga Ashram - Rishikesh - Espanola Way Village Miami Beach - Chiavari Beach :) Travel Photos on Instagram