Building Network Automation Solutions
6 week online course starting in September 2017

Secondary subnets limitation

Chris sent me an interesting question:

How many secondary IPs can you put on a Vlan on a Catalyst switch?

The best way to figure out the answer to this question is to close the browser window pointing to (you won’t find the answer there), generate a test configuration and try to load it into your box.

I’ve written a one-line PERL script that generated the ip address secondary commands for me (you could also do it in almost any tool, including Excel) …

perl -e 'for ($i=1;$i<255;$i++){
  print "ip address 10.22.$i.1 secondary\n" }'

… and pasted the results into the console window. No problem, a router accepted at least 250 secondary addresses. Chris repeated the process on his Catalyst switch and reported that he stopped the test after approximately 150 addresses (obviously way more than what he needed).

Remember: experiment is sometimes the shortest path to the solution (a fact already known to ancient Greeks).

This article is part of You've asked for it series.


  1. can any one know , how to no shut multiple vlan interfaces on a router.

  2. Maybe like this:

    interface range vlan 1 - 100
    no shutdown

    Just guessing, works for FastEthernet interfaces on my 1800.

  3. Cisco says you can have unlimited number of secondary addresses

    According to my experience, there is always a limit ;)


You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.