Macvlan: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
Zeile 11: | Zeile 11: | ||
*echo 2 >/proc/sys/net/ipv4/conf/all/arp_announce | *echo 2 >/proc/sys/net/ipv4/conf/all/arp_announce | ||
*echo 2 >/proc/sys/net/ipv4/conf/all/rp_filter | *echo 2 >/proc/sys/net/ipv4/conf/all/rp_filter | ||
+ | |||
+ | arptables -A OUT -o eth0.1 --arhln 06 -j mangle --mangle-hw-s 00:11:11:11:11:11 | ||
+ | arptables -A IN -d 192.168.1.1 --arhln 06 -j mangle --mangle-hw-d 00:11:11:11:11:11 | ||
+ | |||
+ | |||
*http://serverfault.com/questions/223601/multiple-mac-addresses-on-one-physical-network-interface-linux | *http://serverfault.com/questions/223601/multiple-mac-addresses-on-one-physical-network-interface-linux |
Version vom 23. März 2015, 12:30 Uhr
set main ip
- ip addr add 192.168.244.150/21 dev eth0
set macvlan interface mac0
- ip link add link eth0 mac0 address 00:22:22:22:22:22 type macvlan
assign ip address to mac0
- ip addr add 192.168.244.151/21 brd + dev mac0
bring mac0 up
- ip link set dev mac0 up
settings in proc system
- echo 1 >/proc/sys/net/ipv4/conf/all/arp_ignore
- echo 2 >/proc/sys/net/ipv4/conf/all/arp_announce
- echo 2 >/proc/sys/net/ipv4/conf/all/rp_filter
arptables -A OUT -o eth0.1 --arhln 06 -j mangle --mangle-hw-s 00:11:11:11:11:11 arptables -A IN -d 192.168.1.1 --arhln 06 -j mangle --mangle-hw-d 00:11:11:11:11:11