# Protocol to serve dhcp requests on lagg(4) interface



## rusma (Jul 23, 2012)

Hello. 

Which aggregation protocol would be proper to configure a lagg(4) interface composed of three network interfaces to serve out dhcp requests to clients connected to the three interfaces?

In other words, I am going to use lagg(4) to serve out DHCP requests, and wonder which protocol to choose.

I am guessing roundrobin, broadcast or lacp. Not failover at least. 

Drawing: 

```
Internet
|
+-------------+-----client no. 1
| Soekris box |
+-------------+-----client no. 2
|
client no. 3
```


----------



## shitson (Jul 24, 2012)

Erm, I don't think lagg will work in this type of configuration. Are your client nodes "PC's"? If so how many NICs do they have?

Edit: Also i assume your going for high redundacy?, is this like a business Internet connection?


----------



## rusma (Jul 24, 2012)

Hey, thanks for your interest, shitson. 

The initial post may have been a bit unclear, I will explain some more. This connection is not anything fancy, just a home router/firewall. The "clients" in the drawing are mostly going to be wireless clients through a wirless router, as well as some bsd and linux boxes connected through ethernet. The initial reason for using lagg(4) was to serve the same subnet mask on all the interfaces, i.e. adjoining some interfaces into one large interface with one address, subnet mask and broadcast address. 

This may be a bad idea. I could also just use static inet config for most of the interfaces. 

Drawing attempt no. 2:

```
Internet
|
+-----------+
|Soekris box|
+-----------+
|
+-----------------+--(dhcp)---FreeBSD/amd64 ZFS fileserver
| lagg0 interface |
+-----------------+--(dhcp)---FreeBSD/arm Mail/Web/Database server
|
+--------------------------------------------------+-(dhcp)--wired PC
|wrt54gl fowarding dhcp requests to the Soekris box|
+--------------------------------------------------+~(dchp)~~printer
~
~wlan (dhcp)
~
Linux laptops
```


----------



## SirDice (Jul 24, 2012)

rusma said:
			
		

> The initial reason for using lagg(4) was to serve the same subnet mask on all the interfaces, i.e. adjoining some interfaces into one large interface with one address, subnet mask and broadcast address.


Which is the typical usage of bridge(4). See Handbook: 32.5 Bridging.


----------



## shitson (Jul 25, 2012)

Are you able to provide a better diagram, i.e. one that's not ASCII art?



			
				SirDice said:
			
		

> Which is the typical usage of bridge(4). See Handbook: 32.5 Bridging.



Is bridging needed at all in this network???


----------



## SirDice (Jul 25, 2012)

shitson said:
			
		

> Is bridging needed at all in this network???


Strictly speaking, no, you don't need it. I would get everything working using the 'standard' routing stuff. No bridge(4), no lagg(4).


----------



## phoenix (Jul 27, 2012)

Do you want one single network (subnet/broadcast domain) across all three NICs and the Soekris? Meaning, are you tring to turn the Soekris box into a switch? If so, then if_bridge(4) is what you want. Create a *bridge0* interface comprised of the three physical interfaces, then configure DHCP to use that.

Or, do those three NICs plug into a switch, which the three clients also plug into? And you want to provide a fault/tolerant, possibly faster connection to the Soekris?


----------



## rusma (Aug 4, 2012)

phoenix said:
			
		

> Do you want one single network (subnet/broadcast domain) across all three NICs and the Soekris? Meaning, are you tring to turn the Soekris box into a switch? If so, then if_bridge(4) is what you want. Create a *bridge0* interface comprised of the three physical interfaces, then configure DHCP to use that.
> 
> Or, do those three NICs plug into a switch, which the three clients also plug into? And you want to provide a fault/tolerant, possibly faster connection to the Soekris?



Hey, nice explaination, made me less confused. I want to do the first one. Can I still do NAT in PF? I have read that, according to Itojun (R.I.P.), NAT is an obsolete practice anyway. 

I'll also include the chart I made a week ago on how this will look like:


----------

