LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 02-27-2012, 10:07 AM   #1
gianthawk
LQ Newbie
 
Registered: May 2011
Location: USA bi-coastal
Posts: 7

Rep: Reputation: 0
Change subnet mask


Newbie question, searched but cannot find an answer.

I have an RHEL5 server and am being told that the subnet mask is incorrect. The netstat -rn command showed:
xx.xx.xxx.0 0.0.0.0 255.255.254.0 eth1

should be :
xx.xx.xxx.0 0.0.0.0 255.255.255.0 eth1

I made the update in /etc/sysconfig/network-scripts/ifcfg-eth1
and issued service network restart
but now netstat command shows both entries. How can I remove the incorrect entry without a reboot? Is it possible?

Thanks.
 
Old 02-27-2012, 10:24 AM   #2
mandyapenguin
Member
 
Registered: Nov 2011
Location: India
Distribution: RedHat, Cent OS, Fedora, Debian, Ubuntu
Posts: 105

Rep: Reputation: Disabled
Code:
netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
I tried this and could remove 169.254.0.0/16,
Code:
route del -net 169.254.0.0 netmask 255.255.0.0 dev eth0
Code:
netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth1
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
 
Old 02-27-2012, 10:49 AM   #3
ratotopi
Member
 
Registered: Dec 2011
Posts: 105

Rep: Reputation: 6
Leave it as it is, it won't trouble you , its a default route for windows machines but if you want to get rid of it try by setting NOZEROCONF=yes in /etc/sysconfig/network.
 
Old 02-27-2012, 11:00 AM   #4
gianthawk
LQ Newbie
 
Registered: May 2011
Location: USA bi-coastal
Posts: 7

Original Poster
Rep: Reputation: 0
mandyapenguin, thanks! That worked for me.
 
Old 02-28-2012, 02:40 AM   #5
mandyapenguin
Member
 
Registered: Nov 2011
Location: India
Distribution: RedHat, Cent OS, Fedora, Debian, Ubuntu
Posts: 105

Rep: Reputation: Disabled
Quote:
Originally Posted by gianthawk View Post
mandyapenguin, thanks! That worked for me.
Welcome.
 
Old 02-28-2012, 07:29 AM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Dehradun, Uttarakhand, India
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,412

Rep: Reputation: 303Reputation: 303Reputation: 303Reputation: 303
Now if your problem has been solved, please mark the thread as SOLVED.
 
  


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
Squid stops working after subnet mask change JHMorris Linux - Newbie 3 01-21-2009 06:05 AM
Redhat Centos 5.2 - How to change subnet mask rust8y Linux - Networking 1 11-26-2008 05:20 PM
What is Subnet Mask? cousinlucky Linux - Networking 21 10-17-2007 11:08 AM
Subnet Mask with 1 IP. Ionized Linux - Networking 25 06-10-2007 12:20 AM
Subnet Mask jomyjose Linux - Networking 2 08-01-2006 09:19 AM


All times are GMT -5. The time now is 11:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration