blob: 78f6705ca3234df11b943094a9f8adcfb62d1a74 [file] [log] [blame]
Ed Warnicked6a0fc52016-04-12 17:34:48 -05001#!/bin/bash
2
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
15 ifconfig $intf down
16 fi
17done