View Single Post
Old 5th July 2014
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Each of your NICs must be in its own subnet. You seem to misunderstand IPv4 subnetting and netmasks. The mask defines the number of bits of the 32-bit address which make up the subnet. As an example, a CIDR of /24 and a netmask of 255.255.255.0 or 0xFFFFFF00 all mean the same thing:

11111111 11111111 11111111 00000000

24 bits of ones followed by 8 bits of zeros. The addresses in the zero portion make up the number of bits in the subnet.

And in a subnet, the lowest address is reserved for the subnet itself, and is used in routing, and the highest address is reserved for broadcasts to all devices in the subnet. You may recall in your PF thread I mentioned a /30, the smallest subnet available except for point to point networks?

A /30 netmask, in bits, looks like this:

11111111 11111111 11111111 11111100

There are two bits for addressing a /30, which is four values: 00, 01, 10, and 11. The first and last of those addresses are reserved, the remaining two are available for assignment to devices.

e.g.: 192.168.39.16/30:

192.168.39.16 - the network
192.168.39.17 - first device
192.168.39.18 - second device
192.168.39.19 - broadcast

Some of the tables in this Wikipedia article may help.
----

As shown in your latest post above:

1. Your hostname.athn0 is misconfigured.

1a) You have no "inet" declaration in front of the IPv4 address
1b) You have defined the netmask as 255.0.0.0. This is a /8, which has a range of 10.0.0.0 - 10.255.255.255. That is a subnet containing 16 million 177 thousand and 216 addresses, and it conflicts with your xl0 subnet. If you set this to a /24 instead, it will range from 10.2.0.0 - 10.2.0.255.

2. Your hostname.xl0 is misconfigured.

It is in the same /8 subnet as your athn0 NIC, which is incorrect. If you set this to a /24 instead, it will range from 10.1.0.0 - 10.1.0.255.

3. Your dhcpd.conf is misconfigured.

It is a /8, as your other NICs, and needs to match the athn0 subnet once you have corrected it.

---

(NAT is not strictly required, but I will recommend retaining it for now, as if you wish to route without NAT you must add to your routing table in your outermost network.)

Last edited by jggimi; 5th July 2014 at 01:50 AM. Reason: I chose the wrong base address for my /30 example.
Reply With Quote