Esta receta explicará a través de ejemplos mínimos como utilizar cookies para autenticarnos en una página y poder realizar sucesivas consultas con esa misma autenticación.
Cómo cambiar rápida y cómodamente entre el fichero de implementación (.c, .cc, .cpp) y el de cabecera (.h, hpp) cuando se trabaja con un proyecto C o C++ (por lo visto también funciona con Ada y VHDL).
Como todos sabéis, Ana María Méndez (la dueña de Traxtore que desafió a la SGAE) ha conseguido llevar el canon y a las cinco asociaciones pro-derechos de autor a un tribunal europeo. Por ahora la cosa pinta bien ya que la abogada de dicho tribunal ha dado la razón a Ana considerando el canon incompatible con la actual normativa europea... esta afirmación no es vinculante pero suele coincidir en un 90% con el dictamen definitivo del tribunal.
El tema es sencillo (o lo parece). Cuando utilizamos un contenedor de la STL (vector por ejemplo) ¿qué pasa con el contenido cuando se destruye el contenedor?
A falta de una documentación de pynotify, explicaré en esta receta cómo usar el binding de python para libnotify, para poder crear notificaciones de eventos en tus aplicaciones.
In this article a scheme with one device Cisco Catalyst 3550-12T1 that combines the functions of both a switch and an IGMP querier is described. Catalyst 3550-12T switch has 10 Gigabit Ethernet ports and two ports for GBIC modules. Peak performance is 17 billion
packets per second that allows transmitting data at a 24 Gbps rate.
Configuring IGMP snooping and IGMP querier
It is required to have an IP address configured on the Vlan 1 interface of the switch:
!
interface Vlan1
ip address 10.1.2.247 255.255.0.0
!
IGMP snooping is enabled by using the command (in global configuration mode):
ip igmp snooping
IGMP querier is enabled by using the command (in global configuration mode):
ip igmp snooping querier
Testing
A stand on basis of Cisco Catalyst 3550-12T ( C3550-IPSERVICESK9-M, Version 12.2(40)SE ) and
NetUP DVB to IP gateway 2 was prepared by NetUP specialists. A general network scheme is
given in the figure 1 below. As the client equipment it was used a PC with vlc mediaplayer and
an IP set-top box AmiNET 130.
Fig. 1. General layout of the test stand.
IGMP snooping and IGMP querier were enabled as discussed above. To check this, one can
use the following commands (the output is provided):
c3550#show ip igmp snooping querier
Vlan IP Address IGMP Version Port
----------------------------------------------------------------
1 10.1.2.247 v2 Switch
c3550#show ip igmp snooping groups
Vlan Group Version Port List
------------------------------------------------------------
As it can be seen the switch operates as an IGMP querier. In the groups list there are
no groups as no subscriber has requested a multicast stream. In this case the average
data transfer rate on the client’s port equals 0 Mbps. To check this run the following
command:
At that on the port of NetUP DVB to IP gateway we can see data transfered
at the rate of 110-120 Mbps (full decoding of 4 transponders is performed
that is around 50 TV channels):
Due to IGMP snooping multicast packets are not coming to the client port. If the client
requests a TV channel, copied to his port are only those multicast packets that belong
to this TV channel. To check this let’s request a TV program on the client’s device:
vlc udp://@226.2.0.5:1234
The requested TV channel appears on the client’s TV screen. And on the switch in the groups list we can see a new record:
c3550#show ip igmp snooping groups
Vlan Group Version Port List
------------------------------------------------------------
1 226.2.0.5 v2 Gi0/2
As we can see from this record, the switch is copying multicast packets for the group 226.2.0.5 to
the client port (Gi0/2). To check this we can check the rate of data transfer to the client port:
As it can be seen, only one TV channel is being transfered to the client port at the rate of ~3 Mbps. Because of such behavior of the switch we avoid overloading the client’s port with unwanted multicast packets.
It is worth of noting that the CPU load of the switch is almost zero. Most likely
multicast packets are processed at the hardware level.
c3550#show processes cpu history
1111111111122222111111111111111111111111111111111111111111
100
90
80
70
60
50
40
30
20
10
0....5....1....1....2....2....3....3....4....4....5....5....
0 5 0 5 0 5 0 5 0 5
CPU% per second (last 60 seconds)
Important! According to “IPv4 Multicast Unusable Group And Source Addresses” 3 it is not recommended
to use certain ranges for IPv4 multicast addresses. For example, subnet 226.0.0.0 – 226.0.0.255. Cisco
Catalyst 3550-12T switch sends multicast packets to all ports regardless of client’s requests.