Read the API response
A GET to the controller returned the JSON below for one interface. Read it, then configure R1's Gi0/0 to match what the JSON says (address 10.1.1.1/24, enabled). Finally answer the questions about the data.
{
"interface": {
"name": "GigabitEthernet0/1",
"enabled": true,
"speed": 1000,
"addresses": [
{ "ip": "10.1.1.1", "mask": "255.255.255.0" }
],
"vlans": [1, 10, 20]
}
}
How it works: this is VulnTech NetLab, a network simulator running in your browser. Click a device in the diagram to open its console and type commands, just like on real equipment (? shows help, Tab finishes a word). Click a cable to inspect it. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Your work is kept if you reload; Reset starts the network over.
Solution explanation
The JSON's addresses array holds one object with the IP and mask, and vlans is a list of three numbers. You'd GET this to read it, POST to create a new one, PUT/PATCH to change it, DELETE to remove it. Objects use { }, lists use [ ].
Show solution
[R1]
enable
configure terminal
interface g0/0
ip address 10.1.1.1 255.255.255.0
no shutdown
end
show ip interface brief