@linhua
不行
root@ubuntu:~# cf ic run --rm --net=host lxyimages/tcpdump
docker: Error response from daemon: {"incident_id": "1941-1495169122.615-1389731", "code": "IC5192E", "description": "The container could not be created. Contact Bluemix Support and reference this incident ID.", "environment": "prod-dal09", "rc": "500", "host_id": "176", "type": "Infrastructure", "name": "NetworkError"}.
See 'docker run --help'.
root@ubuntu:~# cf ic run --rm --net=container lxyimages/tcpdump
docker: Error response from daemon: {"incident_id": "1271-1495169134.809-1062745", "code": "IC5192E", "description": "The container could not be created. Contact Bluemix Support and reference this incident ID.", "environment": "prod-dal09", "rc": "500", "host_id": "217", "type": "Infrastructure", "name": "NetworkError"}.
See 'docker run --help'.
评论
有root权限吗?
可以运行 tcpdump命令 吗?
tun设备存在吗?
ls -al /dev/net/tun
现在我尝试的是把一个alpine linux minimal带sshd的image放进了container。
root可以有,tcpdump没有,但是可以安装(apk add tcpdump),tun好像没有
但是我觉得这个应该和系统有关,为了测试我这个用的是alpine linux minimal,image大小只有不到10M,很多都没有装(包括openssl等)是不是和这个有关?
@lewis_xy
https://www.91yunbbs.com/discussion/181/使用lkl开启bbr实现网络加速-docker版#latest
没有tun的话,可以试试这个 https://www.v2ex.com/t/353778#r_4311799
@linhua
多谢,我试一下第一个
v2ex那个链接打不开
@linhua
测试了一下第一个,发现ss可以部署,速度一般。但是加速lkl弄不好,一直启动不了。我现在还不知道怎么查log或者其他查错的方式,但是我估计可能tun不支持,还有其他的方法吗?
@lewis_xy
看来是 隐藏节点,把内容复制过来了
docker 里面 需要有 iptables, grep, cut, xargs 命令
rinetd 的监听端口 可与 服务端口一样。 但前提是 服务软件 的监听地址 应为 ” 0.0.0.0 “ ,不能为服务器 ip 地址。
使用方法:
修改 rinetd 的配置文件 rinetd.conf, 添加 监听地址
运行程序
下载 https://drive.google.com/open?id=0B0D0hDHteoksV2xJcFNOQVdrVHM 提供的 rinetd 可执行程序
venet0:0 为你的网卡名字(需要与 ipv4 地址对应) , 注意:openVZ 中 与服务器 ipv4 地址对应的 网络接口名 一般为 venet0:0,不是 venet0, 请用 ifconfig 命令查看
暂时,无解,我也试过,docker好像不允许运行内核层的东西。。。当然除非权限非常大,这是有可能的,不过没研究过
参考这个
https://www.91yunbbs.com/discussion/181/使用lkl开启bbr实现网络加速-docker版#latest
docker 理论上可以跑 uml,可以试试。
PS:噢,我错了。docker的nat估计用不了
好像没有权限执行rinetd,iptables好像也不行
instance-********:~# ~ ./rinetd ash: /root: Permission denied instance-********:~#
instance-********:~# iptables -S iptables v1.6.0: can't initialize iptables table
filter': Permission denied (you must be root)Perhaps iptables or your kernel needs to be upgraded.
instance-********:~# iptables -L
iptables v1.6.0: can't initialize iptables table
filter': Permission denied (you must be root) Perhaps iptables or your kernel needs to be upgraded.
是不是我就不应该用alpine linux搞这个?他的所有内置命令都是busybox的。。。
我用的是这个image:
https://hub.docker.com/r/sickp/alpine-sshd/
我还发现他的网络结构好象是内网映射到外网的
instance-********:~# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 TX bytes:0 (0.0
nsbda34b8a-fe0 Link encap:Ethernet HWaddr FA:16:3E:64:90:FB
inet addr:172...***(内网ip) Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::f816:3eff:fe64:90fb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:65117 errors:0 dropped:0 overruns:0 frame:0
TX packets:56661 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20843862 (19.8 MiB) TX bytes:10168879 (9.6 MiB)
@dabiaoge
sss那个image可以用,已经搞定,但是lkl的那个image用不了,也没有log之类的
求教怎么在docker里面用UML
@lewis_xy
你运行docker的时候添加 privilege 参数呢? 参考如下(出自https://www.91yunbbs.com/discussion/181/使用lkl开启bbr实现网络加速-docker版#latest):
这个container好像不支持--privillege运行
@lewis_xy
https://github.com/crccheck/docker-tcpdump
这个可以运行吗?
@linhua
不行
root@ubuntu:~# cf ic run --rm --net=host lxyimages/tcpdump
docker: Error response from daemon: {"incident_id": "1941-1495169122.615-1389731", "code": "IC5192E", "description": "The container could not be created. Contact Bluemix Support and reference this incident ID.", "environment": "prod-dal09", "rc": "500", "host_id": "176", "type": "Infrastructure", "name": "NetworkError"}.
See 'docker run --help'.
root@ubuntu:~# cf ic run --rm --net=container lxyimages/tcpdump
docker: Error response from daemon: {"incident_id": "1271-1495169134.809-1062745", "code": "IC5192E", "description": "The container could not be created. Contact Bluemix Support and reference this incident ID.", "environment": "prod-dal09", "rc": "500", "host_id": "217", "type": "Infrastructure", "name": "NetworkError"}.
See 'docker run --help'.
@lewis_xy
那over了,不用纠结了
好吧。。。
能解释一下怎么通过tcpdump判断出能不能用bbr的吗?多谢
我是看到此篇介紹 : https://www.91yunbbs.com/discussion/181/使用lkl开启bbr实现网络加速-docker版#latest
安裝測試ok . 沒有問題....
但SSR我是用這版, 自定參數比較齊全 : https://hub.docker.com/r/smounives/shadowsocksr-docker/
兩個docker都下載安裝後, 用這樣的自啟動命令運行的 .
docker run -d -p 11120:11120/tcp -p 11120:11120/udp --restart=always --name ssr smounives/shadowsocksr-docker -s 0.0.0.0 -p 11120 -k <你的密碼> -m aes-256-cfb -o http_simple -O auth_sha1_v4
docker run -d --privileged --link ssr:myhost --restart=always -e TARGET_HOST=myhost -e TARGET_PORT=11120 -p 11121:8888 --name lkl wuqz/lkl
如此, 每次開機就會自動運行了. 但如果VPS下reboot重啟命令, 要多等30秒才能重啟.
這時, 可以先用底下命令, 把docker容器都先關閉後, 再下reboot命令, 就會快的多..
docker stop --time 1 $(docker ps -a -q)
最後, 如連接 TCP 11120 就是不經過LKL加速的SSR , 如連接 TCP 11121, 就是有LKL加速的端口~
PS : 安裝環境 Centos7 + Docker version 1.12.6.
@liuje
那我就明白了,在VPS上安装docker可以拥有底层权限,因此什么都好办。使用第三方直接提供docker的container由于没有底层权限(docker无法使用--privillage,tcpdump用不了)因此无法使用内核级加速技术(bbr/锐速等)
有圖有真相, 來看看 直接跑 docker裡頭的SSR , 以及添加了LKL(BBR)加速的docker 一起跑的速度比較....
(從照片來看, 在VPS速度還不錯的時候, 至少還能有2-3倍加速效果, 如果VPS更差一點的, 加速效果應該會更明顯的)
docker封裝的lkl, 在無法直接升級內核以支援BBR, 或內存較少而不想安裝UML的, 這是目前最好的加速方案了 ! 推一下~~
编辑掉了
寧波中國電信 測試 , 油管大約 3000~4000k bps . 還行的速度 .
(測試時間 : 週五下午6:15)
感謝分享 !!
@liuje cloudatcost这个廉价vps大约就是这个速度,移动可能好些
alpine默认情况下无法跑lkl的, 因为它的C库是musl,而lkl是glibc编译的。所以docker镜像,我选择了debian。
可以alpine+glibc,镜像更小,不过其实也没啥必要的哈。
各位大神,日本的樱花docker ssr加速有研究成功的吗?
@koala
@ssh 在樱花docker 部署 带LKL的rinetd成功了。 樱花docker 可以运行tcpdump命令!
不过樱花docker的 eth0 网络接口 不是 cooked device,应该可以运行 原版的以raw socket作为后端的LKL
666大神啊,哎,毕业工作了,没时间折腾了,有空请教一下啊
@koala
FPGA相关的? 工作就有钱了,不用再纠结免费 不免费了。
@linhua 樱花执行/root/rinetd -f -c /root/rinetd.conf raw eth0
root@ba2ec68fcd5a:~# /root/rinetd -f -c /root/rinetd.conf raw eth0
sh: 2: iptables: not found
[ 0.000000] Linux version 4.10.0+ ([email protected]) (gcc version 6.3.1 20170306 (GCC) ) #26 Sat May 6 13:37:48 CST 2017
[ 0.000000] bootmem address range: 0x7f80c4000000 - 0x7f80c7fff000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16159
[ 0.000000] Kernel command line: virtio_mmio.device=268@0x1000000:1
[ 0.000000] PID hash table entries: 256 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Memory available: 64492k/0k RAM
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:4096
[ 0.000000] lkl: irqs initialized
[ 0.000000] clocksource: lkl: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[ 0.000003] lkl: time and timers initialized (irq2)
[ 0.000011] pid_max: default: 4096 minimum: 301
[ 0.000041] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.000045] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[ 0.018461] console [lkl_console0] enabled
[ 0.018475] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.018611] NET: Registered protocol family 16
[ 0.019224] clocksource: Switched to clocksource lkl
[ 0.019313] NET: Registered protocol family 2
[ 0.019434] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[ 0.019444] TCP bind hash table entries: 512 (order: 0, 4096 bytes)
[ 0.019447] TCP: Hash tables configured (established 512 bind 512)
[ 0.019486] UDP hash table entries: 128 (order: 0, 4096 bytes)
[ 0.019492] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
[ 0.019626] virtio-mmio: Registering device virtio-mmio.0 at 0x1000000-0x100010b, IRQ 1.
[ 0.021102] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[ 0.022592] virtio-mmio virtio-mmio.0: Failed to enable 64-bit or 32-bit DMA. Trying to continue, but this might not work.
[ 0.022948] NET: Registered protocol family 10
[ 0.023441] Segment Routing with IPv6
[ 0.023477] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 0.023735] Warning: unable to open an initial console.
[ 0.023817] This architecture does not have kernel memory protection.
sh: 1: iptables: not found
sh: 1: iptables: not found
sh: 1: iptables: not found
sh: 1: iptables: not found
[ 2.499531] random: fast init done
没有权限执行iptables的啊,怎么搞?
@mixool
确认了一下, 樱花docker还是不行,我再看看 是否支持原版的 raw socket lkl, 原版的不依赖 iptables
樱花docker也就还能玩一个月了。
要是可行的话可以把那些镜像统统加上bbr,不过樱花不炸的时候本来就挺快了。
我是做数字IC的,公司不给网,没必要爬墙了。。。