This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| fintech:multicast [2023/04/01 18:28] – 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 | ||
| 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): | ||
| - | If we cannot install anything | + | If we cannot install anything |
| + | |||
| + | GENERATING MULTICAST TRAFFIC | ||
| # | # | ||
| import socket | import socket | ||
| Line 240: | Line 236: | ||
| while true; do ./msend.py; sleep 2; done | while true; do ./msend.py; sleep 2; done | ||
| - | If we can install '' | + | SUBSCRIBING TO MULTICAST STREAM |
| + | # | ||
| + | import socket | ||
| + | import struct | ||
| + | import sys | ||
| + | multicast_group = ' | ||
| + | server_address = ('', | ||
| + | # Create the socket | ||
| + | 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: | ||
| + | print(' | ||
| + | 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 253: | 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 278: | Line 303: | ||
| spt-threshold infinity | spt-threshold infinity | ||
| ssm disable | 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 | ||
| + | |||
| + | |||
| ---- | ---- | ||