FreeBSD jail with VLAN - possible?

Network related discussions (including general TCP/IP stuff, routing, etc).

FreeBSD jail with VLAN - possible?

Postby donduq » 19 Dec 2012, 12:04

I would like to do the following on my FreeBSD 9.1 server:

The host's [FILE]re0[/FILE] interface is connected to a managed switch and configured as a trunk port.

The host itself should be in VLAN 10 and get its IP address from a DHCP server.

Then I have a couple of jails. Those should be in VLAN 20 and also get their IPs via DHCP.

Is this possible and if yes then how? :)

In the past I have used VIMAGE and the method described on http://druidbsd.sourceforge.net/vimage.shtml.
donduq
Junior Member
 
Posts: 38
Joined: 13 Sep 2011, 14:57

Postby Crest » 19 Dec 2012, 14:19

You could use ng_bridge and ng_eiface to create the virtual interfaces and run a DHCP client on each interface in the host. The jails could be started with setfib if their routing tables should conflict with the hosts. I can provide the rc script for this setup if you want to try it.
Crest
Member
 
Posts: 114
Joined: 28 Jan 2009, 08:23
Location: ::1

Postby bbzz » 19 Dec 2012, 16:22

Yes, [man=4]vlan[/man]
Along the lines of
Code: Select all
ifconfig vlan0 create
ifconfig vlan0 vlan 100 vlandev bge0


That's one vlan.
bbzz
Member
 
Posts: 858
Joined: 04 Nov 2010, 01:07
Location: random

Postby donduq » 19 Dec 2012, 16:54

Crest wrote:You could use ng_bridge and ng_eiface to create the virtual interfaces and run a DHCP client on each interface in the host. The jails could be started with setfib if their routing tables should conflict with the hosts. I can provide the rc script for this setup if you want to try it.


That's an offer I can't refuse. So please, by all means :)
donduq
Junior Member
 
Posts: 38
Joined: 13 Sep 2011, 14:57


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest