LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-10-2022, 02:13 PM   #1
shanebagel
Member
 
Registered: Apr 2022
Posts: 52

Rep: Reputation: 2
Post Struggling with NMCLI - can't ping anything from VM after changing network settings?


Running Centos 7.9 - I have a VM I'm trying to setup.
My local network Gateway address is 192.168.1.254. On the RHCSA - how would you know what to set the gateway to? For networking to work you need 3 things - the IP, gateway and DNS right?

[root@localhost ~]# nmcli con show
NAME UUID TYPE DEVICE
static aa6ea34c-e618-4c7d-8ee4-0f2a50d75d99 ethernet eth0


[root@localhost ~]# nmcli dev show
GENERAL.DEVICE: eth0
GENERAL.TYPE: ethernet
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: static
IP4.ADDRESS[1]: 192.168.1.240/24
IP4.GATEWAY: 192.168.1.254
IP4.DNS[1]: 192.168.1.254

Output of /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.254

Nmtui has the exact same content, same IP address, same gateway, same DNS servers
The VM I'm running is hosted with KVM and has NAT enabled.



Why the heck can't I ping anything? What am I doing wrong...
Also - why does the connection show as deactivated in nmtui when I restart network manager?
Thank you guys soo much for the assistance!!!
 
Old 06-10-2022, 02:33 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by shanebagel View Post
[root@localhost ~]# nmcli con show
Are you sure you should be doing this as root?
Normally networkmanager is accessed as a normal user.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can nmcli device status but cannot nmcli connection up redhatwannabe Linux - Networking 4 09-27-2021 02:29 AM
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
"nmcli con" failed "Can't obtain connections: settings service is not running." parcox Slackware 2 08-14-2012 04:26 PM
KVM on Redhat 5.7: KVM can ping outside network, outside network can't ping KVM svandyk Linux - Networking 1 09-23-2011 06:45 AM
I cannot ping with command 'ping IP' address but can ping with 'ping IP -I eth0' sanketmlad Linux - Networking 2 07-15-2011 05:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration