OS10 Enterprise Edition User Guide Release 10.4.1.0

PDF

VLAN

Create VLAN interface

RESTCONF endpoint
/restconf/data/interfaces
JSON content
{
                                       	"interface": [{
                                       		"type": "iana-if-type:l2vlan",
                                       		"enabled": true,
                                       		"description": "vlan20",
                                       		"name": "vlan20"
                                       	}]
                                       }
                                    
Parameters
  • type string — Enter iana-if-type:l2vlan for a VLAN interface.
  • enabled bool — Enter true to enable the VLAN; enter false to disable the VLAN.
  • description string — Enter a text string to describe the VLAN, using a maximum of 80 alphanumeric characters.
  • name string — Enter vlan vlan-id , where vlan-id is from 1 to 4093.
Example
curl -X POST –u admin:admin –k "https://10.11.86.113/restconf/data/interfaces" 
                                       -H "accept: application/json" -H "Content-Type: application/json" 
                                       -d '{ "interface": [{ "type": "iana-if-type:l2vlan", "enabled": true, 
                                       "description": "vlan20",  "name": "vlan20" }]}'
                                    

Configure VLAN IP address

RESTCONF endpoint
/restconf/data/interfaces/interface/vlan20
JSON content
{
                                       	"interface": [{
                                       		"type": "iana-if-type:l2vlan",
                                       		"enabled": true,
                                       		"description": "vlan20",
                                       		"name": "vlan20",
                                       		"dell-ip:ipv4": {
                                       			"address": {
                                       				"primary-addr": "192.42.10.254/24"
                                       			}
                                       		}
                                       	}]
                                       }
                                    
Parameters
  • interface vlan-id — Enter the VLAN ID, from 1 to 4093.
  • type string — Enter iana-if-type:l2vlan for a VLAN interface.
  • enabled bool — Enter true to enable the interface; enter false to disable the interface.
  • description string — Enter a text string to describe the VLAN, using a maximum of 80 alphanumeric characters.
  • name string — Enter vlan vlan-id , where vlan-id is from 1 to 4093.
  • primary-addr A.B.C.D/prefix-length — Enter the VLAN IP address and mask.
Example
curl -X PATCH -u admin:admin 
                                       -k "https://10.11.86.113/restconf/data/interfaces/interface/vlan20" 
                                       -H "accept: application/json" -H "Content-Type: application/json" 
                                       -d '{"interface":[{"type":"iana-if-type:l2vlan","enabled":true,
                                       "description":"vlan20","name":"vlan20","dell-ip:ipv4":{"address":
                                       {"primary-addr":"192.42.10.254/24"}}}]}'
                                    

Change Ethernet port from Access to Trunk mode and enable port

RESTCONF endpoint
/restconf/data/interfaces/interface/ethernet1/1/3
JSON content
{
                                       	"interface": [{
                                       		"name": "ethernet1/1/3",
                                       		"enabled": "true",
                                       		"dell-interface:mode": "MODE_L2HYBRID"
                                       	}]
                                       }
                                    
Parameters
  • ethernet-interface — Enter the physical Ethernet interface in the format ethernet node/slot/port .
  • name string — Enter vlan vlan-id , where vlan-id is from 1 to 4093.
  • enabled bool — Enter true to enable the VLAN; enter false to disable the VLAN.
  • mode string — Enter a text value for the port mode. For Access mode, enter MODE_L2; for Trunk mode, enter MODE_L2HYBRID; for L3 mode, enter MODE_L2DISABLED.
Example
curl -X PATCH -u admin:admin 
                                       -k "https://10.11.86.113/restconf/data/interfaces/interface/ethernet1%2F1%2F3" 
                                       -H "accept: application/json"  -H "Content-Type: application/json" 
                                       -d '{ "interface": [{ "name":"ethernet1/1/3", "enabled": "true","dell-interface:mode":"MODE_L2HYBRID"}]}'
                                    

Add untagged port to VLAN

RESTCONF endpoint
/restconf/data/interfaces/interface/vlan20
JSON content
{
                                       	"interface": [{
                                       		"name": "vlan20",
                                       		"type": "iana-if-type:l2vlan",
                                       		"enabled": true,
                                       		"description": "vlan20",
                                       		"dell-interface:untagged-ports": ["ethernet1/1/3"],
                                       		"dell-ip:ipv4": {
                                       			"address": {
                                       				"primary-addr": "192.42.10.254/24"
                                       			}
                                       		}
                                       	}]
                                       }
                                    
Parameters
  • type string — Enter iana-if-type:l2vlan for a VLAN interface.
  • enabled bool — Enter true to enable the VLAN; enter false to disable the VLAN.
  • description string — Enter a text string to describe the VLAN, using a maximum of (80 alphanumeric characters.
  • name string — Enter vlan vlan-id , where vlan-id is from 1 to 4093.
  • untagged-ports string — Enter the untagged port interface in the format ethernet node/slot/port .
  • primary-addr A.B.C.D/prefix-length — Enter the VLAN IP address and mask.
Example
curl -X PATCH -u admin:admin 
                                       -k "https://10.11.86.113/restconf/data/interfaces/interface/vlan20" 
                                       -H "accept: application/json" -H "Content-Type: application/json" 
                                       -d '{"interface":[{"name":"vlan20","type":"iana-if-type:l2vlan",
                                       "enabled":true,"description":"vlan20","dell-interface:untagged-ports":
                                       ["ethernet1/1/3"],"dell-ip:ipv4":
                                       {"address":{"primary-addr":"192.42.10.254/24"}}}]}'
                                    

Display VLAN configuration

RESTCONF endpoint
/restconf/data/interfaces/interface/vlan20
JSON content
None
Parameters
  • interface vlan-id — Enter the VLAN ID, from 1 to 4093.
Example
curl -X GET -u admin:admin 
                                       -k "https://10.11.86.113/restconf/data/interfaces/interface/vlan20" 
                                       -H "accept: application/json"
                                    

Delete a VLAN configuration

RESTCONF endpoint
/restconf/data/interfaces/interface/vlan10
JSON content
None
Parameters
  • interface vlan-id — Enter the VLAN ID, from 1 to 4093.
Example
curl -X DELETE -u admin:admin 
                                       -k "https://10.11.86.113/restconf/data/interfaces/interface/vlan10"
                                       -H "accept: application/json"
                                    

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\