A developer provisions a new Alibaba Cloud Linux ECS instance for an application server and immediately configures its networking — assigning security group rules, binding an elastic network interface, and setting up public IP access so the instance is reachable and secure.
Developers use this workflow when deploying a new Alibaba Cloud Linux (Alinux) application server that requires immediate, secure external access. By combining ECS instance provisioning with granular network configuration, teams ensure the server boots with hardened security group rules, a dedicated secondary ENI for traffic isolation, and a public EIP for inbound reachability.
aliyun ecs RunInstances --RegionId cn-hangzhou --InstanceType ecs.g7.large \
--ImageId aliyun_3_x64_20G_alibase_20230801.vhd --VSwitchId vsw-xxx \
--SecurityGroupId sg-default --InstanceName alinux-app-01
aliyun ecs CreateSecurityGroup --RegionId cn-hangzhou --VpcId vpc-xxx --SecurityGroupName app-sg
aliyun ecs AuthorizeSecurityGroup --SecurityGroupId sg-xxx --IpProtocol TCP --PortRange 8080/8080 --SourceCidrIp 0.0.0.0/0
aliyun ecs JoinSecurityGroup --SecurityGroupId sg-xxx --InstanceId i-xxx
aliyun ecs CreateNetworkInterface --RegionId cn-hangzhou --VSwitchId vsw-xxx --SecurityGroupId sg-xxx
aliyun ecs AttachNetworkInterface --InstanceId i-xxx --NetworkInterfaceId eni-xxx
aliyun vpc AllocateEipAddress --RegionId cn-hangzhou --InstanceChargeType PostPaid
aliyun vpc AssociateEipAddress --AllocationId eip-xxx --InstanceId i-xxx --InstanceType EcsInstance
nmcli con add type ethernet ifname eth1 con-name eni-secondary
nmcli con up eni-secondary
echo "net.core.rmem_max = 16777216" >> /etc/sysctl.conf
sysctl -p
The ECS control plane orchestrates infrastructure provisioning (compute allocation, VPC routing, EIP binding, and hypervisor-level ENI attachment). Once virtual NICs are attached at the hypervisor layer, the Alinux guest OS assumes control, using NetworkManager for IP routing, firewalld for host-level packet filtering, and sysctl for kernel TCP stack tuning. API requests flow from the CLI → Alibaba Cloud API Gateway → ECS/VPC controllers → Guest OS via cloud-init and virtio-net drivers.
AliyunECSFullAccess, AliyunVPCFullAccess)aliyun_3_x64_20G_alibase_20230801.vhd)nmcli reload or udev rules to recognize eth1.firewalld blocks it. Run firewall-cmd --add-port=8080/tcp --permanent.cloud-init finishes overwrites DHCP configs. Verify /var/lib/cloud/instance/boot-finished exists first.Q: How do I deploy an ECS instance and configure its network settings? A: You deploy and network-configure an ECS server by provisioning an Alibaba Cloud Linux instance, applying hardened security group rules, attaching a secondary ENI for traffic isolation, and binding a public EIP. The workflow uses the Alibaba Cloud CLI to launch the instance, authorize inbound traffic, attach the network interface, and associate the IP address. After the hypervisor attaches the virtual NICs, you must activate the secondary interface with nmcli and tune kernel TCP parameters in the guest OS.