Cisco Support Community
Community Member

Secondary IP and Subinterface


I'm abit confuse abt secondary ip and subinterface... when shd i use sec ip or sub-int? both seems to have the same effect...



Community Member

Re: Secondary IP and Subinterface

For example running on LAN interface:

That you run DOT1Q trunk between a switch and the router. I.e. intraVLAN trunk. Then each subinterface matches the tag for prefered VLAN.

Running secondary on each interface, you have two subnets on same media. Maybe this could be two broadcast domains in a Windows NBT structure (not to good).

When configuring PVC/ATM or FR, a subinterface lets toy configure specific things for each logical link. Like ponit-to-point and point-to-multipoint.

Cisco Employee

Re: Secondary IP and Subinterface

Secondary IP addresses allow you to have multiple IP subnets on the same Layer2 broadcast domain. Subinterfaces can be used with different encapsulations (like a trunk on Fast Ethernet or PVC on a serial link) to achieve separate broadcast domains on the same interface. The reason to use one over the other usually depends on the interaction with other features. For example, will seconday ip addresses be distributed automatically by your routing protocol? will traffic forwarded between subnets on the same interface be fast switch or process switched if they are secondary ip's vs subinterfaces. From the LAN perspective you should consider separate broadcast domains for your subnets. That is, subinterfaces and trunk versus secondary ip's.

The following are links that give configuration information and example scenarios for both cases:

CreatePlease to create content