Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jan 2015 10:51:51 -0700
From:      Matthew Hardcastle <geek@doomgeek.com>
To:        freebsd-lists@potato.growveg.org
Cc:        freebsd-questions@freebsd.org
Subject:   Re: real IP and rfc1918 IP on the same machine - how?
Message-ID:  <44F0B11B-918A-4A44-8F90-99778991ED14@doomgeek.com>
In-Reply-To: <20150125165019.GA38580@potato.growveg.org>
References:  <20150125141518.GA23664@potato.growveg.org> <FE000C8F-1C05-4B4B-B7EA-D32118D09C0E@doomgeek.com> <20150125165019.GA38580@potato.growveg.org>

next in thread | previous in thread | raw e-mail | index | archive | help

> On Jan 25, 2015, at 9:50 AM, freebsd-lists@potato.growveg.org wrote:
>=20
> Ah sorry I've probably worded it wrongly.=20
>=20
> em0 =3D wired interface =3D real ip on a /28 =3D 255.255.255.240 =
netmask
> ath0 =3D wireless interface =3D 192.168.100.100 netmask 255.255.255.0
>=20
> Something just occurred to me. If the default route i.e. 0.0.0.0/0 -> =
my=20
> real router ip then how am I going to exclude 192.168.100.0/24 ?
> --=20
> John=20

You don=E2=80=99t need to do anything other than assign the IP and =
subnet to your wireless interface to exclude it from the default route. =
Your computer decides which interface it will send a packet out of based =
on the most specific route for that packet it can find in the routing =
table. For example, If you have a packet destined for 192.168.100.1 your =
computer will choose your wireless interface because the packet matches =
192.168.100.0/24 more specifically that it matches 0.0.0.0/0.

Double checking your routing table (by running `netstat -rn`) and your =
interface configuration (by running `ifconfig` and `grep ^ifconfig =
/etc/rc.conf`) will allow us to make sure you=E2=80=99re interfaces are =
actually configured as your expect they are.

Matt=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44F0B11B-918A-4A44-8F90-99778991ED14>