0

I tried below commands to change interface name on CentOS7 Minimal:

ip link set ens33 down
ip link set ens33 name GMT
ip link set GMT up 

but I could not connect to this VM (CentOS7 Minimal) after run above commands, any wrong in my commands?

and I also tried systemctl restart network, it's failed, but success if I did not change interface name.

after I tried "systemctl status NetworkManager " ,there are some output:

[1620789376.0604] ndisc[0x55cc64f3e0e0,"ens33"]:failure sending router solicitation

[1620792814.9073] audit:op=""connection-activate" uuid="2b32d0f1-7263-48c7-9c36-0675898c8401" name="ens33" result="fail" reason="no suitable device found for this connection

huangxy
  • 1
  • 1
  • I think the names of interfaces are configured in /etc/sysconfig/network-scripts (directory name is from memory). This probably has the effect that interface GMT is up but has no IP address, and also explains why the `network` service can't be started. Perhaps you can do this after creating a suitable `ifcfg-GMT` file. – berndbausch May 11 '21 at 09:30
  • yes, your suggestion is a correct way .but my commands works fine in other centos7 version (compute node ) ,this issue only happened on minimal version – huangxy May 11 '21 at 09:51
  • I'm wondering why this connect issue only happens on centos7 minimal ? or what I should do to make sure it's correct both on minimal and compute node ? – huangxy May 11 '21 at 09:54
  • I don't know how the other installations differ from your Centos minimal installation. One thing you could check is the presence of NetworkManager. What do you mean by "compute node"? – berndbausch May 11 '21 at 11:33
  • When you down + up an interface, routes are lost. LAN routes are usually automatically set back by the kernel, *not* the default route. Check this answer of mine about this: https://unix.stackexchange.com/questions/619068/the-difference-between-ip-link-down-and-physical-link-absence/619084#619084 . Note the talk about interactions with a network manager like NetworkManager too. I bet minimal doesn't include it, "full" does. – A.B May 11 '21 at 17:35
  • there is NetworkManager on centos7 minimal afer I tried . and I do not think it's routes lost after down + up an interface and I could not visit my application after run "ip link set GMT up " mannully , I guess it's indeed lost network connection . – huangxy May 12 '21 at 05:34
  • how can I fix this issue ? – huangxy May 12 '21 at 06:33
  • I just want to renaming network interface without rebooting – huangxy May 12 '21 at 06:36
  • The default route *is* lost for sure. Now for the difference between minimal and full, I made a bad guess. Your log tells that indeed NetworkManager does things. This should be added in the question not in comments. – A.B May 12 '21 at 07:16
  • yes. you're rcorrect .the default route is lost ,but I run these 3 commands inside VM not ssh connecting from outside ,so I can continue to execute other commands even route lost . but I could not connect to this VM after up command. I searched the error by google ,but could not found right answer for me . – huangxy May 12 '21 at 07:26

0 Answers0