• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ping command is not working and I cannot login with ssh.

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have made the following edits to /etc/sysconfig/network-scripts/ifcfg-eth3 file and Now ping command is not working and I cannot login with ssh. My goal was to assign a static IP address that will not change what am I doing wrong? BOOTPROTO I changed from DHCP to static and I put IPADDR=192.168.0.49 at the bottom. What did i do wrong what is missing?
 
Marshal
Posts: 4471
567
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jestina Ojinnaka wrote: I have made the following edits to /etc/sysconfig/network-scripts/ifcfg-eth3 file ...


Can you post the contents of the file here?

What distribution of Linux are you working with?
 
Ron McLeod
Marshal
Posts: 4471
567
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Typical minimal ifcfg file contents would be something like (assuming /24 subnet):If you are using NetworkManager there will be more items that you would need to configure like: GATEWAY, DOMAIN, DNS1, DNS2, etc.  If you are not using NetworkManager, you will need to configure the gateway address in the /etc/sysconfig/network file, and the DNS resolvers (if required) in the /etc/resolv.conf file.
 
Saloon Keeper
Posts: 27707
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch, Jestina!

Ron has given a (somewhat minimal) set of specs for manually defining a network interface on Ref Hat/Fedora/CentOS/Alma/Rocky Linux systems. Ubuntu/Debian have different methods,  but they don't have an /etc/sysconfig, so that's what we're assuming here.

This is the old tried and true method for configuration, but as time has progressed, it has been pushed aside in favor of NetworkManager. So unless you've manually disabled NetworkManager, your best bet is to use that. For GUI management, there should be an icon on a screen taskbar you can use the right/left mouse buttons on (depending on which GUI desktop you're using). For a non-GUI system, you'll probably have to download/install the NetworkManager-tui package and run the command-line (Text User Interface) app.

Also make sure that once you've got the NIC configured (use the old "ifconfig" or "ip address" command to check it), the next step is to make sure your firewall allows your pings and connections. Here again, the older solution would be the iptables command, but the newer OS releases may use the firewall-cmd utility.
 
Tina Jo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I ask how do I know if I am using network manager and I am using centos 7.
 
Tim Holloway
Saloon Keeper
Posts: 27707
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you have to use a very large hammer to shut off NetworkManager in CentOS 7.

Try running the "nmtui" command.
 
Tina Jo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So yes my system uses nmtuli. I am not sure what you mean by a hammer?
 
Tim Holloway
Saloon Keeper
Posts: 27707
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jestina Ojinnaka wrote:So yes my system uses nmtuli. I am not sure what you mean by a hammer?

I mean that NetworkManager is pretty solidly integrated into CentOS 7 and it's a non-trivial task to remove it so I figured that unless you'd applied the required brute force to do so then NetworkManager would be there.
 
Greenhorn
Posts: 23
MySQL Database PHP Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you please post the contents of /etc/sysconfig/network-scripts/ifcfg-eth3?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic