Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Why doesn't ifconfig work?
@ 1998-04-29  4:00 John Chambers
  1998-04-30  4:00 ` Eric Werme - replace nobody with werme
  0 siblings, 1 reply; 4+ messages in thread
From: John Chambers @ 1998-04-29  4:00 UTC (permalink / raw)



On this Digital Unix 4.0B system, and on another 4.0D system, the ifconfig 
command doesn't seem to be able to change IP addresses at all.  It always 
gives a 1 exit status, implying that it thinks that it has worked, but in fact 
the address doesn't change.  Here's some evidence:

: id
uid=0(root) gid=1(daemon) groups=0(system),3(mem),7(terminal),9(opr),12(lp),22(web)
: ifconfig tu1
tu1: flags=c63<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST,SIMPLEX>
     inet 10.1.1.1 netmask ffffff00 broadcast 10.1.1.255 ipmtu 1500 
: ifconfig tu1 10.1.2.3
: ifconfig tu1
tu1: flags=c63<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST,SIMPLEX>
     inet 10.1.1.1 netmask ffffff00 broadcast 10.1.1.255 ipmtu 1500 
: ifconfig tu1 down
: ifconfig tu1
tu1: flags=c62<BROADCAST,NOTRAILERS,RUNNING,MULTICAST,SIMPLEX>
     inet 10.1.1.1 netmask ffffff00 broadcast 10.1.1.255 ipmtu 1500 
: ifconfig tu1 10.1.2.3
: ifconfig tu1
tu1: flags=c63<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST,SIMPLEX>
     inet 10.1.1.1 netmask ffffff00 broadcast 10.1.1.255 ipmtu 1500 
: 


We can see from this that 1) I am indeed logged in as root, 2) ifconfig doesn't make
any changes to the IP address, but 3) ifconfig can put the interface down and 4)
The " ifconfig tu1 10.1.2.3" command doesn't change the address but it does put
the interface back up!   A long series of experiments with varations of the ifconfig
command turned up consisten results:  All sorts of things about the interface can
be changed, but the IP address never changes.  And sometimes changes (such as
the up/down status) change spontaneously for no apparent reason.

Any ideas what might be going wrong, or how to make it work?



BTW, to forestall the obvious red herring:  Yes, I have read "man 8 ifconfig", and
I have seen the suggestion that netsetup be used.  This is not relevant in our case,
because the* intent* is to purposely misconfigure the interface.  The application is
a class exercise in which some judicious mis-configurations are done to a couple
of machines, the student is told that "Such-and-such doesn't seem to work",
and the student is to find and fix the problem.  This situtation absolutely requires
that we be able to dynamically mis-configure the machines (and restore their
correct configuration later with a cleanup script).  Telling us how to "do it right"
isn't a useful answer. We need to be able to change the configuration on the fly,
and then soon after that, we need to be able to change it back.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-05-10  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-04-29  4:00 Why doesn't ifconfig work? John Chambers
1998-04-30  4:00 ` Eric Werme - replace nobody with werme
1998-05-04  4:00   ` John Chambers
1998-05-10  4:00     ` Paul Repacholi ( prep )

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox