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.
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:
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:
description text;
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.
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).
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:
Minimum media MTU = protocol MTU + encapsulation overhead
The maximum media MTU size that you can configure depends on your device and the type of interface.
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:
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:
MPLS MTU = physical interface MTU – encapsulation overhead – 12
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
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:
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.
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:
cost = reference-bandwidth/bandwidth,
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:
bandwidth rate;
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:
(traps);
To explicitly disable these notifications on the logical interface, include the
no-traps
statement:
(no-traps);
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
- Configure Accounting for the Logical Interface
- Introduction to Displaying the Accounting Profile for the Logical Interface
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.
See Also
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.[edit interfaces ge-1/0/1 unit 1] accounting-profile if_profile;
-
Run the
show
command at the[edit accounting-options]
hierarchy level.interface-profile if_profile { interval 15; file if_stats { fields { input-bytes; output-bytes; input-packets; output-packets; input-errors; output-errors; } } }
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:
disable;
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:
[edit interfaces] user@host# show et-2/1/1 { vlan-tagging; encapsulation flexible-ethernet-services; unit 0 { vlan-id 1000; family inet { address 11.0.0.20/24; } } }
Disabling the interface:
[edit interfaces et-2/1/1 unit 0] user@host# set disable
Verifying the interface configuration:
[edit interfaces et-2/1/1] user@host# show disable; # Interface is marked as disabled. unit 0 { vlan-id 1000; family inet { address 11.0.0.20/24; } }