問題
このようにOS作成後にネットワークインターフェースを追加しても自動認識しない
nmcliで作る
1 2 3 4 |
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 |
確認
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[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 |