How Do I Change the Bcast Addr??

Just installed openSUSE 11, and I can’t get online yet. I’m pretty sure it’s because I need a broadcast address of 192.168.0.255 and my ifconfig says it’s currently 192.168.1.255. (My other two distros connect fine using 192.168.0.255.)

How the heck do you change that number? I see nothing in the network config gui…

BTW, I’m trying to set up a static connection…

Thanks in advance!

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Do you have your IP address and subnet mask set properly? For example
if your IP was set to 192.168.1.x with subnet 255.255.255.0 this could
happen. Alternatively if IP was set to 192.168.0.x or 192.168.1.x and
subnet mask was set to 255.255.254.0 (notice the ‘4’) this could also
happen. Broadcast addresses are usually calculated as the last IP in
the range combining your network and subnet mask so one of those is
(imo) probably wrong.

Good luck.

wilberfan wrote:
> Just installed openSUSE 11, and I can’t get online yet. I’m pretty sure
> it’s because I need a broadcast address of 192.168.0.255 and my ifconfig
> says it’s currently 192.168.1.255. (My other two distros connect fine
> using 192.168.0.255.)
>
> How the heck do you change that number? I see nothing in the network
> config gui…
>
> BTW, I’m trying to set up a static connection…
>
> Thanks in advance!
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFItbmf3s42bA80+9kRAvqvAJ9DQ9RjEOA7uWuS4P3b/VssLYY/HQCeOqFG
kNgLfGbS2i1J0Ock4MiiYfg=
=d/tW
-----END PGP SIGNATURE-----

Here’s the numbers that work on both my 'buntu and Sidux installations:

IP ADDR: 192.168.1.100
Netmask: 255.255.255.0
Gateway: 192.168.1.1
Network: 192.168.1.0
Broadcast:192.168.0.255

I’ve carefully put the first 3 into the appropriate places in the SUSE network config…but don’t see anywhere I can specify the last two…

