Upnp what is windows 7. Redirecting or opening ports using UPnP

UPnP (abbreviation for Universal Plug and Play) – set network protocols, published by the forum of the same name. The UPnP Forum is an open association of industry representatives with the goal of developing standards for UPnP technology, the goal of which is to simplify the integration of smart devices, initially at the level of home and subsequently corporate networks.

UPnP is built on the basis of such standards and technologies as TCP/IP, UDP, HTTP, XML and provides automatic installation connection between similar devices and them working together online. Thanks to this approach, setting up a network becomes simple and accessible to a wide user audience.

Setting up UPnP

Setting up UpnP may be necessary if the connection to the Internet is not made directly from a computer, but using a router. In this case, in order to give access, for example, to the resources of an FTP server located on a PC, it is necessary to perform a port forwarding operation on the router and assign a static IP address to your computer.

Note! Using the UPnP function on the router, all port forwarding settings are carried out in automatic mode, That's why this method Suitable for people just starting to learn computers. The downside of UpnP is the reduced level of security home network.

In most cases, the user receives a router with activated mode UpnP. Let's check activation this mode in the settings of our router. For this in any accessible browser you should write the IP address of your router (usually 192.168.0.1 or 192.168.1.1), enter your login and password. Below are a few screenshots that will help you check whether this mode is activated on the most common routers.

TP-Link

Section “Forwarding”, subsection “UpnP” - “Status - Enabled”

D-Link

“Advanced” section, “Advanced Network” subsection, the “Enable UPnP” field is checked.

ASUS

“Internet” section, “Connection” tab - “Enable UpnP” checkbox is checked in the “Yes” field.

After UPnP mode has been enabled on the router, you must also enable it in the application that requires port forwarding. For example, to enable UpnP in Skype, you need to go to the “Advanced” section, the “Connection” subsection and check the box next to “Enable UpnP”.

Creating a DLNA home media server

DLNA is a technology that allows you to combine devices into a single digital network for the purpose of receiving/transmitting and viewing various media content online. In practice it looks like this: there is a computer with hard drive larger capacity on which photos, films, audio recordings and other media content are stored.

What if you want to watch one of the movies not on your PC screen, but on a large TV? Or your friends came to visit you and you want to show photos from your vacation or big screen TV or on the phone, because you don’t want to go into the house. What if each family member wants to watch their media files on their personal device (phone, tablet)? The problem can be solved by creating a PC-based media server and combining all devices into single network using a router.

Please note that routers supporting the 802.11N standard (data transfer speeds up to 300Mb/s) do not always cope with transmitting large volumes of video streaming High Quality Freezing occurs on Wi-Fi and on the TV screen. In this case, we recommend using a wired connection.

As software, with which the media server will be created will be used free program"Home media server UpnP, DLNA, HTTP." Download and install the program.

After installation is complete, you should indicate from which directory and what type of content will be broadcast to the network (the “Add” button on the right panel of the program). The selection is made by placing green dots next to the corresponding directories and content type. To add resources hosted on network or removable drives You must check the appropriate boxes at the bottom of the window.

In this article you will get acquainted with important and useful functionality UPNP and learn how to enable it on a router using the example of a Mikrotik device. Mikrotik routers have won many positive feedback from users, and it gained popularity both among administrators and among ordinary users home networks.

Mikrotik routers support universal PlugandPlay technology to simplify direct network connection personal computers and various network devices. UPNP architecture stands for UniversalPlugandPlay (universal technology direct connection devices) and ensures data exchange between any two devices under the control of network control equipment.

The UPNP function is completely independent of physical media. It supports networking by automatic detection equipment without any initial setup. Thanks to this, the device is able to dynamically join the network. The presence of DHCP and DNS servers is not mandatory, but they can be used if they are present on the network. UPNP implements a simple yet powerful solution that allows the user to get full two-way peer-to-peer networking support.

