What is use of diagnostic address in software cluster? - autosar

The SoftwarePackage download to UCM Client may be through OTA or UDS(diagnostic client to diagnostic management).
Base on EXP_PlatformDesign:
Diagnostic address: in case package is coming from the tester via UDS
for instance
Looks like download via UDS needs the diagnostic address for some purpose. (which I want to know)
But for my understanding,
The diagnostic address is not for the transfer software package! it's used for the diagnostic of the installed SoftwareCluster.
In other words, it's unnecessary to use the diagnostic address to establish the connection of UDS during the SoftwareCluster installation.
So EXP_PlatformDesign is wrong or I misunderstood.

The diagnostic address of a SoftwareCluster is for doing diagnostics of the SoftwareCluster itself. It is not used for the transfer of the SoftwareCluster.
For the transfer of a SoftwareCluster the address of the software that participates in the transfer is relevant.

Related

centos azure vm with broken firewall

I accidently broke my centos VM in azure by twiddling firewall rules within it. After a reboot, the normal ssh access is not working anymore. Is there any chance to get into that VM, any console login directly to the machine somehow?
After reading the current state (April 2016) at microsoft about this, I've decided to dump the virtual machine and set it up again:
This one-directional access is just a start. Console screenshots and serial output can help identify a problem, but they are not the solution for resolving the problems. We are working on enhancements that will enable secure bi-directional access to the console of the virtual machine. This will enable additionally debugging capabilities, and, more importantly, the ability to resolve a set of common problems through the bi-directional access. Right now, I don’t have a timeline but we know this is critical.
(article)

How to trace the outgoing request call using wire shark

I'm working on windows azure project and trying to use out of box azure tool. This tool seems to make lots of outgoing request to azure APIs. Unfortunately, most of the IP addresses are blocked by our internal firewall. Security team has requested a range of or specific IP addresses so that they can open port.
I've tried to use Wireshark to track outgoing IP addresses. Sadly, there are so many stuff going on on the trace. Could someone help me how to setup/configure wireshark such that it logs the outgoing requests for specific application?
Thanks.
This tool is what you want. Just learn how to use Wireshark filters.
Try Microsoft Network Monitor.
Take a look at Petri and read this blog:
Microsoft Network Monitor - Part 1
I like to point to this picture.

How to get Network Statistics of a Remote PC

