Setting Up A Subnet

Post your Debian questions here.

Setting Up A Subnet

Postby smw » April 29th, 2012, 9:22 pm

I am currently learning about subnetting. I know all about the math. Everywhere i look it's all about the classes of IP addresses and the math required to do so.

I can't find anything about Physcially setting up a subnet.

Where in Debian can I LITERALLY set up a subnet with my broadcast IP, my subnet mask, and all of that good stuff?

I don't need to know how to figure out my subnest, and hosts, or any of that.

I just want to know how I actually set the subnet up on my server.

Thanks.
smw
 
Posts: 8
Joined: April 29th, 2012, 9:17 pm

Re: Setting Up A Subnet

Postby lester] » April 30th, 2012, 3:33 am

No
You have to know the math involved to setup a subnet,
(which meant in my case learning to convert an octal IP address into binary notation)
before --> YOU <-- can setup a subnet on your network.

Of course someone can just tell you howto do it, but than that someone would be setting up a subnet on your network.

Which really doesn't make much sense for a lot of reasons.
User avatar
lester]
 
Posts: 200
Joined: January 28th, 2012, 8:13 am
Location: hienlien

Re: Setting Up A Subnet

Postby smw » April 30th, 2012, 3:39 am

I do know the math. What I meant is... I've all ready done the math. I've got my broadcast IP, subnet mask, and all that figured out.

I now need to know how to physically use the information to set it.


I never said the math isn't important. I said I don't need it because I've ALL READY done it.


I just want to know how to actually physically apply the info to my network. (I must not of made it clear in my original post that I already know the math behind it. And didn't clarify enough that I just want to know how to physically set it up on a Debian system. I apologize, and it's cleared up now..)
smw
 
Posts: 8
Joined: April 29th, 2012, 9:17 pm

Re: Setting Up A Subnet

Postby dilberts_left_nut » April 30th, 2012, 7:32 am

Put it in /etc/network/interfaces
detly wrote:What's wrong with RTFM as an answer when the answer is clearly in the FM and requires only cursory Ring?
User avatar
dilberts_left_nut
 
Posts: 176
Joined: February 10th, 2011, 8:41 am
Location: enzed

Re: Setting Up A Subnet

Postby smw » April 30th, 2012, 5:59 pm

dilberts_left_nut wrote:Put it in /etc/network/interfaces



All right. I think I've got it. But I still have one question.


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
address xxx.xxx.x.xxx
netmask xxx.xxx.x.xxx
network xxx.xxx.x.xxx
broadcast xxx.xxx.x.xxx
gateway xxx.xxx.x.xxx


I've made the IP static, and i've plugged in all of MY IP addresses. The internet works fine. But what about my IP tables? Does putting my broadcast IP in the file above automatically make the range of IP addresses associated with it usbale? What I basically mean is.. If I put in my broadcast IP in the file above does that mean I can now assign the IPs in the range associated with the broadcast IP to clients?


Or is there another step to make those IPs usable?
smw
 
Posts: 8
Joined: April 29th, 2012, 9:17 pm

Re: Setting Up A Subnet

Postby dilberts_left_nut » April 30th, 2012, 9:02 pm

Ah ok.
So you want to set up a DHCP server for clients to get their network config automatically?

For small networks I usually use dnsmasq as it is a simple one stop dhcp/dns server.
detly wrote:What's wrong with RTFM as an answer when the answer is clearly in the FM and requires only cursory Ring?
User avatar
dilberts_left_nut
 
Posts: 176
Joined: February 10th, 2011, 8:41 am
Location: enzed

Re: Setting Up A Subnet

Postby smw » April 30th, 2012, 9:05 pm

dilberts, I will be doing that soon. But as of right now I will be assigning IP addresses manually since I only have a few clients.

I just want to know if once I edit my interfaces file and save it can I then immediately begin applying IP dresses to clients?
smw
 
Posts: 8
Joined: April 29th, 2012, 9:17 pm

Re: Setting Up A Subnet

Postby lester] » May 1st, 2012, 6:41 am

Now I'm starting to wonder what you really want to do.
Are you trying to setup a subnet, supernet or a regular network using static IP?

the "range" usually defined as the dhcp scope.
And the broadcast IP is usually outside of that range or at least at the very end of it.

Dilberts_left_nut, if you get what he wants I'll let you take it from here. Otherwise I'll also give it a shot in dark.
User avatar
lester]
 
Posts: 200
Joined: January 28th, 2012, 8:13 am
Location: hienlien

Re: Setting Up A Subnet

Postby smw » May 1st, 2012, 6:48 am

I was all wrong.. Sorry guys. The interface file wasn't what I wanted at all. I thought it was..

My mistake. I'm learning..

Thanks everyone!

P.S. Does dhcp3-server come as a package in Debian? if so what would I call to install it?

apt-get install package name??

Thanks again!
smw
 
Posts: 8
Joined: April 29th, 2012, 9:17 pm

Re: Setting Up A Subnet

Postby nadir » May 1st, 2012, 7:12 am

Not that i would know anything about the subject, but what i do is usually
Code: Select all
apt-cache search dhcp | grep server

sometimes
Code: Select all
apt-cache search dhcp | grep server | grep -v exclude_pattern

to exclude some result i know i don't want, via "grep -v", and sometimes
Code: Select all
apt-cache search dhcp --names-only

helps too.
In this case "apt-cache search dhcp | grep server" already looks promising.
Very often
Code: Select all
apt-cache search dhcp

or
Code: Select all
apt-cache search dhcp | less

to scroll through the output of the search is sufficient too (no need to fiddle with grep and such).

I also check either the debian wiki:
https://wiki.debian.org/DHCP_Server
and often the ubuntu wiki helps too:
https://help.ubuntu.com/community/Servers
In this case it doesn't seem to help, as you will find dhcp3-server, but often it does.

I didn't find anything here:
http://www.debian-administration.org/
but often you will (for such questions)


I would be more than happy if someone would explain the subnet-subject a bit more detailed (do i need a second network-card, etc). I fiddle a lot with networking questions these days, but it all is a big mess for me. The answer: "edit /etc/network/interfaces" didn't really make me see the light :-) . Perhaps i misunderstand "subnet". I thought it means one PC has access to one network, say the internet, and at the same time to another network, say a local one without access to the internet. gateway being the "thing" which goes from one net to the other. Yes, i am a noob. Never said something else ... :-)


btw:
$ date +%F
2012-05-01
In Europe this means something. Have your say, give them the business. Every tool can be a weapon (I will use my laptop, but the old one...)
nadir
 
Posts: 1708
Joined: February 9th, 2011, 8:07 am

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 0 guests

x