Secondary IP addressing v. Subinterface IP addressing
jscimeca715
Member Posts: 280
in CCNA & CCENT
Am I right in saying secondary IP addressing and subinterface ip addressing are mutually exclusive? I would imagine you would only use secondary IP addressing if you only have one vlan? And subinterface IP addressing if using mulitple vlans? Am I correct in assuming that? Any help would be greatly appreciated.
Comments
-
blackninja Member Posts: 385jscimeca715 wrote: »Am I right in saying secondary IP addressing and subinterface ip addressing are mutually exclusive? I would imagine you would only use secondary IP addressing if you only have one vlan? And subinterface IP addressing if using mulitple vlans? Am I correct in assuming that? Any help would be greatly appreciated.
You would use secondary IP addressing to increase the number of available ip addresses.
You would use a sub-interface per Vlan for the router to route between Vlans.Currently studying:
CCIE R&S - using INE workbooks & videos
Currently reading:
Everything. Twice -
Slowhand Mod Posts: 5,161 ModWith subinterfaces, you're splitting a physical interface into several logical interfaces, fooling the router into thinking that it has more ports than there really are. Secondary IP addresses allow you to assign multiple IP addresses to a single interface, or even a subinterface.
Free Microsoft Training: Microsoft Learn
Free PowerShell Resources: Top PowerShell Blogs
Free DevOps/Azure Resources: Visual Studio Dev Essentials
Let it never be said that I didn't do the very least I could do. -
jscimeca715 Member Posts: 280With subinterfaces, you're splitting a physical interface into several logical interfaces, fooling the router into thinking that it has more ports than there really are. Secondary IP addresses allow you to assign multiple IP addresses to a single interface, or even a subinterface.
So, does sub-interface addressing create a default gateway for that particular vlan's subnet? I'm still confused sorry. -
networker050184 Mod Posts: 11,962 Modjscimeca715 wrote: »So, does sub-interface addressing create a default gateway for that particular vlan's subnet? I'm still confused sorry.
Yes, the sub interface ip can be used as the default-gateway for the vlan. The sub interface allows the packets to be tagged (or untagged if you use the native) over the trunk to the switch. The secondary ip can also be used as a default-gateway but does not tag the traffic withoug using a subinterface.An expert is a man who has made all the mistakes which can be made. -
jscimeca715 Member Posts: 280networker050184 wrote: »Yes, the sub interface ip can be used as the default-gateway for the vlan. The sub interface allows the packets to be tagged (or untagged if you use the native) over the trunk to the switch. The secondary ip can also be used as a default-gateway but does not tag the traffic withoug using a subinterface.
Excellent, thank you. I would imagine that in real world application the subinterfaces option is more popular. I would think you'd get greater design flexibility, no? -
networker050184 Mod Posts: 11,962 Modjscimeca715 wrote: »Excellent, thank you. I would imagine that in real world application the subinterfaces option is more popular. I would think you'd get greater design flexibility, no?
Yes you are correct. The only time I have used secondary ips personally was for temporary moves of devices when its easier to leave the current ip on instead of renumbering. I have seen them used for the lazy reason mentioned earlier to get more ips on a vlan. That is poor design IMO though.An expert is a man who has made all the mistakes which can be made.