1. BMC Network Management Introduction
The main responsibility of bmc_network is IPv4/IPv6 configuration, ensuring normal BMC network communication from two perspectives:
- Configuring external IP addresses: Users can connect to the BMC via the management IP address configured on the BMC.
- Configuring internal IP addresses: These are primarily used for network communication between the management board and the BMC, or between multiple BMCs within the same chassis.
Networking example
The eth0.702 (702 is the VLAN ID) network port device belongs to the internal network port group on the 171.31.1.x subnet.
eth0.701, eth2, and eth3 belong to the external network port group on the xx.xx.16.x subnet. External IP addresses switch among these three network port devices. Currently, eth0 and eth2 are mostly used.
2. BMC Network Management Objects
2.1 Common Objects
IPv4
This class primarily carries IPv4 information for external network ports, including the IP address, subnet mask, default gateway, address acquisition mode (DHCP or Static), backup IP address (activated in DHCP mode), and backup subnet mask. It also provides modification interfaces for these properties.
| Property | Description |
|---|---|
| IpMode | IPv4 network mode, which can be DHCP or Static |
| IpAddr | IP address |
| BackupIpAddr | Backup IPv4 Address |
| SubnetMask | IPv4 subnet mask |
| BackupSubnetMask | Backup IPv4 subnet mask |
| DefaultGateway | Default IPv4 gateway |
| EthName | Name of the external network port device, such as eth0.701 (701 indicates a VLAN) |
IPv6
This class primarily carries IPv6 information for external network ports, including the IP address, prefix length, default gateway, and address acquisition mode (DHCPv6 or Static). It also provides modification interfaces for these properties (see 4. Common BMC Network Interfaces for interface usage).
| Property | Description |
|---|---|
| IpMode | IPv6 network mode, which can be DHCPv6 or Static |
| IpAddr | IP address |
| PrefixLength | Length of the IPv6 prefix |
| Scope | Link,Global |
| DefaultGateway | Default IPv6 gateway |
EthernetInterfaces
This class primarily carries most of the information for external network ports.
| Property | Description |
|---|---|
| EthName | Name of the external network port device, such as eth0.701 (701 indicates a VLAN) |
| NetMode | Fixed network port mode/adaptive mode (selecting the external network port based on the NIC priority) |
| Mac | External MAC address of the BMC |
| IpVersion | IPv4/IPv6 enabling status |
| PortId | ID of the currently activated network port, corresponding to Id of MgmtPort |
| NcsiEnable | NC-SI enabling status |
| VLANEnable | NC-SI VLAN enabling status |
| VLANId | NC-SI VLAN ID |
| LinkLocalAddress | IPv6 link-local address |
MgmtPort
This class primarily carries physical NIC information.
| Property | Description |
|---|---|
| Id | Unique identifier (PortId in EthernetInterfaces refers to this). Currently, the dedicated port is fixed at 1, and others start from 2 and are returned to the network adapter. |
| EthId | Associated eth device ID. The value 2 indicates eth2. |
| DeviceId | NIC device information. Currently, the value is 1, which is not critical. |
| DevicePortId | Port number on the NIC (one NIC has multiple ports), such as port1 or port2. |
| Silkscreen | NIC silkscreen, such as Mgmt or Port1. |
| AdaptiveFlag | Whether the port participates in adaptive mode. |
| LinkStatus | Link status: Disconnected, Connected (updated by bmc_network for dedicated ports and by the network adapter for NC-SI ports). |
| Type | NIC type (PCIe, Dedicated, OCP, LOM, and more). |
| VLANEnabled | When Id is 1, this represents the VLAN information for the dedicated port. When Id is not 1, this indicates the VLAN information for the NC-SI port. |
| VLANId | VLAN ID |
| Priority | Priority for adaptive mode. |
LldpConfig
This class primarily carries LLDP-related configurations.
| Property | Description |
|---|---|
| Enabled | Whether to enable the LLDP service, which is disabled by default. Set true to enable. |
| WorkMode | LLDP working mode. Currently, only the Tx mode is supported. |
| TxDelaySeconds | LLDP Tx delay. |
| TxIntervalSeconds | LLDP Tx interval. |
| TxHold | LLDP Tx hold time. |
| LLDPSupport | Whether to support the LLDP function. LLDP is not supported by default, preventing its service and routine test from starting. |
| LLDPParseEnabled | Whether to support the LLDP parsing function. LLDP parsing is not supported by default. |
| LLDPOverNCSIEnabled | Whether to support LLDP over NC-SI. LLDP Over NC-SI is not supported by default, preventing LLDP from parsing packets sent by NC-SI. |
| LLDPGetPortDescEnabled | Whether to support LLDP port description acquisition. This function is not supported by default, preventing the Port Desc field from being parsed. |
LLDPInfo
This class primarily carries information related to LLDP packet parsing.
| Property | Description |
|---|---|
| PortName | Port number parsed from the packet |
| PortDesc | Port description parsed from the packet |
| SystemDesc | Switch model parsed from the packet |
| OrgSpec | Organization model parsed from the packet |
| ManagementIP | Management address parsed from the packet |
| SlotId | U position number corresponding to the cabinet port, defaulting to 0 |
Assembly
This class primarily carries information related to LLDP packet parsing.
| Property | Description |
|---|---|
| HostName | Host name |
| SystemGUID | System-wide unique identifier, which can be modified by users |
| DomainName | Domain name |
| UUID | Device-wide unique identifier, which can only be generated by the IPMI and cannot be modified |
| ManagementIP | Management address parsed from the packet |
| FQDN | Fully qualified domain name (FQDN) in format of host_name.domain_name |
Group
This class currently primarily persists the MAC address of external network ports.
| Property | Description |
|---|---|
| GroupId | Fixed as EthGroup0 |
| EthName | External network port name, such as eth2 and eth0 |
| EthId | External network port ID, such as 2 and 0 |
| Mac | External network port MAC address, defaulting to 20:22:01:75:BC:60 |
EthMac
This class primarily carries network port hardware-related configurations.
| Property | Description |
|---|---|
| GroupId | Network port group ID, such as EthGroup0 and MaintEthGroup |
| EthName | Network port name, such as eth2 and eth0 |
| EthId | External network port ID, such as 2 and 0 |
| Mac | Network port MAC address |
| MacUseEnabled | Whether to enable the MAC address, with only one enabled for a network port group |
| SpeedDuplexEnable | Whether to enable the auto-negotiation mode of the network port |
| SpeedSetting | Network port speed: 0 for N/A, 1 for 10 Mbit/s, 2 for 100 Mbit/s, and 3 for 1,000 Mbit/s |
| DuplexSetting | Network port working mode: 0 for N/A, 1 for half-duplex, and 2 for full-duplex |
HeartBeat
This class primarily carries internal network heartbeat configuration.
| Property | Description |
|---|---|
| Name | Name of the entity monitoring the heartbeat, such as IRMHeartBeat |
| Status | Current heartbeat status, such as Lost |
EthGroup
This class primarily carries configurations for internal networks, multiple external network ports, and maintenance network ports.
| Property | Description |
|---|---|
| GroupId | Network port group ID, which is unique |
| Name | Network port group name, such as InnerEthGroup, MaintEthGroup, or VethGroup |
| OutType | Type of network port group, including 1 (internal), 2 (external), 3 (veth), 4 (internal network for local maintenance of the Atlas compute node), 5 (external network for local maintenance of the Atlas compute node), 6 (floating IP network of the SMM), 7 (internal network for the peer SMM), 8 (dedicated network port for local O&M), 9 (internal network for cabinet management), and 10 (internal network of the cabinet node) |
| ActiveEthId | Index of the currently activated network port, such as 2 for eth2 |
| InnerNetWork | Internal subnet, which is not used |
| VLANId | VLAN ID corresponding to the activated network port in this group |
| VLANEnabled | Whether to enable the VLAN corresponding to the activated network port in this group |
| EthAlias | Alias of the activated network port. If there is an alias, the maximum value is 254 (255 indicates that there is no alias), for example, eth2:0. |
| InnerNetWork | Internal subnet, such as 172.31.1.0 |
| IpAddr | IPv4 address |
| BaseIpAddr | Base IPv4 address, compared with IpAddr, which is used to determine if the internal IP address is generated based on the slot number |
| SubnetMask | IPv4 subnet mask |
| DefaultGateway | IPv4 gateway |
| Ipv6Addr | IPv6 address |
| PrefixLength | IPv6 prefix length |
| Ipv6DefaultGateway | IPv6 gateway |
| IpPolicy | IP address generation policy: 0 for default IP address basis and 1 for slot and base IP address basis |
| Status | Whether the IP address is in the working state |
| IpMode | IPv4 mode, which can be Static or DHCP |
| Ipv6Mode | IPv6 mode, which can be Static or DHCPv6 |
| IpVersion | IP protocol type, including IPv4, IPv6, and IPv4AndIPv6 |
| AssociatedPortType | Network port type associated with the group |
| Channel | LAN channel number corresponding to the network port |
Relationships Between Classes
2.2 Common Customization Items
| Customization Item | Customization Interface | Default Value | Processing Logic | Description |
|---|---|---|---|---|
| BMC host name | BMCSet_Hostname Custom_SerialNUM | BMCSet_Hostname:off | if (BMCSet_Hostname == on) Use Custom_SerialNUM as Hostname. else if (product-serialnumber in the FRU data != Empty) Use product-serialnumber as Hostname. else Set HostName as the host name. | If BMCSet_Hostname is set to on, Custom_SerialNUM is used as the hostname. The value is a string of 1 to 64 characters.(1) By default, the product serial number is used as the host name. (2) The host name cannot contain the following characters: ` ~ ! @ # $ % ^ & * ( ) _ = + [ { } ] | ; : ' , < . > / ? \ (including space). |
| IPv4 address of the management network port | BMCSet_ETH0_DHCPMode BMCSet_Eth0_Ipv4 Custom_Eth0_Ip_Addr Custom_ipv4_gateway Custom_Eth0_DefaultPolicy | BMCSet_ETH0_DHCPMode: onBMCSet_Eth0_Ipv4: offCustom_Eth0_Ip_Addr: empty stringCustom_ipv4_gateway: empty stringCustom_Eth0_DefaultPolicy: 1 | if (BMCSet_ETH0_DHCPMode == off) if(BMCSet_Eth0_Ipv4 = on) Set the IPv4 address and subnet mask of the external network port to the value of Custom_Eth0_Ip_Addr. if (Custom_ipv4_gateway != Empty) Set the IPv4 gateway address of the external network port to the value of Custom_ipv4_gateway. else Set the IPv4 gateway address of the external network port to the value of Custom_Eth0_Ip_Addr. else if(Custom_Eth0_DefaultPolicy == 2) Set the IPv4 address and subnet mask of the external network port to 192.168.2.100/24. Set the IPv4 gateway address of the external network port to 192.168.2.100. else Set the IPv4 address of the external network port to DHCP mode. else Set the IPv4 address of the external network port to DHCP mode. | BMCSet_ETH0_DHCPMode: mode for obtaining the BMC IPv4 address. The value can be:on or not configured: The IPv4 address is obtained in DHCP mode.off: The IPv4 address is obtained in static mode.BMCSet_Eth0_Ipv4: customization of the BMC IPv4 address (including the mask). The value can be:on: The static address is set based on the value of Custom_Eth0_Ip_Addr.off or not configured: The DHCP mode is used.Custom_Eth0_DefaultPolicy: default policy of the BMC network port. The value can be:1: DHCP mode2: fixed as 192.168.2.100/24 |
| BMC external network port mode | BMCSet_NET_Mode | mgnt | if (BMCSet_NET_Mode == Empty) Set the network port mode to the forced dedicated management network port. else Set the network port mode to the value of BMCSet_NET_Mode. | Mode of the BMC management network port. The value can be:mgnt or not configured: forced management network portauto: adaptive (based on the link status of the management network port)pcie: forced PCIe NC-SI mode |
| NC-SI network port binding | Custom_NCSI_Port_Num | 0 | if (BMCSet_NET_Mode != auto && BMCSet_NET_Mode != mgnt) if (Custom_NCSI_Port_Num != Empty) Bind the NC-SI network port specified by Custom_NCSI_Port_Num. else No action elseif (BMCSet_NET_Mode == auto && Custom_NCSI_Port_Num != Empty) Add the NC-SI network port specified by Custom_NCSI_Port_Num to adaptive network ports. else No action | NC-SI network port number. The options are: For four-port configurations, the value ranges from 0 to 3. For two-port configurations, the value ranges from 0 to 1. Note: Currently, only standard PCIe NICs can be bound to NC-SI ports. |
| VLAN ID of the NC-SI network port | BMCSet_NCSI_VLAN_ID | 0 | if (BMCSet_NCSI_VLAN_ID != Empty) Set the VLAN ID of the NC-SI network port to the value of BMCSet_NCSI_VLAN_ID. else Set the VLAN ID of the NC-SI network port to 0 (disabling the VLAN function). | VLAN ID of the NC-SI network port. The value can be:0: disables the VLAN function.1 to 4094: sets the effective VLAN ID. |
| IPv4/IPv6 enablement for the network port | BMCSet_IPVersion | IPv4AndIPv6 | if (BMCSet_IPVersion == Empty) Set the IP version to IPv4AndIPv6. else Set the IP version to the value of BMCSet_IPVersion. | IP version supported by the BMC network. The value can be: IPv4 IPv4AndIPv6 IPv6 |
| BMC domain name | BMCSet_DDSN_DomainName | Empty | Set the domain name to the value of BMCSet_DDSN_DomainName. | The value contains 0 to 67 characters. The value must: 1. Consist of digits, letters, hyphens (-), and dots (.). 2. Not start with a hyphen or dot, and not end with a hyphen. 3. Contain no more than 63 characters between any two dots. |
2.3 Common Network CSR Configurations
Network configuration CSR file: The platform.sr file of the corresponding model in the vpd repository.
eth0 and eth2 as External Network Ports, Both Using IP and MAC Addresses Sourced from IPv4/IPv6 Objects
"EthMac_Eth0": {
"EthId": 0,
"EthName": "eth0",
"GroupId": "EthGroup0",
"Mac": "20:22:01:75:BC:60",
"MacUseEnabled": false,
"SpeedDuplexEnable": true,
"SpeedSetting": 0,
"DuplexSetting": 0
},
"EthMac_Eth2": {
"EthId": 2,
"EthName": "eth2",
"GroupId": "EthGroup0",
"Mac": "20:22:01:75:BC:60",
"MacUseEnabled": true,
"SpeedDuplexEnable": true,
"SpeedSetting": 0,
"DuplexSetting": 0
}Note: The same
GroupIdindicates thateth0andeth2belong to the same external network port group. Both network ports use the MAC address of the port whereMacUseEnabledis set totrue. That is,eth0uses the MAC address ofeth2.
Dual Network Port Configuration (Both the NC-SI and Dedicated Port Configured with External IP Addresses), With the Dedicated Port Using the IPv4 Object and New Port Using the EthGroup Object
"EthMac_Eth0": {
"EthId": 0,
"EthName": "eth0",
"GroupId": "EthGroup0",
"Mac": "20:22:01:75:BC:60",
"MacUseEnabled": false,
"SpeedDuplexEnable": true,
"SpeedSetting": 0,
"DuplexSetting": 0
},
"EthMac_Eth2": {
"EthId": 2,
"EthName": "eth2",
"GroupId": "EthGroup0",
"Mac": "20:22:01:75:BC:60",
"MacUseEnabled": true,
"SpeedDuplexEnable": true,
"SpeedSetting": 0,
"DuplexSetting": 0
},
"EthGroup_OutEthGroup1": {
"Name": "OutEthGroup1",
"GroupId": 0,
"OutType": 2,
"ActiveEthId": 0,
"InnerNetWork": "",
"VLANId": 4092,
"VLANEnabled": false,
"EthAlias": 255,
"IpAddr":"192.168.2.200",
"BackupIpAddr": "",
"BaseIpAddr": "",
"SubnetMask": "255.255.255.0",
"BackUpSubnetMask": "",
"DefaultGateway": "192.168.2.200",
"IpPolicy": 0,
"Status": true,
"IpMode": "DHCP",
"Ipv6Mode": "Static",
"Ipv6Addr": "",
"PrefixLength": 0,
"Ipv6DefaultGateway": "",
"AssociatedPortType": 1,
"Channel": 2
},
"IPMIChannel_LAN2": {
"ChanType": 4,
"Instance": 2,
"ChanPro": 1,
"ChannelID": 2,
"DestAddr": 32,
"SrcAddr": 0,
"MedType": 4
}2.4 bmc_network External Network Initialization Process
2.5 bmc_network Internal Network Initialization Process
2.6 DHCP Task Process
3. Network Features
3.1 Configuring the IPv4 Address
IPv4 addresses can be set in either of the following ways:
- Set static IPv4 information, including the IP address, subnet mask, and gateway.
- Set the DHCP mode, where The DHCP server dynamically distributes IPv4 information. You can also configure a backup IPv4 address and subnet mask. If DHCP fails to obtain an IP address, the BMC can still be accessed via the backup IP address.
3.2 Configuring the IPv6 Address
IPv6 addresses can be set in any of the following ways:
- Set static IPv6 information, including the IP address, prefix, and gateway.
- Set the DHCPv6 mode for dynamically distributed IPv6 information.
- Use SLAAC to automatically configure stateless addresses.
3.3 External Network Port Switching
BMC network devices typically come in two types: dedicated network ports and NC-SI network ports. A dedicated network port is the own management port of the BMC (usually eth2). An NC-SI network port refers to a port shared between the BMC and other network devices in the server via NC-SI (usually eth0). Network port switching refers to the switching of external network configurations between the dedicated port and the NC-SI port. For example, when switching from a dedicated port to an NC-SI port, the external IP address on eth2 will be cleared, and eth0 will be reconfigured with the external IP address. There are two modes for switching external network ports:
- Manually switching to a specified network port.
- Setting adaptive mode: The connected network port with the highest priority is automatically selected. (The dedicated network port usually has the highest priority.)
3.4 External Network VLAN Configuration
VLAN configuration includes dedicated network port VLAN and NC-SI network port VLAN. After a VLAN is configured, the BMC network port only processes packets with the corresponding VLAN tag, effectively partitioning a virtual LAN.
3.5 Network Port Configuration
- Network port MAC address configuration: You can modify the the MAC address of a BMC network port using the
ipmicommand. Generally, the MAC address is fixed after being set during equipment. - Network port speed configuration: You can customize the network port speed and half/full duplex mode in auto-negotiation or non-auto-negotiation mode.
- Network ports up/down support: All network ports are brought up during initialization. Interfaces are also provided for bringing up/down network ports.
4. Common BMC Network Interfaces
4.1 busctl Interfaces
Setting IPv4 Information
Set the IP address, subnet mask, and gateway using busctl. Pass the four-part IP address, subnet mask, and gateway in order:
busctl --user call bmc.kepler.bmc_network /bmc/kepler/Managers/1/EthernetInterfaces/Ipv4 bmc.kepler.Managers.EthernetInterfaces.Ipv4 SetIpMaskGateway a{ss}sss 3 Interface a UserName a ClientAddr a <ipaddr> <mask> <gateway>Set the IP address and subnet mask using busctl. Pass the four-part IP address and subnet mask in order:
busctl --user call bmc.kepler.bmc_network /bmc/kepler/Managers/1/EthernetInterfaces/Ipv4 bmc.kepler.Managers.EthernetInterfaces.Ipv4 SetIpAddr a{ss}ss 3 Interface a UserName a ClientAddr a <ipaddr> <mask>Set the gateway using busctl:
busctl --user call bmc.kepler.bmc_network /bmc/kepler/Managers/1/EthernetInterfaces/Ipv4 bmc.kepler.Managers.EthernetInterfaces.Ipv4 SetDefaultGateway a{ss}s 3 Interface a UserName a ClientAddr a <gateway>Setting IPv6 Information
Set the IP address, prefix length, and gateway using busctl. Pass the IP address, prefix length, and gateway in order:
busctl --user call bmc.kepler.bmc_network /bmc/kepler/Managers/1/EthernetInterfaces/Ipv6 bmc.kepler.Managers.EthernetInterfaces.Ipv6 SetIpv6PrefixGateway a{ss}sis 3 Interface a UserName a ClientAddr a <ipaddr> <prefix> <gateway>Set the IP address and prefix length using busctl. Pass the IP address and prefix length in order:
busctl --user call bmc.kepler.bmc_network /bmc/kepler/Managers/1/EthernetInterfaces/Ipv6 bmc.kepler.Managers.EthernetInterfaces.Ipv6 SetIpAddr a{ss}si 3 Interface a UserName a ClientAddr a <ipaddr> <prefix>Set the gateway using busctl:
busctl --user call bmc.kepler.bmc_network /bmc/kepler/Managers/1/EthernetInterfaces/Ipv6 bmc.kepler.Managers.EthernetInterfaces.Ipv6 SetDefaultGateway a{ss}s 3 Interface a UserName a ClientAddr a <ipaddr> <prefix>External Network Port Switching
Switch network ports using busctl:
busctl --user call bmc.kepler.bmc_network /bmc/kepler/Managers/1/EthernetInterfaces bmc.kepler.Managers.EthernetInterfaces SetNetworkConfig a{ss}sybq 3 Interface a UserName a ClientAddr a <network_mode> <port_ID> <NCSI_VLAN_enable> <NSCI_VLAN_ID>Parameters:
network_mode: The value can beAutomaticorFixed. PassFixedwhen switching to a specified network port, orAutomaticto set adaptive mode.port_ID: This parameter takes effect only whenNetModeis set toFixed. It represents the ID of the network port to switch to (the ID of the dedicated port is usually 1).NCSI_VLAN_enable: The value is a Boolean value indicating whether to enable the VLAN function for the NC-SI network port.NSCI_VLAN_ID: This parameter is effective only when the VLAN function is enabled. If the VLAN function is disabled, the value is 0.
External Network VLAN Configuration
Notes: Configuration will cause network disconnection. You need to configure the same VLAN in the LAN. You can connect to the network through the serial port. Query method: Use the ifconfig command. Set the VLAN using busctl:
busctl --user call bmc.kepler.bmc_network /bmc/kepler/Managers/1/EthernetInterfaces bmc.kepler.Managers.EthernetInterfaces SetVLANConfig a{ss}bqy 3 Interface a UserName a ClientAddr a <VLAN_enable> <VLAN_ID> <port_type>Parameters:
VLAN_enable: The value is a Boolean value indicating whether to enable the VLAN function.VLAN_ID: This parameter is effective only when the VLAN function is enabled. If the VLAN function is disabled, the value is 0.port_type: The value 0 indicates setting the VLAN of NC-SI, and the value 1 indicates setting the VLAN of the dedicated network port.
Network Port Configuration
Setting the Network Port Speed
Use ethtool <EthName> or cat /sys/class/net/<EthName>/speed to query the network port speed. Set network port speed using busctl:
busctl --user call bmc.kepler.bmc_network /bmc/kepler/Managers/1/EthernetInterfaces/Eth bmc.kepler.Managers.EthernetInterfaces.EthConfig SetSpeed a{ss}sbyy 3 Interface a UserName a ClientAddr a <EthName> <SpeedDuplexEnable> <SpeedSetting> <DuplexSetting>Parameters:
EthName: For example,eth2andeth0.SpeedDuplexEnable: The value is a Boolean value, indicating whether to enable the auto-negotiation mode for the network port.SpeedSetting: The value can be 0 for N/A (pass 0 when auto-negotiation is enabled), 1 for 10 Mbit/s, 2 for 100 Mbit/s, and 3 for 1,000 Mbit/s.DuplexSetting: The value can be 0 for N/A (pass 0 when auto-negotiation is enabled), 1 for half-duplex, and 2 for full-duplex.
Setting the Network Port Status
Run ipmcget -d ethport to query the port status. Set the network port status using busctl:
busctl --user call bmc.kepler.bmc_network /bmc/kepler/Managers/1/EthernetInterfaces bmc.kepler.Managers.EthernetInterfaces SetEthState a{ss}sb 3 Interface a UserName a ClientAddr a <EthName> <port_status>Parameters:
EthName: For example,eth2andeth0.port_status: The value is a Boolean value.trueindicates bringing up the network port.falseindicates bringing down the network port.
4.2 CLI Interfaces
Setting IPv4 Information
Set the static IPv4 address, subnet mask, and gateway using the CLI. Pass the four-part IP address, subnet mask, and gateway (optional) in order after -v:
ipmcset -d ipaddr -v <ipaddr> <mask> [gateway]Set the static IPv4 gateway using the CLI:
ipmcset -d gateway -v <gateway>Set the IPv4 mode to DHCP or Static using the CLI:
ipmcset -d ipmode -v <dhcp|static>Setting IPv6 Information
Set the static IPv6 address, prefix length, and gateway using the CLI. Pass the IP address, prefix length, and gateway (optional) in order after -v:
ipmcset -d ipaddr6 -v <ipaddr> <prefix> [gateway]Set the static IPv6 gateway using the CLI:
ipmcset -d gateway6 -v <gateway>Set the IPv6 mode to DHCPv6 or Static using the CLI:
ipmcset -d ipmode6 -v <dhcp|static>External Network Port Switching
Set the network mode using the CLI. Pass 1 for a fixed network port or 2 for adaptive mode:
ipmcset -d netmode -v <network_mode>Switch network ports using the CLI (switching is possible only in fixed network port mode):
ipmcset -d activeport -v <port_type> <port_id>Parameters:
port_type: Set 0 for a dedicated network port, 1 for LOM, and 2 for PCIe.port_id: Set the index of the port for the specified network port type. (Port IDs start from 0. If the network port type is 0, this parameter is optional.)
4.3 IPMI Interfaces
Setting IPv4 Information
Setting the External IPv4 Address
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x01 0x01 0x03 <four-byte_IP_address>Setting the External IPv4 Subnet Mask
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x01 0x01 0x06 <four-byte_subnet_mask>Setting the External IPv4 Gateway
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x01 0x01 0x0c <four-byte_gateway>Setting the External IPv4 Mode
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x01 0x01 0x04 <one-byte_mode>The last byte represents the mode: 0x01 (Static) or 0x02 (DHCP).
Note:
- If only IPv6 is enabled, the IPv4 address, subnet mask, and gateway cannot be set.
- If the current mode is DHCP, it will change to Static mode after configuration.
- Passing all zeros for the IP address clears the IPv4 address (the subnet mask and gateway are also cleared).
- Passing all zeros for the subnet mask clears the IPv4 subnet mask (the gateway is also cleared).
- If the configured gateway is not in the same subnet as the current IP address, the operation fails.
- Passing all zeros for the gateway clears the IPv4 gateway.
Querying the External IPv4 Address
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x02 0x01 0x03 0x00 0x00Querying the External IPv4 Subnet Mask
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x02 0x01 0x06 0x00 0x00Querying the External IPv4 Gateway
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x02 0x01 0x0c 0x00 0x00Querying the External IPv4 Mode
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x02 0x01 0x04 0x00 0x00The first byte returned is always 11, and the following bytes are the query result.
Setting IPv6 Information
Setting the External IPv6 Address
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x01 0x01 0xcc <three-byte_vendor_ID> <sixteen-byte_IPv6_address>Setting the External IPv6 Prefix Length
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x01 0x01 0xcd <three-byte_vendor_ID> <one-byte_prefix_length>Setting the External IPv6 Gateway
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x01 0x01 0xce <three-byte_vendor_ID> <sixteen-byte_gateway>Setting the External IPv6 Mode
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x01 0x01 0xd0 <three-byte_vendor_ID> <one-byte_mode>Querying the External IPv6 Address
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x02 0x01 0xcc 0x00 0x00Querying the External IPv6 Prefix Length
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x02 0x01 0xcd 0x00 0x00Querying the External IPv6 Gateway (Gateway Address Passed in Little-Endian Format)
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x02 0x01 0xce 0x00 0x00Querying the External IPv6 Mode
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x02 0x01 0xd0 0x00 0x00The first byte returned is always 11, the following three bytes are the vendor ID, and the following bytes are the query result.
Setting the Network Mode
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x0c 0x01 0x01 <three-byte_vendor_ID> <one-byte_network_mode>The network mode can be 1 (dedicated network port), 3 (adaptive mode), or 4 (PCIe mode, where the first port is used by default).
Setting the VLAN
ipmitool -H <BMC_IP_address> -I lanplus -p 623 -U <username> -P <password> -C 17 raw 0x30 0x93 <three-byte_vendor_ID> 0x5a 0x1a 0x00 0x04 0x00 <one-byte_port_type> <one-byte_VLAN_enable> <two-byte_VLAN_ID>Parameters:
port_type: The value 0 indicates setting the VLAN of NC-SI, and the value 1 indicates setting the VLAN of the dedicated network port.VLAN_enable: The value 0 indicates that the VLAN is disabled, and the value 1 indicates that the VLAN is enabled.VLAN_ID: The value consists of two bytes, where the lower four bits of the first byte and the entire second byte form a 12-bit number.
4.4 RPC Interfaces
IPv4
Ipv4SetIpAddr
Callback function: set_ipv4_addr
Function: Sets the IPv4 address, passing only the IP address and subnet mask.
Prerequisites:
- The input IPv4 address is valid.
- The input subnet mask is valid.
ip_versionsupports IPv4.- No subnet conflicts exist with the internal network or maintenance IP addresses.
Note: The DHCP client will be stopped if this interface is used in DHCP mode, and the static address mode will be used.
Function implementation:
- Modify resource tree and database information.
- Record operation logs.
- Set the IPv4 address and subnet mask through a socket (core implementation).
- Update iptables rules in the network address translation (NAT) table for the external network.
- Emit signals for IPv4 address and subnet mask changes.
- Clear alias network ports.
- Modify iptables rules when the IP address changes.
- Broadcast ARP packets.
Ipv4SetDefaultGateway
Callback function: set_ipv4_gateway
Function: Sets the IPv4 gateway independently.
Prerequisites:
- The input gateway address is valid.
ip_versionsupports IPv4.- The current gateway and the IP address to be set are in the same subnet.
Function implementation:
- Modify resource tree and database information (
DefaultGateway). - Record operation logs.
- Set the IPv4 address through a socket (core implementation).
- Emit signals for IPv4 gateway changes.
- Broadcast ARP packets.
Ipv4SetIpMaskGateway
Callback function: set_ipv4_mask_gateway
Function: Sets the IPv4 address, passing the IP address, subnet mask, and gateway.
Prerequisites:
- The input parameters are valid.
- The subnets are the same.
- The IP address does not conflict with other IP addresses.
Note: The DHCP client will be stopped if this interface is used in DHCP mode, and the static address mode will be used.
Function implementation:
- Modify the database and resource tree.
- Record operation logs.
- Set the IPv4 address, subnet mask, and default gateway through a socket (core implementation).
- Update
iptablesrules in the NAT table for the external network. - Modify iptables rules when the IP address changes.
- Emit signals for IPv4 information changes.
- Clear alias network ports.
- Broadcast ARP packets.
Ipv4SetDedicatedMaintIpMask
Callback function: set_dedicated_maint_ipv4_mask
Function: Sets the IPv4 address and subnet mask for dedicated port O&M.
Prerequisites:
- The input parameters are valid.
- The subnets are the same.
- The IP address does not conflict with other IP addresses.
Function implementation:
- Update the dedicated O&M network:
- Set the IPv4 address and subnet mask of the O&M network port through a socket (core implementation).
- Set
route_localnetto 1 to ensure services like Web and SSH function normally. - Update
iptablesrules in the NAT table for the O&M network. - After the O&M network port is configured, ARP address resolution points to the maintenance IP address. Therefore, the external network port needs to actively send ARP packets to trigger address learning for the external IP address.
- Record operation logs.
IPv6
Ipv6SetIpAddr
Callback function: set_ipv6_addr
Function: Sets the IPv6 address, passing only the IP address and prefix length. ipv6_addr must be in the shortest string format, such as fe80::.
Prerequisites:
- The IPv6 address is valid.
- The prefix length is valid (the maximum prefix length is 128 bits).
ip_versionsupports IPv6.
Note:
- If the passed prefix length is 0, the default value of 64 is used.
- Disable the DHCPv6 service first if the DHCP mode is used.
Function implementation:
- Record operation logs.
- Modify the database and resource tree.
- Delete the previous IPv6 information through a socket.
- Set new IPv6 information through a socket (core implementation).
- Emit signals for IPv6 address and prefix length changes.
- Send Neighbor Advertisement (NA) packets.
- Modify ip6tables rules when the IPv6 address changes.
Ipv6SetDefaultGateway
Callback function: set_ipv6_gateway
Function: Sets the IPv6 gateway independently.
Prerequisites:
- The gateway is valid.
- The gateway to be set is in the same subnet as the current IP address.
ip_versionsupports IPv6.
Function implementation:
- Record operation logs.
- Modify resource tree and database information (
DefaultGateway). - Delete the previous IPv6 gateway through a socket.
- Set a new IPv6 gateway through a socket (core implementation).
- Emit signals for IPv6 gateway changes.
Ipv6SetIpv6PrefixGateway
Callback function: set_ipv6_prefix_gateway
Function: Sets the IPv6 address, passing the IP address, prefix length, and gateway.
Prerequisites:
- In Redfish scenarios, configuration is required if either
IpAddrorPrefixLengthis valid. - The IP address, prefix length, and gateway are valid.
- The gateway to be set is in the same subnet as the current IP address.
ip_versionsupports IPv6.
Note:
- In Redfish scenarios, an error will be reported if the IPv6 address is invalid.
- Disable the DHCPv6 service first if the DHCP mode is used.
- If the passed prefix length is 0, the default value of 64 is used.
Function implementation:
- Record operation logs.
- Modify resource tree and database information.
- Delete the previous IPv6 gateway through a socket.
- Set a new IPv6 gateway through a socket (core implementation).
- Delete the previous IPv6 information through a socket.
- Set new IPv6 information through a socket (core implementation).
- Emit signals for IPv6 address, prefix length, and gateway changes.
- Send NA packets.
- Modify ip6tables rules when the IPv6 address changes.
Ethernet
EthernetInterfacesGetAllPort
Callback function: get_all_port
Function implementation:
Traverse slot.Port and return all port information:
IdEthIdDeviceIdDevicePortIdSilkscreenTypeAdaptiveFlagLinkStatusMac
EthernetInterfacesSetNetworkConfig
Callback function: set_network_config
Function: Sets network configuration.
Input parameters: NetMode, PortId, VLANEnable, and VLANId
Prerequisites:
- The network configuration does not conflict with the internal VLAN.
- The port ID is valid.
- In adaptive mode, the port remains unchanged from the previous one, and interface parameters are not accepted.
- If only
vlan_idis modified whileVLANEnableisfalse, the network is not restarted.
Function implementation:
NetModeincludes the adaptive mode and fixed network port mode.- Update database and resource tree information.
- Switch the network port and restart the network, updating multi-IP address configurations for the external network port.
- Restart the network if the VLAN information of the NC-SI network port changes.
EthernetInterfacesAddMgmtPort
Callback function: add_mgmt_port
Function: Adds a management port.
Note:
- If
portIdis not 0, the existing port is updated. Otherwise, a port with the specifiedportIdis registered.- A value of 0 indicates a new registration, and a
portIdmust be automatically generated.- Modification of the dedicated network port is not supported.
Function implementation:
- Add a resource tree object.
EthernetInterfacesDeleteMgmtPort
Callback function: delete_mgmt_port
Function: Deletes a management port.
Note:
- When
portIdis 255, all NC-SI network ports are deleted.- Dedicated network ports cannot be deleted.
Function implementation:
- Delete the resource tree object.
EthernetInterfacesSetVLANConfig
Callback function: rpc_set_vlan
Function: Sets the VLAN.
Prerequisites:
- The network configuration does not conflict with the internal VLAN.
- The
vlan_idis within the range of 1 to 4094.
Function implementation:
- Set
vlan_idbased onportType. Currently, only two types are supported: 0 forNCSIand 1 forDedicated. - Determine whether the current model supports VLAN configuration for the dedicated network port. If not, return a failure message directly.
HeartBeatBeat
Callback function: heart_beat:beat
Function: Provides heartbeats.
EthernetInterfacesNetworkFailover
Callback function: network_failover
Function: Updates the network failover status.
Note: When the LAN switch (LSW) switches ports, ARP packets and NA packets are actively sent.
iptables
EthernetInterfacesAddIptablesRule
Callback function: add_iptables_rule
Input parameters: interface_name and ip_addr
Note:
- Operation logs are not recorded when this RPC method is called internally between SSDP components.
- The input parameter validation includes checks for special characters.
Function implementation:
- Implement the function using
iptablescommands of the OS.
EthernetInterfacesAddIp6tablesRule
Callback function: add_ip6tables_rule
Input parameters: interface_name and ipv6_addr
Note:
- Operation logs are not recorded when this RPC method is called internally between SSDP components.
- The input parameter validation includes checks for special characters.
Function implementation:
- Implement the function using
ip6tablescommands of the OS.
NatConfigAddNatRule
Callback function: add_nat_rule
Function: Adds an address mapping rule.
Input parameters: service_name and reg_params
Note:
- Currently, only one forwarding rule with a specified IP address can be added for a network port type.
- Based on the forwarding rules of all running services, a rule for forwarding from
ps.Addressto an internal address is added. Currently, only IPv4 addresses are supported.
Function implementation:
- add_multi_nat_rules or add_single_nat_rule
- Implement the function using
iptablescommands of the OS.
NatConfigUpdateNatRule
Callback function: update_nat_rule
Function: Updates an address mapping rule.
Input parameters: service_name and reg_params
Function implementation:
update_multi_nat_rulesorupdate_single_nat_rule.- Implement the function using
iptablescommands of the OS. - If the network port is unavailable, set
route_localnetto 0.