ifconfig: how to modify?

ifconfig: how to modify?

Post by John Kotche » Wed, 05 Nov 1997 04:00:00




> I have a freshly-installed Solaris 2.6 installation.
> It has two ethernet interfaces, hme0 and hme1.
> hme0 is already set up with an IP number and
> default route and everything.  I configured this
> during the installation.

> How do I:

> 1: Assign a distinct IP number and default route to hme1 and
> get the port listening right now, without rebooting?
> (This machine will not route -- both interfaces are
> on the same subnet.)

First:
ifconfig hme1 plumb

Second
ifconfig hme1 address  IP_ADDRESS  up

Third:
route delete default hme0's.ip.address

Fourth:
if

Quote:> 2: Change the config files so that this machine will have
> this second interface next time it boots?

> 3: Change the -current- IP number on hme0, along with the default route,
> right now, without rebooting?  Also, how do I change the config files
> so that this new number comes into effect on the next boot up?

Ok, here's a series of steps to fix your problems:
Note, netmask and broadcast parameters in steps 2 and 4
are only necessary if their netmasks don't follow the
Class A, Class B, Class C standards for the ip address.

1)  ifconfig hme1 plumb
2)  ifconfig hme1 address ip.address.goes.here netmask \
value.for.subnet.mask broadcast + up
3)  ifconfig hme0 down
4)  route delete default hme0.old.ip.address
5)  route add default hme1.ip.address.here
6)  ifconfig hem0 address new.ip.address.here netmask \
value.for.subnet.mask broadcast + up
7)  vi /etc/hostname.hme1  -- put in ip address or hostname for hme1
from /etc/hosts into this file
8)  vi /etc/hostname.hme0 -- put in ip address or hostname for hme0
from /etc/hosts into this file
9)  vi /etc/defaultrouter -- put in ip address for hme1
10) If the netmask doesn't follow the standards for class A, B and
C vi /etc/netmasks and set the netmask for the IP address in this file.

Quote:> Are these procedures documented somewhere?  

I'm sure they are, but I'll be damned if I can remember where....

I learned the ifconfig stuff when somebody told me to type in
"man ifconfig", literally.

I learned the route stuff from a former boss of mine who used to
know more about Solaris than me.

Quote:> I know this stuff seems painfully obvious to experienced users, but I
> am having trouble understanding the documentation I've been reading.
> This stuff really can't be all that difficult.

It isn't, and, truth be told, I haven't read any books specifically
on Solaris system administration, but have about 3 years of practical
experience with it.

Quote:

> Can someone recommend any book with practical, how-to tips but -not-
> for dummies or absolute beginners?

Just the usual tomes:

O'Reilly's "Essentials of System Administration"
Sebass, Nemeth et al "System Administrator's Handbook"

Quote:> Hopefully I can find something Solaris-specific.

There's always "Solaris System Administration" by SunSoft press,
but I have no clue who the other of this book is.  I've seen it in
stores, but never purchased it.

Hope this helps... take a moment to double check the parameters
on ifconfig, I don't have a Solaris machine handy to make sure
they're exactly right.

Quote:> Thanks very much for any tips or pointers.
> --
> ##--------------------------------
> ##  John Nolan
> ##  jpn acm org
> ##--------------------------------

--
I've munged my address to help foil those
insiduous spammer-type persons.  Remove the
_s to get my real address.


 
 
 

ifconfig: how to modify?

Post by Toni Oliv » Thu, 06 Nov 1997 04:00:00




> > I have a freshly-installed Solaris 2.6 installation.
> > It has two ethernet interfaces, hme0 and hme1.
> > hme0 is already set up with an IP number and
> > default route and everything.  I configured this
> > during the installation.

> > How do I:

> > 1: Assign a distinct IP number and default route to hme1 and
> > get the port listening right now, without rebooting?
> > (This machine will not route -- both interfaces are
> > on the same subnet.)

> First:
> ifconfig hme1 plumb

> Second
> ifconfig hme1 address  IP_ADDRESS  up

> Third:
> route delete default hme0's.ip.address

So, now there is no default route.
What appends ? is there any problem
with new connections without a default route ?

Regards
Toni

 
 
 

ifconfig: how to modify?

Post by nos.. » Thu, 06 Nov 1997 04:00:00


I have a freshly-installed Solaris 2.6 installation.
It has two ethernet interfaces, hme0 and hme1.  
hme0 is already set up with an IP number and
default route and everything.  I configured this
during the installation.

How do I:

1: Assign a distinct IP number and default route to hme1 and
get the port listening right now, without rebooting?
(This machine will not route -- both interfaces are
on the same subnet.)

2: Change the config files so that this machine will have
this second interface next time it boots?

3: Change the -current- IP number on hme0, along with the default route,
right now, without rebooting?  Also, how do I change the config files
so that this new number comes into effect on the next boot up?

Are these procedures documented somewhere?  I know this stuff
seems painfully obvious to experienced users, but I am having
trouble understanding the documentation I've been reading.
This stuff really can't be all that difficult.  

Can someone recommend any book with practical,
how-to tips but -not- for dummies or absolute beginners?
Hopefully I can find something Solaris-specific.  

Thanks very much for any tips or pointers.  
--
##--------------------------------
##  John Nolan  
##  jpn acm org
##--------------------------------

 
 
 

1. ifconfig modifies routing table

Dear Guys,

since I updated to SuSE Linux 6.1 ifconfig can't resist to automatically add a route when
setting up
an interface; for instance:


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
server.sth.qcom *               255.255.255.255 UH    0      0        0 dummy
dhcp-clients    *               255.255.255.255 U     0      0        0 eth1
dhcp-clients    *               255.255.255.255 U     0      0        0 eth0
network10       *               255.255.255.0   U     0      0     6094 eth0
network100      *               255.255.255.0   U     0      0     1376 eth1
loopback        *               255.0.0.0       U     0      0      612 lo

..yields...


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
server.sth.qcom *               255.255.255.255 UH    0      0        0 dummy
dhcp-clients    *               255.255.255.255 U     0      0        0 eth1
dhcp-clients    *               255.255.255.255 U     0      0        0 eth0
192.168.3.1     *               255.255.255.0   U     0      0        0 ippp4     <--
network10       *               255.255.255.0   U     0      0     6094 eth0
network100      *               255.255.255.0   U     0      0     1376 eth1
loopback        *               255.0.0.0       U     0      0      612 lo

If you leave the "up" out (from the ifconfig line) the behavior does not change...

Please, can anyone help me with this... why does ifconfig change the routeing table!?

Thanks in advance,
Daniel

2. Screen Saver 2nd head and other little problems

3. route insists on using dns, ifconfig on modifying the routing table... please help me!

4. Need a walkthrough too. Red Hat for me!

5. Last-modify time on directories containing modified files

6. Detecting zombies

7. ifconfig le0 and ifconfig le1 show same MAC address

8. How to tell different flavors of 3.2v4.2

9. Weird ifconfig error: ifconfig: ioctl (SIOCAIFADDR): File exists

10. ifconfig -a = ifconfig: ioctl (SIOCGIFFLAGS): no such interface

11. How to modify the value of SHMMAX of Linux Kernel 2.2.14 ?

12. ifconfig vs. /etc/netstart

13. modifying FreeBSD boot blocks