Re: Do I need to run netif stop/start if IP is changed?

2009-01-22 Thread Mel
On Wednesday 21 January 2009 08:20:07 Peter Steele wrote:

 The user later runs a tool and specifies the IP address to use for a
 given system. This tool modifies ifconfig and default router lines, e.g.



 ifconfig_lagg0=laggproto failover laggport nfe0 laggport nfe1
 192.168.17.49 netmask 255.255.240.0

 defaultrouter=192.168.16.1



 and also executes explicit ifconfig and route add commands that match
 the entries in rc.conf.



 The question is, should we also execute a netif stop/start sequence when
 this IP/router information is assigned? Are there other services that
 should also be stopped/restarted when the IP is set? Ideally, we want to
 avoid having to reboot the box to set the IP as we are doing.

The question is, should the tool execute the ifconfig and route commands or 
should the tool simply call netif stop/start so that the tool does not have 
to be maintained for those command sequences and dependencies of netif get 
processed (i.e.: /etc/rc.d/pf resync).

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Do I need to run netif stop/start if IP is changed?

2009-01-21 Thread Peter Steele
We have systems that upon initial configuration have no IP addresses
assigned. Their rc.conf entries look like this:

 

ifconfig_nfe0=UP

ifconfig_nfe1=UP

cloned_interfaces=lagg0

ifconfig_lagg0=laggproto failover laggport nfe0 laggport nfe1

defaultrouter=0.0.0.0

 

The user later runs a tool and specifies the IP address to use for a
given system. This tool modifies ifconfig and default router lines, e.g.

 

ifconfig_lagg0=laggproto failover laggport nfe0 laggport nfe1
192.168.17.49 netmask 255.255.240.0

defaultrouter=192.168.16.1

 

and also executes explicit ifconfig and route add commands that match
the entries in rc.conf. 

 

The question is, should we also execute a netif stop/start sequence when
this IP/router information is assigned? Are there other services that
should also be stopped/restarted when the IP is set? Ideally, we want to
avoid having to reboot the box to set the IP as we are doing.

 

 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Do I need to run netif stop/start if IP is changed?

2009-01-21 Thread Frank Staals

Peter Steele wrote:

We have systems that upon initial configuration have no IP addresses
assigned. Their rc.conf entries look like this:

 

  

snip

and also executes explicit ifconfig and route add commands that match
the entries in rc.conf. 

 


The question is, should we also execute a netif stop/start sequence when
this IP/router information is assigned? Are there other services that
should also be stopped/restarted when the IP is set? Ideally, we want to
avoid having to reboot the box to set the IP as we are doing.

  
As far as I know you do not have to, changing interface settings with 
ifconfig should be enough. I used to have a script to switch between LAN 
and WLAN on my laptop which used only ifconfig ip, route flush and 
route add default routerip.  Only thing that comes to mind that could 
go wrong if daemons are configured to listen on a specifc ip instead of  
(default) configs with :port.


Regards,

--

- Frank

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org