Secondary IP addressing v. Subinterface IP addressing

jscimeca715jscimeca715 Member Posts: 280
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

  • blackninjablackninja Member Posts: 385
    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 ;)
  • SlowhandSlowhand MCSE: Cloud Platform and Infrastructure, MCSA: Windows Server 2003/2012/2016, CCNA Routing & Switchi Bay Area, CaliforniaMod Posts: 5,161 Mod
    With 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.
  • jscimeca715jscimeca715 Member Posts: 280
    Slowhand wrote: »
    With 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.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    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.
  • jscimeca715jscimeca715 Member Posts: 280
    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?
  • networker050184networker050184 Mod Posts: 11,962 Mod
    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.
  • jscimeca715jscimeca715 Member Posts: 280
    Thanks networker...I appreciate the help.
Sign In or Register to comment.