IP Multicast - would this work on my dual homed embedded Linux device? - linux

I am working on an embedded Linux project. It has a cell modem that comes up as ppp0 and a single Ethernet interface eth0 that may or may not be connected. The cable could be unplugged at any time from eth0 or may never be plugged in.
Is it possible to setup multicasting so that it could intelligently send the outgoing traffic over eth0 if it's up, otherwise over ppp0? If so I would be very interested on how to do this.
Thanks,
Fred

Related

How to detect disconnection of usb0 device (USB gadget aka g_ether)?

Two Linux machines (embedded board and PC) are connected to each other via USB cable, and communication is established via USB gadget/Ethernet. Both sides have IP address, ping works, etc.
I need to find a way to detect USB cable disconnect on the board side, ideally with a single Bash command.
ifconfig usb0 still shows IP address and that device is "UP" and "RUNNING" even after unplugging the cable.
In my particular case it turned out to be HW+SW issue: driver (atmel_usba_udc) is using USB power (VBUS) to detect connection, since it's acting as a slave and power is provided by host. However in PCB power is provided unconditionally by the board itself for all USB ports at once.
Normally any standard method should work: ifconfig or sysfs.
One way to do this is to check the file:
/sys/class/net/usb0/operstate
If the file content is "up" then the link exists. If the content is "down", then there is no link.

How can I do a http.request using a different gateway?

I have one network connection on my Macbook Pro. It is configured by my ADSL modem by DHCP. That modem is on 192.168.1.1 . I also have a cable modem connected to the network. I switched its DHCP server off. It is on 192.168.1.254 .
How can I connect to a URL using the cable modem?
I think I have to set up a vlan which I then can use by setting the localAddress option of http.request. Am I right?
Ok, I found out that it is not possible with one ethernet interface. So I bought another usb to ethernet adapter. Now one is configured by DHCP. The other is configured by hand. In node I use the localAddress to set which interface to use.

Change TXPower of Probe Requests

Setup: Kali Linux, VMWare Fusion, Mac OSX Host, TPLinkWN772 or ALFA.
I am aiming to reduce the TXPower of a wireless interface in order to assess the impact that it has upon RSSI values. When connected to a network it is easy enough
iwconfig wlan0 txpower 10
However if I am not connected to a network the power will not change. Does something else govern the minimum level that is used for probe requests?
I think your wireless card must be down to do that. So, you must do:
ifconfig wlan0 down
iwconfig wlan0 txpower 10
ifconfig wlan0 up
Some cards doesn't support that.

Linking Bluetooth and Ethernet packets

If I am listening to Ethernet packets going across a Wi-Fi network using a card in monitor mode, and listening to Bluetooth packets using an Ubertooth, is there any way to link both types of packets to devices? As far as I am aware there no commonality between the Bluetooth BD_ADDR and the Ethernet MAC address of a device.
Essentially: is there a common denominator in Wi-Fi and Bluetooth packets that can be used to link the two?
Edit: just to add, the device in question is a smartphone.

Why are external NICs not working on my server (running on Debian 7)?

I have a server running Debian 7. The eth0 interface is configured to use the on-board ethernet card. This is basically used to connect to the internet. As it happens, I had to connect this server to some PCs through a switch, obviously on a different series of IPs. for this, I installed an external NIC in the PCI slot but, strangely it didn't seen to work. The configurations were alright. I checked them more times than I can imagine. So, I disabled my eth0 interface and connected eth1 (external NIC) to the internet. If for the same settings, the on-board card worked, so should the external one. But, it didn't. When I tried to ping some servers like 8.8.8.8, it gives me Destination Host Unreachable and on termination shows, 0 packets "transmitted" and 0 packets received, which is baffling, to say the least. The PCI slot is working because I checked if the drivers were being recognised or not. The NIC itself is working (checked with another machine running Debian 6). Any help/sugesstions would be appreciated.
P.S The NIC in question is D-Link System DGE-530T Gigabit Ethernet Adapter (rev 11)
You need to check to see if the card is being listed in lspci or not. Second, is this a virtual machine?
I would also check to see if the BIOS is handling IRQ's in auto or are they specifically assigned.

Resources