summaryrefslogtreecommitdiff
path: root/scripts/conf-net.sh
blob: e7589a4dbafff63970fa043dfdac7780acdc4e3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

. scripts/lava-common.sh
# set hostname
hostname $(lava-role)

iface=$(find_vland_iface)

# configure an ip
# 200 hosts should be enough
last=$(lava-self)
last=$(((last % 200) + 1))
ip='192.168.200.'"$last/24"
ip addr add dev "$iface" "$ip"