Skip to content

Instantly share code, notes, and snippets.

@mithro
Last active August 29, 2015 14:27
Show Gist options
  • Save mithro/81a44b8aa73c663f811a to your computer and use it in GitHub Desktop.
Save mithro/81a44b8aa73c663f811a to your computer and use it in GitHub Desktop.

Files: 70-persistent-net.rules fake.conf setup-xilinx.sh

70-persistent-net.rules

SUBSYSTEM=="net", KERNEL=="dummy0", NAME="eth0"

# USB device 0x:0x (ax88179_178a)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="8c:ae:4c:ee:0a:ce", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

fake.conf

iface eth0 inet static
    pre-up modprobe dummy
    post-up ifconfig eth0 hw ether 02:16:3e:1d:d3:5b
    address 192.168.1.1
    netmask 255.255.255.255
    hwaddress 02:16:3e:1d:d3:5b

setup-xilinx.sh

#!/bin/bash

rmmod dummy
set -x
set -e

modprobe dummy
ifconfig dummy0
ip link set name eth0 dev dummy0
ifconfig eth0 hw ether 02:16:3e:1d:d3:5b
ifconfig eth0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment