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 google.com (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 255.255.255.0 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.

3 comments:

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

    ReplyDelete
  2. Maybe like this:

    interface range vlan 1 - 100
    no shutdown

    Just guessing, works for FastEthernet interfaces on my 1800.

    ReplyDelete
  3. Cisco says you can have unlimited number of secondary addresses
    http://www.cisco.com/en/US/docs/ios/12_1/iproute/configuration/guide/1cdipadr.html#wp1001012

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

    ReplyDelete

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

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.