[root@centos1 network-scripts]# nmcli con
NAME UUID TYPE DEVICE
enp0s3 94d06cc8-c49c-3fe4-8dbc-d7e163b5ee90 802-3-ethernet enp0s3
enp0s8 72d67d65-0733-329a-b12e-da08fd76722d 802-3-ethernet enp0s8
[root@centos1 network-scripts]# ip a
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: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:a2:da:3e brd ff:ff:ff:ff:ff:ff
inet 172.20.110.37/24 brd 172.20.110.255 scope global enp0s3
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fea2:da3e/64 scope link tentative dadfailed
valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:f6:3e:ff brd ff:ff:ff:ff:ff:ff
inet 192.168.56.101/24 brd 192.168.56.255 scope global enp0s8
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fef6:3eff/64 scope link
valid_lft forever preferred_lft forever
[root@centos1 network-scripts]# cat ifcfg-enp0s8
TYPE="Ethernet"
PROXY_METHOD="none"
BOOTPROTO="none"
ONBOOT="yes"
NAME="enp0s8"
DEVICE="enp0s8"
IPADDR=192.168.56.101
NETMASK=255.255.255.0
GATEWAY=192.168.56.1
UUID=72d67d65-0733-329a-b12e-da08fd76722d
[root@centos1 network-scripts]# cat ifcfg-enp0s3
TYPE="Ethernet"
PROXY_METHOD="none"
BOOTPROTO="none"
ONBOOT="yes"
NAME="enp0s3"
DEVICE="enp0s3"
IPADDR=172.20.110.37
NETMASK=255.255.255.0
GATEWAY=172.20.110.1
UUID=94d06cc8-c49c-3fe4-8dbc-d7e163b5ee90
centos网络配置
最新推荐文章于 2022-08-11 00:00:00 发布