LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-09-2011, 11:12 AM   #1
madara
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
removing network alias


how to remove the network alias (ex: ifcfg-eth0:2)from RHEL5, i had deleted the ifcfg-eth0:2 file from /etc/sysconfig/network-scripts/ifcfg-eth0:3
but i can still see the entry in the graphical network configuration after i issued the command
system-config-network, i want to remove it from there. can any one help me please.
 
Old 03-09-2011, 07:02 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
That removes the on-disk cfg; now issue
Code:
service network restart
as root
 
Old 03-09-2011, 09:46 PM   #3
troysunix
LQ Newbie
 
Registered: Mar 2011
Posts: 7

Rep: Reputation: 1
Rather than restarting 'network', you could additionally remove '/etc/sysconfig/networking/devices/ifcfg-eth0:2'. At least on my test host (CentOS 5.4), after removing that file, the interface was no longer displayed from 'system-config-network'. If you also need / want to remove the configured interface, try:
Code:
/sbin/ip address delete 10.0.23.172/23 dev eth0:2
where 10.0.23.172/23 is the IP_address and CIDR representation of the netmask in use ('/sbin/ip address show' can show IPAddr/CIDR). An example of dealing with logical interfaces can be seen here.
 
Old 03-10-2011, 02:24 PM   #4
madara
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Original Poster
Rep: Reputation: 0
thanks chrism01 and troysunix so much for help, but really i tried your commands but still shows me the same problem finally i mix the commands together as follows and it works:

1- remove the ip address:
#ip address delete 192.168.0.102/24 dev eth0:2

2- remove the device:
#rm -f /etc/sysconfig/networking/devices/ifcfg-eth0:2

3- remove the file:
#rm -f /etc/sysconfig/network-scripts/ifcfg-eth0:2

then check the "system-config-network" command there is no eth0:2 any more.

thanks again i will not success with out your help.
 
  


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
port forwarding for network alias dlugasx Linux - Server 1 08-13-2009 10:53 AM
Network alias inaccessible externally javacougar Linux - Networking 0 05-28-2009 11:18 AM
how to remove network alias slackware pauledwards03 Linux - Wireless Networking 8 09-15-2008 12:41 PM
restart network after adding NIC alias blizunt7 Linux - Networking 1 06-06-2008 02:57 PM
Adding Network Interface alias from command line WireLine Fedora 2 06-08-2005 11:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:32 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