H!
I have to make an application in vc++ which can get the network statics of remote PC.
Is any one can help me to solve my problem?
Since you said vc++, therefore, I assume that you have to do this in Windows environment. Have a look at SNMP protocol. And How it can be used to get information of remote machines.
Look at this SO Question as well.
Depending on the network statistics that you want to capture, you may find that (as Aamir suggested) SNMP is a good choice.
There are standard MIBs defined that will provide a number of network statistics. Three that are worth investigation are:
IF-MIB,
RMON, and
Etherlike MIB
NET-SNMP is a good library for accessing SNMP information and is available for Windows (as you've mentioned vc++). Others are available.
This does assume that you have an SNMP agent running and accessible on the remote machines that you wish to monitor.

Webify embedded linux-based controller through cellular network

Need a basic direction in the following project.
There is a linux based controller doing some industrial control stuff.
The box is equipped with cellular modem and is capable to get online through cellular carrier. Cellular communication is used because controller is mostly installed where no cables or short range radio is available. Places where sun don't normally shine :)
The task is to allow internet clients to connect directly to the box for some basic control/monitoring stuff. The problem is connectivity - how clients will discover the box? - I'd like to have the box act as a server (if possible). Assuming that cellular carrier allows the box to get online doesn't necessarily mean that the box will get public IP so that anyone would be able to get connected. To my understanding the cellular network acts as a gateway from those who are working inside of it, and reaching someone in that network from outside isn't possible. Am I wrong? We are looking for a generic solution, not a solution around particular cellular provider. The controller is installed in different countries, we need to find the standard way to "webify" it.
The software (and hardware) in the box is ours, we can basically do anything, but I am looking for the right way to do it in order to avoid surprises with different providers later. BTW, the solution doesn't necessarily have to be technical, may be it's possible to buy a permanent IP's per box, or setup VPNs.. Which way should I dig to? What questions to ask?
Your ideas are welcome!
Your summary of the problem is basically correct. I've implemented several systems that do this, and the odds of success are good.
The way you tackle this will depend on the number of remote units you expect a single user to interact with. If each user will handle only one or two devices, it's plausible to implement the web server on the remote device. If each user handles many devices, consider centralising as much administration as possible. I've implemented this using Zenoss for data logging, and a custom control server.
If the web server sits on the remote device, you can either buy a SIM with a static IP, or use a proxy server. I recommend setting up a proxy server unless the number of devices is very small.
There are three options for SIMs:
Static IP with an address on the public Internet will be expensive, and negotiating the deal with each provider in each country will be irksome. No proxy server is required.
Private APN SIMs will give you the option of a static address, but in a private address range. Negotiation with the mobile network is still required, and you will require a proxy server to sit between the public Internet and the private address range,
Standard data SIMs will connect to the Internet through NAT. You can use these to host your service by opening a VPN connection (we used openvpn) to your server. You can now reach the devices directly by connecting to the same VPN, or through a proxy server.
If you use openvpn, here are some more tips:
Give each unit a public serial number, and a private key. Store these in the firmware of the unit, and in a central database. Put the public serial number on the outside of the unit. You can use an openvpn login script to ensure that a particular unit always appears at the correct IP address, which keeps the proxy configuration static.
You can control openvpn's bandwidth usage by adjusting its keepalive behaviour, and how often it renegotiates. Measure and tune this before a large deployment.
The NAT timeouts in the mobile networks are generally between 5 and 15 minutes. The device must send a packet to the server often enough to keep NAT alive.
Cheap SIM deals may be web only with limited ports.
Other tips:
GPRS modem firmware can (rarely) crash internally. If your hardware supports it, provide software with the ability to power cycle the modem.
Test your box in areas with poor coverage in your own country before you send out international shipments.
This is a typical problem with "mobile agent" appearing in different places or using different providers (in this case just one provider, but it's almost the same). Usually it's solved using some kind of home agent - a server that the mobile connects to and gives details about how to reach it or if it can't be reached directly then the home agent acts as a proxy.
Client always contact the home agent first and then if it is possible they contact the mobile or if it's not they use the server as a proxy.
In some cases dynamic dns might be sufficient in other you need real proxy/ façade.
There's a good book: Andrew S. Tanenbaum & Maarten van Steen :"Distributed Systems: Principles and Paradigms"
You can ask cellular provider to give you a SIM card with internet access and fixed IP address. Then you can host any server you like. Do not forget that you are dealing with limited bandwidth.

Doing ARP and Inverse ARP on Linux 2.6.21 (glibc 2.3.5)

I need to store persistent reference to third party device on an arbitrary IP network where the IP address of the devices may be static or randomly assigned by DHCP. I don't control the devices on the network and I can't rely on DNS and other ad-hoc networking protocols existing or working with the devices.
So I have been instructed to investigate using hardware addresses and ARP. This will work but I don't want to duplicate code. The kernel must manage an ARP table. On Windows you can access it using GetIpNetTable etc.
I am hoping there is an API to answer these two questions:
How do I translate from IP to MAC address? (ARP)
How do I translate from MAC to IP address? (InARP)
If not then I may have to do it more manually:
How do I read the kernel's ARP table?
How do I add an entry if I have the determined a mapping myself?
/proc/net/arp
K
ARP tables tend to be fairly local and short-lived. If you examine the protocol, the real MAC addresses are generally only provided when the given IP address is in the local subnet.
Otherwise, the packet is forwarded to the local router, which is then responsible for forwarding it.
If you do "arp -g" on Windows or "arp -a" on UNIX, you'll see the table, but I don't think it will do you any good, due to the reasons mentioned above. That command and
That's really what DNS is for but, as you say, it may not be an option for you.
You may well have to write your own 'ARP' database at your application level.
As for ARP:
You could use system("/usr/bin/arp -option_of_choice"); and parse the output, but that's an ugly hack. -- Not my recommendation.
Take a look at /usr/include/linux/sockios.h -- At the SIOCGARP, SIOCDARP, and SIOCSARP details. Those are ioctls that you can perform to manage the ARP table on linux. Of course, you'll have to perform these ioctls on a socket fd.
Here's some examples: SIOCGARP examples
I'm sure you can find many other examples in several other languages as well. As I'm assuming that you're using C.
As for RARP:
A quote from the linux rarp manpage:
" This program is obsolete. From version 2.3, the Linux kernel no longer
contains RARP support. For a replacement RARP daemon, see ftp://ftp.demen-
tia.org/pub/net-tools"
So you'll have to install rarpd on the target system.

Resources