Example: Configuring a Dynamic Interface Set of VLAN Subscribers
Requirements
This example uses the following software and hardware components:
MX Series Router with MPCs
Overview
In this example, the network administrator groups dynamic VLAN interfaces in an interface set. The interface set is configured in a dynamic profile, and enables hierarchical scheduling for the VLAN interfaces for a multiplay service.
DHCP is used as the access method, and RADIUS is used as the authentication method for the interfaces associated with the interface set.
Configuring the Dynamic VLANs
- CLI Quick Configuration
- Configuring the Dynamic Profile for the Autoconfigured VLANs
- Configuring the VLAN Interfaces
- Configuring the Loopback Interface
CLI Quick Configuration
To quickly configure the dynamic VLANs, copy the following commands and paste them into the router terminal window:
[edit] edit dynamic-profiles vlan-prof edit interfaces $junos-interface-ifd-name unit $junos-interface-unit set vlan-id $junos-vlan-id set demux-source inet set family inet unnumbered-address lo0.0 preferred-source-address 203.0.113.32 top edit interfaces ge-1/0/0 set hierarchical-scheduler set vlan-tagging edit auto-configure vlan-ranges dynamic-profile vlan-prof set ranges any set accept inet top set interfaces lo0 unit 0 family inet address 203.0.113.32/32
Configuring the Dynamic Profile for the Autoconfigured VLANs
Step-by-Step Procedure
In this section, you create a dynamic profile for the VLAN IDs to be automatically assigned when subscribers log in.
To configure the dynamic profile for the VLANs:
Configure the dynamic profile.
[edit] user@host#edit dynamic-profile vlan-prof
Configure the interfaces.
[edit dynamic-profiles vlan-prof] user@host#edit interfaces $junos-interface-ifd-name unit $junos-interface-unit
Add the VLAN ID variable.
[edit dynamic-profiles vlan-prof interfaces $junos-interface-ifd-name unit $junos-interface-unit] user@host#set vlan-id $junos-vlan-id
Configure the demux source as IPv4.
[edit dynamic-profiles vlan-prof interfaces $junos-interface-ifd-name unit $junos-interface-unit] user@host#set demux-source inet
Configure the family.
[edit dynamic-profiles vlan-prof interfaces $junos-interface-ifd-name unit $junos-interface-unit] user@host#set family inet unnumbered-address lo0.0 preferred-source-address 203.0.113.32
Configuring the VLAN Interfaces
Step-by-Step Procedure
To configure the VLAN interfaces:
Create the VLAN interface.
[edit] user@host# edit interfaces ge-1/0/0
Enable hierarchical scheduling.
[edit interfaces ge-1/0/0] user@host# set hierarchical-scheduler
Configure VLAN tagging.
[edit interfaces ge-1/0/0] user@host# set vlan-tagging
Configure auto-configuration for the dynamic profile.
[edit interfaces ge-1/0/0] user@host# edit auto-configure vlan-ranges dynamic-profile vlan-prof
Configure any VLAN ID range.
[edit interfaces ge-1/0/0 auto-configure vlan-ranges dynamic-profile vlan-prof] user@host# set ranges any
Specify IPv4 traffic for the VLAN.
[edit interfaces ge-1/0/0 auto-configure vlan-ranges dynamic-profile vlan-prof] user@host# set accept inet
Configuring the Loopback Interface
Step-by-Step Procedure
To configure the loopback interface:
Create the loopback interface.
[edit] user@host# edit interfaces lo0
Configure the unit and the family.
[edit intefaces lo0] user@host# set unit 0 family inet address 203.0.113.32/32
Configuring Dynamic Traffic Scheduling and Shaping
- CLI Quick Configuration
- Configuring the Schedulers in the Dynamic Profile
- Configuring the Scheduler Map in the Dynamic Profile
- Configuring the Traffic-Control Profile in the Dynamic Profile
CLI Quick Configuration
To quickly configure the traffic scheduling and shaping parameters, copy the following commands and paste them into the router terminal window:
[edit] edit dynamic-profiles multiplay class-of-service schedulers be_sch set transmit-rate percent 12 set buffer-size percent 12 set priority low up edit ef_sch set transmit-rate percent 12 set buffer-size percent 12 set priority low up edit af_sch set transmit-rate percent 12 set buffer-size percent 12 set priority low up edit nc_sch set transmit-rate percent 12 set buffer-size percent 12 set priority low up edit voice_sch set transmit-rate percent 12 set buffer-size percent 12 set priority low up edit video_sch set transmit-rate percent 12 set buffer-size percent 12 set priority low up edit game_sch set transmit-rate percent 12 set buffer-size percent 12 set priority low up edit data_sch set transmit-rate percent 12 set buffer-size percent 12 set priority low up 2 edit scheduler-maps all_smap set forwarding-class be scheduler be_sch set forwarding-class ef scheduler ef_sch set forwarding-class af scheduler af_sch set forwarding-class nc scheduler nc_sch set forwarding-class voice scheduler voice_sch set forwarding-class video scheduler video_sch set forwarding-class game scheduler game_sch set forwarding-class data scheduler data_sch up 2 edit traffic-control-profiles multiplay set scheduler-map all_smap set shaping-rate 100m set guaranteed-rate 20m
Configuring the Schedulers in the Dynamic Profile
Step-by-Step Procedure
In this section, you create a dynamic profile for the multiplay service and configure scheduling and shaping.
To configure the schedulers:
Create the
multiplay
dynamic profile.[edit] user@host# edit dynamic-profiles multiplay class-of-service schedulers
Configure the best effort scheduler.
[edit dynamic-profiles multiplay class-of-service schedulers] user@host# edit be_sch user@host# set transmit-rate percent 12 user@host# set buffer-size percent 12 user@host# set priority low
Configure the expedited forwarding scheduler.
[edit dynamic-profiles multiplay class-of-service schedulers] user@host# edit ef_sch user@host# set transmit-rate percent 12 user@host# set buffer-size percent 12 user@host# set priority low
Configure the assured forwarding scheduler.
[edit dynamic-profiles multiplay class-of-service schedulers] user@host# edit af_sch user@host# set transmit-rate percent 12 user@host# set buffer-size percent 12 user@host# set priority low
Configure the network control scheduler.
[edit dynamic-profiles multiplay class-of-service schedulers] user@host# edit nc_sch user@host# set transmit-rate percent 12 user@host# set buffer-size percent 12 user@host# set priority low
Configure the voice scheduler.
[edit dynamic-profiles multiplay class-of-service schedulers] user@host# edit voice_sch user@host# set transmit-rate percent 12 user@host# set buffer-size percent 12 user@host# set priority low
Configure the video scheduler.
[edit dynamic-profiles multiplay class-of-service schedulers] user@host# edit video_sch user@host# set transmit-rate percent 12 user@host# set buffer-size percent 12 user@host# set priority low
Configure the gaming scheduler.
[edit dynamic-profiles multiplay class-of-service schedulers] user@host# edit game_sch user@host# set transmit-rate percent 12 user@host# set buffer-size percent 12 user@host# set priority low
Configure the data scheduler.
[edit dynamic-profiles multiplay class-of-service schedulers] user@host# edit data_sch user@host# set transmit-rate percent 12 user@host# set buffer-size percent 12 user@host# set priority low
Configuring the Scheduler Map in the Dynamic Profile
Step-by-Step Procedure
To configure the scheduler map:
Configure the scheduler map for all of the services.
[edit dynamic-profiles multiplay class-of-service] user@host# edit scheduler-maps all_smap
Configure the forwarding classes for each service in the scheduler map.
[edit dynamic-profiles multiplay class-of-service scheduler-maps all_smap] user@host# set forwarding-class be scheduler be_sch user@host# set forwarding-class ef scheduler ef_sch user@host# set forwarding-class af scheduler af_sch user@host# set forwarding-class nc scheduler nc_sch user@host# set forwarding-class voice scheduler voice_sch user@host# set forwarding-class video scheduler video_sch user@host# set forwarding-class game scheduler game_sch user@host# set forwarding-class data scheduler data_sch
Configuring the Traffic-Control Profile in the Dynamic Profile
Step-by-Step Procedure
To configure the traffic-control profile the interface set:
Configure the traffic-control profile.
[edit dynamic-profiles multiplay class-of-service] user@host# edit traffic control-profiles multiplay
Configure the scheduler map.
[edit dynamic-profiles multiplay class-of-service traffic control-profiles multiplay] user@host# set scheduler-map all_smap
Configure the shaping rate.
[edit dynamic-profiles multiplay class-of-service traffic control-profiles multiplay] user@host# set shaping-rate 100m
Configure the guaranteed rate.
[edit dynamic-profiles multiplay class-of-service traffic control-profiles multiplay] user@host# set guaranteed-rate 20m
Configuring the Interface Set in the Dynamic Profile
- CLI Quick Configuration
- Configuring the Interfaces for the Interface Set
- Configuring the Interface Set
- Applying the Traffic-Control Profile to the Interface Set
CLI Quick Configuration
To quickly configure the interface set, copy the following commands and paste them into the router terminal window:
[edit] edit dynamic-profiles multiplay edit interfaces interface-set $junos-interface-set-name set interface $junos-interface-ifd-name unit $junos-underlying-interface-unit top edit class-of-service interfaces interface-set set output-traffic-control-profile multiplay
Configuring the Interfaces for the Interface Set
Step-by-Step Procedure
To configure the interface variable for the interface set:
Configure the dynamic profile for the interface set.
[edit] user@host#edit dynamic-profiles multiplay
Configure the interface using the Junos OS predefined variable.
[edit dynamic-profiles multiplay] user@host#edit interfaces $junos-interface-ifd-name unit $junos-underlying-interface-unit
Configure the family.
[edit dynamic-profiles multiplay interfaces $junos-interface-set-name unit $junos-underlying-interface-unit] user@host#set family inet unnumbered-address lo0.0 preferred-source-address 203.0.113.32
Configuring the Interface Set
Step-by-Step Procedure
To configure the interface set:
Configure the interface set using the Junos OS predefined variable.
[edit dynamic-profiles multiplay] user@host#edit interfaces interface-set $junos-interface-set-name
Add the dynamic VLAN interfaces to the interface set.
[edit dynamic-profiles multiplay interfaces $junos-interface-set-name] user@host#set interface $junos-interface-ifd-name unit $junos-underlying-interface-unit
Applying the Traffic-Control Profile to the Interface Set
Step-by-Step Procedure
You apply the traffic-control profile outside of the
dynamic profile in the [edit class-of-service]
hierarchy.
To apply the traffic-control profile:
Specify the interface set to which you want to apply the traffic-control profile.
[edit class-of-service] user@host#edit interfaces interface-set dynamic-set
Attach the output traffic-control profile defined in the dynamic profile to the interface set.
[edit class-of-service interfaces] user@host#set output-traffic-control-profile multiplay
Configuring DHCP Access
CLI Quick Configuration
To quickly configure DHCP access, copy the following commands and paste them into the router terminal window:
[edit] edit system services dhcp-local-server authentication set password $ABC123 set username-include user-prefix multiplay up 1 set dynamic-profile dhcp-vlan-prof aggregate-clients replace set group vlans interface ge-1/0/0 top edit access address-assignment pool v4 family inet set network 203.0.113.0/16 set range limited low 203.0.113.10 set range limited high 203.0.113.250 set dhcp-attributes maximum-lease-time 84600
Configuring the DHCP Local Server
Step-by-Step Procedure
To configure DHCP access:
Configure the DHCP local server.
[edit system] user@host# edit services dhcp-local-server authentication
Set the password.
[edit system services dhcp-local-server authentication] user@host# set password $ABC123
Specify that you want to include optional information in the username.
[edit system services dhcp-local-server authentication] user@host# set username-include user-prefix multiplay
Attach the dynamic profile with the interface set.
[edit system services dhcp-local-server] user@host# set dynamic-profile dhcp-vlan-prof aggregate-clients replace
Configure a group for the VLAN interface.
[edit system services dhcp-local-server] user@host# set group vlans interface ge-1/0/0
Configuring Address Assignment Pools
Step-by-Step Procedure
To configure address assignment pools:
Configure the pool of IPv4 addresses.
[edit access] user@host#edit address-assignment pool v4 family inet
Configure the family of interfaces in the pool.
[edit access address-assignment pool v4] user@host#set network 203.0.113.0/16
Configure the upper and lower bounds of the address range.
[edit access address-assignment pool v4] user@host#set range limited low 203.0.113.10 user@host#set range limited high 203.0.113.250
Configure the maximum length of time in seconds for which a subscriber can request and hold a lease.
[edit access address-assignment pool v4] user@host#set dhcp-attributes maximum-lease-time 84600
Configuring RADIUS Authentication
CLI Quick Configuration
To quickly configure RADIUS authentication, copy the following commands and paste them into the router terminal window:
[edit] edit access radius-server 192.51.100.108 set secret $ABC123ABC123ABC123 set timeout 5 set retry 5 up 2 edit profile acc-prof set authentication-order radius set radius authentication-server 192.51.100.108
Configuring RADIUS Access
Step-by-Step Procedure
To configure RADIUS access:
Configure the RADIUS server.
[edit access] user@host#edit radius-server 192.51.100.108
Configure the required secret (password) that the local router or switch passes to the RADIUS client.
[edit access radius-server 192.51.100.108] user@host# set secret $ABC123ABC123ABC123
Configure the length of time that the local router or switch waits to receive a response from a RADIUS server.
[edit access radius-server 192.51.100.108] user@host# set timeout 5
Configure the number of times that the router or switch attempts to contact a RADIUS accounting server.
[edit access radius-server 192.51.100.108] user@host# set retry 5
Configure the access profile.
[edit access] user@host#edit profile acc-prof
Configure the authentication order.
[edit access profile acc-prof ] user@host# set authentication-order radius
Configure the authentication server.
[edit access profile acc-prof] user@host#set radius authentication-server 192.51.100.108
Results
dynamic-profiles { vlan-prof { interfaces { “$junos-interface-ifd-name” { unit "$junos-interface-unit" { vlan-id "$junos-vlan-id"; demux-source inet; family inet { unnumbered-address lo0.0 preferred-source-address 203.0.113.32; } } } } } multiplay { class-of-service { traffic-control-profiles { multiplay { scheduler-map all_smap; shaping-rate 100m; guaranteed-rate 20m; } } interfaces { interface-set “$junos-interface-set-name” { interface “$junos-interface-ifd-name” { unit “$junos-underlying-interface-unit”; } } “$junos-interface-ifd-name” { unit "$junos-interface-unit" { output-traffic-control-profile multiplay; } } } scheduler-maps { all_smap { forwarding-class be scheduler be_sch; forwarding-class ef scheduler ef_sch; forwarding-class af scheduler af_sch; forwarding-class nc scheduler nc_sch; forwarding-class voice scheduler voice_sch; forwarding-class video scheduler video_sch; forwarding-class game scheduler game_sch; forwarding-class data scheduler data_sch; } } schedulers { be_sch { transmit-rate percent 12; buffer-size percent 12; priority low; } ef_sch { transmit-rate percent 12; buffer-size percent 12; priority low; } af_sch { transmit-rate percent 12; buffer-size percent 12; priority low; } nc_sch { transmit-rate percent 12; buffer-size percent 12; priority low; } voice_sch { transmit-rate percent 12; buffer-size percent 12; priority low; } video_sch { transmit-rate percent 12; buffer-size percent 12; priority low; } game_sch { transmit-rate percent 12; buffer-size percent 12; priority low; } data_sch { transmit-rate percent 12; buffer-size percent 12; priority low; } } } } access { radius-server { 192.51.100.108 { secret "$ABC123ABC123ABC123"; ## SECRET-DATA timeout 5; retry 5; } } profile acc-prof { authentication-order radius; radius { authentication-server 192.51.100.108; } } address-assignment { pool v4 { family inet { network 203.0.113.0/16; range limited { low 203.0.113.10; high 203.0.113.250; } dhcp-attributes { maximum-lease-time 84600; } } } } } class-of-service { interfaces { interface-set dynamic-set { output-traffic-control-profile multiplay; } } } interfaces { interface-set “$junos-interface-set-name” { interface "$junos-interface-ifd-name" { unit "$junos-underlying-interface-unit"; } } "$junos-interface-ifd-name" { unit "$junos-underlying-interface-unit" { family inet { unnumbered-address lo0.0 preferred-source-address 203.0.113.32; } } } } } } interfaces { ge-1/0/0 { hierarchical-scheduler; vlan-tagging; auto-configure { vlan-ranges { dynamic-profile vlan-prof { accept inet; ranges { any; } } } } } lo0 { unit 0 { family inet { address 203.0.113.32/32; } } } } system { services { dhcp-local-server { authentication { password $ABC123; username-include { user-prefix multiplay; } } dynamic-profile multiplay aggregate-clients replace; group vlans { interface ge-1/0/0.0; } } } }
Verification
To confirm that the configuration is correct, perform these tasks:
- Verifying the Interfaces that are Included in the Interface Set
- Verifying the Traffic Scheduling and Shaping Parameters for the Interface Set
Verifying the Interfaces that are Included in the Interface Set
Purpose
Verify the interfaces included in the interface set.
Action
user@host> show interfaces interface-set dynamic-set terse