Subnets are being created from Inventory which causes problems with Site assignment and package download
search cancel

Subnets are being created from Inventory which causes problems with Site assignment and package download

book

Article ID: 162904

calendar_today

Updated On:

Products

Client Management Suite IT Management Suite Software Management Solution Deployment Solution

Issue/Introduction

Mystery subnets and some supernets keep showing up in the list of subnets in the SMP Console (under Settings > Notification Server > Site Server Settings > Subnets).  Supernets usually happen when a system Admin puts an incorrect Subnet Mask on a test system and then Inventory policies run.

The subnets often contain wide open masks which encompass other subnets into them causing confusion about why clients are getting packages from Package Servers they are not supposed to be getting packages from. Also, the clients are connecting to Task Servers they should not be connecting to.

Common supernets are 10.0.0.0/8 and 172.0.0.0/8, but can be created from any subnet when an incorrect Mask is used.

Environment

ITMS 8.x

Cause

There is a task called “Subnet Resource Creation Schedule” which runs every day with the “Package Refresh” shared schedule (default is 3:30am). This task creates subnets from Basic Inventory submitted by clients—if the subnets do not exist.  It is sometimes useful, but can cause problems in systems where the administrators would prefer creating subnets themselves, or importing them from AD.

To find possible supernets in the Symantec_CMDB use the following query:

select *
from Inv_AeX_AC_TCPIP ip
where ip.[Subnet Mask] like '255.0%'

select *
from inv_subnet
where [Subnet Mask] like '255.0.%'

select Subnet, [Subnet Mask], count(*) as ComputersOnSubnet
from Inv_Subnet
group by Subnet, [Subnet Mask]
order by 2 

Resolution

The “Subnet Resource Creation Schedule” task can be disabled from running by removing it from running within the “Package Refresh”  shared schedule. Disabling this schedule will stop Inventory data from populating the subnets.

If this is desired, run the following SQL against the database using “Microsoft SQL Server Management Studio”. It is strongly recommended to first make a backup of the database before making any changes:

  1. Run the following query and make note of the 'CreatedDate' value in case the change needs to be reverted later:

    select * from ItemSchedule where ItemGuid = '94FA536C-885C-4B73-92DE-BB49A7F0244E'

  2. Disable the “Subnet Resource Creation Schedule” task by using the following query

Delete from ItemSchedule WHERE ItemGuid = '94FA536C-885C-4B73-92DE-BB49A7F0244E'

UPDATE Item SET [State] = replace(cast([State] as nvarchar(max)),

                '<enabled>True</enabled>',

                '<enabled>False</enabled>'),

                ModifiedDate = getdate()

WHERE Guid = '94FA536C-885C-4B73-92DE-BB49A7F0244E'

UPDATE Item SET [State] = replace(cast([State] as nvarchar(max)),

                '<sharedSchedule>{bd6bf880-bfae-4dad-b746-e8be99f3b8a8}</sharedSchedule>',

                '<sharedSchedule>{00000000-0000-0000-0000-000000000000}</sharedSchedule>'),

                ModifiedDate = getdate()

WHERE Guid = '94FA536C-885C-4B73-92DE-BB49A7F0244E'


If the “Subnet Resource Creation Schedule” task needs to be enabled at a later date, the following query can be used (NOTE: replace <CreatedDateHere> with CreatedDate recorded in step 1)

-- 1. Re-enable the item state from False to True
UPDATE Item SET [State] = replace(cast([State] as nvarchar(max)),
                '<enabled>False</enabled>',
                '<enabled>True</enabled>'),
                ModifiedDate = getdate()
WHERE Guid = '94FA536C-885C-4B73-92DE-BB49A7F0244E'

-- 2. Re-associate with the "Package Refresh" Shared Schedule
UPDATE Item SET [State] = replace(cast([State] as nvarchar(max)),
                '<sharedSchedule>{00000000-0000-0000-0000-000000000000}</sharedSchedule>',
                '<sharedSchedule>{bd6bf880-bfae-4dad-b746-e8be99f3b8a8}</sharedSchedule>'),
                ModifiedDate = getdate()
WHERE Guid = '94FA536C-885C-4B73-92DE-BB49A7F0244E'

-- 3. Re-insert the ItemSchedule link if it was deleted
IF NOT EXISTS (SELECT 1 FROM ItemSchedule WHERE ItemGuid = '94FA536C-885C-4B73-92DE-BB49A7F0244E')
BEGIN
    INSERT INTO ItemSchedule (ItemGuid, ScheduleGuid, CreatedDate, ModifiedDate, Enabled)
    VALUES ('94FA536C-885C-4B73-92DE-BB49A7F0244E', 'BD6BF880-BFAE-4DAD-B746-E8BE99F3B8A8', '<CreatedDateHere>', getdate(), '1')
END

Additional Information

How to Prevent Supernet Creation in ITMS Using the InvalidSubnets Core Setting