Usually initial setup router, which is configured by default, meets all possible requirements for most users. This configuration is described at back side boxes, as well as in the online manual on the manufacturer's website.

The hardware connection is carried out as follows. Connect Ethernet cable to the ether1 port, and the remaining ports on the router to the local network (LAN). By default, the Mikrotik router is protected by a firewall configuration, so questions about additional protection There is no need to worry about data at the initial stages.

IN initial system DHCP client settings are in WAN interface(ether1), the remaining ports are considered your local network with a DHCP server configured for automatic configuration addresses on client devices. To connect to the router, you need to configure your computer to receive DHCP settings and connect the Ethernet cable to one of the LAN ports (check the port numbering of your device and the front panel of the router).

UPNP interface

There are two types of interface for UPNP: internal (to which one local client is connected) and external (to which the Internet is connected). A Mikrotik router can only have one external interface with a “public” IP address, and that number internal interfaces, as much as needed. They all have "internal" IP addresses.

The UPNP protocol is used for many modern applications, for example, for most games using DirectX, as well as for various functions Windows Messenger (remote connection, sharing applications, file transfer, voice, video) when working through a firewall.

Setting up UPNP

The user of a Mikrotik router has several settings available, the configuration of which can be done directly in the program. Let's list some of them.

  • enabled. Basic setting to enable the UPNP function.
  • allow-disable-external-interface. This option can be enabled or disabled, and is enabled by default.

Determines whether users are allowed to disable the external interface of the Mikrotik router. This functionality is required by the standard because it allows users to disable the external interface without any authentication procedure and additional settings. But sometimes this feature becomes undesirable when UPNP is running, since the standard was developed primarily for home users to set up their own local networks. Therefore, it is possible to disable this setting.

IMPORTANT. If this option is disabled, any user in your local network will be able to perform this action and disable the external interface of the Mikrotik router without going through the authentication procedure. You can enable the option at any time if you wish.

  • show-dummy-rule. This option can be enabled or disabled, and is enabled by default.

It provides a workaround for some features that do not handle UPNP correctly (eg causing error messages). This option instructs the server to send the necessary signal to software clients that throw an error when working with UPNP.

  • interface. Displays the name of the interface in which the process is currently running.
  • type. Indicates the interface type. External - an interface that is assigned a global IP address. Internal - the local interface of the router to which clients connect.
  • forced-external-ip. Allows you to specify which public IP address should be included if multiple IP addresses are available on the external interface.
March 23, 2016 at 11:13 am

Opening ports behind NAT using NAT-PMP and UPnP IGD

  • Network technologies

Previously, I heard many times that UPnP somehow knows how to independently open ports (perform Port Forwarding on the router) upon request from a host on the local network. However, exactly how this happens, and what protocols are used for this, have until now been covered in a veil of fog for me.

In this article I want to briefly describe how two mechanisms for port forwarding work, namely NAT Port Mapping Protocol And Internet Gateway Device (IGD) Protocol, included in the set UPnP protocols. To my surprise, I discovered that in RuNet there is information on this issue more than meager, which prompted me to write this note.

First, here's a short FAQ:

Q: What are these protocols for?
A: To create a forwarding rule for a specific TCP/ UDP port(Port Forwarding) not manually, but “automatically”, i.e. upon request from a host on the internal network.

Q: How is this implemented?
A: The device behind the NAT sends a request to the router indicating the internal and external numbers ports and protocol type (TCP/UDP). If the specified external port is free, the router generates a translation rule and reports to the requesting computer that the request was successfully completed.

Q: Does the router authenticate/authorize requests to open a port?
A: No, it is not carried out.

Now let’s look at the operation of these protocols in more detail (under the cut).

Port Mapping Protocol

NAT-PMP is described in RFC 6886. It uses UDP server port 5351 to operate.

Let's consider the operation of the protocol on specific example- torrent client Vuze 5.7 for Windows 7.

Note: NAT-PMP is disabled by default in Vuze. It must be activated in the plugin settings.

