Este conteúdo foi traduzido por máquina para sua conveniência e a Huawei Cloud não pode garantir que o conteúdo foi traduzido com precisão. Para exibir o conteúdo original, use o link no canto superior direito para mudar para a página em inglês.
Computação
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Redes
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Gerenciamento e governança
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
Cloud Operations Center
Resource Governance Center
Migração
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Análises
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
IoT
IoT Device Access
Outros
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Segurança e conformidade
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Serviços de mídia
Media Processing Center
Video On Demand
Live
SparkRTC
Armazenamento
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Cloud Server Backup Service
Storage Disaster Recovery Service
Scalable File Service
Volume Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Bancos de dados
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Aplicações de negócios
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Data Lake Factory
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Distribuição de conteúdo e computação de borda
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Soluções
SAP Cloud
High Performance Computing
Serviços para desenvolvedore
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
Cloud Application Engine
MacroVerse aPaaS
KooPhone
KooDrive
Nesta página

Mostrar todos

Central de ajuda/ Bare Metal Server/ Guia de usuário/ Rede/ VLAN definida pelo usuário/ Configuração de uma VLAN definida pelo usuário (SUSE Linux Enterprise Server 11)

Configuração de uma VLAN definida pelo usuário (SUSE Linux Enterprise Server 11)

Atualizado em 2023-05-09 GMT+08:00

Esta seção usa o SUSE Linux Enterprise Server 11 SP4 como um exemplo para descrever como configurar uma VLAN definida pelo usuário para BMSs.

  1. Use uma chave ou senha para efetuar logon no BMS como usuário root.
  2. Na CLI do BMS, execute o seguinte comando para verificar as informações da NIC:

    ip link

    Informação semelhante à seguinte foi exibida:

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 8888 qdisc mq master bond0 state UP qlen 1000
        link/ether fa:16:3e:0d:13:7c brd ff:ff:ff:ff:ff:ff
    3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 8888 qdisc mq master bond0 state UP qlen 1000
        link/ether fa:16:3e:0d:13:7c brd ff:ff:ff:ff:ff:ff
    4: eth4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
        link/ether 40:7d:0f:f4:ff:5c brd ff:ff:ff:ff:ff:ff
    5: eth5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
        link/ether 40:7d:0f:f4:ff:5d brd ff:ff:ff:ff:ff:ff
    6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 8888 qdisc noqueue state UP 
        link/ether fa:16:3e:0d:13:7c brd ff:ff:ff:ff:ff:ff

    Entre os dispositivos, eth0 e eth1 carregam o VPC, e eth4 e eth5 carregam a VLAN definida pelo usuário.

  3. Execute o seguinte comando para verificar se o diretório /etc/udev/rules.d/ contém o arquivo 80-persistent-net.rules:

    ll /etc/udev/rules.d/ | grep 80-persistent-net.rules

    • Se sim, e o arquivo contiver todas as NICs, exceto bond0 e lo obtidos na etapa 2 e seus endereços MAC, vá para a etapa 6.
    • Se não estiver, vá para a etapa 4.

  4. Execute o seguinte comando para copiar o arquivo /etc/udev/rules.d/70-persistent-net.rules e nomeie a cópia como /etc/udev/rules.d/80-persistent-net.rules.

    cp -p /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/80-persistent-net.rules

  5. Configure as regras do udev:

    Adicione as NICs e seus endereços MAC obtidos na etapa 2, exceto lo, eth0, eth1 e bond0, ao arquivo /etc/udev/rules.d/80-persistent-net.rules. Isto assegura-se de que os nomes e a sequência das NICs não mudarão depois que o BMS é reiniciado.

    Certifique-se de que os endereços e nomes de NIC MAC sejam letras minúsculas.

    vim /etc/udev/rules.d/80-persistent-net.rules

    O resultado da modificação é o seguinte:

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="e8:4d:d0:c8:99:67", NAME="eth0"
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="e8:4d:d0:c8:99:68", NAME="eth1"
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="40:7d:0f:f4:ff:5c", NAME="eth4"
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="40:7d:0f:f4:ff:5d", NAME="eth5"

    Após a modificação, pressione Esc, insira :wq, salve a configuração e saia.

  6. Execute os seguintes comandos para copiar o arquivo de configuração de rede /etc/sysconfig/network/ifcfg-bond0 para gerar o arquivo /etc/sysconfig/network/ifcfg-bond1, e copie o arquivo /etc/sysconfig/network/ifcfg-eth0 para gerar os arquivos /etc/sysconfig/network/ifcfg-eth4 e /etc/sysconfig/network/ifcfg-eth5:

    cp -p /etc/sysconfig/network/ifcfg-bond0 /etc/sysconfig/network/ifcfg-bond1

    cp -p /etc/sysconfig/network/ifcfg-eth0 /etc/sysconfig/network/ifcfg-eth4

    cp -p /etc/sysconfig/network/ifcfg-eth0 /etc/sysconfig/network/ifcfg-eth5

  7. Execute os seguintes comandos para editar os arquivos /etc/sysconfig/network/ifcfg-eth4 e /etc/sysconfig/network/ifcfg-eth5:

    • vim /etc/sysconfig/network/ifcfg-eth4

      Edite o arquivo de configuração de rede eth4 da seguinte forma:

      STARTMODE=auto
      MTU=8888
      NM_CONTROLLED=no
      BOOTPROTO=static
      DEVICE=eth4
      USERCONTRL=no
      LLADDR=40:7d:0f:f4:ff:5c
      TYPE=Ethernet

      Altere o valor de BOOTPROTO para static, o de DEVICE para eth4 e o de LLADDR para o endereço MAC de eth4, que você pode obter na etapa 2. Retenha valores de outros parâmetros.

    • vim /etc/sysconfig/network/ifcfg-eth5

      Edite o arquivo de configuração de rede eth5 da seguinte forma (semelhante ao eth4):

      STARTMODE=auto
      MTU=8888
      NM_CONTROLLED=no
      BOOTPROTO=static
      DEVICE=eth5
      USERCONTRL=no
      LLADDR=40:7d:0f:f4:ff:5d
      TYPE=Ethernet

  8. Execute o seguinte comando para editar o arquivo /etc/sysconfig/network/ifcfg-bond1:

    vim /etc/sysconfig/network/ifcfg-bond1

    Edite o arquivo da seguinte maneira:

    BONDING_MASTER=yes
    TYPE=Bond
    STARTMODE=auto
    BONDING_MODULE_OPTS="mode=1 miimon=100"
    NM_CONTROLLED=no
    BOOTPROTO=static
    DEVICE=bond1
    USERCONTRL=no
    LLADDR=40:7d:0f:f4:ff:5c
    BONDING_SLAVE1=eth4
    BONDING_SLAVE0=eth5
    IPADDR=10.10.10.4
    NETMASK=255.255.255.0
    MTU=8888

    Onde,

    • Altere o valor de BOOTPROTO para static.
    • Altere o valor de DEVICE para bond1.
    • Altere o valor de LLADDR para o endereço MAC de um dispositivo de rede na etapa 7, por exemplo, 40:7d:0f:f4:ff:5c.
    • Altere os valores de BONDING_SLAVE1 e BONDING_SLAVE0 para os nomes de dispositivos na etapa 7, ou seja, eth4 e eth5.
    • Altere o valor de IPADDR para o endereço IP a ser alocado para bond1. Se o endereço IP planejado para a VLAN definida pelo usuário não entrar em conflito com o segmento de rede VPC, você poderá planejar o endereço IP conforme necessário, apenas para garantir que os BMSs que se comunicam por meio da VLAN definida pelo usuário estejam no mesmo segmento de rede que a VLAN definida pelo usuário. Um valor de exemplo é 10.10.10.4.
    • Defina o valor de NETMASK para a máscara de sub-rede do endereço IP atribuído a bond1.
    • Altere o valor de MTU para 8888.

    Retenha valores de outros parâmetros.

    Após a modificação, pressione Esc, insira :wq, salve a configuração e saia.

  9. Execute os seguintes comandos para reiniciar a rede:

    ifup eth4

    ifup eth5

    ifup bond1

    eth4 e eth5 são as portas de rede que carregam a VLAN definida pelo usuário e bond1 é o grupo de portas da VLAN definida pelo usuário.

  10. Execute os seguintes comandos para verificar o status do dispositivo NIC e se o arquivo de configuração bond1 entra em vigor:

    ip link

    ifconfig

  11. Execute as operações anteriores para configurar outros BMSs.
  12. Depois que todos os BMSs estiverem configurados, execute ping nos endereços IP de outros BMSs de cada BMS.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Conteúdo selecionado

Envie o conteúdo selecionado com o feedback