{%

    local net_mode = 'Unknown'
    if NetMode == 'Automatic' then
        net_mode = 'Adaptive'
    elseif NetMode == 'Fixed' then
        net_mode = 'Manual'
    end

    if ActivePort.Type == 'Unknown' then
        echo("EthGroup ID               :  1\n")
        echo(string.format('NetMode                   :  %s\n', net_mode))
        echo("Net Type                  :  Unknown\n")
        echo("Net Port                  :  Unknown\n")
        echo("Get activeport failed\n")
        echo("Get IPinformation failed")
    else
        local ipmode_ipv4 = string.lower(IpModeIpv4)
        local ipmode_ipv6 = IpModeIpv6 == 'Static' and 'static' or 'dhcp'
        local Ipv6_addr = ''
        if type(IpAddrIpv6) == 'string' and string.len(IpAddrIpv6) > 0 then
            Ipv6_addr = IpAddrIpv6 .. '/' .. PrefixLength
        end
        -- 输出SLAAC地址
        local function get_slaac_ipv6_info(addr_list)
            for i = 1, #addr_list do
                echo(string.format("IPv6 Address %-2d           :  %s\n", i + 1, addr_list[i]))
            end
        end
    
        local ncsi_vlan_state = 'disabled'
        if NCSIVLANEnable == true then
            ncsi_vlan_state = 'enabled'
        end
    
        local dedicated_vlan_state = 'disabled'
        if DedicatedVLANEnable == true then
            dedicated_vlan_state = 'enabled'
        end
        local backup_ip_state = 'Deactivated'
        if BackupIpActivated == true then
            backup_ip_state = 'Activated'
        end
        echo('EthGroup ID               :  1\n')
        echo(string.format('Net Mode                  :  %s\n', net_mode))
        echo(string.format('Net Type                  :  %s\n', ActivePort.Type))
        if ActivePort.Type == 'Dedicated' then  
            echo('Active Port               :  ' .. EthName .. '\n')
        end
        if ActivePort.Type ~= 'Dedicated' then      
            echo('Net Port                  :  ' .. ActivePort.DevicePortId .. '\n')
        end
        echo(string.format('IP Version                :  %s\n', IpVersion))
        echo('IPv4 Information\n')
        echo(string.format('IP Mode                   :  %s\n', ipmode_ipv4))
        echo(string.format('IP Address                :  %s\n', IpAddrIpv4))
        echo(string.format('Subnet Mask               :  %s\n', SubnetMask))
        echo(string.format('Default Gateway           :  %s\n', DefaultGatewayIpv4))
        echo(string.format('Backup IP Address         :  %s (%s)\n', BackupIpAddrIpv4, backup_ip_state))
        echo(string.format('Backup Subnet Mask        :  %s (%s)\n', BackupSubnetMaskIpv4, backup_ip_state))
        echo(string.format('MAC Address               :  %s\n', Mac))
        echo('IPv6 Information\n')
        echo(string.format('IPv6 Mode                 :  %s\n', ipmode_ipv6))
        echo(string.format('IPv6 Address 1            :  %s\n', Ipv6_addr))
        echo(string.format('Default Gateway IPv6      :  %s\n', DefaultGatewayIpv6))
        echo(string.format('Link-Local Address        :  %s\n', LinkLocalAddress))
        get_slaac_ipv6_info(SLAACAddressList)
        echo('VLAN Information\n')
        echo(string.format('NCSI Port VLAN State      :  %s\n', ncsi_vlan_state))
        if NCSIVLANEnable == true then    
            echo('NCSI Port VLAN ID         :  ' .. NCSIVLANId .. '\n')
        end
        echo(string.format('Dedicated Port VLAN State :  %s\n', dedicated_vlan_state))
        if DedicatedVLANEnable == true then 
            echo('Dedicated Port VLAN ID    :  ' .. DedicatedVLANId .. '\n')
        end
    end
%}
