이 콘텐츠는 선택한 언어로 제공되지 않습니다.

4.10. nic


The nic resource type groups network interface resources in a Red Hat Enterprise Virtualization environment. These resources acts as sub-resources for both host and vm resources but are defined differently for each. This section contains two tables with parameters for each.
Expand
Table 4.24. Host network interface parameters
Name Type Description Required User Creatable User Updatable
--network-id|name
 string
A reference to the network, if any, that the interface is attached.
Yes
Yes
Yes
--name
 string
The name of the host network interface, e.g. eth0.
Yes
Yes
Yes
--bonding-slaves-host_nic
 collection
A collection of slave network interfaces that form a bonded interface.
No
Yes
Yes
--bonding-options-option
 collection
A list of options for a bonded interface. Each option contains property name and value attributes.
No
Yes
Yes
--ip-gateway
 string
The IP address for the network's gateway.
No
Yes
Yes
--boot_protocol
 string
The protocol for IP address assignment when the host is booting, such as dhcp or static.
No
Yes
Yes
--mac
 string
The MAC address of the interface.
No
Yes
Yes
--ip-address
 string
The IP address of the interface.
No
Yes
Yes
--ip-netmask
 string
The netmask for the interface's IP address.
No
Yes
Yes
--ip-mtu
int
The maximum transmission unit for the interface.
No
No
Yes
Expand
Table 4.25. Virtual Machine network interface parameters
Name Type Description Required User Creatable User Updatable
--network-id|name
 string
A reference to the network, if any, that the interface is attached.
Yes
Yes
Yes
--name
 string
The name of the interface, e.g. eth0.
Yes
Yes
Yes
--mac-address
 string
The MAC address of the interface.
No
Yes
Yes
--interface
 string
Defines the interface type, such as e1000, virtio, rtl8139 and rtl8139_virtio.
No
Yes
Yes
--port_mirroring-networks-network
 collection
Defines a set of networks to copy (mirror) network data from the network interface.
No
Yes
Yes
The --bonding-slaves-host_nic parameter is a collection that uses the sub-parameters in the following table.
Expand
Table 4.26. --bonding-slaves-host_nic
Name Type Description
host_nic.id|name
string
A reference to another host NIC to bond.
The --bonding-options-option parameter is a collection that uses the sub-parameters in the following table.
Expand
Table 4.27. --bonding-options-option
Name Type Description
option.name
string
The bonding option name.
option.value
string
The bonding option value.
type
string
The bonding option type.
The --port_mirroring-networks-network parameter is a collection that uses the sub-parameters in the following table.
Expand
Table 4.28. --port_mirroring-networks-network
Name Type Description
network.id
string
A reference to the network to mirror.
The following table lists additional NIC options for resource-based commands.
Expand
Table 4.29. Additional command options
Option Description
--host-identifier Adds the NIC to a host as a sub-resource.
--vm-identifier Adds the NIC to a vm as a sub-resource.

Example 4.25. Creating a new network interface on a virtual machine

[RHEVM shell (connected)]# add nic --vm-identifier MyVM1 --name eth0 --network-name MyNetwork
Copy to Clipboard Toggle word wrap

Example 4.26. Updating a network interface on a virtual machine

[RHEVM shell (connected)]# update nic eth0 --vm-identifier MyVM1 --ip-address 10.5.68.123
Copy to Clipboard Toggle word wrap

Example 4.27. Deleting a network interface on a virtual machine

[RHEVM shell (connected)]# remove nic eth0 --vm-identifier MyVM1
Copy to Clipboard Toggle word wrap

Example 4.28. Configuring network bonding on a host

[RHEVM shell (connected)]# add nic --host-identifier MyHost1 --name bond1 --network-name MyNetwork --bonding-slaves-host_nic host_nic.name=eth0 --bonding-slaves-host_nic host_nic.name=eth1
Copy to Clipboard Toggle word wrap

Example 4.29. Assigning a logical network to a host network interface

[RHEVM shell (connected)]# action nic eth0 attach --host-identifier MyHost1 --network-name MyNetwork
Copy to Clipboard Toggle word wrap
The following table lists actions for a host NIC resource.
Expand
Table 4.30. Host NIC actions
Action Description
attach Attach a NIC to a host.
detach Detach a NIC from a host.
The following table lists actions for a virtual machine NIC resource.
Expand
Table 4.31. Virtual machine NIC actions
Action Description
activate Activate a NIC on a virtual machine.
deactivate Deactivate a NIC on a virtual machine.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat