b3d1 FreeBSD jail with VLAN - possible? - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Networking

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

Reply
 
Thread Tools Display Modes
  #1  
Old December 19th, 2012, 13:04
donduq donduq is offline
Junior Member
 
Join Date: Sep 2011
Posts: 38
Thanks: 13
Thanked 3 Times in 3 Posts
Default FreeBSD jail with VLAN - possible?

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

The host's re0 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.
Reply With Quote
  #2  
Old December 19th, 2012, 15:19
Crest Crest is offline
Junior Member
 
Join Date: Jan 2009
Location: ::1
Posts: 98
Thanks: 2
Thanked 25 Times in 20 Posts
Default

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.
Reply With Quote
The Following User Says Thank You to Crest For This Useful Post:
donduq (December 19th, 2012)
  #3  
Old December 19th, 2012, 17:22
bbzz bbzz is offline
Member
 
Join Date: Nov 2010
Location: random
Posts: 826
Thanks: 77
Thanked 119 Times in 79 Posts
Default

Yes, vlan(4)
Along the lines of
Code:
ifconfig vlan0 create
ifconfig vlan0 vlan 100 vlandev bge0
That's one vlan.
Reply With Quote
  #4  
Old December 19th, 2012, 17:54
donduq donduq is offline
Junior Member
 
Join Date: Sep 2011
Posts: 38
Thanks: 13
Thanked 3 Times in 3 Posts
Default

Quote:
Originally Posted by Crest View Post
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
Reply With Quote
Reply

Tags
jail, networking, vimage, vlan

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlan handling by FreeBSD 8.1 bv_arvind Networking 2 December 13th, 2011 20:08
FreeBSD 8.1 realtek vlan majls_files Networking 14 August 31st, 2010 06:52
[Solved] FreeBSD 8.0 and VLAN's cata_melc Networking 4 April 30th, 2010 13:10
[Solved] Jail Vlan michandr Networking 2 April 19th, 2010 15:26
2 VLan +2 Jail - how can I set the default route ? ricardopl Networking 1 June 13th, 2009 05:46


All times are GMT +1. The time now is 10:18.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0