ON THIS PAGE
Example: Separating Targeted Multicast Traffic for Demux Subscribers on Aggregated Ethernet Interfaces
This example shows how to separate targeted multicast traffic from targeted unicast traffic and send that multicast traffic to a different interface through the use of OIF maps.
Requirements
Before configuring this example, make sure to configure the distribution type for the interface. See Configuring the Distribution Type for Demux Subscribers on Aggregated Ethernet Interfaces for instructions.
Overview
In this example, targeted traffic distribution is already configured on the router. Dynamically created interfaces each carry their unicast traffic but all multicast traffic is sent to the ge-5/3/9.0 interface.
Topology
Figure 1 shows the sample network.
Configuration
- CLI Quick Configuration
- Configure an OIF Map Policy
- Configure a DHCP VLAN Dynamic Profile
- Configure a VLAN Demux Dynamic Profile
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
and then copy and paste the commands into the CLI at the [edit] hierarchy level.
set policy-options policy-statement OIF-v4-all term oif539 from route-filter 192.168.20.0/4 orlonger set policy-options policy-statement OIF-v4-all term oif539 then map-to-interface ge-5/3/9.0 set policy-options policy-statement OIF-v4-all term oif539 then accept set dynamic-profiles dhcp-vlan-prof interfaces "$junos-interface-ifd-name" unit "$junos-underlying-interface-unit" family inet unnumbered-address lo0.0 set dynamic-profiles dhcp-vlan-prof interfaces "$junos-interface-ifd-name" unit "$junos-underlying-interface-unit" family inet unnumbered-address preferred-sour ce-address 10.20.0.2 set dynamic-profiles demux-vlan-prof interfaces demux0 unit "$junos-interface-un it" vlan-id "$junos-vlan-id" set dynamic-profiles demux-vlan-prof interfaces demux0 unit "$junos-interface-un it" demux-options underlying-interface "$junos-interface-ifd-name" set dynamic-profiles demux-vlan-prof interfaces demux0 unit "$junos-interface-un it" targeted-distribution set dynamic-profiles demux-vlan-prof interfaces demux0 unit "$junos-interface-un it" family inet unnumbered-address lo0.0 set dynamic-profiles demux-vlan-prof interfaces demux0 unit "$junos-interface-un it" family inet unnumbered-address preferred-source-address 10.20.0.2 set dynamic-profiles demux-vlan-prof protocols igmp interface "$junos-interface- name" version 2 set dynamic-profiles demux-vlan-prof protocols igmp interface "$junos-interface- name" promiscuous-mode set dynamic-profiles demux-vlan-prof protocols igmp interface "$junos-interface- name" passive allow-receive set dynamic-profiles demux-vlan-prof protocols igmp interface "$junos-interface- name" passive send-group-query set dynamic-profiles demux-vlan-prof protocols igmp interface "$junos-interface- name" oif-map OIF-v4-all
Configure an OIF Map Policy
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy.
To configure the OIF map:
-
Access the router policy options:
[edit] user@host#edit policy-options
-
Edit a policy statement.
[edit policy-options] user@host edit policy-statement OIF-v4-all
-
Create a term for mapping incoming multicast traffic to a specific interface.
[edit policy-options OIF-v4-all] user@host edit term oif539
-
Define the match condition for the term. In this case, the term matches any route prefix of 192.168.20.0/4 or longer (all multicast traffic).
[edit policy-options OIF-v4-all term oif539] user@host set from route-filter 192.168.20.0/4 orlonger
-
Define the action for the term. In this case, when a match occurs, the term accepts the traffic and maps it to interface ge-5/3/9.0.
[edit policy-options OIF-v4-all term oif539] user@host set then map-to-interface ge-5/3/9.0 user@host set then accept
Results
Confirm your configuration by issuing the show
policy-options commands. If the output does not display the
intended configuration, repeat the instructions in this example to
correct the configuration.
[edit]
user@host# show policy-options
policy-statement OIF-v4-all {
term oif539 {
from {
route-filter 192.168.20.0/4 orlonger;
}
then {
map-to-interface ge-5/3/9.0;
accept;
}
}
}
Configure a DHCP VLAN Dynamic Profile
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy.
To configure a DHCP VLAN dynamic profile for client access:
-
Create a dynamic VLAN demux profile.
[edit] user@host#edit dynamic-profiles dhcp-vlan-prof
-
Edit the dynamic profile interface.
[edit dynamic-profiles dhcp-vlan-prof] user@host edit interfaces $junos-ifd-name
-
Edit the interface unit dynamic variable.
[edit dynamic-profiles demux-vlan-prof interfaces $junos-ifd-name] user@host edit unit $junos-underlying-interface-unit
-
Edit the interface family.
[edit dynamic-profiles demux-vlan-prof interfaces $junos-ifd-name unit $junos-underlying-interface-unit] user@host edit family inet
-
Define the loopback address.
[edit dynamic-profiles demux-vlan-prof interfaces $junos-ifd-name unit $junos-underlying-interface-unit ] user@host set unnumbered-address lo0.0 preferred-source-address 10.20.0.2
Results
Confirm your configuration by issuing the show
dynamic-profiles command. If the output for the dhcp-vlan-prof
dynamic profile does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
[edit]
user@host# show dynamic-profiles
dhcp-vlan-prof {
interfaces {
"$junos-interface-ifd-name" {
unit "$junos-underlying-interface-unit" {
family inet {
unnumbered-address lo0.0 preferred-source-address 10.20.0.2;
}
}
}
}
}
Configure a VLAN Demux Dynamic Profile
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy.
To configure the OIF map:
-
Create a dynamic VLAN demux profile.
[edit] user@host#edit dynamic-profiles demux-vlan-prof
-
Edit the dynamic profile demux0 interface.
[edit dynamic-profiles demux-vlan-prof] user@host edit interfaces demux0
-
Edit the interface unit dynamic variable.
[edit dynamic-profiles demux-vlan-prof interfaces demux0] user@host edit unit $junos-interface-unit
-
Specify the VLAN ID dynamic variable.
[edit dynamic-profiles demux-vlan-prof interfaces demux0 unit �$junos-interface-unit�] user@host set vlan-id $junos-vlan-id
-
Access the demux options.
[edit dynamic-profiles demux-vlan-prof interfaces demux0 unit �$junos-interface-unit�] user@host edit demux-options
-
Define the demux underlying interface.
[edit dynamic-profiles demux-vlan-prof interfaces demux0 unit �$junos-interface-unit� demux-options] user@host set underlying-interface $junos-interface-ifd-name
-
Specify that dynamically created VLANs are using targeted distribution.
[edit dynamic-profiles demux-vlan-prof interfaces demux0 unit �$junos-interface-unit�] user@host set targeted-distribution
-
Edit the interface family.
[edit dynamic-profiles demux-vlan-prof interfaces demux0 unit �$junos-interface-unit�] user@host edit family inet
-
Define the loopback address.
[edit dynamic-profiles demux-vlan-prof interfaces demux0 unit �$junos-interface-unit� family inet] user@host set unnumbered-address lo0.0 preferred-source-address 10.20.0.2
-
Edit the dynamic profile IGMP protocol.
[edit dynamic-profiles demux-vlan-prof] user@host edit protocols igmp
-
Enable IGMP on dynamically created interfaces.
[edit dynamic-profiles demux-vlan-prof protocols igmp] user@host edit interface $junos-interface-name
-
Specify the IGMP version that you want dynamically created interfaces to use.
[edit dynamic-profiles demux-vlan-prof protocols igmp interface $junos-interface-name] user@host set version 2
-
Specify the OIF map that you want dynamically created IGMP interfaces to use.
[edit dynamic-profiles demux-vlan-prof protocols igmp interface $junos-interface-name] user@host set oif-map OIF-v4-all
-
Specify that IGMP selectively sends and receives control traffic such as IGMP reports, queries, and leaves.
[edit dynamic-profiles demux-vlan-prof protocols igmp interface $junos-interface-name] user@host set passive allow-receive send-group-query
-
Specify that the interface accepts IGMP reports from hosts on any subnetwork.
[edit dynamic-profiles demux-vlan-prof protocols igmp interface $junos-interface-name] user@host set promiscuous-mode
Results
Confirm your configuration by issuing the show
dynamic-profiles commands. If the output for the dhcp-vlan-prof
dynamic profile does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
[edit]
user@host# show dynamic-profiles
demux-vlan-prof {
interfaces {
demux0 {
unit "$junos-interface-unit" {
vlan-id "$junos-vlan-id";
demux-options {
underlying-interface "$junos-interface-ifd-name";
}
targeted-distribution;
family inet {
unnumbered-address lo0.0 preferred-source-address 10.20.0.2;
}
}
}
}
protocols {
igmp {
interface "$junos-interface-name" {
version 2;
promiscuous-mode;
passive allow-receive send-group-query;
oif-map OIF-v4-all;
}
}
}
}
...
Verification
Confirm that the configuration is working properly.
- Locate the Multicast Group Member
- Ensure the Targeting Aggregated Ethernet Interface for the Subscriber is Functional
- View the Packets for the Targeted Interface
Locate the Multicast Group Member
Purpose
Locate the dynamic interface and ensure that it is associated with the appropriate IGMP group.
Action
user@host>show igmp group
Interface: demux0.1073741824, Groups: 1
Group: 192.0.2.1
Source: 0.0.0.0
Last reported by: 10.20.0.10
Timeout: 52 Type: Dynamic
Interface: local, Groups: 2
Group: 192.0.2.2
Source: 0.0.0.0
Last reported by: Local
Timeout: 0 Type: Dynamic
Group: 192.0.2.22
Source: 0.0.0.0
Last reported by: Local
Timeout: 0 Type: Dynamic
Meaning
The first Interface field shows the dynamically
created demux interface,
demux0.1073741824
, and the Group field immediately below the first Interface
field shows the group,
192.0.2.1
,
to which the subscriber belongs.
Ensure the Targeting Aggregated Ethernet Interface for the Subscriber is Functional
Purpose
Use the dynamic subscriber interface value to ensure that the targeting aggregated interface is functional.
Action
user@host>show interfaces demux0.1073741824 extensive
Logical interface demux0.1073741824 (Index 810) (SNMP ifIndex 1613)
(Generation 170)
Flags: SNMP-Traps 0x4000 VLAN-Tag [ 0x8100.1 ] Encapsulation: ENET2
Demux:
Underlying interface: ae0 (Index 708)
Link:
ge-1/0/0
ge-5/3/7
Targeting summary:
ge-1/0/0, backup, Physical link is Up
ge-5/3/7, primary, Physical link is Up
Traffic statistics:
Input bytes : 862
Output bytes : 3160
Input packets: 3
Output packets: 30
Local statistics:
Input bytes : 862
Output bytes : 3160
Input packets: 3
Output packets: 30
Transit statistics:
Input bytes : 0 0 bps
Output bytes : 0 0 bps
Input packets: 0 0 pps
Output packets: 0 0 pps
Protocol inet, MTU: 1500, Generation: 212, Route table: 0
Flags: Sendbcast-pkt-to-re, Unnumbered
Donor interface: lo0.0 (Index 802)
Preferred source address: 10.20.0.2
Meaning
The Targeting summary field shows that the
primary interface,
ge-5/3/7
, is up.
View the Packets for the Targeted Interface
Purpose
Verify that packet traffic sent to targeted interface ge-5/3/9 consists only of multicast packets.
Action
user@host>show interfaces ge-5/3/9 extensive
Physical interface: ge-5/3/9, Enabled, Physical link is Up
Interface index: 704, SNMP ifIndex: 1605, Generation: 197
Link-level type: Ethernet, MTU: 1514, Speed: 1000mbps, BPDU Error: None,
MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled,
Flow control: Disabled, Auto-negotiation: Enabled, Remote fault: Online
Device flags : Present Running
Interface flags: SNMP-Traps Internal: 0x4000
Link flags : None
CoS queues : 8 supported, 8 maximum usable queues
Schedulers : 0
Hold-times : Up 0 ms, Down 0 ms
Current address: 00:21:59:ab:85:2a, Hardware address: 00:21:59:ab:85:2a
Last flapped : 2012-09-26 17:32:24 EDT (6d 20:44 ago)
Statistics last cleared: Never
Traffic statistics:
Input bytes : 97857650 1320 bps
Output bytes : 0 0 bps
Input packets: 889615 1 pps
Output packets: 0 889620 pps
IPv6 transit statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Dropped traffic statistics due to STP State:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Input errors:
Errors: 0, Drops: 0, Framing errors: 0, Runts: 0, Policed discards: 0,
L3 incompletes: 0, L2 channel errors: 0, L2 mismatch timeouts: 0,
FIFO errors: 0, Resource errors: 0
Output errors:
Carrier transitions: 1, Errors: 0, Drops: 0, Collisions: 0, Aged packets: 0,
FIFO errors: 0, HS link CRC errors: 0, MTU errors: 0, Resource errors: 0
Egress queues: 8 supported, 4 in use
Queue counters: Queued packets Transmitted packets Dropped packets
0 best-effort 0 0 0
1 expedited-fo 0 0 0
2 assured-forw 0 0 0
3 network-cont 0 0 0
Queue number: Mapped forwarding classes
0 best-effort
1 expedited-forwarding
2 assured-forwarding
3 network-control
Active alarms : None
Active defects : None
MAC statistics: Receive Transmit
Total octets 0 113871616
Total packets 0 889620
Unicast packets 0 0
Broadcast packets 0 0
Multicast packets 0 889620
CRC/Align errors 0 0
FIFO errors 0 0
MAC control frames 0 0
MAC pause frames 0 0
Oversized frames 0
Jabber frames 0
Fragment frames 0
VLAN tagged frames 0
Code violations 0
Total errors 0 0
Filter statistics:
Input packet count 0
Input packet rejects 0
Input DA rejects 0
Input SA rejects 0
Output packet count 889620
Output packet pad count 0
Output packet error count 0
CAM destination filters: 0, CAM source filters: 0
Autonegotiation information:
Negotiation status: Complete
Link partner:
Link mode: Full-duplex, Flow control: Symmetric, Remote fault: OK
Local resolution:
Flow control: None, Remote fault: Link OK
Packet Forwarding Engine configuration:
Destination slot: 0 (0x00)
CoS information:
Direction : Output
CoS transmit queue Bandwidth Buffer Priority Limit
% bps % usec
0 best-effort 95 950000000 95 0 low none
3 network-control 5 50000000 5 0 low none
Interface transmit statistics: Disabled
Logical interface ge-5/3/9.0 (Index 818) (SNMP ifIndex 1597) (Generation 149)
Flags: SNMP-Traps 0x4004000 Encapsulation: ENET2
Traffic statistics:
Input bytes : 0
Output bytes : 97857650
Input packets: 0
Output packets: 889620
Local statistics:
Input bytes : 0
Output bytes : 0
Input packets: 0
Output packets: 0
Transit statistics:
Input bytes : 0 0 bps
Output bytes : 97857650 1320 bps
Input packets: 0 0 pps
Output packets: 889615 1 pps
Protocol aenet, AE bundle: ae4.0, Generation: 180, Route table: 0
Meaning
The MAC statistics Unicast packet field
shows that the interface is not transmitting any unicast packet traffic
and the Multicast packet field shows that the total number
of packets being transmitted from the interface are multicast packets.