Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2013 14:12:07 -0400
From:      Rick Miller <vmiller@hostileadmin.com>
To:        Joe <fbsd8@a1poweruser.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: looking for command to display default route ip address
Message-ID:  <CAHzLAVHMMAiCkbk8mkBakn_6tUHBWzz%2BNq0pceRTpPPebumk2A@mail.gmail.com>
In-Reply-To: <51A642E5.2050506@a1poweruser.com>
References:  <51A642E5.2050506@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 29, 2013 at 2:03 PM, Joe <fbsd8@a1poweruser.com> wrote:
> Hello list
>
> How do I find the ip address of the default route?

The following examples return the next hop, usually a router.

# grep defaultrouter /etc/rc.conf
defaultrouter="192.168.0.1"

or

# netstat -r
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.0.1       UGS         0      192    em0
...

-- 
Take care
Rick Miller



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHzLAVHMMAiCkbk8mkBakn_6tUHBWzz%2BNq0pceRTpPPebumk2A>