0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Hyper-V上のCentOS8にネットワークデバイスを追加しても自動的に仮想ネットワークインターフェースが作られない

Posted at

問題

  • このようにOS作成後にネットワークインターフェースを追加しても自動認識しない
    image.png

nmcliで作る

nmcli connection add type ethernet ifname eth1 con-name eth1
nmcli connection modify eth1 ipv4.address 172.16.0.2/24
nmcli connection modify eth1 ipv4.method manual
nmcli connection up eth1

確認

[root@aaaa ~]# ip a 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    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 mq state UP group default qlen 1000
    link/ether 00:15:5d:0b:c9:05 brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.208/24 brd 192.168.11.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 240d:1a:76e:800:5397:a6f9:8481:e895/64 scope global dynamic noprefixroute 
       valid_lft 7502sec preferred_lft 7502sec
    inet6 fe80::5854:f022:4e88:61d1/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:0b:c9:0a brd ff:ff:ff:ff:ff:ff
    inet 172.16.0.2/24 brd 172.16.0.255 scope global noprefixroute eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a1c2:78aa:a19f:5a48/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?