2019年4月

Raspbian 网桥配置

安装bridge-utils:

sudo apt install bridge-utils -y

修改:

/etc/network/interfaces

添加:

auto br0
  iface br0 inet manual
  bridge_ports eth0 eth1

修改:

/etc/dhcpcd.conf

添加:

denyinterfaces eth0 eth1

interface br0
static ip_address=10.168.1.206/24
static routers=10.168.1.1
static domain_name_servers=10.168.1.1

树莓派添加enc28j60网络模块

树莓派针脚

   3V3  (1) (2)  5V    
 GPIO2  (3) (4)  5V    
 GPIO3  (5) (6)  GND   
 GPIO4  (7) (8)  GPIO14
   GND  (9) (10) GPIO15
GPIO17 (11) (12) GPIO18
GPIO27 (13) (14) GND   
GPIO22 (15) (16) GPIO23
   3V3 (17) (18) GPIO24
GPIO10 (19) (20) GND   
 GPIO9 (21) (22) GPIO25
GPIO11 (23) (24) GPIO8 
   GND (25) (26) GPIO7 
 GPIO0 (27) (28) GPIO1 
 GPIO5 (29) (30) GND   
 GPIO6 (31) (32) GPIO12
GPIO13 (33) (34) GND   
GPIO19 (35) (36) GPIO16
GPIO26 (37) (38) GPIO20
   GND (39) (40) GPIO21

enc28j60模块与树莓派连接针脚


Pi                ENC28J60   
----------------------------
+3V3              VCC         
GPIO10/MOSI       SI        
GPIO9/MISO        SO       
GPIO11/SCLK       SCK     
GND               GND      

GPIO25            INT       
GPIO8/CE0#        CS 

针脚连接好之后修改/boot/config.txt,加入以下内容:

dtparam=spi=on
dtoverlay=enc28j60

然后重启树莓派就能出现enc28j60网卡.