Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Mar 2003 17:22:00 -0600
From:      David Kelly <dkelly@hiwaay.net>
To:        "E. J. Cerejo" <edinho64@netscape.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Need help on configuring a static internal IP address.
Message-ID:  <20030326232200.GA76801@grumpy.dyndns.org>
In-Reply-To: <3E822F94.3000200@netscape.net>
References:  <3E822740.3080400@netscape.net> <20030326224403.GA76676@grumpy.dyndns.org> <3E822F94.3000200@netscape.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 26, 2003 at 05:54:12PM -0500, E. J. Cerejo wrote:
> 
> what's the diference between ifconfig_fxp0="inet 192.168.2.72/24" and 
> ifconfig_fxp0="inet 192.168.2.72  netmask 255.255.255.0"?

Its easier to type "/24" than 255.255.255.0. The /24 says "set first 24
bits of netmask." It doesn't work with ifconfig on older (~4.4) FreeBSD.
Anyway, after typing "ifconfig fxp0 192.168.2.72/24" you could follow
with "ifconfig fxp0" and see it reporting the netmask as 255.255.255.0.

For fun you could type "ifconfig fxp0 192.168.2.72/25" and your network
will still function but the netmask would be 255.255.255.128.

The netmask defines the address range which is directly accessible by
the NIC. Everything else has to be routed. "Hmm, 1.2.3.4 is outside of
my attached nets so I'll send it to my default router for relay and hope
it can find a way to deliver."

A subtile thing people miss sometimes is that their router(s) have to be
on a net within the netmasks of their NICs.

"netstat -rn" should be interesting reading.

-- 
David Kelly N4HHE, dkelly@hiwaay.net
=====================================================================
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030326232200.GA76801>