How to set up internal routing between virtual interfaces and real ethernet interface (Linux)

view full story

http://serverfault.com – I have a Linux box with one real (as opposes to virtual, a.k.a. aliased) Ethernet interface I can use (eth0 is used for other purposes - can't use it, nor can I add more NICs). Say it's eth1 I need to control some objects/entities via SNMP, so I set up a virtual Ethernet interface for each object, with its appropriate MAC address. I do this by (example for vif1): ip -family inet link add link eth1 name vif1 address <the MAC addr> type macvlan ip link set vif1 up multicast on ip route del default dev vif1 table main /* enable the pings/TFTP going out! */ ip route add default via 192.168 (HowTos)