{"id":3686,"date":"2019-02-05T15:39:17","date_gmt":"2019-02-05T15:39:17","guid":{"rendered":"https:\/\/tst-amo.net.ua\/blog\/?p=3686"},"modified":"2019-02-05T15:49:06","modified_gmt":"2019-02-05T15:49:06","slug":"nmcli","status":"publish","type":"post","link":"https:\/\/tst-amo.net.ua\/blog\/?p=3686","title":{"rendered":"nmcli"},"content":{"rendered":"<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430:<\/p>\n<pre># nmcli dev\r\nDEVICE    TYPE        STATE            CONNECTION \r\nenp64s0   ethernet    \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043e       enp64s0 \r\nenp5s9    ethernet    \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043e       enp5s9 \r\nlo        loopback    \u0431\u0435\u0437 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f   --<\/pre>\n<pre># nmcli con show\r\nNAME               UUID                                   TYPE       DEVICE \r\nenp5s9             1454cfa8-305a-446e-a257-8d8e6a884c05   ethernet   enp5s9 \r\nenp64s0            f1963841-564a-4e83-8417-89279a1ce0cd   ethernet   enp64s0 \r\nWired connection 1 e21c76c3-554e-3743-9c72-feb52fb1972a   ethernet   --<\/pre>\n<h4>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441<\/h4>\n<pre># nmcli con add con-name enp5s9 ifname enp5s9 type ethernet ip4 10.10.5.1\/24 gw4 10.10.5.1<\/pre>\n<h4>\u0421\u043e\u0437\u0434\u0430\u0442\u044c VLAN<\/h4>\n<pre># nmcli con del eth0<\/pre>\n<p>To create the two\u00a0vlans\u00a0on the\u00a0eth0\u00a0network interface, type:<\/p>\n<pre># nmcli con add type vlan con-name vlan10 dev eth0 id 10<\/pre>\n<p>To check the new configuration, type:<\/p>\n<pre># nmcli con show<\/pre>\n<p>Configure the network interfaces<\/p>\n<pre># nmcli con mod vlan5 ipv4.addresses 10.10.5.1\/24 # nmcli con mod vlan5 ipv4.gateway 10.10.5.1 # nmcli con mod vlan5 ipv4.method manual # nmcli con up vlan5<\/pre>\n<blockquote class=\"wp-embedded-content\" data-secret=\"gknM0c12xA\"><p><a href=\"https:\/\/www.certdepot.net\/rhel7-configure-vlans\/\">RHEL7: How to configure vlans.<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/www.certdepot.net\/rhel7-configure-vlans\/embed\/#?secret=gknM0c12xA\" data-secret=\"gknM0c12xA\" width=\"600\" height=\"338\" title=\"&#8220;RHEL7: How to configure vlans.&#8221; &#8212; CertDepot\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<div class=\"pdfprnt-buttons pdfprnt-buttons-post pdfprnt-bottom-right\"><a href=\"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=wpv2posts3686&print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/tst-amo.net.ua\/blog\/wp-content\/plugins\/pdf-print\/images\/pdf.png\" alt=\"image_pdf\" title=\"View PDF\" \/><\/a><a href=\"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=wpv2posts3686&print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/tst-amo.net.ua\/blog\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430: # nmcli dev DEVICE TYPE STATE CONNECTION enp64s0 ethernet \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043e enp64s0 enp5s9 ethernet \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043e enp5s9 lo loopback \u0431\u0435\u0437 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f &#8212; # nmcli con show NAME UUID TYPE DEVICE enp5s9 1454cfa8-305a-446e-a257-8d8e6a884c05 ethernet enp5s9 enp64s0 f1963841-564a-4e83-8417-89279a1ce0cd ethernet enp64s0 Wired connection 1 e21c76c3-554e-3743-9c72-feb52fb1972a ethernet &#8212; \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441 # nmcli con add con-name enp5s9 ifname enp5s9 &#8230;<\/p>\n<p><a href=\"https:\/\/tst-amo.net.ua\/blog\/?p=3686\" class=\"more-link\">Continue reading &lsquo;nmcli&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,47,217,38],"tags":[],"class_list":["post-3686","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","category-nmcli","category-vlan"],"_links":{"self":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3686"}],"collection":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3686"}],"version-history":[{"count":5,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3686\/revisions"}],"predecessor-version":[{"id":3691,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3686\/revisions\/3691"}],"wp:attachment":[{"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tst-amo.net.ua\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}