Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Logical Interface Properties

The logical interfaces can be configured and the description is displayed in the output of the show commands. Media maximum transmission unit (MTU) is automatically calculated when configuring an interface and can also be modified. Simple Network Management Protocol (SNMP) notifications can be enabled on the logical interface to provide information about the state of an interface or when a connection changes.

Assign the Interface Address

You assign an address to an interface by specifying the address when configuring the protocol family. For the inet or inet6 family, configure the interface IP address. For the iso family, configure one or more addresses for the loopback interface. For the ccc, ethernet-switching, tcc, mpls, tnp, and vpls families, you never configure an address.

Note:

The Point-to-Point Protocol (PPP) address is taken from the loopback interface address that has the primary attribute. When the loopback interface is configured as an unnumbered interface, it takes the primary address from the donor interface.

To assign an address to an interface, perform the following steps:

  1. Configure the interface address at the [edit interfaces interface-name unit logical-unit-number family family] hierarchy level.
    • To configure an IP version 4 (IPv4) address on routers and switches, use the interface interface-name unit number family inet address a.b.c.d/nn statement at the [edit interfaces] hierarchy level.

      You can also assign multiple IPv4 addresses on the same interface.

      Note:
      • Juniper Networks routers and switches support /31 destination prefixes when used in point-to-point Ethernet configurations; however, they are not supported by many other devices, such as hosts, hubs, routers, or switches. You must determine if the peer system also supports /31 destination prefixes before configuration.

      • You can configure the same IPv4 address on multiple physical interfaces. When you assign the same IPv4 address to multiple physical interfaces, the operational behavior of those interfaces differs, depending on whether they are implicitly or explicitly point-to-point.

      • By default, all interfaces are assumed to be point-to-point (PPP) interfaces. For all interfaces except aggregated Ethernet, Fast Ethernet, and Gigabit Ethernet, you can explicitly configure an interface to be a point-to-point connection.

      • If you configure the same IP address on multiple interfaces in the same routing instance, Junos OS applies the configuration randomly on one of the interfaces. The other interfaces will remain without an IP address.

    • To configure an IP version 6 (IPv6) address on routers and switches, use the interface interface-name unit number family inet6 address aaaa:bbbb:...:zzzz/nn statement at the [edit interfaces] hierarchy level.

      Note:
      • You represent IPv6 addresses in hexadecimal notation using a colon-separated list of 16-bit values. The double colon (::) represents all bits set to 0.

      • You must manually configure the router or switch advertisement and advertise the default prefix for autoconfiguration to work on a specific interface.

  2. [Optional] Set the broadcast address on the network or subnet.
    Note:

    The broadcast address must have a host portion of either all ones or all zeros. You cannot specify the addresses 0.0.0.0 or 255.255.255.255.

  3. [Optional] specify the remote address of the connection for the encrypted, PPP-encapsulated, and tunnel interfaces.

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 following hierarchy levels:

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

  • [edit logical-systems logical-system-name interfaces interface-name unit logical-unit-number]

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

Note:

You can configure the extended DHCP relay to include the interface description in the option 82 Agent Circuit ID suboption. See DHCP Relay Agent Information Option (Option 82).

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

Configure the Media MTU

If you change the size of the media MTU, you must ensure that the size is equal to or greater than the sum of the protocol MTU and the encapsulation overhead. In other words:

The maximum media MTU size that you can configure depends on your device and the type of interface.

Note:

Changing the media MTU or protocol MTU causes an interface to be deleted and added again. This causes the link to flap.

To configure the media MTU:

  1. In configuration mode, go to the [edit interfaces interface-name] hierarchy level.
  2. Include the mtu statement.

Protocol MTU

Overview

The default protocol MTU depends on your device and the interface type. When you initially configure an interface, the protocol MTU is calculated automatically. If you subsequently change the media MTU, the protocol MTU on existing address families automatically changes.

If you reduce the media MTU size but one or more address families are already configured and active on the interface, you must also reduce the protocol MTU size. If you increase the size of the protocol MTU, you must ensure that the size of the media MTU is equal to or greater than the sum of the protocol MTU and the encapsulation overhead.

If you do not configure an MPLS MTU, Junos OS derives the MPLS MTU from the physical interface MTU. From this value, the software subtracts the encapsulation-specific overhead and space for the maximum number of labels that might be pushed in the Packet Forwarding Engine. The software provides for three labels of four bytes each, for a total of 12 bytes.

In other words, the formula used to determine the MPLS MTU is as follows:

You can configure the protocol MTU on all tunnel interfaces except virtual tunnel (VT) interfaces. Junos OS sets the MTU size for VT interfaces to unlimited by default.

Configure the Protocol MTU

Note:

Changing the media MTU or protocol MTU causes an interface to be deleted and added again. This causes the link to flap.

To configure the protocol MTU:

  1. In configuration mode, go to the [edit interfaces interface-name unit logical-unit-number] hierarchy level.
  2. Include the mtu statement for each family you want to configure with a non-default MTU value.

    If you configure the protocol MTU for any family, the configured value is applied to all families that are configured on the logical interface.

    Note:

    If you are configuring the protocol MTU for both inet and inet6 families on the same logical interface, you must configure the same value for both families. We do not recommend configuring different MTU size values for inet and inet6 families that are configured on the same logical interface.

  3. (Optional) On some devices, you can also configure the protocol MTU at the logical systems hierarchy:

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 levels:

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

  • [edit logical-systems logical-system-name 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.

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 levels:

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

  • [edit logical-systems logical-system-name interfaces interface-name unit logical-unit-number]

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. For more information, see the Junos OS Network Management Administration Guide for Routing Devices.

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. For more information, see the Routing Policies, Firewall Filters, and Traffic Policers User Guide.

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. For more information about how to configure an accounting-data log file, see the Configuring Accounting-Data Log Files.

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. For more information, see Configuring Accounting-Data Log Files.

  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—ge-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 ge-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.

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 levels:

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

  • [edit logical-systems logical-system-name 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: