-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for multiple NICs with configured addresses #10
Comments
This is already supported. >>> import libioc
>>> jail = libioc.Jail("myjail")
>>> jail.config["ip4_addr"] = "vnet0|192.168.23.2/24,vnet1|192.168.42.2/24"
>>> jail.config["ip4_addr"]
{'vnet0': AddressSet({IPv4Interface('192.168.23.2/24')}), 'vnet1': AddressSet({IPv4Interface('192.168.42.2/24')})}
>>> jail.save() You can have multiple IP addresses on each interface as well as DHCP (or rtadv for IPv6). Please keep in mind that you also need to configure your vnet interfaces before starting the jail: >>> jail.config["interfaces"] = "vnet0:bridge0,vnet1:bridge1"
>>> jail.config["interfaces"]
{'vnet0': <libioc.BridgeInterface.BridgeInterface object at 0x8025230f0>, 'vnet1': <libioc.BridgeInterface.BridgeInterface object at 0x802523128>} |
This should go directly into the handbook. |
Intended to add more information, as the described process does not work: (using the ioc command line tool):
While
Let's update to the git version of
Using the Python interface the config is correct:
But it's still not configured. |
@gtz42 could you please post the output of the following command:
The second device in your ip4_configuration is named |
Thanks for spotting my typo. Once I do it correctly, with 'vnet1'. It works, sorry. I should have scrapped my jail and do it from scratch. What I actually would like to do is push interfaces from the host in to the jail (in the experiment a vlan interface), but that fails with (lib)ioc, as the syntax check expects "$interface_name:$brindge_name". sorry for the noise. |
Currently ioc requires a bridge interface where it can assign the epair device of the jail to. So you would require a bridge interface created on the host for each VLAN. |
We don't support any kind of passthru? |
Make sure to follow and check these boxes before submitting an issue! Thank you.
print(libioc.VERSION)
master
if usinga stable release.
The text was updated successfully, but these errors were encountered: