Skip to content

ifdown don't run on non-up interfaces #441

@gaoxingwang

Description

@gaoxingwang

The interface was brought up by ifup at first, then i ifconfig down the interface and modify the IP address in the ifcfg file.
After restarting the network service, the interface will have a residual IP address.
Because the network service script will not perform the ifdown operation on the network card in the down state, the link information remains.

Recurrence steps:

  1. Configure the static IP address for the network card through the ifcfg configuration file (192.168.1.1)
  2. Use the command ifconfig eth0 down to close the network port
  3. Modify the configuration file corresponding to the eth0 network card, and modify the static IP address (192.168.1.2)
  4. Restart the network service with the command systemctl restart network
  5. The expected result is that the IP address of the network card is 192.168.1.2. But there are actually two IPs (192.168.1.1 and 192.168.1.2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions