User guide

IP Virtual interfaces
iMG/RG Software Reference Manual (IPNetwork Functions)
4-6
4.1.6 Virtual interfaces
Usually, each transport only has one router interface associated with it, and each router interface has only one
IP address and local subnet associated with.
Virtual interfaces allow you to attach more than one IP interface to the same transport. Secondary IP addresses
allow you to associate more than one IP address with the same IP interface. Together, these features allow
many configurations that would not otherwise be possible.
Virtual interfaces allow you to create multiple router interfaces on the same transport, for example, on the
same Ethernet port. This allows the IP stack to communicate with and route between multiple subnets existing
on the same LAN.
4.1.6.1 Configuring virtual interfaces
To configure a virtual interface you need to create an IP interface, but instead of attaching it to a transport, you
need to attach it to a second IP interface that already has a transport attached to it.
In this way, the two interfaces share the transport that is only attached to one of the interfaces.
The original interface attached directly to a transport is called the real interface, and the interface that is
attached to the real interface is called the virtual interface.
To configure a virtual interface using the CLI:
Create the real interface, then create an Ethernet transport and attach the IP interface to the transport:
ip add interface real_ip 192.168.101.2 255.255.255.0
On FIBER A/C and ADSL A devices:
ethernet add transport eth1 myvlan
ip attach real_ip eth1
On the remaining models it’s enough to:
ip attach real_ip myvlan
Create the virtual interface:
ip add interface virtual_ip 192.168.50.10 255.255.255.0
Attach the virtual interface to the real interface:
ip attachvirtual virtual_ip real_ip
You can add more than one virtual interface to the same real interface.
Attaching them to a real interface instead of to a transport directly creates virtual interfaces. If the real inter-
face is deleted, then all associated virtual interfaces are detached automatically.