I would like to know what are the steps to get the exact port number of the switch my pc is connected to. I'm advised SNMP can solve that but i have so little background about networking. If it really can supply me the port number then how do you do it? If possible, I would like to ask the detailed steps like what do you need to download beforehand etc. And if there are any other simpler ways to get port numbers through the command prompt only, any help would be very much appreciated. Thanks in advance!
Basically you should correlate data from different MIB tables:
Management MIB2 Interfaces
Ethernet MIB dot3Stats
Management MIB2 dot1dBridge
Related
I am trying to set up a simulation of an Ethernet net work in CANoe. This network has two nodes ("input" and "result"). The input node should receive a data stream from the "outside", e.g. another program on my computer. The idea was sending simple data (e.g. 101010 as bits) via TCP/UDP to the input node. This node then transfers these bits to the result node, which simply outputs the received data. So much for the basic setup.
What I am not able to accomplish is the connection from the outside into the CANoe simulation aka the input node. After hours of reading the CANoe help I am still not sure if that is even possible. So has anyone tried something similiar like this or has an idea how to approach this?
I hope it is clear what I want to achieve. I am relatively new to CANoe, so maybe my complete approach is wrong? Some input or alternative ideas would be appreciated.
It is definitely possible. CANoe allows usage of CANoe TCP/IP Stack to isolate Ethernet Communication from ECUs from Windows/OS ethernet communication. To use operating system stack :
In CANoe> Simulation Setup> TCP/IP Stack :
Select the Ethernet network used, set TCP/IP Stack Configuration for the particular network should be selected as "No TCP/IP Stack, use network of operating system"
This way CANoe will have access to windows system network adapters.
I'm trying to figure out, how to connect two hm-10 module, when I do not know the slave MAC address. Imagine you have an electric longboard and lost you remote. You got yourself a new one and now want to pair with the board.
In the data sheet I cannot find any useful functions, to make this process easy.
I thought about making an unique name of the slave device and by making a pairing button on the master device. The pairing button would set the master device in the pairing mode (AT-ROLE1, AT+IMME1 in order to execute AT+DISC?). The results of the AT+DISC? command would be saved to an array and after finding the unique name of slave device, the index of the device/MAC address would be saved and used as a parameter for establishing the connection.
I'm using the firmware version v707.
The problem is, I do not find this solution as elegant and I think there must be a better way to do that, but I cannot find any information about it. Did anyone tried to do that and maybe has some insight? I'd very much appreciate it.
Only way I can think of on the HM10 is setting a unique name and scanning for that name.
Another way I have seen is some devices allow you to see service UUIDs in the advertising information so you can connect to the device that has the desired service UUID. But this doesn't seem possible on the HM10
Anyone knows how to publish Network cost information element (explained here https://msdn.microsoft.com/en-us/library/windows/hardware/dn391819.aspx) using dnsmasq or by any other means?
This is for vendors and WiFi-driver hackers. You can use something like 'hostapd' to add this to your hotspot. It is communicated inside the WLAN beacons so one need to knows a thing or two about WiFi drivers.
I would like to look at all the devices in my network . I would like to do it using the command line .
Is it possible , Please give me directions the name of the tool that would help achieve the purpose .
You need to elaborate on what you mean by 'look' and 'network'. A network could be anything. Do you mean devices on the same subnet as yours? Probably on the same Ethernet cable?
There are scanners that can scan your subnet and spew out a list of IP addresses that respond to an ICMP echo (Ping).
You could take a look at 'nmap' too if you want to get additional information about these devices.
You might want to post that on:
superuser.com
StackOverflow is more geared toward programming, whereas superuser is more geared toward questions such as 'What commandline tool can I use to do xxx?'
There are two common tools, available for linux, windows and other platform.
nmap
snmp
For the second, you can try to send a snmpget to your local broadcast address, community public and oid SysName or SysDescr.
I'm doing a project where I must write a network library for a device connected to a Windows machine. The complication comes in that I may only communicate with the device using ethernet frames. So there is no TCP/UDP/IP at all. I don't think the bind/listen/accept approach can be applied here, but maybe I am wrong. Also, there is no routing or switching involved.
I have a few questions. How do I use a socket to communicate with this device? Does winsock have any support for just frames? I haven't been able to find many resources on this. Does anyone have any ideas about how I should proceed?
Is using sockets even a good idea or can I just send out the information with the appropriate headers?
Use WinPCap, it has an an API to send and listen to raw data.
You can build your communicate layer with it.
Give the WinAoE code a look-see - it says it lets Windows talk to ATA over Ethernet devices which means it has to communicate without any of the upper layers of the network stack.
Edited:
As near as I can tell, if you want to send raw ethernet frames, you want NdisSend and friends.
As well as winpcap and NDIS you could also look at raw sockets which are a standard part of the Windows API and don't require you to write driver code http://msdn.microsoft.com/en-us/library/ms740548(v=vs.85).aspx.