[Contents] [Prev] [Next] [Index] [Report an Error]

Using JUNOS Default Groups

The JUNOS software provides a hidden and immutable configuration group called junos-defaults that is automatically applied to the configuration of your routing platform. The junos-defaults group contains preconfigured statements that contain predefined values for common applications. Some of the statements must be referenced to take effect, such as definitions for applications (for example, FTP or telnet settings). Other statements are applied automatically, such as terminal settings.

Note: Many identifiers included in the junos-defaults configuration group begin with the name junos-. Because identifiers beginning with the name junos- are reserved for use by Juniper Networks, you cannot define any configuration objects using this name.

You cannot include junos-defaults as a configuration group name in an apply-groups statement.

To view the full set of available preset statements from the JUNOS default group, issue the show groups junos-defaults configuration mode command at the top level of the configuration. The following example displays a partial list of JUNOS default groups:

user@host# show groups junos-defaults
# Make vt100 the default for the console port
system {
ports {
console type vt100;
}
}
applications {
# File Transfer Protocol
application junos-ftp {
application-protocol ftp;
protocol tcp;
destination-port 21;
}
# Trivial File Transfer Protocol
application junos-tftp {
application-protocol tftp;
protocol udp;
destination-port 69;
}
# RPC port mapper on TCP
application junos-rpc-portmap-tcp {
application-protocol rpc-portmap;
protocol tcp;
destination-port 111;
}
# RPC port mapper on UDP
}

To reference statements available from the junos-defaults group, include the selected junos- default-name statement at the applicable hierarchy level.

Example: Referencing the Preset Statement

The following example is a preset statement from the JUNOS defaults group that is available for FTP in a stateful firewall:

[edit]
groups {
junos-defaults {
applications {
application junos-ftp {# Use FTP default configuration
application-protocol ftp;
protocol tcp;
destination-port 21;
}
}
}

To reference a preset JUNOS default statement from the JUNOS defaults group, include the junos- default-name statement at the applicable hierarchy level. For example, to reference the JUNOS default statement for FTP in a stateful firewall, include the junos-ftp statement at the [edit services stateful-firewall rule rule-name term term-name from applications] hierarchy level:

[edit]
services {
stateful-firewall {
rule my-rule {
term my-term {
from {
applications junos-ftp; #Reference predefined statement, junos-ftp,
}
}
}
}
}

Example: Viewing Default Statements That Have Been Applied to the Configuration

To view the JUNOS defaults that have been applied to the configuration, issue the show | display inheritance defaults command. For example, to view the inherited JUNOS defaults at the [edit system ports] hierarchy level:

user@host# show system ports | display inheritance defaults
## ## 'console' was inherited from group 'junos-defaults'
## 'vt100' was inherited from group 'junos-defaults'
## console type vt100;

If you choose not to use existing JUNOS default statements, you can create your own configuration groups manually. For more information about manually creating of configuration groups, see Configuration Groups and Configuration Groups Configuration StatementsConfiguration Groups Configuration Statements.


[Contents] [Prev] [Next] [Index] [Report an Error]