LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 03-06-2015, 04:53 PM   #1
danno_mite
LQ Newbie
 
Registered: Mar 2015
Posts: 2

Rep: Reputation: Disabled
Red Hat interface alias - ONPARENT=no


Hi all,

First of all I'm using RHEL 6.5

I'm trying to create an ifcfg alias file for eth0 named eth0:0 that is NOT brought up with the Network Manager or on boot. Also, I have a different NETMASK for the alias interface.

The problem I'm having is that no matter what I try, the interface is brought up with the network service, or reboots. Funny thing is, its brought up with the NETMASK of the eth0 interface, not the new NETMASK I specified in ifcfg-eth0:0. I tried setting both ONBOOT=no and ONPARENT=no. If I run 'ifdown eth0:0' and then 'ifup eth0:0' the interface comes back up with the proper NETMASK I specified. I can't really figure out what's going on here. I've been Googling like a mad-man but no luck yet. I can't figure out why its still coming up on boot, and why it comes up with the wrong NETMASK unless I manually bring down the alias interface and back up again.

Contents of ifcfg-eth0:0 :
DEVICE=eth0:0
BOOTPROTO=none
ONBOOT=no
ONPARENT=no
IPADDR=10.11.184.58
NETMASK=255.255.255.248

ifconfig result after boot:

[root@siwr25mxwsrusrciset network-scripts]# ifconfig
eth0 Link encap:Ethernet HWaddr
inet addr:10.10.69.66 Bcast:10.10.69.127 Mask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:57514 errors:0 dropped:0 overruns:0 frame:0
TX packets:43543 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:40171061 (38.3 MiB) TX bytes:13540057 (12.9 MiB)
Interrupt:21

eth0:0 Link encap:Ethernet HWaddr 06:88:41:C4:24:A2
inet addr:10.11.184.58 Bcast:10.11.184.63 Mask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:21

If I run ifdown eth0:0 and ifup eth0:0 the interface starts properly with mask 255.255.255.248. Is there any way to actually stop it from starting automatically, and with the wrong NETMASK?

Thanks!
 
Old 03-08-2015, 12:45 AM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
check and see if you have "network manager" running.
Code:
 service NetworkManager status
If it's running, shut it down
Code:
service NetworkManager stop
and kill it at boot with chkconfig.
Now configure your interface and don't forget to sighup inetd when you're finished.
I think that might solve your problem.

Last edited by dijetlo; 03-08-2015 at 07:28 AM.
 
Old 03-12-2015, 09:29 PM   #3
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
It might be in how you are specifying the alias.

In RHEL5, you were supposed to make a second ifcfg file named ifcfg-ethx:y. In RHEL 6.4 or RHEL 6.5, they added the ALIAS stanza for aliases. So you should be able to have a single ifcfg file like this:

~~~
TYPE=Ethernet
NAME=eth0
IPADDR=10.10.69.66
NETMASK=255.255.255.192
IPADDR2=10.11.184.58
NETMASK2=255.255.255.248
~~~

See here: https://access.redhat.com/solutions/8672

That's *with* network manager. If you wish to disable NM, then you use the method you're using with multiple files (a real PITA, IMO), but you must turn off NM, disable NM. THen you can use the ONPARENT options and whatnot.
 
Old 03-20-2015, 07:42 AM   #4
danno_mite
LQ Newbie
 
Registered: Mar 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks to both of your replies.

Unfortunately disabling the NM isn't a permanent solution because my environments are provisioned via a master image template. I am trying to make a case to disable NM on them (for this and a couple other reasons) but that will be a while before it can happen.

GaWdLy your solution worked but I am trying to have the original IP available with the option for the alias to be up or down. Placing them both in the same file doesn't seem to give me this ability.

My solution for now is to script the ip address add command, so I can add and remove on the fly. I do this because my alias IP hops around from VM to VM with my VPN tunnel.

Thanks to both of you for the information, both methods seemed to work for applying the alias.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hostnames and interface files - Debian and Red Hat jayeola Linux - Networking 1 05-23-2009 08:14 PM
Can you help me about Message Passing Interface (MPI) in Red Hat? danilux Red Hat 0 11-11-2004 11:49 AM
Red hat don't recognize my NIC interface albatross Linux - Networking 1 04-14-2004 11:36 AM
Red Hat X interface problem romcgill Linux - Newbie 3 02-14-2003 09:18 PM
vi -> vim alias under red hat 7.3 sancho5 Linux - Distributions 4 09-02-2002 01:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration