LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-18-2003, 01:50 PM   #1
scorchen
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Rep: Reputation: 0
Subnet changed = Network Unreachable


Alright This problem might just be just my own misunderstanding of how ip's and subnets work, but i still can't get it resolved.

Heres my situation.

I've got a slackware bawx set up as a firewall running ip-masq. Everything worked fine for over a year. Last year our ip settings were as follows

eth0:

ip: 137.85.35.47
netmask: 255.255.0.0
gateway: 137.85.1.1

eth1:

ip: 192.168.0.1
netmask: 255.255.255.0


Everything was working fine UNTIL the IT Dept. notified our dorm that the subnet was going to change from 255.255.0.0 to 255.255.224.0

When i changed from .0 to .224 I can still ping other people in the dorm.. so all my equipment still works, but when i try to ping 137.85.1.1 i get Network Unreachable

when I run /etc/rc.d/rc.inet1

SIOCADDRT: File exists
Configuring eth0:
ifconfig eth0 137.85.35.42 broadcast 137.85.63.255 netmask 255.255.224.0
Configuring eth1:
ifconfig eth1 192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0
SIOCADDRT: Network is unreachable

i do a route -n and i get

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
137.85.32.0 0.0.0.0 255.255.224.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo


i tried to do a
route add -net default gw 137.85.1.1 netmask 0.0.0.0 metric 1 eth0

which produces

SIOCADDRT: Network is unreachable

So to sum it up:

-All my equipment/cables are functional
-All windows machines on the network use the 255.255.224.0 netmask without problems
-I've tried without success on my slack box, a gentoo box, a knoppix live cd, a gentoo live cd, and another slackware box. ALL of which produce the same results
-I can still ping other machines on the LAN


Any help is appreciated on this one. Thanks


Scorchen
 
Old 09-18-2003, 03:39 PM   #2
demian
Member
 
Registered: Apr 2001
Location: Bremen, Germany
Distribution: Debian
Posts: 303

Rep: Reputation: 30
Sure you can't reach the gateway. Netmask 255.255.224.0 translates to /19 (I prefere that notation.) This means there are 2^(32-19)=8192 IP addresses on your network:

Your IP/netmask is 137.85.35.47/19 so the network includes the IP range 137.85.32.0-137.85.63.255 and 137.85.1.1 is not in that range.

So, somethings wrong. If you are really supposed to use the gateway 137.85.1.1 you can add a route to this host like so:

route add -host default gw 137.85.1.1 eth0

and then hope that your IP packets hit a bridge that knows about the other network or you ask your IT guys for a gateway that's actually in your network.
 
Old 09-18-2003, 04:07 PM   #3
scorchen
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Hey thanks.. Any ideas as to why all the windows machines don't have a problem?
 
Old 09-18-2003, 04:13 PM   #4
demian
Member
 
Registered: Apr 2001
Location: Bremen, Germany
Distribution: Debian
Posts: 303

Rep: Reputation: 30
Quote:
Originally posted by scorchen
Hey thanks.. Any ideas as to why all the windows machines don't have a problem?
Dunno. Maybe when you enter the gateway in the windows networking config thing it doesn't care about the netmask which would be the equivalent of using the -host option to route. Or maybe there's some proprietary vodoo going on.
 
  


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
Network Unreachable? biledaemon Slackware 4 10-24-2005 02:05 PM
Network Is Unreachable!!!!!!!!!!!!!!!!!!!!! koodoo Linux - Newbie 4 02-19-2005 09:51 AM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM
Network is unreachable radix Linux - Networking 4 05-09-2002 01:06 AM
network unreachable topsoil Linux - Networking 6 08-05-2001 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:47 AM.

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