Reserve a NIC for jails?

Status
Not open for further replies.

Nindustries

Patron
Joined
Jun 12, 2013
Messages
269
Hello there!

I was wondering if it would be possible to reserve a NIC for a certain jail?
In my situation (ideally), I would be running newznab, musicbrainz and Sabznd in jails. Therefore, it would be much more performant if I could still reserve one NIC for my home network shares.

Greetings
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Not that I know of.... :(
 

MtK

Patron
Joined
Jun 22, 2013
Messages
471
I was thinking about the same concept: one NIC for internal traffic and the other for external (WAN).

this could probably be solved with the switch/router, but I'd prefer a server/setting solution.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
I think it's already kind of reserved. All the epair interfaces are bridged to just one of the physical interfaces -- the one configured with a default gateway (as it is assumed that the plugins need to access the internet). So, any other physical interface should not see the plugin traffic.
Quoting the documentation: http://doc.freenas.org/index.php/Adding_Jails#Adding_Jails
[PANEL]The IPv4 and IPv6 bridge interface is used to bridge the epair(4) device, which is automatically created for each started jail, to a physical network device. The default network device is the one that is configured with a default gateway. So, if em0 is the FreeBSD name of the physical interface and three jails are running, the following virtual interfaces will be automatically created: bridge0, epair0a, epair1a, and epair2a. The physical interface em0 will be added to the bridge, as well as each epair device. The other half of the epair will be placed inside the jail and will be assigned the IP address specified for that jail. The bridge interface will be assigned an alias of the default gateway for that jail, if configured, or the bridge IP, if configured; either is correct.[/PANEL]
 

Nindustries

Patron
Joined
Jun 12, 2013
Messages
269
I think it's already kind of reserved. All the epair interfaces are bridged to just one of the physical interfaces -- the one configured with a default gateway (as it is assumed that the plugins need to access the internet). So, any other physical interface should not see the plugin traffic.

Now is the question, how can I instruct freenas to use my other NIC without configuring a default gateway..
Is the pairing done during the creation of the jail or just at startup? hmm
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
The bridge is created and configured when the jail starts by this script: /usr/local/share/warden/scripts/backend/startjail.sh
EDIT: Looking at the script it seems you can create a <jail_root>/.<jail_name>.meta/iface file containing the name of the interface you want the bridge to "pair" with.
 
Status
Not open for further replies.
Top