1. Launch Wireshark. In the filter line enter nat-pmp
2. Vuze launches.
3. Stop packet interception and look at the results.

I got the following:

The first 2 are a request for the external address of the router and a response indicating this address. We will not dwell on them in detail and will better consider how port mapping occurs using the example of packets 3-4.

Here we see that a request is made to forward external UDP port 48166 to the same internal port. Interestingly, the protocol does not specify the host address to which the broadcast should take place (Inside Local in Cisco terminology). This means that the router must take the source address of the packet from the IP header and use it as the Inside Local.

Parameter Requested Port Mapping Lifetime expected means the lifetime of an entry in the translation table.

As we can see, the router supposedly created the requested broadcast and responded with the code Success. Parameter Seconds Since Start of Epoch means the time since the translation table was initialized (i.e., since the last reboot of the router).

Mapping of TCP ports occurs in exactly the same way and differs only in the field value Opcode.

After an application has stopped using these ports, it can send a request to the router to remove the broadcast.
The main difference between a delete request and a create request is that the parameter Lifetime is set to zero.

This is what will happen if we close Vuze.

This concludes our review of NAT-PMP; I propose moving on to the somewhat more sophisticated UPnP IGD.

Internet Group Device Protocol

This protocol uses SOAP to exchange its messages.

However, unlike NAT-PMP, IGD does not use fixed number server port, so before exchanging messages, you must first find out this port. This is done using the SSDP protocol (this protocol is part of UPnP and is used for service discovery).

Launch the torrent client. It generates an SSDP request and sends it to the multicast address 239.255.255.250.

The router generates a response and sends it using Unicast:

Inside the response we can see the URL for interacting with the router using the IGD protocol.

Next, Vuze connects to the router at the specified URL and receives XML with information about this device, including a set of URIs to control some of the router’s functions. After the desired URI is found in rootDesc.xml, Vuze sends a SOAP request to create a NAT translation to the found URI.

Note: Before requesting the creation of a broadcast, Vuze forced the router to list all available Port Forwarding's. Why this was done, I can only guess.

SOAP request to create a UDP port translation:

As mentioned earlier, Vuze took the required URI (immediately after the POST) from rootDesc.xml. To add a broadcast, use a function called AddPortMapping.

It can also be noted that, in contrast to NAT-PMP, the Inside Local address is specified within the protocol itself.

Similar to NAT-PMP, when the torrent client is closed, mappings of forwarded ports are deleted. This is done by the function DeletePortMapping:

You may notice that to delete a rule, it is enough to specify only the protocol type (UDP) and number external port, without specifying other parameters.

Conclusion

In this article we have looked at two quite simple ways on creating Port Forwarding rules on your home router based on a command from a host on the local network. It only remains to note that if you consider the operation of these protocols to be a threat to the security of your home network, then you can try to turn them off (although, of course, it is much better to entrust security issues to the utility that is designed for this - a firewall). In my case Zyxel Giga II, on which, by the way, all tests were carried out, this is done by the CLI command no service upnp(Notably, there is no option to enable/disable UPnP in the web interface).

What is the Universal Plug and Play feature in NBG routers and P-660 ADSL modems?

Universal Plug and Play is an architecture that allows you to automatically expand peer-to-peer networks by adding various network devices and new hosts to them. This technology is designed to make it easier and more standardized to connect new devices on unmanaged networks, whether they are at home, in a small office, in public places or connected to the Internet.

Universal Plug and Play- distributed, open architecture networking that leverages TCP/IP and web technology to automatically provide seamless networking for management and data transfer between network devices in home, office and public places.
UPnP is more than just a simple extension of the Plug and Play model. It is designed to support zero configuration, invisible networking, and automatic network openness to a wide range of network devices. various manufacturers. A device can dynamically join a network, obtain an IP address, transfer its capabilities, and learn about the presence and capabilities of other devices. DHCP and DNS servers are optional and are only used if available online. Finally, the device can be disconnected from the network without additional configuration, without leaving any information about itself.


What is the universality of the new UPnP standard? No device drivers needed: interaction is carried out on common protocols. UPnP devices can be used in networks of any localization, by any operating systems.

UPnP Also supports NAT traversal, which can automatically solve many problems related to configuration and using NAT. UPnP automatically assigns a dynamic port that is used by an application to the appropriate Internet gateway and removes the association when the connection is completed.
The key components of UPnP are devices, services, and control points.
Devices: Network devices such as network gateways, TV, Appliances, printers, etc. that provide services.
Services: Services are provided by devices, for example the time service is provided by the device clock. In UPnP, services are described in XML format. Control points can set or receive values ​​from devices.
Control points: Control points are designed to control network devices. When adding new point control (for example, you connect a laptop) to the network, the device can scan networks to find various UPnP-compatible devices. Such devices will respond with their own URLs and a description of their functionality.



The figure shows two computers - PC1 and PC2, both registered on the MSN server, which want to establish a video conference session. PC1 is behind a router that uses a PPPoE connection and supports UPnP. Since the router supports UPnP, there is no need to configure NAT tables. As long as the UPnP function is enabled on the router, PC1 will use and make changes to the NAT table automatically. Note: we mean that the PC1 supports UPnP and, accordingly, most likely runs Windows. PC1 in in this case is the network control point, and ZyXEL modem- a network device that supports UPnP.



To activate UPnP on ZyXEL NBG series devices, you need to go to the menu in the web configurator Management - UPnP and mark three fields: “ Enable the Universal Plug and Play (UPnP) Feature», « Allow users to make port forwarding changes through UPnP" And "".
The first field enables UPnP functionality on the device.
The second field allows applications to user computers change configuration of this device. For example, if this field is enabled, MSN application users can assign dynamic ports in the router table.
The third field allows UPnP to pass through the Firewall.


To use UPnP on ZyXEL P660 series devices, you need to go to the menu in the web configurator Advanced - UPnP and mark three fields: “ Active the Universal Plug and Play (UPnP) Feature», « Allow users to make configuration changes through UPnP" And " Allow UPnP to pass through Firewall».



IN ZyXEL device P-330W uses a different web configurator interface and to activate UPnP on this device you need to go to the menu in the web configurator WAN and check the box " Enable UPnP».


An example of setting up UPnP in Keenetic series Internet centers with NDMS V2 firmware can be found in the article: “Using the UPnP function in the Internet center”

Surely, most users of computers, laptops and mobile devices have at least once expressed a desire to watch your favorite films, TV shows or photographs on a large TV screen. There are also opposite situations when you want to synchronize an Internet broadcast, for example, TV, with a mobile device.


A UPnP media server can handle such tasks. This article will discuss it. Questions about how to set it up will be covered. It is worth immediately noting that this process does not involve any particular difficulties.

What is UPnP?

UPnP is an abbreviation for the term Universal Plug & Play. In other words, this is a specific virtual system that combines the connections of smart devices located on the same network with each other. This process carried out on the basis of TCP/IP, UDP, HTTP and other protocols.

When considering UPnP, in simple terms, we can imagine it as creating the ability to transmit and receive data by all devices that support this standard. A simple example can be given: viewing photos on a TV instead of a smartphone. It has already become clear that this will require regular synchronization of devices with each other in order to gain access to data.

Windows Presets

Before you start looking at how to set up and activate your home UPnP media server, it is necessary to implement certain presets in the most operating system. This can be implemented in several ways, which differ from each other and depend on the version of Windows OS. Although, the principle remains the same.

Therefore, you will need to enable the UPnP server (Windows 7). How to do it? Everything is very simple. You just need to visit the programs and components section, which is located in the standard “Control Panel”. Then you need to select installation options Windows elements. In this case we're talking about about the item network services, the mark is set. On the right, their composition item is activated. When entering this menu, you will have to use enable discovery and management client. In addition, you will need to indicate user interface UPnP. Then you just need to save the changes. You don't need to reboot to do this. This applies to XP, Vista, 8 or 10 systems. However, you will need to note that sometimes it is necessary installation disk Windows.

