Displaying 1 result from an estimated 1 matches for "transfer_mac".
Did you mean:
transfer_map
2008 Apr 14
0
Etch Release / Bond networking
...ep '^ *inet ' | sed -e "
s/inet/ip addr add/
s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
s/${src}/dev ${dst}/
" | sh -e
# Remove automatic routes on destination device
ip route list | sed -ne "
/dev ${dst}\( \|$\)/ {
s/^/ip route del /
p
}" | bash
}
transfer_mac () {
local src=$1
local dst=$2
src_mac=`ip addr show dev $src | egrep '^ *link/ether ' | awk '{print $2}'`
ip link set $src address fe:ff:ff:ff:ff:ff
ip link set $dst address $src_mac
}
# Usage: transfer_routes src dst
# Get all IP routes to device $src, delete...