Jump to content

6.8.1: How to assign mac addresses to virtual eth0:x


DZMM

Recommended Posts

Apologies if my network terminology is incorrect.  What I'm trying to do is create virtual IPs for eth0 that I can use to segment my traffic.  I've successfully created virtual IPs using:

 

ip addr add 172.30.12.21/24 dev eth0 label eth0:1
ip addr add 172.30.12.22/24 dev eth0 label eth0:2

to create new IPs, but they all have the same mac address as eth0.  How do I give them unique mac addresses?  I've tried:

 

ip link add link eth0 address 22:22:22:22:22:22 eth0.2 type macvlan

but I get the error message "RTNETLINK answers: Device or resource busy". 

 

Does anyone e.g. @bonienl know how to crack this please?

 

Thanks in advance.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...