UCSB NOC VLAN id calculator

This calculator will help you determine the appropriate 802.1q VLAN id for a particular UCSB IP network.

Enter a CIDR notated IP network (e.g.

Any IP network that lies on a '/26' boundary may be calculated with the following formula:

where x = IP subnet number

(The IP subnet number is the third octet of the IP address.
For example,

and y = last octet of the IP network address

(the IP network address is the first IP address in a network.
For example, the network address of is

Discard the remainder from any division.

( ( y / 64 ) + ( x + 1 ) * 4 ) + offset
Where offset = 0 for 128.111/16 and 1276 for 169.231/16

An easier formula to remember, but one which only works for '/24', or class 'C' networks, is:

(Subnet * 4 + 4) + offset

UCSB Home Page
Last modified: August 14 2006 | Web contact:
Privacy Policy  | ©2018 The Regents of the University of California