Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Sample Service Templates

    We provide templates for Juniper Networks E Series Broadband Services Routers running JunosE Software release 7.2 or later and for Cisco routers running Cisco IOS Release 12.2SB. These templates include sample global and service templates that you can modify for your specific environment. Each sample includes a global service template and at least one service template.

    Juniper Networks Routers Service Template

    This example shows the complete Juniper Networks service template configuration. This template supports Juniper Networks E Series Broadband Services Routers running JunosE Software release 7.2 or later.

    user@host# show device-template juniper-router-junose-7.2-plus
    capabilities {
      capability activation {
        Both;
      }
      capability bundle {
        Single;
      }
      capability modification {
        false;
      }
    }
    model juniper-router-junose-7.2-plus;
    global-template {
      description 'global section';
      mode abort-session {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 40;
        }
      }
      mode accounting {
        attributes;
      }
      mode authentication {
        attributes;
      }
    }
    service-template content_provider_tiered {
      description 'content_provider_tiered service';
      mode activation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          tagged-group {
            attribute Unisphere-Activate-Service {
              parameterized {
                format 'content_provider_tiered\\($(contentProviderAddress),$(conten
    tProviderMask),$(subscriberAddress),$(subscriberMask),$(upstreamBandwidth),$(dow
    nstreamBandwidth)\\)';
                name Unisphere-Activate-Service;
              }
            }
            attribute Unisphere-Service-Stats {
              default {
                name Unisphere-Service-Stats;
                value 2;
              }
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode deactivation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          attribute Unisphere-Deactivate-Service {
            parameterized {
              format 'content_provider_tiered\\($(contentProviderAddress),$(contentP
    roviderMask),$(subscriberAddress),$(subscriberMask),$(upstreamBandwidth),$(downs
    treamBandwidth)\\)';
              name Unisphere-Deactivate-Service;
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode initial-authorization {
        attributes {
          tagged-group {
            attribute Unisphere-Activate-Service {
              parameterized {
                format 'content_provider_tiered\\($(contentProviderAddress),$(conten
    tProviderMask),$(subscriberAddress),$(subscriberMask),$(upstreamBandwidth),$(dow
    nstreamBandwidth)\\)';
                name Unisphere-Activate-Service;
              }
            }
            attribute Unisphere-Service-Stats {
              default {
                name Unisphere-Service-Stats;
                value 2;
              }
            }
          }
        }
      }
      mode service-correlation-id {
        attributes {
          attribute Juniper-Service-Correlation-Id {
            parameterized {
              format 'content_provider_tiered\\($(contentProviderAddress),$(contentP
    roviderMask),$(subscriberAddress),$(subscriberMask),$(upstreamBandwidth),$(downs
    treamBandwidth)\\)';
              name Juniper-Service-Correlation-Id;
            }
          }
        }
      }
    }
    service-template internet_tiered {
      description 'internet_tiered service';
      mode activation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          tagged-group {
            attribute Unisphere-Activate-Service {
              parameterized {
                format 'internet_tiered\\($(upstreamBandwidth),$(downstreamBandwidth
    )\\)';
                name Unisphere-Activate-Service;
              }
            }
            attribute Unisphere-Service-Stats {
              default {
                name Unisphere-Service-Stats;
                value 2;
              }
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode deactivation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          attribute Unisphere-Deactivate-Service {
            parameterized {
              format 'internet_tiered\\($(upstreamBandwidth),$(downstreamBandwidth)\
    \)';
              name Unisphere-Deactivate-Service;
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode initial-authorization {
        attributes {
          tagged-group {
            attribute Unisphere-Activate-Service {
              parameterized {
                format 'internet_tiered\\($(upstreamBandwidth),$(downstreamBandwidth
    )\\)';
                name Unisphere-Activate-Service;
              }
            }
            attribute Unisphere-Service-Stats {
              default {
                name Unisphere-Service-Stats;
                value 2;
              }
            }
          }
        }
      }
      mode service-correlation-id {
        attributes {
          attribute Juniper-Service-Correlation-Id {
            parameterized {
              format 'internet_tiered\\($(upstreamBandwidth),$(downstreamBandwidth)\
    \)';
              name Juniper-Service-Correlation-Id;
            }
          }
        }
      }
    }
    service-template guided_entrance {
      description 'guided_entrance service';
      mode activation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          tagged-group {
            attribute Unisphere-Activate-Service {
              parameterized {
                format 'guided_entrance\\($(redirectAddress),$(redirectPort),$(redir
    ectRemainingUrl),$(originalAddress),$(originalMask),$(originalPort)\\)';
                name Unisphere-Activate-Service;
              }
            }
            attribute Unisphere-Service-Stats {
              default {
                name Unisphere-Service-Stats;
                value 1;
              }
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode deactivation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          attribute Unisphere-Deactivate-Service {
            parameterized {
              format 'guided_entrance\\($(redirectAddress),$(redirectPort),$(redirec
    tRemainingUrl),$(originalAddress),$(originalMask),$(originalPort)\\)';
              name Unisphere-Deactivate-Service;
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode initial-authorization {
        attributes {
          tagged-group {
            attribute Unisphere-Activate-Service {
              parameterized {
                format 'guided_entrance\\($(redirectAddress),$(redirectPort),$(redir
    ectRemainingUrl),$(originalAddress),$(originalMask),$(originalPort)\\)';
                name Unisphere-Activate-Service;
              }
            }
            attribute Unisphere-Service-Stats {
              default {
                name Unisphere-Service-Stats;
                value 1;
              }
            }
          }
        }
      }
      mode service-correlation-id {
        attributes {
          attribute Juniper-Service-Correlation-Id {
            parameterized {
              format 'guided_entrance\\($(redirectAddress),$(redirectPort),$(redirec
    tRemainingUrl),$(originalAddress),$(originalMask),$(originalPort)\\)';
              name Juniper-Service-Correlation-Id;
            }
          }
        }
      }
    }
    vendor juniper;
    
    [edit shared sic group test-group]
    user@host#
    

    Cisco Router Service Template

    This example shows the complete Cisco router service template configuration. This template supports Cisco routers running Cisco IOS Release 12.2SB.

    user@host# show device-template cisco-router-ios-12.2-sb
    capabilities {
      capability activation {
        Both;
      }
      capability bundle {
        None;
      }
      capability modification {
        false;
      }
    }
    model cisco-router-ios-12.2-sb;
    global-template {
      description 'global section';
      mode abort-session {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 40;
        }
      }
      mode accounting {
        attributes;
      }
      mode authentication {
        attributes;
      }
    }
    service-template content_provider_tiered {
      description 'content_provider_tiered service';
      mode activation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          attribute Cisco-SSG-Command-Code {
            override {
              name Cisco-SSG-Command-Code;
              value '{hex}0B 63 6F 6E 74 65 6E 74 5F 70 72 6F 76 69 64 65 72 5F 74 69 65 72 65 64';
            }
          }
          attribute Cisco-AVPair-1 {
            parameterized {
              format 'ip:inacl#10=permit ip any $(subscriberAddress) $(subscriberMask)';
              name Cisco-AVPair;
            }
          }
          attribute Cisco-AVPair-2 {
            parameterized {
              format 'ip:outacl#20=permit ip $(contentProviderAddress) $(contentProviderMask) any';
              name Cisco-AVPair;
            }
          }
        attribute Cisco-AVPair-3 {
            override {
              name Cisco-AVPair;
              value 'ip:traffic-class=in access-group name 10 priority 10';
            }
          }
          attribute Cisco-AVPair-4 {
            override {
              name Cisco-AVPair;
              value 'ip:traffic-class=in default drop';
            }
          }
          attribute Cisco-AVPair-5 {
            override {
              name Cisco-AVPair;
              value 'ip:traffic-class=out access-group name 20 priority 10';
            }
          }
          attribute Cisco-AVPair-6 {
            override {
              name Cisco-AVPair;
              value 'ip:traffic-class=out default drop';
            }
          }
          attribute Cisco-SSG-Service-Info {
            parameterized {
              format 'QU;$(upstreamBandwidth);;;D;$(downstreamBandwidth);;';
              name Cisco-SSG-Service-Info;
            }
          }
          attribute Cisco-AVPair-7 {
            override {
              name Cisco-AVPair;
              value accounting-list=default;
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode deactivation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          attribute Cisco-SSG-Command-Code {
            override {
              name Cisco-SSG-Command-Code;
              value '{hex}0C 63 6F 6E 74 65 6E 74 5F 70 72 6F 76 69 64 65 72 5F 74 69 65 72 65 64'; 
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode service-correlation-id {
        attributes {
          attribute Juniper-Service-Correlation-Id {
            override {
              name Juniper-Service-Correlation-Id;
              value Ncontent_provider_tiered;
            }
          }
        }
      }
      mode service-profile-download {
        attributes {
          attribute User-Name {
            override {
              name User-Name;
              value content_provider_tiered; 
            }
          }
        }
      }
    }
    service-template internet_tiered {
      description 'internet_tiered service';
      mode activation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          attribute Cisco-SSG-Command-Code {
            override {
              name Cisco-SSG-Command-Code;
              value '{hex}0B 69 6E 74 65 72 6E 65 74 5F 74 69 65 72 65 64'; 
            }
          }
          attribute Cisco-SSG-Service-Info {
            parameterized {
              format 'QU;$(upstreamBandwidth);;;D;$(downstreamBandwidth);;';
              name Cisco-SSG-Service-Info;
            }
          }
          attribute Cisco-AVPair {
            override {
              name Cisco-AVPair;
              value accounting-list=default;
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode deactivation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          attribute Cisco-SSG-Command-Code {
            override {
              name Cisco-SSG-Command-Code;
              value '{hex}0C 69 6E 74 65 72 6E 65 74 5F 74 69 65 72 65 64'; 
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode service-correlation-id {
        attributes {
          attribute Juniper-Service-Correlation-Id {
            override {
              name Juniper-Service-Correlation-Id;
              value Ninternet_tiered;
            }
          }
        }
      }
      mode service-profile-download {
        attributes {
          attribute User-Name {
            override {
              name User-Name;
              value internet_tiered; 
            }
          }
        }
      }
    }
    service-template guided_entrance {
      description 'guided_entrance service';
      mode activation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          attribute Cisco-SSG-Command-Code {
            override {
              name Cisco-SSG-Command-Code;
              value '{hex}0B 67 75 69 64 65 64 5F 65 6E 74 72 61 6E 63 65'; 
            }
          }
          attribute Cisco-AVPair-1 {
            parameterized {
              format 'ip:inacl#10=permit ip any $(originalAddress) $(originalMask)';
              name Cisco-AVPair;
            }
          }
          attribute Cisco-AVPair-2 {
            parameterized {
              format 'ip:inacl#20=permit tcp any eq $(originalPort)';
              name Cisco-AVPair;
            }
          }
          attribute Cisco-AVPair-3 {
            override {
              name Cisco-AVPair;
              value 'ip:traffic-class=in access-group name 10 priority 10';
            }
          }
          attribute Cisco-AVPair-4 {
            override {
              name Cisco-AVPair;
              value 'ip:traffic-class=in access-group name 20 priority 10';
            }
          }
          attribute Cisco-AVPair-5 {
            parameterized {
              format 'ip:l4redirect=redirect to ip $(redirectAddress) port $(redirectPort)';
              name Cisco-AVPair;
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode deactivation {
        attributes {
          attribute Acct-Session-Id {
            required {
              name Acct-Session-Id;
            }
          }
          attribute Cisco-SSG-Command-Code {
            override {
              name Cisco-SSG-Command-Code;
              value '{hex}0C 67 75 69 64 65 64 5F 65 6E 74 72 61 6E 63 65'; 
            }
          }
        }
        variable RadiusCode {
          type integer;
          value 43;
        }
      }
      mode service-correlation-id {
        attributes {
          attribute Juniper-Service-Correlation-Id {
            override {
              name Juniper-Service-Correlation-Id;
              value Nguided_entrance;
            }
          }
        }
      }
      mode service-profile-download {
        attributes {
          attribute User-Name {
            override {
              name User-Name;
              value guided_entrance; 
            }
          }
        }
      }
    }
    vendor cisco;
    
    [edit shared sic group test-group]
    user@host#
    

    Published: 2014-06-19