树莓派历程笔记

环境 Deepin15.4

Raspberry Pi 3

ovs常用命令

Linux命令行烧录树莓派镜像至SD卡

http://shumeipai.nxez.com/2013/12/08/linux-command-line-burn-raspberry-pi-mirror-to-sd-card.html

配置键盘

https://jingyan.baidu.com/article/e6c8503c6b79a1e54f1a18fc.html

带树莓的低成本的LoRa网关

https://github.com/CongducPham/LowCostLoRaGw

ssh 连接树莓派

ssh pi@172.17.171.232
密码:raspberry

树莓派连接wifi

https://www.cnblogs.com/wangchuanyang/p/6422947.html

树莓派3是自带wifi模块的。如果使用命令 ifconfig不出现wlan,但是iwconfig出现wlan,可以尝试 sudo ifconfig wlan0 up,如果出现错误:
SI0CSIFFLAGS: Input/output error
八成内置wifi就是坏了,需要外插一个usb网卡

注:有些usb无线网卡linux系统识别不到,对于可识别的deepin系统会自动弹窗

Deepin系统下开启wifi热点

http://blog.csdn.net/marsggbo/article/details/70227337

对接摄像头

http://www.linuxidc.com/Linux/2015-04/116490.htm 拍照-测试成功
http://shumeipai.nxez.com/2016/09/01/raspberry-pi-motion-cameras-for-remote-monitoring.html 视频-测试成功
https://linux.cn/article-3650-1.html

安装OVS

sudo apt-get install openvswitch-switch

目标模型

现阶段模型-2017_12_12

sudo ovs-vsctl add-br br0
sudo ovs-vsctl add-port br0 eth1
sudo ovs-vsctl add-port br0 eth2

在默认情况下,ovs生成port会自动添加流标,完成 建立bridge/加入port host就可以便可以访问因特网了

可以查看当前bridge下的所有流标

sudo ovs-ofctl dump-flows br0

删除对应流标之后对应host便不能访问因特网

删除编号为 100 的端口上的所有流表项
ovs-ofctl del-flows ovs-switch "in_port=100"

添加对应流表之后对应host便可以再访问因特网

#1号端口连接因特网
sudo ovs-ofctl add-flow br0 'in_port=1,actions=output:100'
sudo ovs-ofctl add-flow br0 'in_port=100,actions=output:1'

使用树莓派搭建SOCKS5透明网关

https://www.jianshu.com/p/05d32b4e8fc0

安装time

https://www.cnblogs.com/roilat/articles/3547605.html

posted @ 2017-11-28 17:47  春雨冰河  阅读(337)  评论(0编辑  收藏  举报