How to enable UPnP on a router?

However, this is not all that needs to be done. If network connection is intended to be implemented when using wireless connection using a router, you need to check the UPnP settings on it too. True, in most cases, almost all common router models provide an already enabled UPnP service. However, it would be a good idea to check the settings.

In many router models, the menu is entered by entering the address 192.168.1.1 in a web browser. It is worth noting that the menu may vary depending on the device model. Differences can be seen in the name or placement of individual controls. One way or another, you will need to find the “Enable UPnP” option.

Enable UPnP in Skype

Next, as an example, it is worth considering famous program for communication using IP telephony Skype. In this case, UPnP technology is also involved. What does this mean in relation to the application itself? In fact, this is the same port forwarding system, designed to establish communication with another device. As you know, it’s more pleasant to communicate with friends if you can see them on the big screen. For these purposes, you can use a television panel.

Activating UPnP is quite simple. In this case, you will need to go to the main program settings and specify additional parameters. Next, use the “Connection” menu. There is a special field for enabling UPnP, which you should check next to and then save the changes.

The simplest program for creating a home media server

It's time to consider the main issue related to settings and enabling the UPnP server. First you need to decide on the program (UPnP client). Samsung PC Share Manager is the easiest to use. This utility does not require manual settings. Almost all settings are automated in it. Thus, user participation is not required to determine the devices and connection method. However, you need to specify shared folders containing stored multimedia files.

By default, the application selects its own parameters, but it is possible to delete them and set others instead. In addition, it is important to check whether you are open to them general access. This is done from the properties menu. It can be called up by clicking right click mouse on the directory. After startup is complete, the UPnP server turns on automatically. Thus, all devices that are currently present on the home network are synchronized. In some cases, it may be necessary to add the program to the firewall exclusion list.

U this application there is also a disadvantage. It consists in the inability to view online television or listening to the radio. Only content stored in shared folders can be played.

Using the Home Media Server program

Use a more serious application called Home Media Server It’s already more difficult. In this case, you will have to delve into the settings. Also activated here automatic detection, however sometimes you need to add devices manually. For example, the program accurately identifies the desired computer terminal where it is installed, and also determines the router that is responsible for the connection. If there is a need to transmit a signal to a television IPTV set-top box with further broadcast to the TV panel, the IP or MAC address of the device will need to be entered independently.

It is also worth addressing the issue of transcoding. As a rule, the “Movies (main)” mode is selected, but when the system has a special program Ace Stream, which is one of the components of Ace Player, it is advisable to use it. Concerning shared folders, in this case everything is also simple. But with the issue of television broadcasting, you will again need to strain your brains. For example, to watch torrent television, you need to register on a specific resource, then download podcasts from it, which you need to add to the list, and then update. When these steps are completed, access to television programs opens.

It should be noted that on the set-top box you must manually activate the use UPnP server. Often, its application involves LAN mode. Of course, another one can be used, which depends on the modification of the console itself. It should be noted that there are many settings in the program. The basic ones are easy to understand, but if necessary additional parameters you need to spend a certain amount of time. But it won't go to waste.

The user receives in return the opportunity to manage the most powerful tool synchronization of devices of any kind. It is worth noting that mobile devices may require installation special applications, as well as UPnP activation. If this is not done, synchronization becomes impossible. You should also pay attention to the fact that turning on the server is performed exclusively in manual mode, unlike the application presented above. In this case it is used special button startup or restart.

Thus, the topic was briefly discussed: “UPnP: what is it?” The article presents the most common situations, as well as rules for setting up and working with a home media server. Of course, it is possible to use other programs, but the initial principles of setup and activation are identical for almost all UPnP clients. Once you study at least a few of the simplest programs, understanding others will not be difficult.