Solved

Linux, network config and deleting old eth's

Posted on 2013-12-12
4
333 Views
Last Modified: 2013-12-12
I have a situation where I created a new IP using the
'setup' command.  I created eth3, then I deleted the old eth2 by deleting all the characters in the  setup-Netowrk configuration-eth2   TUI

This did not work well, and I ca no longer perofrm a service network restart

I usually setup a network config using the setup command.  In this situation where I need to delete eth2, how should I do it

Thanks
0
Comment
Question by:Los Angeles1
  • 3
4 Comments
 
LVL 31

Accepted Solution

by:
farzanj earned 500 total points
ID: 39714943
It depends on your distribution.

For RedHat family, you can simply move the interface files to a backup folder or change the file name

Eg.

mv /etc/sysconfig/network-scripts/ifcfg-eth2  /etc/sysconfig/network-scripts/BKUP-ifcfg-eth2

Open in new window



This way it is really easy to revert back to your older settings but just changing the file name back.

To incorporate these changes, issue command


service network restart
0
 

Author Comment

by:Los Angeles1
ID: 39715292
Here are the ifcfg files

 ls -la ifcfg*
-rw-r--r--. 3 root root 235 Dec 12 11:27 ifcfg-eth2
-rw-r--r--. 3 root root 260 Dec 12 11:27 ifcfg-eth3
-rw-r--r--. 1 root root 254 Oct 10 10:48 ifcfg-lo

Open in new window


Here is the content of the ifcfg-eth2 file:

cat ifcfg-eth2
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
DEVICE=eth2
BOOTPROTO=none
NETMASK=255.255.240.0
TYPE=Ethernet
IPADDR=10.14.0.194
GATEWAY=10.14.0.1
IPV6INIT=no
ONBOOT=no
USERCTL=no

Open in new window


So I did a mv on the ifcfg-eth2 to a.a, and then I did a mv back to ifcfg-eth2, so the directory is still the same

 ls -la ifcfg*
-rw-r--r--. 3 root root 235 Dec 12 11:27 ifcfg-eth2
-rw-r--r--. 3 root root 260 Dec 12 11:27 ifcfg-eth3
-rw-r--r--. 1 root root 254 Oct 10 10:48 ifcfg-lo

Open in new window


The ifup eth3 still works, but I get this on the service network restart

service network restart
shutting down loopback interface                {OK]
Bringing up loopback interface          {OK]

Open in new window


So at this point the service network restart does nto bring up eth3 even though the ifcfg-eth3 file is in the directory
0
 

Author Comment

by:Los Angeles1
ID: 39715299
Sorry, that previous post was ment for another thread
0
 

Author Closing Comment

by:Los Angeles1
ID: 39715301
This worked well
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now