Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign two MAC addresses to a device? #724

Open
DickenSerm opened this issue Jul 4, 2024 · 21 comments
Open

Assign two MAC addresses to a device? #724

DickenSerm opened this issue Jul 4, 2024 · 21 comments
Labels
Feature request➕ New feature or request

Comments

@DickenSerm
Copy link

My laptop is recognized as two devices, once via the MAC address of the WLAN card and once via the RJ45 network card. Is it possible to assign two MAC addresses to one device?

@jokob-sk
Copy link
Owner

jokob-sk commented Jul 4, 2024

Hi @DickenSerm,

No, currently that's not possible. MACs are unique identifiers and each new mac generates a new device.

@DickenSerm
Copy link
Author

I think that's a bit of an unfortunate solution, as the number of devices is rather meaningless.

@jokob-sk
Copy link
Owner

jokob-sk commented Jul 4, 2024 via email

@DickenSerm
Copy link
Author

Wouldn't it be possible to say "you are not a device, but a card of this existing device" on a new device? And then have it listed on the existing device as a second MAC address.

@jokob-sk
Copy link
Owner

jokob-sk commented Jul 4, 2024 via email

@DickenSerm
Copy link
Author

I was thinking of a manual selection option that would be ignored by default if you don't select anything.

@jokob-sk
Copy link
Owner

jokob-sk commented Jul 4, 2024 via email

@DickenSerm
Copy link
Author

Yes, in principle. My main concern is that the device count is correct.

So I don't have the laptop listed twice under devices and it isn't counted twice.

@jokob-sk
Copy link
Owner

jokob-sk commented Jul 4, 2024 via email

@DickenSerm
Copy link
Author

I find it confusing when 90 devices are shown to me, but in reality I only have 45 physical devices (exaggerated example).

The idea with the extra view for physical devices is a good idea and would be completely sufficient.

But I would then call this view devices and rename the current devices to interfaces or something similar.

@jokob-sk
Copy link
Owner

jokob-sk commented Jul 4, 2024 via email

@DickenSerm
Copy link
Author

Glad she even thought about it :)

I don't have any further suggestions right now, but I'll think about it :)

@vladaurosh
Copy link
Contributor

I agree with @jokob-sk
This is network scanner so 2 nics are 2 network devices.
How do you handle if your RJ45 is disconnected and wlan is connected? How to show in UI which one is offline/online?
Also given that UI has IP address info, how this would look like for a computer with 5 nics?

@jokob-sk jokob-sk added the Feature request➕ New feature or request label Jul 4, 2024
@FlyingToto
Copy link
Contributor

Stepping back a second, the same issue applies to any devices with multiple interfaces like routers...
IMHO, it would make sense to think of a way to use a compound unique key in the database like:

nodename+mac+ip+hostname (circa old SystemV unix).
nodename = device name (1 per machine)...
hostname = name associated to specific IP (1 or more per IP)
mac = 1 per interface

Then in the plugins/screens/reports provide views by nodenames (ie devices) vs by hostnames/ip or MAC...

This wouldn't be trivial to implement, most likely the core DB needs to be quite updated and most plugins will need some adapters or rewritten... but this should allow to handle any L1-L3 assets...

of course, one could also ask to consider Layer4... nodename+mac+ip+hostname+PORT
this would allow to perform further services levels inventories/monitors...

@sanvalerius
Copy link

Hi, first of all thanks for the work done !

I vote for a feature like this, I have the similar use case, for example a tablet device that present 2 entries (different macs) depending on if it connects to the WiFi 5Ghz or the WiFi 2.4 Ghz..
The @FlyingToto approach seems good to me.

@stanelie
Copy link

stanelie commented Oct 7, 2024

+1 here too, I have several laptops that connect either through wifi, their ethernet port or the ethernet port of their docking station. A way to "group" such devices into 1 unique device would be better to establish "presence".

@stanelie
Copy link

The way they implement this on a TP-Link Deco router I have is they use this for parental control. You create a profile, say "kid1", and then you assign one or more devices to it. So, it is a distinct list of items. This list would be very useful to display a "person present" list.

@eagle79
Copy link

eagle79 commented Jan 13, 2025

I'm not sure this helps with the device count, but I could imagine a Jira issue-styled device "link" element. You could have the ability to add a link with a type from one device to another. One of the link types could be "is same physical device as" or similar. Probably a catch-all link type as well (something like "is related to"). And, of course, the ability for the user to add their own custom link types.

@jokob-sk
Copy link
Owner

@eagle79 thanks, could you elaborate how would this influence the behavior of the listing page(s)?

Also - what other link types would you have and again, how would that influence the app behavior:

And, of course, the ability for the user to add their own custom link types.

Since you are talking about Jira you can form your answers in this user story format to add more context:

As a I want to be able so that <reason, use case>

@eagle79
Copy link

eagle79 commented Jan 13, 2025

@eagle79 thanks, could you elaborate how would this influence the behavior of the listing page(s)?

Also - what other link types would you have and again, how would that influence the app behavior:

And, of course, the ability for the user to add their own custom link types.

Since you are talking about Jira you can form your answers in this user story format to add more context:

As a I want to be able so that <reason, use case>

To be sure, I don't really need this feature, but the OP seems to want to be able to associate multiple MACs with a single device. Since MAC seems to define uniqueness of a device in the system (which does seem logical to me), that would be difficult. However, I think it's reasonable to want to define links or associations between devices (in the same way you can form links between issues in Jira). So as a use case:

As a user, I want to be able to associate/link a device with one or more other devices, defining what the association/link means. As an example I have a laptop with both a wired and wireless connection, which both have their own MAC. Because this laptop appears as two different devices in the system, I'd like to create a link between them (as a data element on the device details page) that indicates that they are the same physical device (e.g. on device for the wireless MAC, "This device [is the same as] [John's Laptop (wired)]" (the latter element would be a link to the wired device). Further, I'd like to be able to create such links between any two devices with any customizable meaning I desire (e.g. "This device [is on host] [ESX Server]").

In Jira, such links have text for both directions (which can be the same). For example:

  • (on BUG-1234) "relates to BUG-1235" and (on BUG-1235) "relates to BUG-1234".
  • (on BUG-4321) "duplicates BUG-5321" and (on BUG-5321) "is duplicated by BUG-4321".
    See Linking Issues | Jira Software for more.

I'm thinking the "is the same as" link would be of the former variety (same text in both directions). While this doesn't directly fix the OP's concern about device counts, it at least does allow him to note that a given device is associated with another device.

I should note - as described, this wouldn't necessarily influence app behavior at all... it's just additional data. That said, it could influence the app behavior if you start using that data to control how listings filter or sort devices.

@jokob-sk
Copy link
Owner

Thanks a lot for the detailed description @eagle79 , appreciated. I'll see what others think about app behavior, because there might be implied expectations. So the more clarity the better. Listing and displaying devices is one thing, influencing notifications is a whole new beast.

The idea of different links is interesting, but not sure the complexity to build and maintain this forward (maybe not obvious, but it's only me vs Atlassian lol)

Either way, interesting idea, will keep in mind when deciding on an implementation approach 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request➕ New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants