NM_CONTROLLED 网卡参数作用及配置指南

Kevin 教程 7,666 次浏览 88条评论

CentOS 网卡配置文件中有个名为 NM_CONTROLLED 参数,其默认值是 yes。然而在很多教程里看到建议设置 no,但未进一步解释其含义。为了弄明白这个问题网上查了相关资料,下面概要总结下。

NM_CONTROLLED=yes

NM_CONTROLLED 设置 yes 表示网卡允许用 NetworkManager 程序管理。它可以降低网络配置使用难度,便于管理无线网络、虚拟专用网等网络连接,适合普通台式机和笔记本电脑使用。

当 NM_CONTROLLED 设为 yes 并有安装运行 NetworkManager 服务,若编辑了网卡配置文件,需要先重启 NetworkManager 再重启 network 服务。

NM_CONTROLLED=no

NM_CONTROLLED 设置 no 表示网卡使用传统方式管理而不用 NetworkManager。好处是修改网卡配置文件后直接重启 network 就生效,不受 NetworkManager 干扰。适合用以太网连接的服务器使用。

禁用 NetworkManager 服务

CentOS Minimal 默认未启用 NetworkManager 服务。若不清楚现在系统是否启用,用下面命令检查,

chkconfig --list NetworkManager

如果打印如下信息,表示没有安装启用 NetworkManager 服务。

error reading information on service NetworkManager: No such file or directory

如果打印了服务运行级别信息,但值均为 off。表示有安装 NetworkManager,但已经禁用服务。

NetworkManager 	0:off	1:off	2:off	3:off	4:off	5:off	6:off

如果打印的服务运行级别值有 on,则按下面步骤禁用 NetworkManager(如果需要禁用的话)。

1. 停止禁用正在运行的 NetworkManager 服务。

sudo service NetworkManager stop
sudo service NetworkManager disable

2. 取消服务自动运行。

sudo chkconfig NetworkManager off

3. 修改所有使用 NetworkManager 管理的网卡配置文件,将 NM_CONTROLLED 值改为 no,并确认需要自动连接的网卡有设置ONBOOT=yes参数。

要快速查询哪些网卡使用 NetworkManager 管理,可以用nmcli device status命令检查(不支持 CentOS 6),STATE 状态下非 unmanaged 值的网卡都由 NetworkManager 管理。

4. 重启网络使修改生效,并确认设置网络自动运行。

sudo service network start
sudo service network restart
sudo chkconfig network on

完成禁用 NetworkManager。后续若要修改网络连接,直接修改其配置文件重启网络即可。

