SUMMARY: remove interface

From: Brown, Melissa (BrownM@fhu.disa.mil)
Date: Fri Jun 30 2000 - 13:50:00 CDT


Thanks AGAIN!!
I encourage anyone who wants to know more about it to read the comments I
included below because some are really written well and taught me more than
just the steps!

1. Remove or rename the /etc/hostname.XXy file
2. ifconfig XXy down
3. ifconfig XXy unplumb
4. Edit /etc/hosts and /etc/netmasks
5. boot

If you want to configure the interface again later:
1. Create the /etc/hostname.XXy file
2. ifconfig XXy plumb
3. Edit your /etc/hosts and /etc/netmasks
4. boot

Contributors:
 Alan Reichert
 Unixboy
 Stan Francis
 Kale Nandkishor
 Mike Marcell
 Jarrett Carver
 Vince Merrell
 R.Scott Balfour
 Kevin Colagio
 Nasser Manesh
 Bruce Wilkins
 David Evans
 Gary Trail
 Dwight Petersen
 Michael DeSimone

----------------------------------------------------------------------------
---------
I'd just remove any of the /etc/hostname.??? entries for the cards that
you*don't* want to come up. Then do an "ifconfig ??? down", then
do an "ifconfig ??? unplumb"
(I think that's the correct argument, I don't have access to man pages
at the moment...).

Remember that if you need to bring the interfaces back up again, you'll need
to "plumb" them first.
----------------------------------------------------------------------------
---------
just ifconfig le0 down
----------------------------------------------------------------------------
---------
You may want to try "ifconfig le1 unplumb". Here's the blurb from the
ifconfig man page:

unplumb Destroy any streams associated with this
                     device and close the device. After this
                     command is executed, the device name should
                     not show up in the output of ifconfig -a.
----------------------------------------------------------------------------
---------
To disable : remove hostname.lex file and ifconfig lex plumb down

to enable : add hostanme.lex and ifconfig lex plumb up
----------------------------------------------------------------------------
---------
You should be able to just remove the /etc/hostname.le1. You could then do
the following:

      ifconfig le1 down
      ifconfig le1 unplumb

This will take the info out of an `ifconfig -a`. That should be all that
you need to do to remove it.

To add it back in:
add the hostname > /etc/hostname.le1
make sure that there's a corresponding ipaddress for the above hostname in
/etc/hosts
if needed, add the netmask information to /etc/netmasks

ifconfig le1 plumb
ifconfig le1 inet (xx.xx.xx.xx)
ifconfig le1 broadcast +
ifconfig le1 netmask +
ifconfig le1 up
----------------------------------------------------------------------------
---------
If you want to disable an interface on a running system, you would use the
'ifconfig le1 down' (If le1 is the extra interface). This only offlines the
interface and a simple 'ifconfig le1 up' will bring it back online. This is
not saved through reboots, therfore the next time you reboot the interface
would come back up.

To prevent an interface from coming up during boot time you would simply
remove the /etc/hostname.le1 (if le1 is the extra interface). When the
system boots it runs your /etc/rc*.d scripts. One of these scripts will try
to configure each interface that has an /etc/hostname file. It checks you
/etc/hosts table for the ip address of the hostname and assignes that
hostname to the interface.
----------------------------------------------------------------------------
---------
My advice? If you're not using the cards and your not likely to in the
future, take them out. Put them in anti-static bags and store them somewhere
safe.

You'd be horrified if one of these cards failed in the future and caused you
hardware problems if you weren't *ACTUALLY* using them, wouldn't you?!

It has happened to me in the past.

As ever - keep things simple.

Oh - and remember to delete the /etc/hostname.xxx files!
----------------------------------------------------------------------------
---------
ifconfig le1 unplumb

this will remove it
----------------------------------------------------------------------------
---------
Delete the /etc/hostname.le1 file. (replace hme1 for le1 if applicable)
Run this: ifconfig le1 down
Run this: ifconfig le1 unplumb
Run this: touch /reconfigure

