How to uniquely identify devices connected to the GW in Thingsboard - device

I am using ThingsBoard (https://thingsboard.io/) version 3.4.1, OS: Ubuntu 20.04 LTS.
I know how to connect devices to the Thingsboard and send data and creating dashboard etc. Previously I had connected my GW to the Thingsboard with which only one device was attached. But if more than one devices are attached to one GW (the usual case) how to uniquely identify the devices?
Thanks

Device name should be unique.
Each time gateway sends data on behalf of real device gateway adds to data the name of real device.

Related

How do I add, delete or modify a flow using opendaylight?

I have set up an SDN using Open vSwitch and OpenDaylight.
I have two machines with Ubuntu and I am using KVM to simulate two devices (for now). I have two other devices in the network. The OpenDaylight Dlux network topology shows an openflow switch and five hosts - the two virtual devices, two real devices and the one machine; the other machine is the one that has ovs and odl and the KVMs.
Now I want to play with flow control... From one of the virtual devices, I can ping the other host/machine - traffic flows from the host through the openflow switch. I am working on setting up a samba server so that I will be able to wget a file from that machine. BUT ultimately, I want to change the flow, so that when I try to download the file, it will instead go from the host through one of the real devices.
I am having trouble locating relevant documentation about how to add/modify/delete a flow using opendaylight (that I can understand). Maybe that last part is the actual problem, but thought I would ask here for some guidance!
if you want to play with flow you have to use opendaylight openflow plugin here the user guide link
http://docs.opendaylight.org/en/stable-oxygen/user-guide/openflow-plugin-project-user-guide.html
you can install postman and send the request to the openflow plugin,,, you can change flow on each port , QOS, flow timeout, ..etc.

snmp network discovery identify mac address of device connected to a router

i am working on a network discovery program which employs snmp to discover devices in the network. My program takes the router-ip as input, scans the iprotetable(iprouttenext hop),to determine if any other routers are connected to it. for non router devices (like switch) the algorithm scans the arptable (ipnettomediatable) of the router, but cant find the connected switch unless i ping from the switch to the router. is there any way where i can determine the device connected directly to the router ..?
Getting the devices connected to a router or switch is not that easy. Switches usually maintain a MAC forwarding database where it stores which MAC address has been seen on which switch port. This table can be easily read by using the bridge MIB. Unfortunately, there are several issues to take care of:
Those entries disappear again, when a device to the switch has been switched off or is simply not communicating. Usually, the entries in the MAC forwarding tables age out after 5 minutes or so.
The fact that a MAC address has been seen on a switch port doesn't mean that the device having the mac address is directly connected to the port. There might be any number of other switches, routers or hubs inbetween.
Some manufacturers like Cisco or HP use their own protocols to determine the network topology. There are several protocols (that area usually also available through a SNMP MIB):
CDP (Cisco Discovery Protocol): This is a proprietary protocol developed by Cisco to expose network topology information. Some vendors licensed this technology and implement that protocol in their products.
LLDP (Link Layer Discovery Protocol): A standard similar to CDP, but without paying Cisco license fees :-)
And many more. I know kthat Extreme Networks has their own protocols and I am pretty sure that other vendors have them as well.
The problem with those protocols is when you have a mixed environment. Cisco switches talking CDP do not understand Extremen Network's protocol and vica versa.
If your goal is to find IP addresses to discover, then you might use the ARP caches for routers. Scanning the ARP caches for switches makes no real sense, because they're operating on layer 2.
I was using broadcast message for my java snmp agent

UDPAnySourceMulticastClient works only in Wi-fi?

I am developing an application in which device discovery in a network is required. I am using UDPAnySourceMulticastClient in windows phone 7 for discovering desktop clients. Whenever I connect desktop to a D-link or wi-fi connector, I am able to discover desktop in my wp7.
But my problem arises when I connect desktop through ethernet to some network and connect wp7 to the same network that desktop is using I am not able to discover desktops(Even though I am sending message to the group). Is it UDPAnySourceMulticastClient works only if both are connected through wi-fi network?
Thanks in advance
UDP multicast is dependent upon the hardware used to make the network (routers, etc.) to rebroadcast the message to all other clients. While more complex scenarios are possible, it's unusual for multicast to be enabled for anything other than communications connected to the same wireless hub.

snmp, how to retrieve ip connected to the router with MIB-II

I want to create a program that acts as manager and that queries the router (or sets a trap) to obtain the list of ip connected to it. My router has these functionalities: SNMP v1, v2c, built-in MIB-I, MIB-II agent.
Is it possible to retrieve these informations quering the MIB-II agent of the router in a standard way (not vendor dependent)?
Bye
The Address Translation table (OID .1.3.6.1.2.1.3.1) contains arp table of the device.
This will show you list of all devices from the network, which are (or have been recently) sending some traffic via router.

Headless Linux -> broadcast IP to Windows workstation?

I'd like to sell headless Linux servers to SOHO users. Typically, they'll have a DHCP-capable ADSL modem cum switch to which they'll connect their workstation and the server.
In order to just show up with the server, I need to find a way to just plug the server into the switch to get an IP address from the modem, and then have the server broadcast its adresse so I can then connect to it with Putty from the workstation.
I thought about using Samba to broadcast a message using the Messenger Service, but unless I'm mistaken, this only works if the two hots are configured to use the same workgroup/domain.
Do you know of way to get the server's IP address from the workstation?
Thank you for any tip.
Take a look at UPnP and zeroconf services like Apple's Bonjour.
I'd probably suggest using the normal approach for switches and modems as you are treating your device as an appliance, i.e. set a default IP 192.168.0.1, and connect to that to then configure the device into the local infrastructure.
I don't know of any good solutions.
Some DHCP servers will register the name you send in the request - then give that name in your setup instructions. But I suspect home user DSL routers aren't in that category.
Maybe you could ship a tool on CD that does arp requests to get the IP address? (Given the MAC address printed on the box)
Broadcast packets periodically on some arbitrarily chosen UDP port, and build some client software to listen for those packets.

Resources