making new default gateway take affect

How do you make the changes take affect when you change the subnet masks or default router without rebooting?

change the /etc/netmasks and /etc/defaultrouter first.

then

route delete default <ip of old defaultrouter>
ifconfig <interface> <ipaddress> netmask <new netmask>
route add default <ip of new defaultrouter>

Sometimes you need to bounce the network iterface after applying the new netmask.

ifconfig <interface> down
ifconfig <interface> up