Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
IJOS-12a-guide_pdf / IJOS-12.a_IG (Instructor Guide).pdf
Скачиваний:
747
Добавлен:
11.04.2015
Размер:
26.22 Mб
Скачать

Introduction to the Junos Operating System

Using Configuration Groups

The slide highlights the topic we discuss next.

A–14 • Interface Configuration Examples

www.juniper.net

Introduction to the Junos Operating System

Configuration Groups

Configuration groups allow you to create a group containing configuration statements and to direct the inheritance of that group's statements in the rest of the configuration. You can apply the same group to different sections of the configuration, and different sections of one group's configuration statements can be inherited in different places in the configuration.

Configuration groups allow you to create smaller, more logically constructed configuration files, making it easier to configure and maintain the Junos OS. For example, you can group statements that repeat in many places in the configuration, such as when configuring interfaces, and thereby limit updates to just the group.

You can also use wildcards in a configuration group to allow configuration data to be inherited by any object that matches a wildcard expression.

The configuration group mechanism is separate from the grouping mechanisms used elsewhere in the configuration, such as BGP groups. Configuration groups provide a generic mechanism that you can use throughout the configuration but that only the Junos command-line interface (CLI) recognizes. The individual software processes that perform the actions directed by the configuration receive the expanded form of the configuration; they have no knowledge of configuration groups.

www.juniper.net

Interface Configuration Examples • A–15

Introduction to the Junos Operating System

Interface Group Example

You can use configuration groups to separate the common interface media parameters from the interface-specific addressing information. The example on the slide places configuration data for ATM interfaces into a group called all-atm, which is applied at the [edit interfaces] hierarchy. In this example, all configuration parameters defined within the all-atm configuration group apply to the at-0/0/1 interface. If competing statements existed, the software would use the statements configured directly under the ATM interface.

A–16 • Interface Configuration Examples

www.juniper.net

Introduction to the Junos Operating System

Displaying Inherited Configuration

Configuration groups can make determining the actual values used by a device running the Junos OS difficult, because configuration data can be inherited from configuration groups. To view the actual values used by a device running the Junos OS, use the | display inheritance option after the show command. This command displays the inherited statements at the level at which they are inherited and the group from which they have been inherited. As mentioned on the slide, you can also add the | except # option to exclude the inheritance notes.

Continued on the next page.

www.juniper.net

Interface Configuration Examples • A–17

Introduction to the Junos Operating System

Displaying Inherited Configuration (contd.)

The following is the command illustrated on the slide without the | except # command:

[edit]

user@router# show interfaces at-0/0/1 | display inheritance

##

##'atm-pvc' was inherited from group 'all-atm'

encapsulation atm-pvc;

##'atm-options' was inherited from group 'all-atm'

atm-options {

##

## '0' was inherited from group 'all-atm'

##

vpi 0 {

##

## '200' was inherited from group 'all-atm'

##

maximum-vcs 200;

}

}

unit 100 {

##

##'point-to-point' was inherited from group 'all-atm'

point-to-point;

##'0.100' was inherited from group 'all-atm'

##

 

vci 0.100;

 

family inet

{

address

172.18.101.1/30;

}

 

}

A–18 • Interface Configuration Examples

www.juniper.net

Introduction to the Junos Operating System

This Appendix Discussed:

The interface configuration hierarchy;

Configuration examples for various interface types; and

Configuration groups.

www.juniper.net

Interface Configuration Examples • A–19

Introduction to the Junos Operating System

A–20 • Interface Configuration Examples

www.juniper.net