There is now now reference to the interface (and it will be gone when it
reboots).
----------------------------------------------------------------------------
---------
If I remember correctly, all you need to do is to "rename" those
hostname.le1 (or hme1) files (and not edit them). Init scripts look for
"hostname.*" in /etc and try make them up, so as far as you do not have
those files with those specific names you're okay. I wrote "rename" and not
"remove" so that when you want to revert (for that silly reason :-) back to
where you were before, just rename the files back to standard
hostname.whatever. And yes, if you do not hve plans to reboot the machines,
you should turn them down with ifconfig first.
----------------------------------------------------------------------------
---------
You essentially have the steps down. First is renaming the /etc/hostname.le1
or hme (whatever the interface name) and doing a ifconfig hme0 down.

But before you have to do that, if the 2nd NIC has an IP in the /etc/hosts
file, you will
have to remove it.
If you have rebooted the
server since, and you want to put back the interface you can do the
following:

1. mv /etc/hostname_hme1_save /etc/hostname.hme1
2. ifconfig hme0 plumb
3. ifconfig ipaddr netmask broadcast_address metric

ex
ifconfig 192.168.0.1 -netmask 255.255.255.0 1 up
----------------------------------------------------------------------------
---------

1. Drop the interface with "ifconfig <device>".
2. Remove the file /etc/hostname.<device>.
3. If you really want: comment out any details in /etc/hosts
        although this isn't necessary.
4. Remove the streams associated with the device:
        ifconfig <device> unplumb
5. Check /etc/netmasks for subnets.

To reenable just do a "ifconfig <device> plumb", restore the
/etc/hostname.<device> (so it works on the next boot) and update
the file /etc/netmask if doing sub-netting on the new interface.

All from memory but I'm pretty sure I'm right.
----------------------------------------------------------------------------
---------
I usually simply do a "mv /etc/hostname.le1 /etc/hostnamE.le1" and reboot.
An "ifconfig le1 down" will probably turn things off until next reboot.
on next reboot the fact the file name is "hostnamE.le1" means it will not
be ifconfig'd. Renaming has the additional benefit of allowing the
interface to turned on to its original config at a later date.
----------------------------------------------------------------------------
---------
ifconfig name down will only shut down the interface now, as long
as hostname.name exists it will be restarted at reboot. If you remove the
hostname.name file for the interface it will not restart

but you still may get some complaints at least at boot time.
ifconfig name unplumb and removing the /etc/hostname.name is what you
want. Then unless you some how remove the software from the hosts entirely
ifconfig name plumb and adding th /etc/hostname.name file will put you back
in business.
----------------------------------------------------------------------------
---------
down
ifconfig interface down
rm /etc/hostname.interface
remove or comment out hostname/ipaddress from /etc/hosts
ifconfig unplumb interface

up
ifconfig plumb interface
ifconfig interface up ip address netmask [netmask number] broadcast
[broadcast number]
add /etc/hostname.interface [in this file will be the hostname]
add hostname & ip back to /etc/hosts
----------------------------------------------------------------------------
---------
----------------------------------------------------------------------------
---------

-----Original Message-----
Subject: remove interface

I've moved some servers around and in the process I have two machines
(sparc10 and ultra1) that have extra interface cards in them, and, the
configuration.
While I don't necessarily feel I have to pull the cards, I'm not sure how to
remove all the interface configuration so I can get rid of the "reminder":
le1: No carrier: transciever cable problem?
 
>From what I understand, I might only have to edit the /etc/hostname.le1 (or
hme1) files, and do a inconfig le1: down
 
Can someone detail the steps to remove the configuration, and then what
would need to be done "if" I wanted to enable it again, for some silly
reaso, in the future?
 
I promise to summarize!!
 
Thanks!!!
Melissa
 

S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:11 CDT