You can create multiple shared IP interfaces over the same layer 2 logical interface—for example, atm 5/3.101—enabling more than one IP interface to share the same logical resources. You can configure one or more shared IP interfaces. Data sent over shared interfaces uses the same layer 2 interface. You can configure shared interfaces as you would unshared IP interfaces. Each shared interface has its own statistics.
Some layer 2 interfaces require a primary IP interface to negotiate certain IP parameters—for example, IPCP for PPP, ARP for Ethernet, and Inverse ARP for Frame Relay. If you do not configure a primary IP interface in such cases, the layer 2 interface cannot become operationally up.
A primary IP interface is the default interface for receiving data that arrives on the layer 2 interface. If you configure shared IP interfaces for the same layer 2 interface as your primary IP interface, by default data received on the layer 2 interface is received on the virtual router corresponding to the primary IP interface. A primary IP interface and all of its shared IP interfaces have the same interface location. You can configure a shared IP interface to receive data on the same layer 2 interface as a primary IP interface. You can delete primary and shared IP interfaces independently of each other.
You can create a primary IP interface as you do any other IP interface, as shown in the following example:
- host1(config)#virtual-router vr-a:vrf-2
- host1:vr-a:vrf-2:(config)#interface atm 5/3.101
- host1:vr-a:vrf-2:(config-if)#ip address 10.1.1.1
255.255.255.255
- host1:vr-a:vrf-2:(config-if)#exit
You do not have to configure a primary IP interface if you do not need one as described above. In the absence of a primary interface, you can still configure shared IP interfaces; however, in this scenario, data received on the layer 2 interface is discarded.
You cannot create shared IP interfaces for the following kinds of interface:
For information about configuring shared IP interfaces to receive data on the same layer 2 interface as a primary IP interface, see Configuring Subscriber Interfaces in the JUNOSe Broadband Access Configuration Guide.
To share IP interfaces:
- host1(config)#interface atm 5/3
- host1(config-if)#interface atm 5/3.101
- host1(config-if)#ip address 10.1.1.1 255.255.255.255
- host1(config-if)#exit
- host1(config)#interface ip si0
- host1(config-if)#ip address 2.2.2.2 255.0.0.0
interface ip
- host1(config)#interface ip si0
ip share-interface
- host1(config-if)#ip share-interface atm 5/3.101
ip share-nexthop
You can move an IP shared interface from one layer 2 interface to another by issuing the ip share-interface command to specify a different layer 2 interface. Moving an IP interface does not affect interface statistics, packets forwarded through the interface, or policies attached to the IP interface.
Example
The following commands create shared interface si0 on the layer 2 interface atm5/3.101:
- host1(config)#virtual-router vr-a:vrf-1
- host1:vr-a:vrf-1(config)#interface ip si0
- host1:vr-a:vrf-1(config-if)#ip share-interface
atm 5/3.101
- host1:vr-a:vrf-1(config-if)#exit
The following commands move shared interface si0 to the layer 2 interface atm5/3.201:
- host1:vr-a:vrf-1(config)#interface ip si0
- host1:vr-a:vrf-1(config-if)#ip share-interface
atm 5/3.201
Each shared interface has its own statistics. Packets transmitted on a shared IP interface are always counted only in the shared IP interface.
A subscriber interface is an extension of a shared IP interface. Shared IP interfaces are unidirectional—they can transmit but not receive traffic. In contrast, subscriber interfaces are bidirectional—they can both receive and transmit traffic.
For details about configuring and using subscriber interfaces, see Configuring Subscriber Interfaces.JUNOSe Broadband Access Configuration Guide.