If you don’t need to route any traffic over it, you could use the dummy
interface
eg before:
$ ip link
1: 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:00
2: 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:ff
Now 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:ff
This 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 tap0
4: 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:ff
With tap
devices you can call it any name you like, even cheat and call it eth1
.
Make Permanent
/etc/sysconfig/network-scripts/ifcfg-tap0
DEVICE=tap0
ONBOOT=yes
BOOTPROTO=none
TYPE=Tap
bring it up with
ifup ifcfg-tap0