11.2 and the mystery of epair0b...

Status
Not open for further replies.

yeliaB

Dabbler
Joined
Jan 10, 2017
Messages
17
Back when dinosaurs roamed the Earth, I set up FreeNAS and added a jail for Plex--the only jail I ever set up. This was back in the 9.<mumble> days, I think, and the neurons I'd devoted to remembering the details have since moved on to other jobs. I have a vague recollection of needing to set up a bridge and epair interfaces (possibly via CLI?) and that, for whatever reason, I ended up with two epairs--epair0a and epair0b. My Plex jail happily used epair0a, while epair0b remained unused. Everything worked fine, many things were Plex'ed, and life went on. Over time, I did the usual FreeNAS updates (skipping 10, thankfully), and eventually ended up on 11.1-U6. In all that time I don't think I ever updated my Plex server, but it worked, and there was no additional functionality I was looking for, so why bother?

Fast-forward to the present. The other day, I updated to 11.2 a few days ago (everything went perfectly--kudos, dev team!), and decided to bite the bullet, get rid of my old Plex jail, and create a brand-new iocage one. I created a plain jail (no plugin) and manually installed Plex in it myself. Added a mountpoint for my media, and all is well. Everything's working great--I have a Plex server that does what it says on the tin. All good stuff.

But I'm curious.

Every time I bounce my jail, the console displays the ethernet addresses for bridge0, epair0a, and epair0b. Seeing that, I'm left wondering where in the jail spin-up process this happens, and whether there's a UI (or FreeNAS-sanctioned CLI) for tweaking this or not. And the thing is, I don't know that I'm going to do any tweaking, I just want to become a better-informed FreeNAS user.

If you got this far, thanks for reading!
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
When you see bridge0 and epairXx, it means the jail has VIMAGE (aka VNET) enabled. VIMAGE gives the jail it's own network stack allowing you to enable routing and firewall (pf, ipfw) inside the jail without it touching the host configuration.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Let me explain to you what each of these are, sir.

On the main non-jail side, your FreeNAS appliance, you will have for each jail with its own VIMAGE (so, all jails, these days) something that looks like epair0a, epair1a, and so on. This is the virtual network interface for each individual jail. These will have MAC/ethernet addresses only, and are typically emulated as if they were 10 Gbps NICs.

Also on the main FreeNAS side, You will also have the hardware interfaces that are active, as well as any aggregations. The former usually look like "igb0" or "re0" or whatever. The latter are usually "lagg0" or whatever. That's your actual network interface on your motherboard, and/or aggregations thereof. Whichever of these is the main NIC to your FreeNAS will, of course, have the LAN IP assigned to it.

Finally,. also on the FreeNAS side, you will have a bridge that collects all those epairs, and whatever the main network interface is for your FreeNAS. "bridge0" or whatever.

Then, for each jail, the jail will simply have an epair0b, or whatever from its perspective. The 'b' is the jail side of the 'a' for the epairs. If you're in the jail and do an "ifconfig", you'll see the 'b' side of the epair has the IP address.

Anyway, I think that's what you were after.
 

yeliaB

Dabbler
Joined
Jan 10, 2017
Messages
17
When you see bridge0 and epairXx, it means the jail has VIMAGE (aka VNET) enabled. VIMAGE gives the jail it's own network stack allowing you to enable routing and firewall (pf, ipfw) inside the jail without it touching the host configuration.

Thanks, but that's not quite what I was looking for. However, it appears DrKK seems to have added the nugget of information that was eluding me.
 

yeliaB

Dabbler
Joined
Jan 10, 2017
Messages
17
Let me explain to you what each of these are, sir.

...

Finally,. also on the FreeNAS side, you will have a bridge that collects all those epairs, and whatever the main network interface is for your FreeNAS. "bridge0" or whatever.

Then, for each jail, the jail will simply have an epair0b, or whatever from its perspective. The 'b' is the jail side of the 'a' for the epairs. If you're in the jail and do an "ifconfig", you'll see the 'b' side of the epair has the IP address.

Anyway, I think that's what you were after.

YES!!! Thank you so much for mentioning this key piece of information that made everything click into place for me--now I understand!
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Thank you so much for mentioning this key piece of information that made everything click into place for me--now I understand!
Sir. It is a pleasure to serve you.
 
Status
Not open for further replies.
Top