ON THIS PAGE
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 statements at the following hierarchy levels:
-
[edit interfaces interface-name]
-
[edit logical-systems logical-system-name 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. For more information, see Interface Naming Overview.
Point-to-point Protocol (PPP), 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:
unit logical-unit-number { ... }
You can include this statement at the following hierarchy levels:
-
[edit interfaces interface-name]
-
[edit logical-systems logical-system-name interfaces interface-name]
The range of number available for the logical unit number varies for different interface types. See unit 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:
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).
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.
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.
Configure Interface Encapsulation on Logical Interfaces
- Understand the Interface Encapsulation on Logical Interfaces
- Configure the Encapsulation on a Logical Interface
- Display the Encapsulation on a Logical Interface
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. For more information, see Configuring VLAN and Extended VLAN Encapsulation.
-
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. For more information, see Configuring an ATM1 Cell-Relay Circuit Overview.
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:
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 are set at the [edit
interfaces interface-name]
or [edit
logical-systems logical-system-name interfaces
interface-name]
hierarchy level:
-
interface-name—at-1/1/0
-
Encapsulation—
atm-ccc-cell-relay
-
Unit—120
Action
Run the show
command at the [edit interfaces
interface-name]
hierarchy level.
[edit interfaces at-1/1/0] user@host# show encapsulation atm-ccc-cell-relay; unit 120 { encapsulation atm-ccc-cell-relay; }
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
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:
interfaces { et-1/0/3 { vlan-tagging; encapsulation flexible-ethernet-services; unit 0 { vlan-id 1000; family inet { address 11.0.0.20/24; } } unit 1 { encapsulation vlan-ccc; vlan-id 1010; } unit 2 { encapsulation vlan-tcc; vlan-id 1020; family tcc { proxy { inet-address 11.0.2.160; } remote { inet-address 11.0.2.10; } } } } }
Configure a Point-to-Point Connection
By default, all interfaces are assumed to be point-to-point connections. You must ensure that the maximum transmission unit (MTU) sizes on both sides of the connection are the same.
For all interfaces except aggregated Ethernet, Fast Ethernet,
and Gigabit Ethernet, you can explicitly configure an interface to
be a point-to-point connection by including the point-to-point
statement:
point-to-point;
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]
Configure a Multipoint Connection
By default, all interfaces are assumed to be point-to-point
connections. To configure an interface to be a multipoint connection,
include the multipoint
statement:
multipoint;
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]
Configure Dynamic Profiles for PPP
A dynamic profile acts as a template that enables you to create, update, or remove a configuration that includes attributes for client access (such as, interface or protocol) or service (such as, IGMP). Using dynamic profiles, you can consolidate all of the common attributes of a client (and eventually a group of clients) and apply the attributes simultaneously.
After dynamic profiles are created, the profiles reside in a profile library on the router. You
can then use the dynamic-profile
statement to attach profiles to
interfaces. To assign a dynamic profile to a PPP interface, you can include the
dynamic-profile
statement at the [edit interfaces
interface-name unit logical-unit-number
ppp-options]
hierarchy level:
[edit interfaces interface-name unit logical-unit-number ppp-options] dynamic-profile profile-name;
To monitor the configuration, issue the show interfaces interface-name
command.
For information about dynamic profiles, see Dynamic Profiles Overview in the Junos Subscriber Access Configuration Guide.
For information about creating dynamic profiles, see Configuring a Basic Dynamic Profile in the Junos Subscriber Access Configuration Guide.
For information about assigning a dynamic profile to a PPP interface, see Attaching Dynamic Profiles to Static PPP Subscriber Interfaces in the Junos Subscriber Access Configuration Guide.
For information about using dynamic profiles to authenticate PPP subscribers, see Configuring Dynamic Authentication for PPP Subscribers.
Dynamic profiles for PPP subscribers are supported only on PPPoE interfaces for this release.
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.
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]
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; } }