From c3068206af72a24b1ca5394a947e938b141ec0d9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 28 Jul 2019 16:16:43 +0200 Subject: [PATCH] Add v4 neighbor setting --- bin/set_ipv4_neighbor.sh | 11 +++++++++++ {netpfga => bin}/set_ipv6_neighbour.sh | 0 2 files changed, 11 insertions(+) create mode 100755 bin/set_ipv4_neighbor.sh rename {netpfga => bin}/set_ipv6_neighbour.sh (100%) diff --git a/bin/set_ipv4_neighbor.sh b/bin/set_ipv4_neighbor.sh new file mode 100755 index 0000000..43ad9ca --- /dev/null +++ b/bin/set_ipv4_neighbor.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# eth1 / nsg +remote_mac=f8:f2:1e:41:44:9c + +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 enp2s0f0 +done diff --git a/netpfga/set_ipv6_neighbour.sh b/bin/set_ipv6_neighbour.sh similarity index 100% rename from netpfga/set_ipv6_neighbour.sh rename to bin/set_ipv6_neighbour.sh