Article 5P33R Setting static IP for Centos 8 laptop

Setting static IP for Centos 8 laptop

by
NotionCommotion
from LinuxQuestions.org on (#5P33R)
I have a laptop with both a wired and wireless nic running Centos 8 server w/ gui. I wish to be able to access it via puTTY from the local network, and don't want its IP to change.

While I would rather use the wired connection, I first tried to edit the wireless connection using "sudo nmtui-edit wlp0s20f3", but received message "nmtui-edit: no such connection 'wlp0s20f3'"

I then tried the wired connection using "sudo nmtui-edit virbr0", and edited it as follows, but it doesn't appear to be working and ifconfing and ip route still show it as 192.X.
Code:IP4 CONFIGURATION <manual>
Addresses 10.120.11.40/24
Gateway 10.120.11.1
DNS servers 1.1.1.1
10.120.11.1How should I set up virbr0 to use a static 10.120.11.40. IP? Thank you

Code:[michael@localhost ~]$ ifconfig
enp0s31f6: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:68:eb:e1:bb:13 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xc8100000-c8120000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 48 bytes 4080 (3.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 48 bytes 4080 (3.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:8c:57:d2 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.120.11.104 netmask 255.255.255.0 broadcast 10.120.11.255
inet6 fe80::c52a:9af1:2e96:3598 prefixlen 64 scopeid 0x20<link>
ether c0:b8:83:c5:33:c5 txqueuelen 1000 (Ethernet)
RX packets 63 bytes 14970 (14.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 80 bytes 14623 (14.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

[michael@localhost ~]$ ip route
default via 10.120.11.1 dev wlp0s20f3 proto dhcp metric 600
10.120.11.0/24 dev wlp0s20f3 proto kernel scope link src 10.120.11.104 metric 600
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown
[michael@localhost ~]$ sudo nmtui-edit virbr0
[sudo] password for michael:
[michael@localhost ~]$latest?d=yIl2AUoC8zA latest?i=XnR151CiFdI:svnreMgPbWY:F7zBnMy latest?i=XnR151CiFdI:svnreMgPbWY:V_sGLiP latest?d=qj6IDK7rITs latest?i=XnR151CiFdI:svnreMgPbWY:gIN9vFwXnR151CiFdI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments