This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| fintech:multicast [2023/03/13 20:14] – jotasandoku | fintech:multicast [2025/05/18 10:02] (current) – jotasandoku | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | * Cisco fintech architecture: | + | * Multicast summary |
| TECH NOTES: | TECH NOTES: | ||
| Line 29: | Line 29: | ||
| * “BLOCK_OLD_SOURCE” Record type 6 indicating it is no longer interested to hear multicast traffic to that group from specific host. | * “BLOCK_OLD_SOURCE” Record type 6 indicating it is no longer interested to hear multicast traffic to that group from specific host. | ||
| - | MEMBERSHIP-QUERY: | + | MEMBERSHIP-QUERY |
| * Sent by the last hop router. Normally when a listener has left a group and it wants to know if there are still anybody in there interested on the group. | * Sent by the last hop router. Normally when a listener has left a group and it wants to know if there are still anybody in there interested on the group. | ||
| * General Query – to learn complete multicast reception state of the neighboring interface. Sent to 224.0.0.1 | * General Query – to learn complete multicast reception state of the neighboring interface. Sent to 224.0.0.1 | ||
| * Group-Specific Query – to learn the reception state, with respect to single multicast group address. Sent to destination multicast address of interest. | * Group-Specific Query – to learn the reception state, with respect to single multicast group address. Sent to destination multicast address of interest. | ||
| * "Max Resp Time” router is giving a max time to a receiver to respond. | * "Max Resp Time” router is giving a max time to a receiver to respond. | ||
| - | * “S” Flag when set to “1”: For other neighbor routers potentially being quariers | + | * “S” Flag when set to “1”: For other neighbor routers |
| * QRV (Query Robustness Variable) used by querier to adjust the query frequency depend on the quality of the network. | * QRV (Query Robustness Variable) used by querier to adjust the query frequency depend on the quality of the network. | ||
| * QQIC (Querier’s Query Interval Code) specified the query interval. | * QQIC (Querier’s Query Interval Code) specified the query interval. | ||
| Line 71: | Line 71: | ||
| ---- | ---- | ||
| **Remember: dynamic RPs are preferred to statically defined** | **Remember: dynamic RPs are preferred to statically defined** | ||
| - | \\ | + | * __BSR__: IEEE standard |
| - | __BSR__: IEEE standard | + | |
| - | \\ | + | |
| - | __AUTO-RP__: | + | * Classical anycast: lo100 (shared loopback), msdp betweeen lo0 shared ' |
| - | \\ | + | * PIM-based anycast (RFC 4610): lo100 (shared loopback). State is shared in the PIM messages themselves. Requires this command '' |
| - | __ANYCAST RP__ : In practice, anycast | + | * __SSM__: Is becoming very popular. No RP, all SPT, a little less of state. Requires IGMPv3 |
| - | \\ | + | |
| - | __SSM__ | + | |
| - | \\ | + | |
| - | __BIDIR__: ONLY SHARED TRESS (*,G) - central bidirectional RP which is ALWAYS in the datapath | + | |
| - | \\ | + | |
| - | Bidir would not use source trees to better scale its routing table, so a new mechanism is required for Bidir sources to reach the rendezvous point. This new mechanism is called the designated forwarder (DF). | + | |
| - | There’s no SPT switchover. | + | |
| - | \\ | + | |
| - | No RPF so traffic can go in both directions. | + | |
| - | \\ | + | |
| - | In absence of the above, loops are prevented by having a, fixed, DF router. | + | |
| - | \\ | + | |
| - | DF (designated forwarder) we have one per segment (no per group so several in the way from source to the DR). Role of the DR as well as its election (remember higher IP wins for DR, lower for querier) is important. This is because the DR is the ONLY one forwarding data upstream PER SEGMENT (ie per Ethernet segment, therefore there can be several DRs from Rest do it downstream only. | + | |
| Line 101: | Line 94: | ||
| * DESIGNATED ROUTER: Routers configured for IP multicast send PIM hello messages to determine which router will be the designated router (DR) for each LAN segment (subnet). The hello messages contain the router' | * DESIGNATED ROUTER: Routers configured for IP multicast send PIM hello messages to determine which router will be the designated router (DR) for each LAN segment (subnet). The hello messages contain the router' | ||
| * in each LAN segment where one or more multicast enabled routers are connected to you can see the three roles of PIM DR, IGMP querier, PIM forwarder. | * in each LAN segment where one or more multicast enabled routers are connected to you can see the three roles of PIM DR, IGMP querier, PIM forwarder. | ||
| - | * **PIM DR has to represent the LAN segment/ | + | |
| * QUERIER: When a multicast-enabled router first becomes active on a subnet, it assumes that it is the Querier — the router responsible for sending all General and Group-Specific Queries to the subnet. When there are multiple routers, the rule for electing the Querier is simple: The router whose connected interface has the **lowest IP address is the Querie**. [[http:// | * QUERIER: When a multicast-enabled router first becomes active on a subnet, it assumes that it is the Querier — the router responsible for sending all General and Group-Specific Queries to the subnet. When there are multiple routers, the rule for electing the Querier is simple: The router whose connected interface has the **lowest IP address is the Querie**. [[http:// | ||
| + | |||
| show ip igmp snooping querier | show ip igmp snooping querier | ||
| Line 220: | Line 214: | ||
| **__SERVER SIDE TOOLS (generate multicast traffic): | **__SERVER SIDE TOOLS (generate multicast traffic): | ||
| - | * https:// | + | If we cannot install anything (and we have pyton3 we can paste these scripts: |
| - | * https:// | + | |
| - | cd mtools | + | |
| - | apt install make | + | |
| - | apt install gcc | + | |
| - | make | + | |
| - | ./msend -g 224.2.2.2 -p 2222 -t 8 -text " | + | |
| - | **Mausezahn is a free fast traffic generator** (very promising): | + | GENERATING MULTICAST TRAFFIC |
| - | + | # | |
| - | | + | |
| - | + | # Usage in bash : 'while true; do ./msend.py; sleep 2; done' | |
| - | IPERF | + | MCAST_GRP = '239.1.1.1' |
| + | MCAST_PORT | ||
| + | # regarding socket.IP_MULTICAST_TTL | ||
| + | # --------------------------------- | ||
| + | # for all packets sent, after two hops on the network the packet will not | ||
| + | # be re-sent/ | ||
| + | MULTICAST_TTL | ||
| + | sock = socket.socket(socket.AF_INET, | ||
| + | sock.setsockopt(socket.IPPROTO_IP, | ||
| + | # For Python 3, change next line to ' | ||
| + | # "bytes-like object is required" | ||
| + | sock.sendto(b"robot", | ||
| + | ! | ||
| + | ! Execute from the cli with: | ||
| + | while true; do ./msend.py; sleep 2; done | ||
| + | |||
| + | SUBSCRIBING TO MULTICAST STREAM | ||
| + | # | ||
| + | import socket | ||
| + | import struct | ||
| + | import sys | ||
| + | multicast_group = '239.1.1.1' | ||
| + | server_address = ('', | ||
| + | # Create | ||
| + | sock = socket.socket(socket.AF_INET, | ||
| + | # Bind to the server address | ||
| + | sock.bind(server_address) | ||
| + | # Tell the operating system to add the socket to the multicast group | ||
| + | # on all interfaces. | ||
| + | group = socket.inet_aton(multicast_group) | ||
| + | mreq = struct.pack(' | ||
| + | sock.setsockopt(socket.IPPROTO_IP, | ||
| + | while True: | ||
| + | | ||
| + | data, address = sock.recvfrom(1024) | ||
| + | |||
| + | print(' | ||
| + | print(data, file=sys.stderr) | ||
| + | |||
| + | # | ||
| + | # | ||
| + | # | ||
| + | # | ||
| + | |||
| + | |||
| + | If we can, install '' | ||
| iperf -c 224.0.0.1 -u -B 10.1.0.54 -t 3600 -T 255 # traffic for this group from this address (needs to belong to the switch) | iperf -c 224.0.0.1 -u -B 10.1.0.54 -t 3600 -T 255 # traffic for this group from this address (needs to belong to the switch) | ||
| Line 245: | Line 278: | ||
| * pim cannot be enabled in loopback interfaces. Nonetheless is not required to enable RP. | * pim cannot be enabled in loopback interfaces. Nonetheless is not required to enable RP. | ||
| - | This is for static and BSR RP: | + | ! This is for static and BSR RP: |
| interface Vlan100 | interface Vlan100 | ||
| ip address 10.1.8.3/24 | ip address 10.1.8.3/24 | ||
| Line 260: | Line 293: | ||
| ipv4 | ipv4 | ||
| candidate Vlan100 priority 192 hashmask 30 interval 30 | candidate Vlan100 priority 192 hashmask 30 interval 30 | ||
| - | | ||
| ---- | ---- | ||
| + | |||
| + | MULTICAST IN IOS-XR: | ||
| + | |||
| + | router pim | ||
| + | | ||
| + | rp-address 10.0.100.2 | ||
| + | spt-threshold infinity | ||
| + | ssm disable | ||
| + | |||
| + | ---- | ||
| + | __IPV6 MULTICAST__ | ||
| + | * PIM > IPv6 PIM | ||
| + | * **IGMPv2 > MLDv1** | ||
| + | * **IGMPv3 > MLDv2** | ||
| + | |||
| + | ipv6 multicast-routing | ||
| + | show ipv6 mroute | ||
| + | ! | ||
| + | show ipv6 pim neighbor | ||
| + | ! | ||
| + | show ipv6 mld group | ||
| + | show ipv6 mld interface g0/0 | ||
| + | show ipv6 mld traffic | ||
| + | |||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| **BIER (bit indexed explicit replication)** | **BIER (bit indexed explicit replication)** | ||