Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNetworking docs are completely useless #404
Comments
* Updated the 'updating/upgrading jail' section. * Explained more the network adapter 'warning' message * Added even more information about Network Adapters.
…n. Issue #404 (#488) * Updated the 'updating/upgrading jail' section. * Explained more the network adapter 'warning' message * Added even more information about Network Adapters. * Deleted one of the bridges. 'bridge1' was optional;caused confusion. * Modifed the man page. Specifically exec. Accounted for the jexec command.
|
If anyone gets here from google looking for simple DHCP settings (which google doesn't turn up atm...)
(1) kernel building, specifically to change (2) see below about additional settings in the HEAD (1.0 alpha) version of iocage. |
@RNCTX, why is it necessary to disable SCTP? (aside from a disabling a whole network stack that hardly anyone uses) |
|
That's a fair question, it's in the original docs and I don't use it, so I disabled it per the original docs. The only mention I can find of it is in this from a few years ago, suggesting issues with SCTP and IPV6 in 9.0... https://lists.freebsd.org/pipermail/freebsd-net/2014-April/038403.html I don't use IPV6 so can't confirm/deny issues there either. I did some further poking and prodding, it seems like the configuration for iocage is very much a moving target as we come up to the official 1.0 release. I also have a beta install of FreeNAS on a virtualbox and was comparing their default jail configs versus mine. FreeNAS beta is using the head version of iocage (which reports 1.0 alpha if you compile it yourself). There are some variances:
edited post above to reflect these tests. |
This comment has been minimized.
This comment has been minimized.
|
Specifying devfs_rules is not necessary for iocage either.
On Wed, Jun 20, 2018, 6:47 PM Stefan Grönke ***@***.***> wrote:
iocage set bpf=yes dhcp=on devfs_ruleset=4 JAILNAME
@RNCTX <https://github.com/RNCTX> could you point to documentation about
DHCP in jails without? Afaik it is necessary to execute dhclient within the
jail but fails with ifconfig: up: permission denied. I'm happy to follow
your steps to reproduce!
- when you set DHCP in FreeNAS, the dhcp request is made on the epair
interface, and 1.0 (head) has an option to set vnet_interfaces=none in the
config. FreeNAS uses this by default. I'm not sure what purpose this
serves, but it apparently changes which interface the DHCP address binds to.
python-iocage uses netifaces.gateways() to obtain the interface of the
default gateway:
https://github.com/iocage/iocage/blob/ec15598ae11b87d31b3e3babf2fc8783c0f92600/iocage/lib/ioc_json.py#L1250-L1252
Since #521 <#521> this does no
longer happen automatically, so I guess FreeNAS will either have that as
default value already or will change it in the near future.
- FreeNAS is using devfs_rules=4 rather than 5, so I changed that as
well.
Can you please post the content of each hosts /etc/devfs.rules/ file?
libiocage for example creates the rules automatically on demand and takes
the next available devfsrule number when a new rule is required.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#404 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABg_N1NvsuALjksno9hW5-8tZEAYAHJ5ks5t-t8HgaJpZM4QRX86>
.
--
- Brandon
|
|
@skarekrow wrote:
That is not true, because it's in the config by default. If you unset it (leave it blank), the jail will not boot, Traceback (most recent call last):
File "/usr/local/bin/iocage", line 10, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/iocage/cli/start.py", line 54, in cli
ioc.IOCage(exit_on_error=True, jail=jail, rc=rc).start()
File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 1643, in start
exit_on_error=self.exit_on_error)
File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_start.py", line 63, in __init__
self.__start_jail__()
File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_start.py", line 109, in __start_jail__
devfs_ruleset = self.conf["devfs_ruleset"]
KeyError: 'devfs_ruleset'I'm now on the head version as of yesterday, btw. Here is the current networking docs that mentions all of these things. |
|
Right. Don't unset it or leave it intentionally blank :P
I can confirm it's true, I wrote it ;)
iocage create -n foo -r latest bpf=yes dhcp=on vnet=on is all you need to
create a DHCP enabled jail. If you add boot=on you'll see the jail start
just fine.
Behind the scenes iocage creates a dev ruleset of 5 for dhcp on the host.
So specifying 4 actively works against you was it doesn't unhide the bpf
device. Less is more in this case.
On Thu, Jun 21, 2018, 3:27 AM Robert Clayton ***@***.***> wrote:
@skarekrow <https://github.com/skarekrow> wrote:
Specifying devfs_rules is not necessary for iocage either.
That is not true, because it's in the config by default. If you unset it
(leave it blank), the jail will not boot, mount reports an invalid ruleset.
If you remove or comment the configuration parameter entirely, you get a
python error about it not being in the config...
Traceback (most recent call last):
File "/usr/local/bin/iocage", line 10, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/iocage/cli/start.py", line 54, in cli
ioc.IOCage(exit_on_error=True, jail=jail, rc=rc).start()
File "/usr/local/lib/python3.6/site-packages/iocage/lib/iocage.py", line 1643, in start
exit_on_error=self.exit_on_error)
File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_start.py", line 63, in __init__
self.__start_jail__()
File "/usr/local/lib/python3.6/site-packages/iocage/lib/ioc_start.py", line 109, in __start_jail__
devfs_ruleset = self.conf["devfs_ruleset"]
KeyError: 'devfs_ruleset'
I'm now on the head version as of yesterday, btw.
@gronke <https://github.com/gronke> wrote:
python-iocage uses netifaces.gateways() to obtain the interface of the
default gateway:
That behavior changed between 0.9.10 and the current head version (which
reports 1.0 alpha if you build it right now). Previously the address in the
jail's ifconfig was on vnet0. On the most recent head version the jail's
ifconfig lists the address on the epair interface. This may not make any
difference, both worked for me just fine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#404 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABg_N_E2NgocOW-87S0R0eOVdPubJMQ4ks5t-1j1gaJpZM4QRX86>
.
--
- Brandon
|
|
Gotcha, thanks! After changing it I realized that there was no documentation pointing to what the default was. I couldn't change it back to default because I didn't remember what it was (without creating and destroying another jail, anyway...) I'll set mine back at 5. @gronke wrote:
That behavior changed between 0.9.10 and the current head version. Previously the address in the jail's ifconfig was on vnet0 for me. On the most recent head version the jail's ifconfig lists the address on the epair interface. This may not make any difference, both worked for me just fine. Here's the output of a fresh devfs.rules from a stock 11.1-RELEASE jail....
|
|
Yeah 4 is the default. I'd set it back to 4 personally as if you decide to
stop using dhcp, 5 will no longer exist unless you manually create it.
On Thu, Jun 21, 2018, 3:53 AM Robert Clayton ***@***.***> wrote:
Gotcha, thanks!
After changing it I realized that there was no documentation pointing to
what the default was. I couldn't change it back to default because I didn't
remember what it was (without creating and destroying another jail,
anyway...)
I'll set mine back at 5.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#404 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABg_N8phltFJkCWtsEetnnICQlYJOP8Jks5t-18EgaJpZM4QRX86>
.
--
- Brandon
|
|
After checking the default rules for gronke that makes sense. |
|
So with all of this in mind, in my opinion what the docs lack is:
|
* Updated the 'updating/upgrading jail' section. * Explained more the network adapter 'warning' message * Added even more information about Network Adapters.
…n. Issue #404 (#488) * Updated the 'updating/upgrading jail' section. * Explained more the network adapter 'warning' message * Added even more information about Network Adapters. * Deleted one of the bridges. 'bridge1' was optional;caused confusion. * Modifed the man page. Specifically exec. Accounted for the jexec command.
Especially the VNET stuff. Why do I need two bridges? What is em0? How did you get to that default gateway IP? Also, there's no mention of DHCP, which is available.