meta données pour cette page
  •  

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
windows:powershell_hyper-v_switchembededteaming [01/01/2025 22:56] mdlwindows:powershell_hyper-v_switchembededteaming [02/01/2025 18:22] (Version actuelle) mdl
Ligne 15: Ligne 15:
 </code> </code>
  
-  * Assignation  VLAN 5 sur la carte virtuelle OS 
-<code powershell> 
-Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "LAN_SWITCH"  -Access -VlanID 5 
-</code> 
  \\  \\
 == Modification NIC Teaming == == Modification NIC Teaming ==
Ligne 26: Ligne 22:
 </code> </code>
  
-  * Il faut ré appliquer la conf VLAN sur la carte ManagementOS 
-<code powershell> 
-Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "LAN_SWITCH"  -Access -VlanID 5 
  
-</code> + \\ 
-  * on créé une carte virtuelle puis on adresse son réseau:+== création d'une carte virtuelle et adressage réseau: == 
 <code powershell> <code powershell>
 Add-VMNetworkAdapter -Name LAN_DATA1 -ManagementOS -SwitchName LAN_SWITCH Add-VMNetworkAdapter -Name LAN_DATA1 -ManagementOS -SwitchName LAN_SWITCH
 +
 +
 +Get-NetAdapter
 +
 +Name                      InterfaceDescription                    ifIndex Status       MacAddress
 +----                      --------------------                    ------- ------       ----------
 +LAN_OSNIC                 Hyper-V Virtual Ethernet Adapter             12 Up           10-7C-61...
 +Lan_2                     Realtek(R) PCI(e) Ethernet Control...#     11 Up           00-0A-CD...
 +LAN_OSNIC_ISCSI           Hyper-V Virtual Ethernet Adapter #2          10 Up           E4-FA-C4...
 +LAN_10G                   ASUS XG-C100F 10G SFP+ Network Adapter       28 Up           10-7C-61...
 +Lan_3                     Realtek(R) PCI(e) Ethernet Control...#      8 Up           00-0A-CD...
 +LAN_iSCSI_10G             Marvell AQtion 10Gbit Network Adapter         7 Up           E4-FA-C4...
 +vEthernet (LAN_DATA1)     Hyper-V Virtual Ethernet Adapter #3          34 Up           00-15-5D...
 +Lan_1                     Realtek(R) PCI(e) Ethernet Control...#      3 Up           30-9C-23...
 +
 +
 +Rename-NetAdapter -Name "vEthernet (LAN_DATA1)" -NewName LAN_DATA1
 +
 Get-NetAdapter -Name LAN_DATA1 | New-NetIPAddress -IPAddress 192.168.10.100  -PrefixLength 24 -DefaultGateway 192.168.10.254 Get-NetAdapter -Name LAN_DATA1 | New-NetIPAddress -IPAddress 192.168.10.100  -PrefixLength 24 -DefaultGateway 192.168.10.254
 </code> </code>
 +
 +  * Assignation  VLAN 5 sur la carte virtuelle OS
 +<code powershell>
 +Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "LAN_DATA1"  -Access -VlanID 5
 +</code>
 +
 +  * ou trunk
 +<code powershell>
 +Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "LAN_DATA1"  -Trunk -AllowedVlanIdList 1-100 -NativeVlanId 5
 +</code>
 +
  \\  \\
 == Désactiver une carte == == Désactiver une carte ==