How can I add a virtual NIC with a specific MAC address on a cloud server?I recently acquired a cloud based service with Centos 7 in it. I have an application that runs on a specific MAC address only. How can I clone this MAC address or add another virtual NIC with this MAC address? I tried adding a virtual NIC like eth0:1 , it got added fine, but the MAC address is the same as eth0, however I need a different MAC address.
Adding a virtual NIC in centos 7 not working on the cloud
centos;cloud
If you don't need to route any traffic over it, you could use the dummy interfaceeg before:$ ip link1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:002: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000    link/ether 52:54:00:0c:d8:88 brd ff:ff:ff:ff:ff:ffNow we use the dummy module, and get a new interface:$ sudo modprobe dummy$ sudo ip link set dummy0 address 10:20:30:40:50:60$ ip link show dummy0                            3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT     link/ether 10:20:30:40:50:60 brd ff:ff:ff:ff:ff:ffThis has created an interface called dummy0 with the MAC address we requested.Another option could be to create a tap device:$ sudo ip tuntap add dev tap0 mode tap$ sudo ip link set tap0 address 10:20:30:40:50:61$ ip link show tap04: tap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 500    link/ether 10:20:30:40:50:61 brd ff:ff:ff:ff:ff:ffWith tap devices you can call it any name you like, even cheat and call it eth1.