Mastering Windows Server 2016 Hyper-V

(Romina) #1
Multi-instance  Network Controller  deployment
Configuration of Network Controller via REST API
All Hyper-V host networking including VFP and host agents deployed
Multitenant gateway deployed and configured

Information about SDNExpress can be found at https://technet.microsoft.com/en-
us/library/mt427380.aspx and can be downloaded from
https://github.com/Microsoft/SDN. Once deployed, the various -
NetworkController
cmdlets are used to communicate with the Network Controller
and perform configuration. For example, you can use the following to connect to a
network controller, get the object for a virtual network, and then view all ACLs known:


Import-Module networkcontroller
$URI = "https://savdalnc01.savilltech.net"


Grab the Resource Id of the first Virtual Network


(Get-NetworkControllerVirtualNetwork -ConnectionUri $uri)[0] `
|fl ResourceId


ResourceId : 7fb0a029-136d-44cd-8697-8dbcac7a7c70


Grab all Virtual Subnets attached to the above Virtual Network


Get-NetworkControllerVirtualSubnet -ConnectionUri $uri `
-VirtualNetworkId "7fb0a029-136d-44cd-8697-8dbcac7a7c70"


Check for ACLs applied to a virtual subnet


Get-NetworkControllerVirtualSubnet -ConnectionUri $uri -VirtualNetworkId "7fb0a029-136d-44cd-8697-8dbcac7a7c70"
| foreach { $_.Properties.AccessControlList }


Get-NetworkControllerNetworkInterface -ConnectionUri $uri `
| foreach { $_.Properties.IpConfigurations.Properties.AccessControlList }


$acl = Get-NetworkControllerAccessControlList -ConnectionUri $uri `
-ResourceId "f8b97a4c-4419-481d-b757-a58483512640"


$acl.Properties.AclRules[0].Properties


If you experience problems with the Network Controller, I recommend several useful
PowerShell cmdlets for debugging:


Debug-NetworkController:    Information about   the Network Controller
Debug-NetworkControllerConfigurationState: Configuration state of a Network
Controller
Debug-ServiceFabricNodeStatus: Health of a Network Controller
Get-NetworkControllerDeploymentInfo: Deployment information of a Network
Controller
Get-NetworkControllerReplica: Replica information for a Network Controller
Free download pdf