Changing Default Router?

Malcolm Kay malcolm.kay at internode.on.net
Sat Dec 13 15:54:35 PST 2003


On Sun, 14 Dec 2003 10:11, Dragoncrest wrote:
> HI all.  How do I change the default router (aka gateway) in freebsd
> without rebooting?  I know I can change the IP, subnet mask, and broadcast
> address through ifconfig, but I couldn't find in there where I could change
> the default router.  Anyone know?  Thanks.
>

The relevant command is 'route'. Take a look at route(8).

I think you want:
   route change default <gateway-address>

Or from scratch
   route add default <gateway-address>

Malcolm


More information about the freebsd-questions mailing list