nmcli command-line tool for controlling NetworkManager - RHEL 7 - RHCSA



nmcli is a command-line tool for controlling NetworkManager and reporting network status. It can be utilized as a replacement for nm-applet or other graphical clients.  nmcli is used to create, display, edit, delete, activate, and deactivate network connections, as well as control and display network device status.



Scripts: Utilize NetworkManager via nmcli instead of managing network connections manually.  nmcli supports a terse output format which is better suited for script processing. Note that NetworkManager can also execute scripts, called "dispatcher scripts", in response to network events. See NetworkManager(8) for details about these dispatcher scripts.



Servers, headless machines, and terminals: nmcli can be used to control NetworkManager without a GUI, including creating, editing, starting and stopping network connections and viewing network status.



NetworkManager stores all network configuration as "connections", which are collections of data (Layer2 details, IP addressing, etc.) that describe how to create or connect to a network. A connection is "active" when a device uses that connection's configuration to create or connect to a network. There may be multiple connections that apply to a device, but only one of them can be active on that device at any given time. The additional connections can be used to allow quick switching between different networks and configurations.



Consider a machine which is usually connected to a DHCP-enabled network, but sometimes connected to a testing network which uses static IP addressing. Instead of manually reconfiguring eth0 each time the network is changed, the settings can be saved as two connections which both apply to eth0, one for DHCP (called default) and one with the static addressing details (called testing). When connected to the DHCP-enabled network the user would run nmcli con up default , and when connected to the static network the user would run nmcli con up testing.



nmcli monitor

nmcli connection {show | up | down | modify | add | edit | clone | delete | monitor | reload | load | import | export} [ARGUMENTS...]



Youtube PlayLists

Shell-Scripting: https://goo.gl/a1Hu3s

Linux-Commands: https://goo.gl/QDoL7h

RHCSA Certification: https://goo.gl/X2Ksqn

Putty Software Tricks: https://goo.gl/MB1Do2

Linux OS: https://goo.gl/62p8s9



Follow Us on Social Media

Telegram Group: https://goo.gl/KPvMda

https://arkit.co.in/one-linux-tutorial/

Reddit: http://bit.ly/redditark

https://goo.gl/mcUvef

Mailing List: http://bit.ly/feedburnerark

https://goo.gl/fb/WAU7JG

Facebook: https://fb.com/linuxarkit 

https://goo.gl/2QN4sD

LinkedIn: http://bit.ly/linkedark

https://goo.gl/ZLcikC

Twitter: https://twitter.com/aravikumar48

Google Plus: http://bit.ly/gplusark

https://goo.gl/79zwX9

No comments:

Post a Comment