-- Performance vlan config
-- modify history: not change
--    

TPLINK-PRIVATE-VLAN-MIB DEFINITIONS ::= BEGIN

          IMPORTS
              TPRowStatus       	 
  					FROM TPLINK-TC-MIB
              OBJECT-TYPE,MODULE-IDENTITY
          	  	         	FROM SNMPv2-SMI
              tplinkMgmt	          
          	  	          FROM TPLINK-MIB
			  ifIndex 
							FROM  RFC1213-MIB;
          	  	          	
       		  tplinkPrivateVlanMIB MODULE-IDENTITY  
			    LAST-UPDATED    "201012200000Z"
			    ORGANIZATION    "TPLINK"
			    CONTACT-INFO		"www.tplink.com"
			    DESCRIPTION
			             "Implementation of the privlan is mandatory for the swtich."
			    REVISION        "201012200000Z"
			    DESCRIPTION
					"Initial version of this MIB module."
			    ::= { tplinkMgmt 18 }      	      
      	             
         tplinkPrivateVlanMIBObjects   OBJECT IDENTIFIER    ::=  {tplinkPrivateVlanMIB 1}
		 tplinkPrivateVlanMIBNotifications OBJECT IDENTIFIER ::=   {tplinkPrivateVlanMIB 2}
         privateVlanTable OBJECT-TYPE
              SYNTAX  SEQUENCE OF PRIVATEVLANENTRY
              MAX-ACCESS  not-accessible
              STATUS  current
              DESCRIPTION
                      "A list of private VLAN control entries."
              ::= { tplinkPrivateVlanMIBObjects 1 }

         privateVlanEntry OBJECT-TYPE
              SYNTAX  PRIVATEVLANENTRY
              MAX-ACCESS  not-accessible
              STATUS  current
              DESCRIPTION
                      "PVLAN (Private Virtual Local Area Network) 
                      technology is developed for saving VLANs of
                      uplink devices and decrease broadcast message
                      . Private VLAN can enhance performance by 
                      conserving bandwidth, and improve security
                       by decreasing broadcast ."
              INDEX   { secondaryVlan }
              ::= { privateVlanTable 1 }
      
          PRIVATEVLANENTRY ::=
              SEQUENCE {
                  secondaryVlan
                 		 INTEGER ,
                  primaryVlan
                         INTEGER ,                   
                  privateVlanPort
                 		 OCTET STRING ,
				  privateVlanType
				         INTEGER,
                  privateVlanStatus
						TPRowStatus
              }
              
          secondaryVlan OBJECT-TYPE
              SYNTAX  INTEGER (2..4094)
              MAX-ACCESS  read-create
              STATUS  current
              DESCRIPTION
                      "The ID number of the Secondary VLAN."
              ::= { privateVlanEntry 1 } 
          
          primaryVlan OBJECT-TYPE
              SYNTAX  INTEGER (2..4094) 
              MAX-ACCESS  read-create
              STATUS  current
              DESCRIPTION
                      "The ID number of the Primary VLAN."
              ::= { privateVlanEntry 2 }
                
              
          privateVlanPort OBJECT-TYPE
              SYNTAX  OCTET STRING (SIZE (0..255))
              MAX-ACCESS  read-only
              STATUS  current
              DESCRIPTION
                      "Displays the Port number of the Private VLAN."
              ::= { privateVlanEntry 3 }   
         privateVlanType OBJECT-TYPE
              SYNTAX  INTEGER{
										      	community(1), 	
												isolated(2)
										      		}
              MAX-ACCESS  read-create
              STATUS  current
              DESCRIPTION
                      "The Port Type for the port.
                      1. promiscuous
                      2. host"
              ::= { privateVlanEntry 4 }			  
            
         privateVlanStatus OBJECT-TYPE
              SYNTAX  TPRowStatus
              MAX-ACCESS  read-create
              STATUS  current
              DESCRIPTION
                      "the following two values are states:
                     these values may be read or written
                     active(1),
                     notInService(2),

                     the following value is a state:
                     this value may be read, but not written
                     notReady(3),

                     the following three values are
                     actions: these values may be written,
                     but are never read
                     createAndGo(4),
                     createAndWait(5),
                     destroy(6)"
              ::= { privateVlanEntry 5 }
              
			    
         privateVlanPortTable OBJECT-TYPE
              SYNTAX  SEQUENCE OF PRIVATEVLANPORTENTRY
              MAX-ACCESS  not-accessible
              STATUS  current
              DESCRIPTION
                      "A list of vlan port type control entries."
              ::= { tplinkPrivateVlanMIBObjects 2 }

          privateVlanPortEntry OBJECT-TYPE
              SYNTAX  PRIVATEVLANPORTENTRY
              MAX-ACCESS  not-accessible
              STATUS  current
              DESCRIPTION
                      "The PVLAN provides two Port Types 
                      for the ports, Promiscuous and Host. 
                      Usually, the Promiscuous port is used 
                      to connect to uplink devices while the 
                      Host port is used to connect to the he 
                      terminal hosts, such as PC and Server."
              INDEX   { ifIndex }
              ::= { privateVlanPortTable 1 }
      
          PRIVATEVLANPORTENTRY ::=
              SEQUENCE {
					portNum
                 		 OCTET STRING,
                    portType
                        INTEGER,
                    portConfigPrimaryVlan
                        INTEGER , 
                    portConfigsecondaryVlan
                 		INTEGER , 
                    vlanPortStatus
                        TPRowStatus
              }
			  
             portNum  OBJECT-TYPE
			     SYNTAX  OCTET STRING (SIZE (0..16))  
			      MAX-ACCESS  read-only
			      STATUS  current
			      DESCRIPTION
			              "The port id."
			      ::= { privateVlanPortEntry 1} 
                     
		    portType OBJECT-TYPE
              SYNTAX  INTEGER{
										      		promiscuous(1), 		--Disable
										      		host(2)						--Enable
										      		}
              MAX-ACCESS  read-create
              STATUS  current
              DESCRIPTION
                      "The Port Type for the port.
                      1. promiscuous
                      2. host"
              ::= { privateVlanPortEntry 2 }
          
          portConfigPrimaryVlan OBJECT-TYPE
          	  SYNTAX  INTEGER (2..4094)
              MAX-ACCESS  read-create
              STATUS  current
              DESCRIPTION
                      "Specify the Primary VLAN the port belongs to."
              ::= { privateVlanPortEntry 3 }
              
          portConfigsecondaryVlan OBJECT-TYPE
          	  SYNTAX  INTEGER (2..4094)
              MAX-ACCESS  read-create
              STATUS  current
              DESCRIPTION
                      "Specify the Secondary VLAN the port belongs to."
              ::= { privateVlanPortEntry 4 }
      	
      	  vlanPortStatus OBJECT-TYPE
              SYNTAX  TPRowStatus
              MAX-ACCESS  read-create
              STATUS  current
              DESCRIPTION
                      "the following two values are states:
                     these values may be read or written
                     active(1),
                     notInService(2),

                     the following value is a state:
                     this value may be read, but not written
                     notReady(3),

                     the following three values are
                     actions: these values may be written,
                     but are never read
                     createAndGo(4),
                     createAndWait(5),
                     destroy(6)"
              ::= { privateVlanPortEntry 5 }

END	  	         
