Skip to content
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

Prevent duplicating a host MAC #77

Open
dominikholler opened this issue Nov 19, 2019 · 7 comments
Open

Prevent duplicating a host MAC #77

dominikholler opened this issue Nov 19, 2019 · 7 comments

Comments

@dominikholler
Copy link

Is there a protection to prevent a that a MAC address of a (nmstate) managed interface of a physical host is taken by a VM?

dominikholler referenced this issue in erav/ovirt-site Nov 19, 2019
@SchSeba
Copy link
Collaborator

SchSeba commented Nov 27, 2019

Hi @dominikholler thanks for the comment right now we don't have that feature in the project

@dominikholler
Copy link
Author

Do you think it would be a good idea to have it?
What happens if a VM gets the MAC address of a host?

@phoracek
Copy link
Member

phoracek commented Dec 3, 2019

@dominikholler I guess the only prevention would be to set the MAC range outside of anything that would be assigned to host's interfaces. The host MAC would be likely the MAC of the physical NIC with vendor-based prefix. When we generate a random MAC range, we make it locally administered, so it should not collide with any vendored MAC.

We could drop all MACs found on host from the pool, but there can be more devices with MAC addresses on the network. The only solution for this is IMHO setting proper dedicated range.

@dominikholler
Copy link
Author

The host MAC would be likely the MAC of the physical NIC with vendor-based prefix. When we generate a random MAC range, we make it locally administered, so it should not collide with any vendored MAC.

Nice approach.

The only solution for this is IMHO setting proper dedicated range.

Is there the possibility to create (e.g. custom, imported or vNICs created on another range) MACs outside the range ?

@phoracek
Copy link
Member

phoracek commented Dec 4, 2019

Is there the possibility to create (e.g. custom, imported or vNICs created on another range) MACs outside the range ?

We don't limit users from hurting themselves. If somebody explicitly sets a MAC address request, we respect that.

@dominikholler
Copy link
Author

We don't limit users from hurting themselves. If somebody explicitly sets a MAC address request, we respect that.

This would mean a user, who is allowed to create a vNIC, is able to kick a host.
I am discussing because I considering whether such a behavior should be prevented or accepted.

@phoracek
Copy link
Member

phoracek commented Dec 5, 2019

That's a good point.

The host can be kicked only if the user is given access to the management network. MAC address would not be the only threat in that case, would it? I think that the administrator has to either trust the user not to break the network or put them behind a VLAN.

Having a parameter to allow/block custom MAC setting would not hurt though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants