Re: dhcp server returns core dump when i define network with mask 8

2013-07-23 Thread Frank Leonhardt

On 23/07/2013 09:03, jb wrote:

s m sam.gh1986 at gmail.com writes:


...
subnet 192.0.0.0 netmask 255.0.0.0 {
 range 192.0.0.1 192.255.255.255;

The 'range' denotes IP addresses that can be allocated to clients.
The IP 192.255.255.255 is a reserved broadcast address for the network.
jb




It's definitely bad idea to try to use it, but it doesn't explain the 
core dump.


Also, using DHCP to dish out addresses that don't belong to you AND 
aren't on a private network (as defined by IANA) will probably lead to 
trouble. Valid private address ranges are:


10.0.0.0 - 10.255.255.255 (private class A)
172.16.0.0 - 172.31.255.255 (private class B x 16)
192.168.0.0 - 192.168.255.255 (private class C x 256)

Which block you use is really a matter of taste - classes haven't been 
used in routing for quite a while so you can consider them all as 
straight blocks but I (for one) still treat them as classed just to help 
me visualise what's what. For example, I'll use one class C per site to 
prevent conflicts over VPN.


192.0.0.0/24 addresses are allocated to real hosts on the wider 
internet, although IIRC some of the lower ones are reserved for use in 
documentation (like example.com) - is that where the idea came from?!? :-)


Regards, Frank.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dhcp server returns core dump when i define network with mask 8

2013-07-23 Thread s m
thanks Frank,

192 is just a sample. if i want to define 125.0.0.0 netmask 255.0.0.0, dhcp
server core dump either. you're right, it is better to use just some
limited addresses to avoid possible troubles. but i want to run my dhcp
server for all possible networks.
now my question is: if i define a network with mask 8, the rang should be
like: 126.0.0.0  126.254.255.255?

and thank you jb but if i define my network like below,  server runs
correctly:
log-facility local7;
subnet 192.168.0.0 netmask 255.255.0.0 {
range 192.168.0.1 192.168.255.255;
}

i think 192.168.255.55 is reserved for broadcast too. is it not true? if
yes, why dhcp server works correctly?
please help me to clear my mind.
regards,
SAM


On Tue, Jul 23, 2013 at 12:56 PM, Frank Leonhardt fra...@fjl.co.uk wrote:

 On 23/07/2013 09:03, jb wrote:

 s m sam.gh1986 at gmail.com writes:

  ...
 subnet 192.0.0.0 netmask 255.0.0.0 {
  range 192.0.0.1 192.255.255.255;

 The 'range' denotes IP addresses that can be allocated to clients.
 The IP 192.255.255.255 is a reserved broadcast address for the network.
 jb



 It's definitely bad idea to try to use it, but it doesn't explain the
 core dump.

 Also, using DHCP to dish out addresses that don't belong to you AND aren't
 on a private network (as defined by IANA) will probably lead to trouble.
 Valid private address ranges are:

 10.0.0.0 - 10.255.255.255 (private class A)
 172.16.0.0 - 172.31.255.255 (private class B x 16)
 192.168.0.0 - 192.168.255.255 (private class C x 256)

 Which block you use is really a matter of taste - classes haven't been
 used in routing for quite a while so you can consider them all as straight
 blocks but I (for one) still treat them as classed just to help me
 visualise what's what. For example, I'll use one class C per site to
 prevent conflicts over VPN.

 192.0.0.0/24 addresses are allocated to real hosts on the wider internet,
 although IIRC some of the lower ones are reserved for use in documentation
 (like example.com) - is that where the idea came from?!? :-)

 Regards, Frank.


 __**_
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/**mailman/listinfo/freebsd-**questionshttp://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-**
 unsubscr...@freebsd.org freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dhcp server returns core dump when i define network with mask 8

2013-07-23 Thread J . McKeown

Quoting Frank Leonhardt fra...@fjl.co.uk:



There are two common ways of defining a subnet mask - one is a  
dotted quad (e.g. 255.255.255.0) and the other is with a slash and  
the number of low-order bits - e.g. 192.168.1.0/8. Eight bits here  
means you get 2^8 addresses (i.e. 256). Don't use the first and last  
address in the range - the first is complicated (the network  
address) and the last is for broadcast packets. This doesn't always  
hold true but you're unlikely to come across exceptions.


This is the wrong way round. the number after the slash indicates the  
number of bits in the network address - the high-order bits.


So, when you say you want to define a network with mask 8 I don't  
really know what you mean from your example. Do you mean a /8?


192.168.1.0/8 = range 192.168.1.1192.168.1.254 with a subnet  
mask of 255.255.255.0 (0xFF00)


Nope. 192.168.1.0/24 = 192.168.1.1-255 mask 255.255.255.0.  
192.168.1.0/8 doesn't start where you think it does (and is arguably  
the wrong way to specify that network) because all but the first 8  
bits are masked out - it's 192.0.0.0 - 192.255.255.255.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dhcp server returns core dump when i define network with mask 8

2013-07-23 Thread jb
s m sam.gh1986 at gmail.com writes:


 and thank you jb but if i define my network like below,  server runs
 correctly:
 log-facility local7;
 subnet 192.168.0.0 netmask 255.255.0.0 {
 range 192.168.0.1 192.168.255.255;
 }
 
 i think 192.168.255.55 is reserved for broadcast too. is it not true? if
 yes, why dhcp server works correctly?
 please help me to clear my mind.
 regards,
 SAM

Regarding subnets:

192.168.0.0 netmask 255.255.0.0
is equivalent to
192.168.0.0/16
which splits it into a network id 192.168. and host id .0.0
Another example:
192.168.0.0 netmask 255.0.0.0
is equivalent to
192.168.0.0/8
which splits it into a network id 192. and host id 168.0.0

Regarding broadcast address:

yes, for subnet  192.168.0.0/16 the broadcast ip is 192.168.255.255 .
What are the implications of including broadcast ip in range option ?

Firstly, it depends on how the authors of software, that is DHCP server,
interpreted the dhcpd.conf option data. They could have rejected that
option up front, or accept it (implying you are the boos !).
After all, dhcpd.conf(5) only says:

The range statement
range [ dynamic-bootp ] low-address [ high-address];
For any subnet on which addresses will be assigned dynamically, there
must be at least one range statement. The range statement gives
the lowest and highest IP addresses in a range. All IP addresses in
the range should be in the subnet in which the range statement is declared.

Well, looks good to me so far !

Next, dhcpd.conf(5) describes how DHCP server deals with:
DYNAMIC ADDRESS ALLOCATION
...
IP ADDRESS CONFLICT PREVENTION
...
You can analyse it and see if any trouble lurks there ...

Secondly, let's assume there was no problem and that ip was dispensed to a host.

But, in a different place of IP specs there is a RFC??? which says that
the 192.168.255.255 as a generically valid ip address will assume some
additional meaning, that is it will be treated as a broadcast address
(it will represent all hosts on a subnet).
Wow ! That should give you a pause ...

It is said that the broadcast address is used by an application to send
the same message to all other hosts in the network simultaneously.
Who is using it ?

Well, our client host is using it (let's assume it was assigned that ip
above ...).
What happens when the host sends a packet out with a source ip address of
a broadcast ip address ? One can imagine that the destination host will
respond and send back a packet to a destination ip address which is our
sender's broadcast ip address ... You mean to every host on that network ?
Something fishy is on the way ...
But while doing it, it will utilize some protocols, like ARP, RIP, etc.

In addition, it is said that broadcast messages are typically produced by
network protocols such as the Address Resolution Protocol (ARP) and
the Routing Information Protocol (RIP).
They will utilize that ip broadcast address regardless of the fact that it
has been presumably assigned to the client host too.

Wow, what a soup ...
Enjoy it while it lasts :-)
jb


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dhcp server returns core dump when i define network with mask 8

2013-07-23 Thread Frank Leonhardt

On 23/07/2013 13:35, j.mcke...@ru.ac.za wrote:

Quoting Frank Leonhardt fra...@fjl.co.uk:



There are two common ways of defining a subnet mask - one is a dotted 
quad (e.g. 255.255.255.0) and the other is with a slash and the 
number of low-order bits - e.g. 192.168.1.0/8. Eight bits here means 
you get 2^8 addresses (i.e. 256). Don't use the first and last 
address in the range - the first is complicated (the network 
address) and the last is for broadcast packets. This doesn't always 
hold true but you're unlikely to come across exceptions.


This is the wrong way round. the number after the slash indicates the 
number of bits in the network address - the high-order bits.


So, when you say you want to define a network with mask 8 I don't 
really know what you mean from your example. Do you mean a /8?


192.168.1.0/8 = range 192.168.1.1192.168.1.254 with a subnet mask 
of 255.255.255.0 (0xFF00)


Nope. 192.168.1.0/24 = 192.168.1.1-255 mask 255.255.255.0. 
192.168.1.0/8 doesn't start where you think it does (and is arguably 
the wrong way to specify that network) because all but the first 8 
bits are masked out - it's 192.0.0.0 - 192.255.255.255.


Quite correct - for some reason I got that bit backwards when I'm using 
it every day the right way around. It's ludicrously hot and humid in 
London at the moment, lack of sleep caused thereby c...



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


dhcp server returns core dump when i define network with mask 8

2013-07-23 Thread s m
hello all,
i have a question about dhcpd in freebsd8.2 . when i define my network like
below in dhcpd.conf file, server doesn't run correctly and return core
dump
this is my dhcpd.conf file:

ddns-update-style none;
log-facility local7;
subnet 192.0.0.0 netmask 255.0.0.0 {
range 192.0.0.1 192.255.255.255;
}

 i want to define a network with mask 8. is this config wrong? if yes, how
should i define it?

thanks in advance,
SAM
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: dhcp server returns core dump when i define network with mask 8

2013-07-23 Thread jb
s m sam.gh1986 at gmail.com writes:

 ... 
 subnet 192.0.0.0 netmask 255.0.0.0 {
 range 192.0.0.1 192.255.255.255;

The 'range' denotes IP addresses that can be allocated to clients.
The IP 192.255.255.255 is a reserved broadcast address for the network.
jb





___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org