Comments (6)
Hmm. This is saying that something is already using that port. What does ss -nulp | grep :67
say? It should list the process name/pids of things that have that port already open.
from erbium.
Yes, the l
of listen
makes the difference.
$ sudo ss -n | grep :67
$ sudo ss -nl | grep :67 | sed -e 's/ / /g'
udp UNCONN 0 0 0.0.0.0%virbr0:67 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0%ovsbr0:67 0.0.0.0:*
$
Silly me.
Running the request test:
$ sudo ss -nulp | grep :67 | sed -e 's/ / /g'
UNCONN 0 0 0.0.0.0%virbr0:67 0.0.0.0:* users:(("dnsmasq",pid=1621,fd=3))
UNCONN 0 0 0.0.0.0%ovsbr0:67 0.0.0.0:* users:(("dnsmasq",pid=1393,fd=4))
That indeed does explain the EADDRINUSE
. Now how to get beyond it 😃
dnsmasq
does bind on interface name and each dnsmasq
only claims one interface.
To get ( to trick? ) erbium
to only use eth0
I have in erbium.conf
this line
addresses: [ 172.24.0.37/26 ]
because
$ ip -4 address show dev eth0
7: enxe4b97a90028f: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 172.24.0.37/26 brd 172.24.0.63 scope global noprefixroute enxe4b97a90028f
valid_lft forever preferred_lft forever
I think the strace
shown
bind(15, {sa_family=AF_INET, sin_port=htons(67), sin_addr=inet_addr("0.0.0.0")}, 16)
should become something like
bind(15, {sa_family=AF_INET, sin_port=htons(67), sin_addr=inet_addr("172.24.0.37")}, 16)
to honor
addresses: [ 172.24.0.37/26 ]
from erbium.conf
.
from erbium.
erbium, currently, always listens on 0.0.0.0. I want to support interfaces coming and going without needing to restart erbium, as well as erbium dropping permissions (which, to be fair, it doesn't do at the moment), so it wouldn't be able to start listening on a new interface after startup.
I could, I guess, add a "dhcp-listen-addresses: [192.0.2.1]" or similar for people who specifically don't want it to listen on all interfaces.
from erbium.
FWIW:
- When an interface goes, it is fine that it takes
erbium
with it. - I have no idea how network daemons should cope with bouncing interfaces, but I fear the idea of a running network daemon that is unaware of a returned network interface.
- Listening on 1 interface will allow running various
erbium
instances for various interfaces.
from erbium.
Listening on 1 interface will allow running various erbium instances for various interfaces.
is to express that
I could, I guess, add a "dhcp-listen-addresses: [192.0.2.1]" or similar for people who specifically don't want it to listen on all interfaces
is indeed a solution to Error: I/O Error in DHCP: Address already in use (os error 98)
from erbium.
I've given this quite a bit of thought over the last few weeks, trying to figure out the right balance.
-
Do I have a global
listen-addresses
(or possiblylisten-interfaces
) for all protocols? Or do I have a per protocoldhcp-listen-addresses
/radv-listen-addresses
/dns-listen-addresses
(or their equivalent ${protocol}-listen-interfaces)? Or both? What should the semantics be if you, say, specifylisten-interface: ['eth0']
anddhcp-listen-address: 192.0.2.1
? Are you interested in listening on an interface, or listening on an address? -
Having one erbium process process per interface is a bit odd when I finish up the DNS support, as you'll end up with an unique DNS cache per interface. Is this the right thing to do?
-
I still would like to make it that you can (although don't necessarily have to) start erbium before an interface is available, and let erbium handle the interface coming and going.
from erbium.
Related Issues (20)
- doesn't say where it's attempting to read configuration from when it fails
- Example configuration file HOT 1
- Build failed on nixos... HOT 6
- doesn't print usage information on --help or -h HOT 3
- add lldp support
- dhcp should populate the arp table
- dhcp should support dhcp relay
- dhcp should support rfc8925 (ipv6-only prefered)
- add ntp support
- add mDNS support
- dns ratelimiter needs tuning.
- dns should support dnssec
- experiment with multiarmed bandits for choosing which dns server to forward to.
- Add goals / requirements document
- Support RFC8914 (extended DNS errors) HOT 1
- exits with exit code 0 when configuration can't be parsed
- 100% CPU usage just after starting erbium HOT 2
- doesn't handle IPv6 domain name servers - Add support for RDNSS HOT 3
- Request: Publish as crate HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erbium.