LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-29-2010, 04:00 AM   #1
rewards
Member
 
Registered: Dec 2010
Posts: 135

Rep: Reputation: 0
Question Please help Network Connection Problem Centos


Hello all,

Please help. I think I messed it up. At this time I want to recover some network files such as /etc/sysconfig/network, /etc/sysconfig/network-scripts/, ifcfg-eth1, to default condition not modified I don't know why when Linux server is idle for a while, it loses connection. No Internet and I am not even able to ping from another computer in the same network. I tried to put static IP address and did this command cd /etc/sysconfig/network-scripts/ and vi ifcfg-eth1 and put static IP address. Anthe I did this command vi /etc/sysconfig/network and appended GATEWAY=192.168.0.1. An I did this command ifconfig eth1 192.168.0.189 netmask 255.255.255.0 broadcast 192.168.o.255. After all these commands now I have no connection at all. I tried to check back again to see what I did, I vi /etc/sysconfig/network and system prompted me to the message below;


Found a swap file by the name "/etc/sysconfig/.network.swp"
owned by: root dated: Tue Dec 28 00:46:25 2010
file name: /etc/sysconfig/network
modified: no
user name: root host name: localhost.localdomain
process ID: 15153 (still running)
While opening file "/etc/sysconfig/network"
dated: Tue Dec 28 00:36:41 2010

(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.

(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /etc/sysconfig/network"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/etc/sysconfig/.network.swp"
to avoid this message.
"/etc/sysconfig/network" 4L, 66C
Press ENTER or type command to continue

Last edited by rewards; 12-30-2010 at 10:38 PM. Reason: Solved
 
Old 12-29-2010, 11:30 AM   #2
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

Seems your vi session was canceled for any reason. Vi swp-files are created during edit session, in case the session is killed this swp-files are not removed.
This also indicates why your changes are not saved to this files.

Last edited by mesiol; 12-29-2010 at 11:31 AM.
 
Old 12-29-2010, 12:07 PM   #3
rewards
Member
 
Registered: Dec 2010
Posts: 135

Original Poster
Rep: Reputation: 0
[Solved] Hello and thank you all. Does anyone know why Linux loses it connection when it has been idle for a while? I have not found a solution to my problem yet bu where do you make the thread and mark it solved?

Last edited by rewards; 12-30-2010 at 10:37 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem with network and RAID on Centos 5.2 and Centos 5.4 thesirwolf Linux - Hardware 1 04-02-2010 12:47 PM
Problem in network in CentOS after restarting network sidkapoor2000 Linux - Networking 3 07-01-2009 01:27 AM
scp connection problem/ centos 5 mmk2000 Linux - Networking 3 09-17-2007 10:46 AM
Home network problem - Centos - no route to host dralexpe Linux - Networking 2 06-30-2007 06:43 PM
problem installing wireless network card on Centos abdulquadir Linux - Hardware 1 10-07-2006 07:20 AM

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

All times are GMT -5. The time now is 01:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration