View previous topic :: View next topic |
Author |
Message |
MycahM n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Jul 2005 Posts: 3
|
Posted: Fri Jul 01, 2005 7:10 pm Post subject: I want to add more systems to my network... |
|
|
I want to add more systems to my network, but I'm having some trouble.
I lease static IP's from my ISP (63.225.62.225 - 230)
I've got systems connected to all of those IP's now, and I want to add more systems.
I've been looking around for a solution to this, and I can't seem to just setup dhcp to have 10.0.0.* or 192.168.0.* to any systems connected and configured for dhcp.
My eth0 is as such:
eth0 Link encap:Ethernet
inet addr:63.225.62.225 Bcast:63.225.62.255 Mask:255.255.255.248
I'm new to dhcp, but it doesn't seem to allow me to simply do this: (quoted from dhcpd.conf)
# Configuration for an internal subnet.
subnet 63.225.62.225 netmask 255.255.255.0 {
range 10.0.0.1 10.0.0.50;
option routers 63.225.62.230;
}
It constantly reports this:
/etc/dhcp/dhcpd.conf line 25: subnet 63.225.62.225 netmask 255.255.255.0: bad subnet number/mask combination.
subnet 63.225.62.225 netmask 255.255.255.0
Which I guess is understandable, but is there any way around this? Will I need to use iptables or is there something else I can do? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bluedevils Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 21 Jul 2004 Posts: 252 Location: Vancouver BC -> NYC, NY
|
Posted: Fri Jul 01, 2005 7:55 pm Post subject: |
|
|
add another network card to the box. You will need to seach for thing like port forwarding, iptables, and nat. Your second network will be your internal (192.168.. or 10...) and the eth0 will be your external.
The easiest on the brain is to buy a router. Most consumer routers come with external to internal network and firewall. Make sure you get one with a switch and not a hub (just no efficient). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54824 Location: 56N 3W
|
Posted: Fri Jul 01, 2005 8:02 pm Post subject: |
|
|
MycahM,
There are several inconsistancies here, first, this doesn't hang together
Code: | eth0 Link encap:Ethernet
inet addr:63.225.62.225 Bcast:63.225.62.255 Mask:255.255.255.248 |
and
Code: | subnet 63.225.62.225 netmask 255.255.255.0 | is not a valid combination
The subnet always ends in an even number, its easy to see why if you write the addresses as hex (or binary if you prefer)
So subnet 63.225.62.225 becomes 0x3f,0xe1,0x3e,0xe1
Netmask 255.255.255.0 becomes 0xff,0xff,0xff,0x0
Lets start with an explaination of the net mask. Its a string of binary 1's followed by a string of binary 0's that is used to divde any IP up into the network part and host part. The term mask comes from the fact that it is appled in a bitwise logical and operation with the target IP, so it leaves behind only the network part of the IP. This part of the IP left, after the netmask has been applied, is also known as the network address. This bit of the IP is used to route packets between one (sub)network and another. Your subnet address of 63.225.62.225 cannot be a (sub)network address, since its not an even number.
The (sub)network address must always end in the same number of binary 0's as the netmask.
It is convention that the highest address in any subnet is the broadcast address. So with some guesswork,
Your network address is 63.225.62.224 - you may not allocate this to a PC
Your netmask is 255.255.255.248 (because you have said so) it gives you a public subnet of 8 IP addresses
Your broadcast address is 63.225.231 - you may not allocate this to a PC either.
Your ISP will force you to allocate an IP address to your router, leaving you with five public IPs that you can use.
To share a single public IP you need to set up Network Address Translastion (NAT) using iptables in the kernel and a script to set up some rules. You should really add another network interface card too, since your ISP may disconnect you if you start sending him 10.x.x.x packets. DHCP allocates IP addresses, it does not provide address translation so that packets from your internal network can be routed to/from the internet. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
MycahM n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Jul 2005 Posts: 3
|
Posted: Fri Jul 01, 2005 8:03 pm Post subject: |
|
|
I've got a current network setup through my existing switch.
You're recommending I configure a 2nd switch through an additional NIC?
That'd work, I guess. I'd rather try and keep everything on the same switch though.. If at all possible. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|