blob: 50b96f0d8b0e4ea670074a883e328c74d0d51366 [file] [log] [blame]
Tom Jonesc3b416c2024-01-18 14:51:44 +00001#!/usr/bin/env bash
Ed Warnicked6a0fc52016-04-12 17:34:48 -05002
3# Capture all the interface IPs, in case we need them later
4ip -o addr show > ~vagrant/ifconfiga
5chown vagrant:vagrant ~vagrant/ifconfiga
6
7# Disable all ethernet interfaces other than the default route
8# interface so VPP will use those interfaces. The VPP auto-blacklist
9# algorithm prevents the use of any physical interface contained in the
10# routing table (i.e. "route --inet --inet6") preventing the theft of
11# the management ethernet interface by VPP from the kernel.
12for intf in $(ls /sys/class/net) ; do
13 if [ -d /sys/class/net/$intf/device ] &&
14 [ "$(route --inet --inet6 | grep default | grep $intf)" == "" ] ; then
Kyle Mesteryacc1fbc2018-08-10 16:32:13 -050015 sudo -E ifconfig $intf down
Ed Warnicked6a0fc52016-04-12 17:34:48 -050016 fi
17done