master-thesis/bin/set_ipv4_neighbor.sh
Nico Schottelius a2868a3f07 Doc,various
2019-08-04 09:04:01 +02:00

15 lines
264 B
Bash
Executable file

#!/bin/sh
# eth1 / nsg
remote_mac=f8:f2:1e:41:44:9c
# enp2s0f1 / esprimo
remote_mac=f8:f2:1e:09:62:d1
intf=enp2s0f1
set -x
for addr in $(seq 1 64); do
hwaddr=$(printf "%0.2d" $addr)
sudo ip neighbor add 10.0.0.$addr lladdr $remote_mac dev ${intf}
done