评论列表

  1. #1

    Hi, very nice website, cheers!
    ——————————————————
    Need cheap and reliable hosting? Our shared plans start at $10 for an year and VPS plans for $6/Mo.
    ——————————————————
    Check here: https://www.reliable-webhosting.com/

  2. #2

    coronavirus treatment antivirals https://www.herpessymptomsinmen.org/productacyclovir/

  3. #3

    when generic viagra in usa https://buszcentrum.com/

  4. #4

    bimatoprost without an rx fast shipping https://carepro1st.com/

  5. #5

    can you give ivermectin orally https://ivermectin.webbfenix.com/

  6. #6

    what is cialis tablets used for http://www.lm360.us/

  7. #7

    vidalista dose chart https://vidalista.mlsmalta.com/

  8. #8

    how much does viagra cost at walmart http://droga5.net/

  9. #9

    hydroxychloroquine coronavirus africa https://hydroxychloroquine.webbfenix.com/

  10. #10

    studies show hydroxychloroquine works https://hydroxychloroquine.mlsmalta.com/

  11. #11

    ivermectin for pinworms in humans https://ivermectin.mlsmalta.com/

  12. #12

    viagra dapoxetine levitra comparison chart https://ddapoxetine.com/

  13. #13

    vidalista dosing information https://vidalista40mg.mlsmalta.com/

  14. #14

    generic cialis cost https://tadalafili.com/

  15. #15

    over the counter bronchitis inhaler https://amstyles.com/

  16. #16

    cialis.com https://wisig.org/

  17. #17

    325mg aspirin daily

  18. #18

    cost of generic hydroxychloroquine

  19. #19

    free adult cam

  20. #20

    retino 0.025 cream

  21. #21

    canadian pharmacy no prescription needed

  22. #22

    doxycycline doryx http://doxycycline.zolftgenwell.org/

  23. #23

    canadian online pharmacy no prescription

  24. #24

    texas loan

  25. #25

    tadalafil price in india

  26. #26

    payday loans in georgia

  27. #27

    hydroxychloroquine long term https://hydroxychloroquinee.com/

  28. #28

    top ten home insurance companies

  29. #29

    insurance house

  30. #30

    10mg viagra for women

  31. #31

    buy ivermectin cream

  32. #32

    buy sildenafil from canada

  33. #33

    western union loan

  34. #34

    interest rates on personal loans

  35. #35

    hydroxychloroquine stock symbol https://hydroxychloroquine.mymvrc.org/

  36. #36

    hydroxychloroquine stock symbol https://hydroxychloroquine.lm360.us/

  37. #37

    progressive auto and homeowners insurance

  38. #38

    levitra for sale canada

  39. #39

    dapoxetine without doctor prescription connect https://dapoxetine.confrancisyalgomas.com/

  40. #40

    tamoxifen weight loss message boards https://tamoxifen.mrdgeography.com/

  41. #41

    tadalafil and grapefruit juice https://tadalafil.cleckleyfloors.com/

  42. #42

    buying painkillers online https://edmeds.buszcentrum.com/

  43. #43

    metoprolol and cialis interaction http://tadalafila.online/

  44. #44

    ivermectin tablets dosage http://ivermmectin.com/

  45. #45

    cialis without doctor prescription http://ciaalis2u.com/

  46. #46

    online physician https://medpills.bee-rich.com/

  47. #47

    online physician https://buymeds.mlsmalta.com/

  48. #48

    pussy888
    Wow…never seen this before

  49. #49

    cialis users testimonials http://cialis.anafassia.com/

  50. #50

    cialis users testimonials https://cialis.lm360.us/

  51. #51

    อย่างชอบ
    วิธีดูราคาบอล

  52. #52

    hydroxychloroquine from india http://hydroxychloroquined.online/

  53. #53

    Fine way of explaining, and nice paragraph to take data
    regarding my presentation topic, which i am going to present in institution of
    higher education. http://antiibioticsland.com/Cephalexin.htm

  54. #54

    viagra generic without prescription http://viiagra.co/

  55. #55

    ed meds online without doctor https://atadalafil.online/

  56. #56

    viagra http://viaagra1.com/

  57. #57

    I think this is one of the most important information for me.
    And i am glad reading your article. But want to remark on few
    general things, The website style is great, the articles
    is really nice : D. Good job, cheers http://cleckleyfloors.com/viagra

  58. #58

    Sweet blog! I found it while searching on Yahoo News. Do you
    have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Thank you https://cialis.bee-rich.com/tadalafil

  59. #59

    generic cialis tadalafil walmart http://cialis.audiovideoninja.com/

  60. #60

    generic cialis tadalafil walmart https://cialis.adicbc.com/

  61. #61

    Remarkable! Its genuinely remarkable piece of writing, I
    have got much clear idea concerning from this post. https://hydroxychloroquinej.jueriy.com/

  62. #62

    If you wish for to grow your familiarity only keep
    visiting this site and be updated with the newest news posted here. https://hydroxychloroquineb.buszcentrum.com/

  63. #63

    I was very pleased to find this web-site.I wanted to thanks for your time for this wonderful read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you blog post.

    http://www.vreyrolinomit.com/

  64. #64

    This design is incredible! You definitely know how
    to keep a reader amused. Between your wit and your videos, I was almost moved to
    start my own blog (well, almost…HaHa!) Excellent job.
    I really enjoyed what you had to say, and more than that, how you presented it.
    Too cool! http://herreramedical.org/sildenafil

  65. #65

    For most recent information you have to pay a visit world-wide-web and on the web I found
    this web site as a finest website for newest updates. http://www.deinformedvoters.org/sildenafil-price

  66. #66

    where to buy ivermectin lotion https://ivermectin1st.com/

  67. #67

    We’re a gaggle of volunteers and starting a brand new scheme in our community.
    Your website provided us with valuable info to work
    on. You’ve done a formidable job and our whole group will likely
    be thankful to you. http://antiibioticsland.com/Amoxil.htm

  68. #68

    in our previous posts. Thank you to everyone who took part in these excellent http://www.supplementguidesg.net/homeopathic-hcg-drops-official-hcg-diet.html

  69. #69

    I really like the way you have shared this awesome http://www.guideonproduct.com/phengold-reviews.html

  70. #70

    I’ve recently started a web site, the info you provide on this website has helped me greatly. Thank you for all of your time & work.

    http://www.zortilonrel.com/

  71. #71

    Helpful information. Fortunate me I discovered your website unintentionally, and I am stunned why this twist of fate didn’t took place in advance! I bookmarked it.

    https://citizenshipforsale.co

  72. #72

    vidalista daily http://viidalista.co/

  73. #73

    Simply wish to say your article is as astounding. The clarity in your post is simply great and i could assume you are an expert on this subject. Well with your permission let me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please continue the rewarding work.

    http://www.vreyrolinomit.com/

  74. #74

    canadian pharmacies online

  75. #75

    canada online pharmacies

  76. #76

    vidalista tablet http://vidallista.com/

  77. #77

    Some genuinely fantastic info , Gladiolus I noticed this.

    https://www.onlinecasinobetrouwbaar.net/

  78. #78

    canadian pharmacies that ship to us

  79. #79

    canada pharmacy online

  80. #80

    online pharmacy canada

  81. #81

    Thanks for sharing your thoughts about NM_CONTROLLED作用.
    Regards http://hydroxychloroquinea.audiovideoninja.com/

  82. #82

    This was great! I would like you to clean up all this spam though

    https://www.linkedin.com/in/yusuf-hanafy-82493b183

  83. #83

    Have you ever heard of second life (sl for short). It is basically a video game where you can do anything you want. sl is literally my second life (pun intended lol). If you would like to see more you can see these sl websites and blogs

    http://www.feedage.com/feeds/1772080/comments-for-angela-a-thomas

  84. #84

    Have you ever heard of second life (sl for short). It is essentially a video game where you can do anything you want. sl is literally my second life (pun intended lol). If you would like to see more you can see these second life authors and blogs

    elsewhere.typepad.com/the_view_from_elsewhere/2007/10/the-octogenaria.html

  85. #85

    canadian trust pharmacy

  86. #86

    What’s up to all, the contents existing at this web site are truly awesome for people experience, well, keep up the good work fellows. https://hydroxychloroquineg.grassfed.us/

  87. #87

    Heya i am for the first time here. I found this board and I find It really useful & it helped me out much.
    I’m hoping to offer something again and help others such as you helped me. http://www.deinformedvoters.org/cialis-usa

  88. #88

    online pharmacy

发表评论

电邮地址用于 Gravatar 头像显示,不会被公开可见。