how do i calculate broadcast & network

July 12, 2010 at 22:26:21
Specs: linux ubuntu
i m setting up a linux server and i have to setup ip , in static mode.
so i know everything except those two things.
how do i calculate them?
example ip:200.49.142.91
submask 255.255.255.248
gateway 200.49.142.89

See More: how do i calculate broadcast & network

Report •

#1
July 13, 2010 at 03:58:30
You don't calculate IP addresses at all. If it is a public IP address you get the address from your ISP who will also provide all information regarding DNS servers. A static IP address usually cost more than a dynamic IP address.

The IP address you quoted is a public IP address belonging to a Cable TV company in Argentina.

If you are behind a router you use a private IP address, usually provided by DHCP or can be entered manually. These address must come within one of the three private IP address blocks allocated for the purpose.

http://en.wikipedia.org/wiki/Privat...

The usual address to start with is 192.168.1.1 which is allocated to the router with a mask of 255.255.255.0. This will give you 254 addresses in the range 192.169.1.xxx

The gateway address will be the address of the router, 192.168.1.1. You would only use a public IP address as a gateway address within the router or if the computer had direct access to the Internet.

It would help as well if we knew what kind of server you are talking about. Web server or a file server. There's a world of difference between the two,


Stuart


Report •

#2
July 13, 2010 at 07:08:28
What Stuart said!

Just FYI, the info you gave:

example ip:200.49.142.91
submask 255.255.255.248
gateway 200.49.142.89

Is a subnet of only 6 IP's. If one figures 200.49.142.89 as the first IP and using the subnet mask of 255.255.255.248 you get:

200.49.142.89/29

Which in turn gives you a total of 6 host IP's in the range of:

200.49.142.89 to 200.49.142.94

and

Broadcast Address: 200.49.142.95

That's not much of a subnet. I would recommend you follow Stuarts advice, use the Class C private IP with a standard class C subnet mask. This gives you:

192.168.0.0/24

IP's:
192.168.0.1 through 192.168.0.254

Broadcast Address: 192.168.0.255

You can use .1 in the 3'd octet if you'd prefer. Some router's by default use .1 and others .0

.1 is just the next available subnet after .0 and I have a habit of starting with the first available network.

It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.

***William Henley***


Report •

#3
July 13, 2010 at 08:43:14
thank you so much everyone. !!!
i call my isp and they told me everything i need it.
my broadcast is Broadcast Address: 200.49.142.95 like curt said.
and my network is 200.49.142.88.

so i just install ubuntu 10 server with citadel email server.
easy to install and use.
if anyone knows how to make safe a server agains hackers that will be great.
or how to install a good anti spam and antivirus for citadell.

thank you all guys in advance !!
have nice day


Report •

Related Solutions

#4
July 13, 2010 at 10:45:48
Ouch!

Those are your actual IP's as provided by your ISP. The small number of hosts is understandable.............however, I wouldn't have posted the IP's as now anybody who has viewed this will know them. If you want, you can edit those and change the last two octets to x's.

You should put (at the very least) a SOHO Router between your LAN and the internet. A SOHO router will provide NAT as well as a firewall giving you some protection from intrusion as well as allowing multiple clients to access the internet through one external IP. If you buy a SOHO Router with DMZ capability, you could put an outward facing server (like a web server) in the DMZ and segregate it from your internal network while providing some protection from the internet while allowing external access to it's website.

Just some security stuff you may want to give some serious thought to before deploying.

It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.

***William Henley***


Report •

#5
July 13, 2010 at 12:13:13
thxs
but this forum does nt let me to edit my first post just the second response. (appear a little notepad but not in the rest).
i have a very small isp and i dont have many ppl using that server.
but i prefer nt to use a SOHO solution it can be a pain.
i use mikrotik it is more professional but for this server i want to use a public ip i still have 3 ip remaining to use.
if u have some solution to use iptables or some firewall it will be much better

Report •

#6
July 13, 2010 at 12:38:29
You've got to use what works best for you and what you're most familiar with. I've never heard of mikrotik myself but that doesn't mean a whole lot since I work in an Enterprise environment and we use highend equipment.

but i prefer nt to use a SOHO solution it can be a pain.

More of a pain than mikrotik? I wager it's not. In fact, for what you're doing, I'd suspect it would work just fine with a much smaller learning curve. But you're the one who's going to have to deal with this long term, not me, so do whatever feels right to you.

want to use a public ip i still have 3 ip remaining to use

Just make sure you have the box secured against intrusion. When you have your server sitting right out on the web with nothing between it and the hackers you're completely wide open to attack.

if u have some solution to use iptables or some firewall it will be much better

Sorry, I can't help you. We use OpenBSD and it's built in pf for firewalls so I know nothing about iptables.

I see you don't know your way around iptables and/or linux very well either which is why I suggested a SOHO Router with a DMZ. This would actually simplify things. But, you seem to want to use some obscure product (mikrotik) and an OS you don't know very well so all I can say is, good luck, have fun. I'm sure you'll eventually get everything setup and working the only question is how long (and how painful) it will be to get it setup, configured, and most importantly, secured against intrusion.

It matters not how straight the gate,
How charged with punishments the scroll,
I am the master of my fate;
I am the captain of my soul.

***William Henley***


Report •

#7
July 13, 2010 at 13:22:54
thxs again for ur opinion.
mikrotik is router board solution based on linux.
i have installed mikrotik to many customers and enterprices and they are happy in my case i had it without restating for a year til the ups just die then i had to restart it , but i can handle tons of gigabytes and it does nt froze like the SOHO i have tried. Here at least there are many ISP who use this solution.
btw if i do what u said with SOHO router and i activate DMZ it will be almost like if the server is connected directly to the public ip. is nt it that right?

Report •

Ask Question