LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-18-2002, 10:23 AM   #1
CDPL
LQ Newbie
 
Registered: Mar 2002
Location: Indiana
Distribution: Red Hat 7
Posts: 8

Rep: Reputation: 0
configuring RH 7 for a subnet mask of 255.255.255.224


Hi, all. I was finally able to configure my computer running Red Hat 7.0 (2.2.16-22) to access the Internet. I am on a small library LAN with a subnet mask of 255.255.255.0 and with static IP addresses of .0 to .255. I had trouble getting eth0 to initialize until I put the following at the end of /etc/rc.d/rc.local:

insmod tulip
ifconfig eth0 xxx.xxx.xxx.xxx.up
route add default gw xxx.xxx.xxx.254
ifconfig eth0 netmask 255.255.255.0

My nameservers are both listed in /etc/resolv.conf

Then everything works fine. I am online and have even been able to set up a practice web server using Apache 1.3.12.

Here is my problem. I want to reconfigure the same machine to work in another nearby library that has a LAN with a subnet mask of 255.255.255.224. Its IP range is .96 to .127.

I assume the xxx.xxx.xxx.96 would be the network address that I enter in Network Configurator (although I did not have to indicate a network address in my other LAN, probably because it was xxx.xxx.xxx.0, right?). My router/gateway is xxx.xxx.xxx.126.

So should I be able to indicate this in /etc/rc.d/rc.local sort of like I did for the other LAN? (The DNS IPs don't change, so that is already taken care of.)

insmod tulip
ifconfig eth0 xxx.xxx.xxx.xxx up
ifconfig eth0 netmask 255.255.255.224
route add default gw xxx.xxx.xxx.126
route add –net xxx.xxx.xxx.96

I assume I need to add this last line to indicate where my network starts. But so far, I can't get to the network when I try this. The NIC is up and running. When I do ifconfig, here is the output:

eth0 Link encap:Ethernet Hwaddr 00:00:F8:08:3D:0F
inet addr: xxx.xxx.xxx.xxx Bcast: xxx.xxx.255.255 Mask: 255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets: 0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:9 Base address:0xec00

My static IP is fine, my netmask is fine, but the broadcast is odd. Shouldn't it be: xxx.xxx.xxx.127 (one number above the gateway?) Maybe my inexpert hacking of /etc/rc.d/rc.local is the problem?

I have had no trouble configuring Windows 98 and NT computers for this subnet mask, but I really want to get a Linux box in this library and start replacing some Windows machines. Any advice would be welcome! Thanks to anyone in advance.
 
Old 04-19-2002, 03:03 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
Yes it's your broadcast address which is wrong.

If you have ip range from .96 to .127 then the highest one would be your broadcast address. So try adding something like:
ifconfig eth0 broadcast xxx.xxx.xxx.127
 
Old 04-20-2002, 09:06 AM   #3
CDPL
LQ Newbie
 
Registered: Mar 2002
Location: Indiana
Distribution: Red Hat 7
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks a ton. Yes, that must be it. Now I can get the right broadcast address, which must default to xxx.xxx.xxx.255 unless indicated otherwise -- I guess I didn't have to worry about it until I encountered this particular LAN setup . Your help is much appreciated!
 
  


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
Are Broadcasts to 255.255.255.255 Routed MQMan Linux - Networking 6 11-23-2005 02:16 PM
invalid mask `255' graziano1968 Linux - Software 1 09-25-2004 11:10 AM
Logs full of hits to 255.255.255.255; how to stop logging? mac_phil Mandriva 2 02-23-2004 10:25 AM
dhcp subnet is 255.255.252.0 why does dhclient not find it???? baked Linux - Wireless Networking 0 01-06-2004 08:25 AM
UDP broadcast 255.255.255.255 java8964 Linux - Networking 0 10-29-2003 02:05 PM

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

All times are GMT -5. The time now is 11:43 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