1"use strict";(globalThis.webpackChunkmikes_dev_notebook=globalThis.webpackChunkmikes_dev_notebook||[]).push([[6267],{404332(e,n,t){t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"DevOps/Linux/2019-09-22--centos8-network-config/index","title":"CentOS 8 Network Configuration","description":"Mong Kok, Hongkong","source":"@site/docs/DevOps/Linux/2019-09-22--centos8-network-config/index.mdx","sourceDirName":"DevOps/Linux/2019-09-22--centos8-network-config","slug":"/DevOps/Linux/2019-09-22--centos8-network-config/2019-09-22","permalink":"/docs/DevOps/Linux/2019-09-22--centos8-network-config/2019-09-22","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/DevOps/Linux/2019-09-22--centos8-network-config/index.mdx","tags":[{"inline":true,"label":"LINUX","permalink":"/docs/tags/linux"}],"version":"current","sidebarPosition":8080,"frontMatter":{"sidebar_position":8080,"slug":"2019-09-22","title":"CentOS 8 Network Configuration","authors":"mpolinowski","tags":["LINUX"]},"sidebar":"tutorialSidebar","previous":{"title":"Installing Oh-My-Zsh on CentOS8","permalink":"/docs/DevOps/Linux/2019-09-22--zsh-on-centos8/2019-09-22"},"next":{"title":"Working with TMUX","permalink":"/docs/DevOps/Linux/2019-06-17--working-with-tmux/2019-06-17"}}');var o=t(474848),s=t(28453);const i={sidebar_position:8080,slug:"2019-09-22",title:"CentOS 8 Network Configuration",authors:"mpolinowski",tags:["LINUX"]},c=void 0,a={},d=[];function l(e){const n={code:"code",img:"img",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Mong Kok, Hongkong",src:t(494998).A+"",width:"1500",height:"724"})}),"\n",(0,o.jsxs)(n.p,{children:["Check your network settings with ",(0,o.jsx)(n.code,{children:"ip a"})," and ",(0,o.jsx)(n.code,{children:"ip r"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"ip a\r\n\r\n2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000\r\n link/ether b0:6e:bf:1d:d3:2a brd ff:ff:ff:ff:ff:ff\r\n inet 192.168.2.111/24 brd 192.168.2.255 scope global noprefixroute enp2s0\r\n valid_lft forever preferred_lft forever\r\n inet6 fe80::2a48:7e58:daf5:872d/64 scope link noprefixroute \r\n valid_lft forever preferred_lft forever\r\n\r\n\r\nip r\r\n\r\ndefault via 192.168.2.5 dev enp2s0 proto static metric 100 \r\n192.168.2.0/24 dev enp2s0 proto kernel scope link src 192.168.2.111 metric 100\n"})}),"\n",(0,o.jsxs)(n.p,{children:["The current ethernet interface is ",(0,o.jsx)(n.code,{children:"enp2s0"})," and the gateway that is used is ",(0,o.jsx)(n.code,{children:"192.168.2.5"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"Alternatively, you can also run the following to find your active network interface:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"nmcli connection show\r\n\r\nNAME UUID TYPE DEVICE \r\nenp2s0 280ed14d-7c8b-4586-853d-420df9f65412 ethernet enp2s0\n"})}),"\n",(0,o.jsx)(n.p,{children:"To edit the interface run:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"nmtui-edit enp2s0\n"})}),"\n",(0,o.jsx)(n.p,{children:"Make your changes and then restart your network interface:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"ifdown enp2s0 && ifup enp2s0\n"})}),"\n",(0,o.jsx)(n.p,{children:"Verify the changes you made, e.g. setting a different gateway:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"ip r\r\n\r\ndefault via 192.168.2.1 dev enp2s0 proto static metric 100 \r\n192.168.2.0/24 dev enp2s0 proto kernel scope link src 192.168.2.111 metric 100\n"})})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},494998(e,n,t){const r=t.p+"assets/images/photo-kt443t6d_64hdh43hfh6dgjdfhg4_d-4173d56305cae28f944de04dcd6feb43.jpg";t.d(n,["A",0,r])},28453(e,n,t){t.d(n,{R:()=>i,x:()=>c});var r=t(296540);const o={},s=r.createContext(o);function i(e){const n=r.useContext(s);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.