Bigdaye Posted June 26, 2023 Share Posted June 26, 2023 docker服务有自己的DHCP服务器吗? 为什么我的docker服务使用 br0 网络,不填写指定地址的情况下,并不从路由器的DHCP服务获取ip,而是unraid 下发了一个ip? 我在路由器配置的静态网络地址完全不能起作用。 Quote Link to comment
phui.chen Posted June 30, 2023 Share Posted June 30, 2023 docker本身有自己的dhcp,但如果你跟路由同网段就会有问题,如果要跟路由同网段,要在路由dhcp和docker网路都做设置,比如路由ip范围192.168.0.0/24,dhcp ip范围192.168.0.0/25;docker ip范围192.168.0.0/24,dhcp ip范围192.168.0.128/25,这样就不会有冲突,我有个帖子,分享的就是我的网络设置,需要的话,可以看看 Quote Link to comment
Bigdaye Posted July 11, 2023 Author Share Posted July 11, 2023 On 6/30/2023 at 12:36 PM, phui.chen said: docker本身有自己的dhcp,但如果你跟路由同网段就会有问题,如果要跟路由同网段,要在路由dhcp和docker网路都做设置,比如路由ip范围192.168.0.0/24,dhcp ip范围192.168.0.0/25;docker ip范围192.168.0.0/24,dhcp ip范围192.168.0.128/25,这样就不会有冲突,我有个帖子,分享的就是我的网络设置,需要的话,可以看看 谢谢啊,因为我的主路由是openwrt,如果不能从主路由获取IP地址,路由器上就无法显示主机名称,我想修复这个问题,只能想办法关闭docker自己的dhcp服务。但是目前还没有找到办法,是不是docker的网络设置不支持关闭dhcp? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.