Secondary IP vs. Sub-Interface

polm

Diamond Member
May 24, 2001
3,183
0
0
What are the differences/advantages/dis-advantages of using Secondary IP Addressing vs. Sub-Interfaces in a multinet situation using Cisco equipment ?
 

ScottMac

Moderator<br>Networking<br>Elite member
Mar 19, 2001
5,471
2
0
A sub-interface is treated as a separate logical interface representing a VLAN or PVC (depending on the interface type).

A secondary address is just another address label on the same interface. It is mostly used to permit a smooth address transition from one address block to another.

With a subinterface, each logical interface can have QOS and queuing applied as if it were a separate physical interface. With a secondary address, you are constrained to the parameters set on the physical interface.

Routing protocols will handled the two differently (poorly on the secondary addresses interfaces).

Aside from the convenience of changing address blocks, secondary addressing is generally an Evil Thing that should be avoided. Improperly used, it could destroy all life as we know it on the face of the Earth (probably "a Bad Thing"). I spit on secondary addressing. It's not Our Friend.

Aside from some caveats with split horizon / poison reverse, sub-interface addressing makes Network Admin life easier and more ordered. Flowers grow and birds sing everywhere sub-interfaces are properly used. It's a Good Thing. Sub-Interfaces are our Friend, especially in the Frame-Relay environments and Ethernet VLANs / Trunks.


I hope this helps to clarify your understanding.


FWIW

Scott


 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
Scott's pretty much nailed it.

Secondary addressing is a bad thing and as mentioned reaks havoc on routing protocols. Sub interfaces are used when there is some kind of layer2 address that it can map to...

In the case of a trunk - you have 802.1q vlan information and can route between VLANS. In the case of Frame-Relay (above all this is really why they were invented) you have PVCs/DLCIs. So in both cases there is layer2 info that can differentiate the sub-interfaces even though they are on the same physical interface.