Quote:
Originally Posted by Sagar P Dalvi
I am using Red Hat Enterprise 7 for on Vmware. I am getting error which creating network connection with nmcli Here is my all steps
[root@localhost Desktop]# nmcli con show
NAME UUID TYPE DEVICE
etho 9427b62b-0acc-421a-817a-2e7128546e01 802-3-ethernet eno16777736
[root@localhost Desktop]# nmcli con show etho
connection.id: etho connection.uuid: 9427b62b-0acc-421a-817a-2e7128546e01 connection.interface-name: -- connection.type: 802-3-ethernet connection.autoconnect: yes
IP4.ADDRESS[1]: ip = 192.168.233.134/24, gw = 192.168.233.2
IP4.DNS[1]: 192.168.233.2 IP4.DOMAIN[1]: localdomain
[root@localhost Desktop]# nmcli con add con-name "default" type ethernet ifname eth0
Connection 'default' (feb5f62f-276a-4677-82bc-fe60634a6393) successfully added.
[root@localhost Desktop]# nmcli connection add con-name "static" ifname eth0 autoconnect no type ethernet ip4 192.168.2.1/24 gw4 192.168.2.254
Connection 'static' (9fc9247a-8c9a-49fa-995a-859d3be293ba) successfully added.
[root@localhost Desktop]# nmcli con up "static"
Error: no device found for connection 'static'.
[root@localhost Desktop]# nmcli con up "default"
Error: no device found for connection 'default'. [root@localhost Desktop]#
[root@localhost Desktop]# nmcli connection show
NAME UUID TYPE DEVICE
static 9fc9247a-8c9a-49fa-995a-859d3be293ba 802-3-ethernet --
etho 9427b62b-0acc-421a-817a-2e7128546e01 802-3-ethernet eno16777736
default feb5f62f-276a-4677-82bc-fe60634a6393 802-3-ethernet --
[root@localhost Desktop]#
You can see Under DEVICE no lable for Static and Default an any one find out the problem
Thank you Sagar Dalvi
|
you must have an adapter (device) for the interface. in this case it is eno16777736. so ifname should always be eno16777736 except you have other option in : nmcli dev status like eno2 or etc. you must in this case have only two option 1. eno16777736 and 2. lo. so u can only use one interface at this time. if you have 2 physical ethernet or a ethernet and a wireless interface then youcan add more than one ifname.
in rhel 6 this was not the case. but in 7 it is.