You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### `Get-VNVDTrafficRuleAction`: Get the VDTrafficRule Action for the TrafficRule from the given VDTrafficFilterPolicy configuration from VDPortgroup(s)
21
+
22
+
```PowerShell
23
+
## Get the traffic rules action from the traffic rules from the TrafficeRuleset property of the TrafficFilterPolicyConfig
#### `Get-VNVDTrafficRuleQualifier`: Get the VDTrafficRule Qualifier for the TrafficRule from the given VDTrafficFilterPolicy configuration from VDPortgroup(s)
28
+
29
+
```PowerShell
30
+
## Get the traffic rules qualifiers from the traffic rules from the TrafficeRuleset property of the TrafficFilterPolicyConfig
#### `Get-VNVDTrafficRuleSet`: Get the DvsTrafficRuleset for the given VDTrafficFilterPolicy configuration from VDPortgroup(s), or from VDPortgroup(s) directly
35
+
36
+
```PowerShell
37
+
## Get the traffic ruleset from the TrafficFilterPolicyConfig object of a given vDPG. Can also get the ruleset from just the vDPG, but this "from TrafficFilterPolicyConfig" method is to help show the relationship between the vDPG, the TrafficFilterPolicyConfig, and the TrafficRuleset
#### `New-VNVDTrafficRule`: Make new Traffic Rule and add it to the given Traffic Ruleset of a vDPortgroup traffic filter policy
45
+
46
+
```PowerShell
47
+
## Create a new Traffic Rule that has two Qualifiers and add it to the given TrafficRuleset from the given vDPortgroup. The new Traffic Rule allows vMotion traffic from given source network
## Create a new Traffic Rule that has two Qualifiers and add it to the given TrafficRuleset from the given vDPortgroup. The new Traffic Rule adds a DSCP tag with value 8 to VM traffic from given source IP
51
+
Get-VDPortGroup myVDPG0 | Get-VNVDTrafficRuleSet | New-VNVDTrafficRule -Name "Apply DSCP tag to VM traffic from given address" -Action (New-VNVDTrafficRuleAction -DscpTag 8) -Qualifier (New-VNVDTrafficRuleQualifier -SystemTrafficType virtualMachine), (New-VNVDTrafficRuleQualifier -SourceIpAddress 172.16.1.2) -Direction outgoingPackets
52
+
```
53
+
54
+
#### `New-VNVDTrafficRuleAction`: Make new VMware.Vim.DvsNetworkRuleAction, for use in creating vDPortgroup traffic filter policy rule. Currently supports creating Rule Actions of types DvsAcceptNetworkRuleAction ("Allow"), DvsDropNetworkRuleAction, and DvsUpdateTagNetworkRuleAction
55
+
56
+
```PowerShell
57
+
## Create a new DvsAcceptNetworkRuleAction object that will specify an action of "Allow packet"
58
+
New-VNVDTrafficRuleAction -Allow
59
+
60
+
## Create a new DvsDropNetworkRuleAction object that will specify an action of "Drop packet"
61
+
New-VNVDTrafficRuleAction -Drop
62
+
63
+
## Create a new DvsUpdateTagNetworkRuleAction object that will specify an action of "tag with DSCP value of 8, and clear the QoS tag of packet"
64
+
New-VNVDTrafficRuleAction -DscpTag 8 -QosTag 0
65
+
```
66
+
67
+
#### `New-VNVDTrafficRuleQualifier`: Make new VMware.Vim.DvsNetworkRuleQualifier, for use in creating vDPortgroup traffic filter policy rule
68
+
69
+
```PowerShell
70
+
## Create a new DvsSystemTrafficNetworkRuleQualifier for traffic that is vMotion
## Create a new DvsIpNetworkRuleQualifier for traffice from the given source IP that is _not_ to the given destination network, using TCP (6) protocol, and that is from source ports of 443 or 444
## Create a new DvsMacNetworkRuleQualifier for traffic from the source MAC address, that is _not_ to the destination MAC, that is using EtherType 0x8922, and that is not on VLAN 10
Copy file name to clipboardExpand all lines: vNugglets.VDNetworking/GetItems.ps1
+8-7Lines changed: 8 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
functionGet-VNVDTrafficFilterPolicyConfig {
2
2
<#.Description
3
-
Function to get the VDTrafficFilterPolicy configuration for the given VDPortgroup(s) from VDSwitch(es). The VDTrafficFilterPolicy is the item that can be enabled/disabled at the vDPG level.
3
+
Get the VDTrafficFilterPolicy configuration for the given VDPortgroup(s) from VDSwitch(es)
Get the TrafficFilter policy config for the given VDPortgroup
7
8
8
9
.Outputs
9
-
VNVDTrafficFilterPolicyConfig with properties with at least VMware.Vim.DvsTrafficFilterConfig and VMware.Vim.DistributedVirtualPortgroup for the TrafficFilter policy confi
10
+
VNVDTrafficFilterPolicyConfig with properties with at least VMware.Vim.DvsTrafficFilterConfig and VMware.Vim.DistributedVirtualPortgroup for the TrafficFilter policy config
10
11
#>
11
12
[CmdletBinding()]
12
13
[OutputType([VNVDTrafficFilterPolicyConfig])]
@@ -30,7 +31,7 @@ function Get-VNVDTrafficFilterPolicyConfig {
30
31
31
32
functionGet-VNVDTrafficRuleSet {
32
33
<#.Description
33
-
Function to get the DvsTrafficRuleset for the given VDTrafficFilterPolicy configuration from VDPortgroup(s), or from VDPortgroup(s) directly.
34
+
Get the DvsTrafficRuleset for the given VDTrafficFilterPolicy configuration from VDPortgroup(s), or from VDPortgroup(s) directly
## IP qualifier of the traffic destination, either a single IP, or a CIDR-notation network. If this parameter is omitted (or $null), it will match "any IPv4 or any IPv6 address". Currently accepts IPv4 address / CIDR network
48
-
# See description of parameter -SourceIpAddress for more information.
48
+
# See description of parameter -SourceIpAddress for more information
## Single MAC address or a MAC address range of the traffic source. If this parameter is omitted (or $null), it will match "any MAC address".
80
+
## Single MAC address or a MAC address range of the traffic source. If this parameter is omitted (or $null), it will match "any MAC address"
81
81
#
82
-
# The MAC address "range" is a mask that is used in matching the MAC address. A MAC address is considered matched if the "and" operation of the mask on the MAC address and address yields the same result. For example, a MAC of "00:A0:FF:14:FF:29" is considered matched for a address of "00:A0:C9:14:C8:29" and a mask of "FF:FF:00:FF:00:FF".
82
+
# The MAC address "range" is a mask that is used in matching the MAC address. A MAC address is considered matched if the "and" operation of the mask on the MAC address and address yields the same result. For example, a MAC of "00:A0:FF:14:FF:29" is considered matched for a address of "00:A0:C9:14:C8:29" and a mask of "FF:FF:00:FF:00:FF"
83
83
#
84
84
# Single MAC example: 00:00:56:01:23:45
85
85
# MAC range example: 00:A0:C9:14:C8:29/FF:FF:00:FF:00:FF
@@ -88,21 +88,21 @@ function New-VNVDTrafficRuleQualifier {
88
88
## Switch: negate the source MAC address? If $true, then this has the effect of "not source MAC", like "not traffic from 00:00:56:01:23:45"
## EtherType protocol used. Example: 0x8922. This corresponds to the EtherType field in Ethernet frame. The valid values can be found from IEEE list at: http://standards.ieee.org/regauth/ as mentioned in RFC 5342 (for example, in text format at http://standards-oui.ieee.org/ethertype/eth.txt).
99
+
## EtherType protocol used. Example: 0x8922. This corresponds to the EtherType field in Ethernet frame. The valid values can be found from IEEE list at: http://standards.ieee.org/regauth/ as mentioned in RFC 5342 (for example, in text format at http://standards-oui.ieee.org/ethertype/eth.txt)
## Switch: negate EtherType protocol? If $true, then this has the effect of "not this ethertype protocol", like "not traffic to using ethertype protocol 0x8922"
## Switch: negate VLAN ID? If $true, then this has the effect of "not this VLAN ID", like "not traffic to using VLAN ID 1234"
@@ -326,7 +326,7 @@ function New-VNVDTrafficRule {
326
326
# "List of Network rule qualifiers. 'AND' of this array of network rule qualifiers is applied as one network traffic rule. For TrafficRule belonging to DvsFilterPolicy: There can be a maximum of 1 DvsIpNetworkRuleQualifier, 1 DvsMacNetworkRuleQualifier and 1 DvsSystemTrafficNetworkRuleQualifier for a total of 3 qualifiers"
Copy file name to clipboardExpand all lines: vNugglets.VDNetworking/vNugglets.VDNetworking_SupportingFunctions.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ function _Set-VNVDTrafficRuleset_helper {
31
31
## Operation to take on the TrafficRuleSet's Rules array with the given TrafficRule(s). "Add" the rule to the array, "Remove" the rule from the array, or "Overwrite" the array to be just the given rule(s)
0 commit comments