Giter VIP home page Giter VIP logo

Comments (19)

infusion avatar infusion commented on June 11, 2024

Hi,

thanks for your ping! Your changes look impressive! The time when I started this project, async code was not a thing. So I'm totally in favor of going a step forward.

I have to test your fork and look into the code in greater detail. But all your improvements are long-awaited and I would look forward integrating these features :) Did you make any cuts in terms of generalizability, which were only useful for your very use-case?

What would be your idea of integrating your fork into the main branch? Can it be seen as a full replacement? If not, would you like to work with me together on bringing these features into the main branch?

Robert

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

Why are you using a dual licence ?
a mix of 2 open licence is unusual.

from node-dhcp.

infusion avatar infusion commented on June 11, 2024

I chose a dual license to match different requirements. Practically, it's MIT, but to embed it into an environment where GPL is used, you can use the GPL part.

from node-dhcp.

XantheFIN avatar XantheFIN commented on June 11, 2024

Broken here when try test:

`Error: Cannot find module 'debounce'
Require stack:
- /lib/leaseStore/LeaseStoreFile.js
`

or?

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

extract from package.json:

  "dependencies": {
    "debounce": "^1.2.0",
    "fs-extra": "^8.1.0",
    "minimist": "*"
  }

debonce is here, so maybe you should make a new npm install.

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

I have just finish my heavy refactor.

Leases are now completely new, and leaseStatic support tags, like dnsmask.

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

anyone know how works Options id
150 151 159 160 ?
100 101 120 132 133 ?
I do not knows they types.
I can not find they configuration name.

I use this page to find some data:
https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml

But some optionId are vendor dependent ...

some more change and this project will be able to compete old school classic DHCP server.

from node-dhcp.

XantheFIN avatar XantheFIN commented on June 11, 2024

I see it had still some typo but now got running. Tried with WinXP laptop and it has still failure to give correct DHCP Offer message so it fails.

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

Okey, you should wait some days, to let me finish my devs.

from node-dhcp.

XantheFIN avatar XantheFIN commented on June 11, 2024

Sure! Sorry and thanks.

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

I have just setup the dhcp server, but It do not receved any discover multicast message.
How to be shure that the server listen to the proper network interface (I have 6 ethernet port on my server)

the mail UDP socket is initialied with:
const socket = createSocket({ type: "udp4", reuseAddr: true });

but there is no reference to an interface name.

I make all my developpement on a windows host, the production is is an ubuntu server.

from node-dhcp.

XantheFIN avatar XantheFIN commented on June 11, 2024

As far as i know there is no specific interface and you need manually setup IP for that Ethernet port (i mean IP, netmask 255.255.255.0 or same you congifured in config, and router IP).

IP and router IP need be same and same on config file for server.

It listens 0.0.0.0 as to get messages which means all IPv4 messages on host machine... When i originally loaded project there was broken broadcast address which was not passed correctly to dhcp.js file which too made it not working.

And if you try pass via config file ip with assigned mac address it is broken still by this day until mac styling is fixed to be same on everywhere on project (including hard coded test files which uses hyphen styling for not any specific reason as far as i know as linux supports colons too).

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

If I bind socket 10.5.0.1, I do not receive any DHCP Discover.
If I bind socket 10.5.255.255, I do not receive any DHCP Discover.

Update: If I bind socket 0.0.0.0, I receive all DHCP Discover....

My set is:

  • enp1s0 => local
    IP 10.5.0.1
    network 10.5.0.0/16
    gateway None

  • enp2s0 => Internet service provider 1: (xDsl)
    IP 10.12.0.3
    network 10.12.0.0/16
    gateway 10.12.0.1

  • enp3s0 => Internet service provider 2: (coaxial operator)
    IP 192.168.1.225
    network 192.168.1.254/24
    gateway 192.168.1.1

  • enp4s0 => Internet service provider 3: not setup yet (will be 4G)

  • enp5s0 => Internet service provider 4: not setup yet (Will be fiber)

  • enp6s0 => Internet service provider 5: not setup yet (will be an other xDSL)

But I only want to reply to DHCP on enp1s0.
So... maybe I can try to guess the incomming interface for each UDP, in the last case I will filter that with an IPtables.

an Idea ?

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

update it's not multicast but broadcast.
in nodeJs doc only multicast have call to specified an interface

socket.setBroadcast(true); should be the only needed call but it do not work's

to continue my test I use an basic iptables:

iptables -I INPUT -p udp --dport 67 -i '!enp1s0' -j DROP

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

Hi,
I found some time to resume my fork,
the news:

  • This server do not support binding a single interface, the issue #37 had never been implemented.
  • I have start a rebuild an ReactJS Backoffice ton configure the dhcp + HTTP Proxy + routing interface.

from node-dhcp.

aquamoth avatar aquamoth commented on June 11, 2024

Any chances you will get this work completed and maybe make an npm package from it?

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

I need a to bind an UDP pour on a specific interface.
I tried with an iptables, but that a nightmare using this way.

I wish deno will support interface binding, so I will move to it.

for now I'm stuck.

from node-dhcp.

szekelyisz avatar szekelyisz commented on June 11, 2024

@UrielCh You can use the setsockopt call for that on Unix-like systems, not sure about Windows.

Check out this stackoverflow thread and this package.

from node-dhcp.

UrielCh avatar UrielCh commented on June 11, 2024

Thx for the link,

But for now, I'm switching from NodeJS to Deno, So can not check that.

from node-dhcp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.