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 20:36] mdlwindows:powershell_hyper-v_switchembededteaming [02/01/2025 18:22] (Version actuelle) mdl
Ligne 1: Ligne 1:
 ====== Switch Embedded Teaming (SET) ====== ====== Switch Embedded Teaming (SET) ======
  
-=NIC Teaming puis création du switch Hyper-v +  * Renommer carte physique 
-get-NetAdapter+<code powershell> 
 +Get-NetAdapter 
 +Rename-NetAdapter -Name Ethernet -NewName LAN_10G 
 +</code>
  
 +  * NIC Teaming puis création du switch Hyper-v
 +<code powershell>
 +get-NetAdapter
 New-VMSwitch -Name "LAN_SWITCH"   -NetAdapterName Lan_2,Lan_3 -AllowManagementOS $true -EnableEmbeddedTeaming $true New-VMSwitch -Name "LAN_SWITCH"   -NetAdapterName Lan_2,Lan_3 -AllowManagementOS $true -EnableEmbeddedTeaming $true
 +Disable-NetAdapterBinding -Name Ethernet -ComponentID ms_tcpip6
 +get-NetAdapter
 +</code>
  
 + \\
 +== Modification NIC Teaming ==
 +  * ici on enleve les cartes 1GB et on met une seule carte 10GB
 +<code powershell>
 +Set-VMSwitchTeam -Name "LAN_SWITCH"   -NetAdapterName Lan10g 
 +</code>
  
-Disable-NetAdapterBinding -Name Ethernet -ComponentID ms_tcpip6 
  
-get-NetAdapter + \\ 
-Set-VMNetworkAdapterVlan -ManagementOS -Access -VlanID 5+== création d'une carte virtuelle et adressage réseau: == 
 + 
 +<code powershell> 
 +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 
 +</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 == 
 + 
 +<code powershell> 
 +Get-NetAdapter -Name Ethernet0| Disable-NetAdapter 
 +</code>