Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Logical Interface Properties

This topic discusses how to configure various logical interface properties with examples.

Logical Interface Properties Overview

For a physical interface device to function, you must configure at least one logical interface on that device. For each logical interface, you must specify the protocol family that the interface supports. You can also configure other logical interface properties. Properties vary by Physical Interface Card (PIC) and encapsulation type, but include the IP address of the interface, and whether the interface supports multicast traffic, data-link connection identifiers (DLCI), virtual channel identifiers (VCI) and virtual path identifiers (VPI), and traffic shaping.

To configure logical interface properties, include the statement at the following hierarchy level:

[edit interfaces interface-name]

Specify the Logical Interface Number

Each logical interface must have a logical unit number. The logical unit number corresponds to the logical unit part of the interface name.

Cisco High-level Data Link Control (HDLC) and Ethernet circuit cross-connect (CCC) encapsulations support only a single logical interface, whose logical unit number must be 0. Frame Relay and ATM encapsulations support multiple logical interfaces, so you can configure one or more logical unit numbers.

You specify the logical unit number by including the unit statement:

You can include this statement at the following hierarchy level:

[edit interfaces interface-name]

The range of number available for the logical unit number varies for different interface types. See Ethernet Interfaces User Guide for Routing Devices for current range values.

Add a Logical Unit Description to the Configuration

You can include a text description of each logical unit in the configuration file. Any descriptive text that you include displays in the output of the show interfaces commands. It is also exposed in the ifAlias Management Information Base (MIB) object. It has no impact on the interface’s configuration. To add a text description, include the description statement:

You can include this statement at the [edit interfaces interface-name unit logical-unit-number] hierarchy level.

The description can be a single line of text. If the text contains spaces, enclose it in quotation marks.

For information about describing physical interfaces, see Configure the Interface Description.

Configure the Interface Bandwidth

By default, the operating system uses the physical interface speed for the MIB-II object, ifSpeed. You can configure the logical unit to populate the ifSpeed variable by configuring a bandwidth value for the logical interface. The bandwidth statement sets an informational-only parameter; you cannot adjust the actual bandwidth of an interface with this statement.

Note:

We recommend that you be careful when setting this value. Any interface bandwidth value that you configure using the bandwidth statement affects how the interface cost calculation for a dynamic routing protocol, such as OSPF. By default, the interface cost for a dynamic routing protocol is the following formula:

In the formula, bandwidth is the physical interface speed. However, if you specify a value for bandwidth using the bandwidth statement, that value is used to calculate the interface cost rather than the actual physical interface bandwidth.

To configure the bandwidth value for a logical interface, include the bandwidth statement:

You can include this statement at the following hierarchy level:

[edit interfaces interface-name unit logical-unit-number]

rate is the peak rate, in bits per second (bps) or cells per second (cps). You can specify a value in bps either as a complete decimal number or as a decimal number followed by the abbreviation k (1000), m (1,000,000), or g (1,000,000,000). You can also specify a value in cps by entering a decimal number followed by the abbreviation c. Values expressed in cps are converted to bps using the formula 1 cps = 384 bps. The value can be any positive integer. The bandwidth statement is valid for all logical interfaces except multilink interfaces.

Configure Interface Encapsulation on Logical Interfaces

Understand the Interface Encapsulation on Logical Interfaces

An encapsulation is used with certain packet types. You can configure an encapsulation on a logical interface.

The following restrictions apply to logical interface encapsulation:

  • With the atm-nlpid, atm-cisco-nlpid, and atm-vc-mux encapsulations, you can configure the inet family only.

  • With the circuit cross-connect (CCC) circuit encapsulations, you cannot configure a family on the logical interface.

  • A logical interface cannot have frame-relay-ccc encapsulation unless the physical device also has frame-relay-ccc encapsulation.

  • A logical interface cannot have frame-relay-tcc encapsulation unless the physical device also has frame-relay-tcc encapsulation. In addition, you must assign this logical interface a data-link connection identifier (DLCI) from 512 through 1022 and configure it as point to point.

  • A logical interface cannot have frame-relay-ether-type or frame-relay-ether-type-tcc encapsulation unless the physical interface has flexible-frame-relay encapsulation and is also on an IQ or IQE PIC.

  • For frame-relay-ether-type-tcc encapsulation, you must assign this logical interface a DLCI from 512 through 1022.

  • For interfaces that carry IP version 6 (IPv6) traffic, you cannot configure ether-over-atm-llc encapsulation.

  • When you use ether-over-atm-llc encapsulation, you cannot configure multipoint interfaces.

  • A logical interface cannot have vlan-ccc or vlan-vpls encapsulation unless the physical device also has vlan-ccc or vlan-vpls encapsulation, respectively. In addition, you must assign this logical interface a VLAN ID from 512 through 1023; if the VLAN ID is 511 or lower, it is subject to the normal destination filter lookups in addition to source address filtering

  • You can create an ATM cell-relay circuit by configuring an entire ATM physical device or an individual virtual circuit (VC). When you configure an entire device, only cell-relay encapsulation is the only encapsulation type allowed on the logical interfaces.

Configure the Encapsulation on a Logical Interface

Generally, you configure an interface’s encapsulation at the [edit interfaces interface-name] hierarchy level. However, for some encapsulation types, such as Frame Relay, ATM, or Ethernet VLAN encapsulations, you can also configure the encapsulation type that is used inside the Frame Relay, ATM, or VLAN circuit itself.

