linux virtual machine ifconfig command can not find the newly added card solutions

ip_addr looking to add IP check card usage

When we are finished adding network cards to virtual machines, using a network card ifconfig can not see the newly added,

We do not add succeed?

No, when you add hardware window housekeeping have two network cards, explained the success of the added card

Tip: Add a card without shutting down the virtual machine

The reason why the ifconfig command to see the newly added is less than the card because,

ifconfig command does not display the status of the card DOWN

Show the ip addr or ip a (abbreviated ip addr) may be displayed in the DOWN state NIC

When we use this command, add a new card will be the

As we are familiar with linux slowly getting used to use ip addr command instead of ifconfig command

Because this is more efficient and allows us to look professional, I strongly recommend here

If we can look at before I am interested ip addr wrote "ip addr and ip link linux commands explain"

 

Before it is because this command does not find the old IP, so write this article and I hope to help the same people who encounter this problem

The problem is very small, but it is the accumulation of a large framework, refuel it together

If you want to know more about the use of a detailed command ip addr

[root@server1 ~]# ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 scope host lo

       valid_lft forever preferred_lft forever

    inet6 ::1/128 scope host

       valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000

    link/ether 52:54:00:3e:0a:33 brd ff:ff:ff:ff:ff:ff

    inet 172.25.21.1/24 brd 172.25.21.255 scope global eth0

       valid_lft forever preferred_lft forever

    inet 172.25.21.100/32 scope global eth0

       valid_lft forever preferred_lft forever

    inet6 fe80::5054:ff:fe3e:a33/64 scope link

       valid_lft forever preferred_lft forever

3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000

    link / ether 52: 54: 00: 71: 2f: BRD ff ff: ff: ff: ff: ff: ff

 

 

 

Published 150 original articles · won praise 2 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_43309149/article/details/104501163