(I’m not sure if I need to set the “network” number–but I have memories of no 'net connection if that last (broadcast) number was incorrect.)

The broadcast address and network address can be computed from the IP address and netmask. In your case the broadcast address is 192.168.1.255. Here are the forrmulae, in C notation:

network = ip & netmask;
bcast = ip | ~netmask;

You’ll have to forgive me–but I have no idea what that means (being a non-C speaker)

All I know is this: If I don’t specify that my broadcast address is 192.168.0.255 I do NOT connect to the internet. Whether that’s “correct” or not–that seems to be what works.

(Now, I’ll grant you that perhaps something needs to be changed in the modem and/or router (but I have no idea what or where yet. Since, after 3 hours of trying, no one (including Google) has been able to tell me how to change the broadcast address in the network setup in openSUSE 11, I’m willing to entertain the idea that I’ll need to change the modem and/or router.)

It’s a Motorola SB5101 Modem and a LinkSys BEFSX41 Router…)

That’s a truly weird situation since in that case your broadcast address is not inside your subnet. I can’t even begin to imagine why that would be necessary. And in fact the subnet broadcast address (which is what it is) is not used very much, I think Samba uses it, but for most other uses, the global broadcast address 255.255.255.255 is used.

But you can edit the settings after YaST is done, in /etc/sysconfig/network/ifcfg-eth0 (assuming it’s eth0) and set BROADCAST to what you want. Hopefully that will get you going and you won’t have to investigate this oddity before you change your router.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I don’t see how your broadcast address can be 192.168.0.255 when
EVERYTHING else is 192.168.1.x. If that is a setting you put on your
router then fix it along with your other settings. Maybe I’m out of
touch with my TCP/IP knowledge but I don’t think so…

Good luck.

wilberfan wrote:
> Here’s the numbers that work on both my 'buntu and Sidux installations:
>
> IP ADDR: 192.168.1.100
> Netmask: 255.255.255.0
> Gateway: 192.168.1.1
> Network: 192.168.1.0
> Broadcast:192.168.0.255
>
> I’ve carefully put the first 3 into the appropriate places in the SUSE
> network config…but don’t see anywhere I can specify the last two…
>
> (I’m not sure if I need to set the “network” number–but I have
> memories of no 'net connection if that last (broadcast) number was
> incorrect.)
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFItdgU3s42bA80+9kRAsh3AJwO4Wlpuir+HlPhPIi6aKQO0oi6JwCeLpGS
U42HqDE1cj601GS1Xf21GCQ=
=88Rh
-----END PGP SIGNATURE-----

Thanks for the suggestion! I’ll try it here in a second…

But first: Before I saw your most recent reply, I was poking around my router config screens.

I have the option of changing the router address to whatever I want. Since that third number (192.168.1.1) seemed to be at some kind of variance to the broadcast address (192.168.0.255), I changed the router IP to 192.168.0.1.

I also noticed that the router config screen gives me the following choices of subnet masks:

255.255.255.0
.128
.192
.224
.240
.248
.252

I don’t know why those SPECIFIC ones (this is all still somewhat new to me!)–but would I be better off selected something other than 255.255.255.0?

Appreciate your help so far…!

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Unless you are ready to learn a lot more about networking, stick with
255.255.255.0. Actually, if those are all the last octet (replacing the
…0) then you don’t want them as it will make life less-easy, rather than
easier.

Good luck.

wilberfan wrote:
> Thanks for the suggestion! I’ll try it here in a second…
>
> But first: Before I saw your most recent reply, I was poking around my
> router config screens.
>
> I have the option of changing the router address to whatever I want.
> Since that third number (192.168.1.1) seemed to be at some kind of
> variance to the broadcast address (192.168.0.255), I changed the router
> IP to 192.168.0.1.
>
> I also noticed that the router config screen gives me the following
> choices of subnet masks:
>
> 255.255.255.0
> .128
> .192
> .224
> .240
> .248
> .252
>
> I don’t know why those SPECIFIC ones (this is all still somewhat new to
> me!)–but would I be better off selected something other than
> 255.255.255.0?
>
> Appreciate your help so far…!
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFItefd3s42bA80+9kRAr/IAKCGfY4sMvJNuWKHiD4RVJG7qtjHBQCfdpQH
8RPScpCknmnrNLzr5VQscuA=
=yp74
-----END PGP SIGNATURE-----

Those subnet masks correspond to different sizes of subnet, going from a 256 (actually 254 effectively, since the network address and the broadcast address are not available) size subnet downwards, halving each time. I don’t see any reason why making your subnet smaller would make any difference to your situation.

After changing my router IP to 192.168.0.1, here’s a solution that a (very helpful!) fellow in the Sidux IRC channel gave me:

I added “nameserver 192.168.0.1” to /etc/resolv.conf

:slight_smile:

Thanks for your help, too!

Well that makes sense. When you decide to assign a machine a static IP, you need the following information:

IP address
netmask
gateway address
nameserver address(es)

The last is often the same as the modem/router gateway address as these have a nameserver proxy these days. Without the last you won’t be able to resolve websites, etc. although you will be able to reach hosts by IP address.

Did you not want to configure your Linux machine by DHCP, which would have set all of the above automatically? DHCP doesn’t have to imply dynamic address, though many people think so. You may find that your router allows you to give out a pinned static address via DHCP.

I have two machines and a router–and wanted to keep the IP of the SUSE box the same as the other distros on the same box (192.168.0.100)

When you pin a DHCP address in the router, it uses the MAC address of the Ethernet card to look up the address. So you would receive the same address no matter what OS you run. Something to remember for next time.

I’m clearly in a bit over my head here! :wink:

I’ve got some ports forwarded, etc… I was under the impression that I needed fixed internal IP addrs , etc, to get things to work properly…

Obviously this grasshopper has MUCH to learn!

Yes, you do need fixed IPs for hassle free port-forwarded services, but you can sometimes get the router to give you those fixed IPs via DHCP and not have to configure these things on each OS you run on that machine.