update script to setup arp entries up to .66

This commit is contained in:
Nico Schottelius 2019-08-04 09:08:17 +02:00
parent a2868a3f07
commit c16ccb475c
2 changed files with 15 additions and 1 deletions

View file

@ -9,7 +9,8 @@ intf=enp2s0f1
set -x
for addr in $(seq 1 64); do
for addr in $(seq 1 66); do
hwaddr=$(printf "%0.2d" $addr)
sudo ip neighbor del 10.0.0.$addr dev ${intf}
sudo ip neighbor add 10.0.0.$addr lladdr $remote_mac dev ${intf}
done

View file

@ -8573,7 +8573,20 @@ Result:
#+END_CENTER
Problem: something removed the ipv4 address on the test host (again)
#+BEGIN_CENTER
nico@ESPRIMO-P956:~/master-thesis/bin$ sudo sh init_ipv4_esprimo.sh
nico@ESPRIMO-P956:~/master-thesis/bin$ ./set_ipv4_neighbor.sh
+ seq 1 64
+ printf %0.2d 1
+ hwaddr=01
+ sudo ip neighbor add 10.0.0.1 lladdr f8:f2:1e:09:62:d1 dev enp2s0f1
+ printf %0.2d 2
+ hwaddr=02
+ sudo ip neighbor add 10.0.0.2 lladdr f8:f2:1e:09:62:d1 dev enp2s0f1
+ printf %0.2d 3
+ hwaddr=03
#+END_CENTER
** References / Follow up
*** RFC 791 IPv4 https://tools.ietf.org/html/rfc791
*** RFC 792 ICMP https://tools.ietf.org/html/rfc792