I am developing P2P application in .Net using PNRP
protocol. I have already check tons of materials concerning PRNP and
P2P (SO, Microsoft blog etc). But still cant solve the issues with
clouds. And can`t find exact step -by-step instruction for
proper setting up Clouds and peer name resolving. Everything works
perfectly on local machine (registering and resolving names are ok).
But cloud states for Global and Local always Alone (if i make some
changes sometimes turns to virtual and synchronizing but ended up as Alone). And as result peer names registered on one machine is not
visible on other machine in local network. Ipv6 is supported. Teredo
seems to be working (otherwise global cloud didn't appear):
Scope Id Addr State Name
----- ----- ----- ---------------- -----
3 9 1 Alone LinkLocal_ff00::%9/8
3 5 1 Virtual LinkLocal_ff00::%5/8
1 0 1 Alone Global_
The actions I tried (Win 10 + Win 7):
• disabled firewall for all networks.
• turned on (state: running) and set to Automatic:
○ DNS Client
○ Function Discovery Resource Publication
○ Function Discovery Provider Host
○ SSDP Discovery
○ UPnP Device Host
○ Peer Name Resolution Protocol
○ Peer Networking Grouping
○ Peer Networking Identity Manager
○ PNRP Machine Name Publication Service
• made this actions: https://technet.microsoft.com/en-us/library/dd349394(v=ws.10).aspxLocal
• read and post the same on this blog: https://blogs.msdn.microsoft.com/p2p/2007/07/24/pnrp-debugging-guide-part-1/
• went to Group Policy Editor --> Administrative Templates --> Microsoft Peer-to-Peer Networking Services --> Global Clouds:
○ Turn Off Multicast Bootstrap --> disabled
○ Turn Off PNRP cloud creation --> disabled
○ Set PNRP cloud to resolve only --> disabled
○ Set the Seed Server --> Enabled (leaved empty) and for Linc Local --> Not configured.
But still can`t see registered names of other machines in local
network and resolve peer names. All cloud states are Alone. Any suggestions?
Thank you in advance,
P.S. Ping seed Global_failed, but should not affect the local Cloud?
P.P.S. Ports 3450 and 1900 are opend and added as a rule for Firewall.
Related
I am running a single node Standalone Service Fabric dev cluster. The node is installed on a Hyper-V virtual machine with two network adapters attached to the external host network. The first VM net adapter is configured with a static IP address and is used as the cluster endpoint. The second VM net adapter is configured through DHCP and has an IP from the same subnet as the first net adapter.
I have looked at the topic "Service Fabric container networking modes" (https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-networking-modes). I have enabled DnsService, IPProviderEnabled and ContainerNetworkSetup. The step 2. I skipped, because it is applicable to Azure Resource Manager configuration. I have configured the network type to Open in the application manifest. The service is hosting a docker container.
When I publish the application to the cluster I get Warning events in the Microsoft-Service-Fabric\Admin channel with Hosting Category.
Here are the text of some of the messages:
SFApplication1Type_App6:ebanking2016xg_ContainerPkg#257e8304-637b-4e58-bc13-388542cf6d6c#d526398e-e01e-43fd-b1d4-9cba19bd608c:131816448810648848: End BeginAssignIpAddress. Error FABRIC_E_INVALID_OPERATION
Failed to remove enpoint resource file=C:\ProgramData\SF\vm0\Fabric\work\Applications\SFApplication1Type_App6\ebanking2016xg_ContainerPkg.d526398e-e01e-43fd-b1d4-9cba19bd608c.Endpoints.txt. Error=0x80070002. NodeVersion=6.3.176.9494:0:0.
SFApplication1Type_App6:ebanking2016xg_ContainerPkg#257e8304-637b-4e58-bc13-388542cf6d6c#d526398e-e01e-43fd-b1d4-9cba19bd608c:131816448810648848: End(Setup->EndCleanupServicePackageEnvironment due to error FABRIC_E_INVALID_OPERATION): error 0x80070002
End(SetupPackageEnvironment): Id=SFApplication1Type_App6:ebanking2016xg_ContainerPkg#257e8304-637b-4e58-bc13-388542cf6d6c#d526398e-e01e-43fd-b1d4-9cba19bd608c, Version=1.0:1.0:131816452585647419, ErrorCode=FABRIC_E_INVALID_OPERATION
...
Activate: Activate:SFApplication1Type_App6:ebanking2016xg_ContainerPkg#257e8304-637b-4e58-bc13-388542cf6d6c#d526398e-e01e-43fd-b1d4-9cba19bd608c:1.0:1.0:131816452585647419, ErrorCode=FABRIC_E_INVALID_OPERATION, RetryCount=0
This group of warning messages continue to appear on a 10 seconds interval. And the application stays in Activating status on the node.
When I do not set the network type to Open, the application activates successfully using the nat mode.
So a couple of questions emerge:
Is network type Open supported on a Standalone Service Fabric installation?
What is the required configuration on host, guest, cluster, and node level?
I can connect to AP using the default init.lua from readthedocs. -- https://nodemcu.readthedocs.io/en/master/en/upload/
But DNS does not work and neither does http client.
I edited credentials.lua to match my SSID and password. It successfully connects to my WiFi
I verify it is connected with this example script:
do
local sta_config=wifi.sta.getconfig(true)
print(string.format("\tCurrent station config\n\tssid:\"%s\"\tpassword:\"%s\"\n\tbssid:\"%s\"\tbssid_set:%s", sta_config.ssid, sta_config.pwd, sta_config.bssid, (sta_config.bssid_set and "true" or "false")))
end
Results:
[NodeMCU-Tool] Connected
[NodeMCU] Version: 2.2.0 | ChipID: 0x813d2b | FlashID: 0x1625c2
[NodeMCU] Running "getapinfo.lua"
[NodeMCU] >----------------------------->
Current station config
ssid:"JohnnyCinco" password:"88888888"
bssid:"00:05:4e:4c:3e:0b" bssid_set:false
[NodeMCU] >----------------------------->
I verify I get an IP using this example script.
ip, nm, gw = wifi.sta.getip()
print("IP Address is:")
print(ip)
print("NM is:")
print(nm)
print("GW Address is:")
print(gw)
Results:
IP Address is:
192.168.61.197
NM is:
255.255.255.0
GW Address is:
192.168.61.1
This is the correct IP for this router.
But a simple DNS fails. I created a script with the example from nodemcu.
net.dns.resolve("www.google.com", function(sk, ip)
if (ip == nil) then print("DNS fail!") else print(ip) end
end)
This is the result.
[NodeMCU-Tool] Connected
[NodeMCU] Version: 2.2.0 | ChipID: 0x813d2b | FlashID: 0x1625c2
[NodeMCU] Running "getgoogdns.lua"
[NodeMCU] >----------------------------->
null
[NodeMCU] >----------------------------->
Even though I get a DNS server from DHCP. I changed it to 8.8.8.8 to test again and I get the same failure.
I can create a http server and hit it from other WiFi clients on the LAN, that part works. But DNS lookups and http client requests all fail.
This WiFi AP works for all other clients. There is no firewall. Just to be sure I tried 2 different routers. I also tried a 3rd router that has cellular Internet instead of my cable internet. All fail.
This is on nodemcu version 2.2.0. I have tried both dev and master branches. Same results on both.
I have tried building on nodemcu-build.com and also built on my own linux machine. Both fail.
I have tried 4 different ESP8266 dev boards from different providers. All fail.
What am I missing? I must be missing something basic. This is too basic to be broken. Or is latest firmware broken?
Thanks
J5
I'm new user of openWRT I using a internet wifi in Ubuntu 16.04, I installed openWRT in VirtualBox, I tried to connect to internet but I failed, when I try to ping google.com I get this message **bad address google.com **
Just went through the same issue this morning. You have a good documentation in OpenWrt wiki for configuring your OpenWrt network when running over VirtualBox. The information below is all taken from the wiki, but I can assure that is working for a Barrier Breaker running on top of Ubuntu 16.04. The process is as follows:
With your VM off, open the VirtualBox Network tab and make the following configurations:
Configure Adapter 1 to use NAT
Configure Adapter 2 to use Bridge Adapter + Select your host machine's interface from the menu (the one that appears by using
commands as iwconfig or ifconfig). + disable promiscuous
mode
These configurations refer to the following screens (my wireless interface has the name wlx0022.., yours may be different):
Power on your VM and edit /etc/config/network. Change the two interfaces that the wiki mentions (wan and lan) and put them as it is shown below. Your interfaces may have different names before the change (in my case, the wan interface was wan6).
Your /etc/config/network file should look like this:
config 'interface' 'wan'
option 'proto' 'dhcp'
option 'ifname' 'eth0'
config 'interface' 'lan'
#option type 'bridge'
option ifname 'eth1'
#option ip6assign '60'
Just do the changes you need to in order to have your /etc/config/network file as it is shown above, but leaving the other interfaces in the file unchanged (as they are).
Then reboot OpenWrt. After that I was able to connect and ping to any site.
First,change your network connection in VirtualBox to Bridge Mode
Settings --> Network --> Adapter 1 --> Attached to --> Bridged Adapter
Second,modify /etc/config/network in OpenWRT
config interface lan
option ifname eth0
option type bridge
option proto dhcp
Restart your network by this command :
/etc/init.d/network restart
Note: make sure your host (Ubuntu 16.04) is connected to DHCP server.Then your OpenWRT-VirtualBox should get the IP address from it.
If you want to connect WiFi manually by editing file,
you need to edit mainly 3 files.
/etc/config/network
/etc/config/wireless
/etc/config/firewall
--> I would suggest adding the following portion in your network config file(/etc/config/network).
(make sure you do not have any assigned section for the wifi in the network config file)
config interface 'wifi'
option proto 'dhcp'
--> Also, you need to update the file (/etc/config/wireless)
config wifi-iface 'station1'
option device 'radio0'
option ifname 'wlan0'
option mode 'sta'
option network 'wifi'
option disabled '0'
option ssid 'name_of_the_wifi'
option key 'password_of_the_wifi'
option encryption 'encryption_of_wifi_generally_psk2'
in above setup option network 'wifi' "wifi" will be the name of the interface you defines in the /etc/config/network.[make sure if you have above section you edit the existing one. Do not add new section if you do not know what you are doing]
Here, replace "wlan0" with your wireless interface.
If you already have above section in wireless file,
you can also use uci commands as following,
uci set wireless.station1.ssid=name_of_wifi
uci set wireless.station1.key=password
uci set wireless.station1.encryption=psk2
uci commit wireless
wifi down; wifi
here, "station1" would be the name of the section.
--> In the /etc/config/firewall, find the option zone section where all the interface is defined, which looks like following
config zone
option name wan
list network 'wan'
list network 'wan6'
option input REJECT
option output ACCEPT
option forward REJECT
option masq 0
option mtu_fix 1
option conntrack 1
and add
list network 'wwan'
Command to check Wifi Connectivity: iwconfig
Refer the following link:
https://wiki.openwrt.org/doc/uci/wireless
NOTE: PLEASE READ FROM OPENWRT FORUM OR GOOGLE BEFORE DOING ANYTHING
The Wrong configuration may break the OpenWRT connection
I notice that some of the better network discovery apps like Fing for iOS and iNet for Mac are able to discover the device name of iOS devices and Mac devices even when they are not advertising Bonjour services such as iTunes Wi-Fi Sync. How is this done? I am aware of how to do a reverse mDNS query https://serverfault.com/questions/143184/how-do-i-get-the-machine-name-from-an-ip-via-multicast-dns. But while a reverse mDNS lookup (at least as accomplished by the dig command dig -x the.ip #224.0.0.251 -p 5353) will work against a Mac that is not otherwise broadcasting any Bonjour services, it doesn't work unless Wi-Fi Sync is running or some other Bonjour service on an iOS device. I am not sure how to get the name otherwise but these apps reliably get it. I used Wireshark while iNet was discovering and I only see ICMP and NetBios queries all which return 0 answers.
Also note that I have the IP address of the device already by doing a broadcast ping and then parsing the ARP table. I want to discover which of the devices discovered in this way are iOS devices by getting their device name and looking for the string "iPhone" or "iPad".
Also note that the iNet app website provides the following about how they do reverse IP lookups. I take this to mean they do a reverse DNS lookup and a reverse mDNS lookup for every IP.
Reverse IP lookups (hostnames) are performed as unicast and multicast queries for every IP found. -http://www.bananaglue.de/inet/index_e.php
Have you tried the dns-sd command line tool?
If you type dns-sd -B _services._dns-sd._udp to get all available services, you'll see there's a _whats-my-name service available.
$ dns-sd -B _services._dns-sd._udp
Browsing for _services._dns-sd._udp
DATE: ---Tue 16 Dec 2014---
14:38:30.746 ...STARTING...
Timestamp A/R Flags if Domain Service Type Instance Name
14:38:30.747 Add 3 5 . _tcp.local. _nfs
14:38:30.747 Add 3 5 . _tcp.local. _afpovertcp
14:38:30.747 Add 3 5 . _tcp.local. _smb
14:38:30.747 Add 2 0 . _tcp.local. _whats-my-name
14:38:31.330 Add 3 10 . _tcp.local. _nfs
14:38:31.330 Add 3 10 . _tcp.local. _afpovertcp
14:38:31.330 Add 2 10 . _tcp.local. _smb
after that we can query for this service which outputs the following:
$ dns-sd -B _whats-my-name._tcp
Browsing for _whats-my-name._tcp
DATE: ---Tue 16 Dec 2014---
14:40:20.738 ...STARTING...
Timestamp A/R Flags if Domain Service Type Instance Name
14:40:20.742 Add 2 0 local. _whats-my-name._tcp. Blub MacBook Pro
The Instance Name is the interesting part here. I assume the _whats-my-name service is available on every computer running bonjour. Maybe you can hunt down the sent queries and reconstruct it with basic bash tools if you can't access dns-sd in every case. More over you should not use dns-sd in your script. Instead you should use a specific implementation of the protocol for your programming language.
Note: Be aware that the name of the device may not be reliable to detect which device you are communicating with
Hope that helps.
I have Bonjour (mDNSResponder - Linux version) up and running on a Ubuntu Box (Host A). I have managed to port Avahi to a new platform. As I see, ./mDNSNetMonitor is able to discover the service published by avahi on say different host, Host B (/etc/avahi/services/myservice.service) . This means that Bonjour is able to discover the service published by Avahi.
My question here is, why do I need avahi-compat-libdns_sd library. In the context of experiment, do I need to port avahi-compat-libdns_sd library also to the new platform (Host B)? Note that Avahi running on Host B is 'Dbus enabled'.
Basically it provides a dns_sd.h header file and a backing implementation using avahi to provide compability with the Bonjour SDK interface. So no, you do not need to also port the avahi-compat-libdns_sd part for your experiment.