To configure encapsulation on a logical interface:

  1. In configuration mode, go to the [edit interfaces interface-name unit logical-unit-number] hierarchy level.
  2. Configure the encapsulation type.

Display the Encapsulation on a Logical Interface

Purpose

To display the configured encapsulation and its associated set options on a physical interface when the following is set at the [edit interfaces interface-name] hierarchy level:

  • interface-name—et-1/1/0

  • Encapsulation—atm-ccc-cell-relay

  • Unit—120

Action

Run the show command at the [edit interfaces interface-name] hierarchy level.

Meaning

The configured encapsulation and its associated set options are displayed as expected.

Configure Interface Encapsulation on PTX Series Routers

This topic describes how to configure interface encapsulation on PTX Series Packet Transport Routers. Use the flexible-ethernet-services configuration statement to configure different encapsulation for different logical interfaces under a physical interface. With flexible Ethernet services encapsulation, you can configure each logical interface encapsulation without range restrictions for VLAN IDs.

Supported encapsulations for physical interfaces include:

  • flexible-ethernet-services

  • ethernet-ccc

  • ethernet-tcc

In Junos OS Evolved, the flexible-ethernet-services encapsulation is not supported on PTX10003 devices.

Supported encapsulations for logical interfaces include:

  • ethernet

  • vlan-ccc

  • vlan-tcc

Note:

PTX Series Packet Transport Routers do not support extended-vlan-cc or extended-vlan-tcc encapsulation on logical interfaces. Instead, you can configure a tag protocol ID (TPID) value of 0x9100 to achieve the same results.

To configure flexible Ethernet services encapsulation, include the encapsulation flexible-ethernet-services statement at the [edit interfaces et-fpc/pic/port] hierarchy level. For example:

Overview of Accounting for the Logical Interface

This section discusses on how to configure accounting on logical interfaces.

Accounting Profiles Overview

Juniper Networks routers and switches can collect various kinds of data about traffic passing through the router and switch. You can set up one or more accounting profiles that specify some common characteristics of this data, including the following:

  • The fields used in the accounting records

  • The number of files that the router or switch retains before discarding, and the number of bytes per file

  • The polling period that the system uses to record the data

You configure the profiles and define a unique name for each profile using statements at the [edit accounting-options] hierarchy level. There are two types of accounting profiles: interface profiles and filter profiles. You configure interface profiles by including the interface-profile statement at the [edit accounting-options] hierarchy level. You configure filter profiles by including the filter-profile statement at the [edit accounting-options] hierarchy level.

You apply filter profiles by including the accounting-profile statement at the [edit firewall filter filter-name] and [edit firewall family family filter filter-name] hierarchy levels.

Configure Accounting for the Logical Interface

Before you begin

You must configure a profile to collect error and statistic information for input and output packets on a particular logical interface. An accounting profile specifies which statistics are collected and written to a log file.

An interface profile specifies the information collected and written to a log file. You can configure a profile to collect error and statistic information for input and output packets on a particular logical interface.

  1. To configure which statistics are collected for an interface, include the fields statement at the [edit accounting-options interface-profile profile-name] hierarchy level.
  2. Each accounting profile logs its statistics to a file in the /var/log directory. To configure which file to use, include the file statement at the [edit accounting-options interface-profile profile-name] hierarchy level.
    Note:

    You must specify a file statement for the interface profile that has already been configured at the [edit accounting-options] hierarchy level.

  3. Each interface with an accounting profile enabled has statistics collected once per interval time specified for the accounting profile. Statistics collection time is scheduled evenly over the configured interval. To configure the interval, include the interval statement at the [edit accounting-options interface-profile profile-name] hierarchy level.
    Note:

    The minimum interval allowed is 1 minute. Configuring a low interval in an accounting profile for a large number of interfaces might cause serious performance degradation.

  4. To configure the interfaces on which the accounting needs to be performed, apply the interface profile to a logical interface by including the accounting-profile statement at the [edit interfaces interface-name unit logical-unit-number] hierarchy level.

Introduction to Displaying the Accounting Profile for the Logical Interface

Purpose

Displaying the configured accounting profile of a particular logical interface at the [edit accounting-options interface-profile profile-name] hierarchy level requires that you specify certain parameters:

  • interface-name—et-1/0/1

  • Logical unit number—1

  • Interface profile —if_profile

  • File name—if_stats

  • Interval—15 minutes

Action

  • Run the show command at the [edit interfaces et-1/0/1 unit 1] hierarchy level.

  • Run the show command at the [edit accounting-options] hierarchy level.

Meaning

The configured accounting and its associated set options are displayed as expected.

Enable or Disable SNMP Notifications on Logical Interfaces

By default, Simple Network Management Protocol (SNMP) notifications are sent when the state of an interface or a connection changes.

To explicitly enable these notifications on the logical interface, include the traps statement:

To explicitly disable these notifications on the logical interface, include the no-traps statement:

You can include these statements at the following hierarchy level:

[edit interfaces interface-name unit logical-unit-number]

Disable a Logical Interface

You can unconfigure a logical interface, effectively disabling that interface, without removing the logical interface configuration statements from the configuration. To unconfigure a logical interface, include the disable statement:

You can include this statement at the following hierarchy level:

[edit interfaces interface-name unit logical-unit-number]

When an interface is disabled, a route (pointing to the reserved target “REJECT”) with the IP address of the interface and a 32–bit subnet mask is installed in the routing table. See Routing Protocols.

Example: Disable a Logical Interface

Sample interface configuration:

Disabling the interface:

Verifying the interface configuration: