LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-15-2005, 11:38 AM   #1
dr_sad
Member
 
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38

Rep: Reputation: 15
Linux DHCP-server + Cisco uBR7246.


Hi.
I have a Cisco uBR7246 router and a DHCP-server under Linux SuSE 9.2 (dhcpd).
There is the cable interface on Cisco:

interface Cable3/0.1
description ###-I- | inet
ip address 10.10.24.1 255.255.252.0 secondary
ip address 10.10.20.1 255.255.252.0
ip access-group 100 in
cable dhcp-giaddr policy
cable helper-address 192.168.0.1
end


Within dhcpd.conf (on the host 192.168.0.1) I have following configuration:

shared-network HFCNet
{
...

# Aurora's CPE Network
subnet 10.10.24.0 netmask 255.255.252.0 {
option routers 10.10.24.1;
option time-servers 217.8.80.1;
#range 10.10.24.2 10.10.27.254;
}

# Aurora's CM Network
subnet 10.10.20.0 netmask 255.255.252.0 {
filename "basic.cm";
next-server 10.10.20.1;
option routers 10.10.20.1;
option time-servers 217.8.80.1;
range 10.10.20.2 10.10.23.254;
}
...
}


Now it works properly.
But if I turn range 10.10.24.2 10.10.27.254; on cable modems stop get IP addresses. They hang up in the init (i) state.

If I comment range out again all things work properly again.
Why does it happen?

I have one more problem. There is another Cisco 7246 router. It has another IP network on its cable interface. I add new "subnet" declaration in dhcpd.conf and the first router start try to get IPs from this new "subnet" block... ): Why ?

--
Thanks a lot.
Sad Grablin.
 
Old 08-15-2005, 01:30 PM   #2
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
I just see up your post, but I think you must use a valid network. if you are using 255.255.252.0 as your netmask so you have 64 ips per subnet, so 10.10.0.0 to 10.10.63.255 is your network address, and 10.10.192.0 to 10.10.255.255 is your broadcast . Have you tried setting the ip of your router above? Like for e.g: 10.10.64.24

Last edited by maginotjr; 08-15-2005 at 01:33 PM.
 
Old 08-15-2005, 09:45 PM   #3
dr_sad
Member
 
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
maginotjr, Thank You but I don't understand You at all! The netmask 255.255.252.0 is the netmask for 4*256=1024 ips as I thought. From, in my case, 10.10.24.1 - 10.10.27.254 and 10.10.27.0 - network address, 10.10.27.255 - broadcast. Or am I wrong?
 
Old 08-16-2005, 12:41 PM   #4
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
I hope not be missing anything... but this is my 2c:
Code:
+----.----.----.----.---.---.---.---+
|128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
+----|----|----|----|---|---|---|---|
| 1  |  1 |  1 |  1 | 1 | 1 | 0 | 0 |
+----'----'----'----'---'---'---'---+
 128  192  224  240  248 252 

252= 2^6= 2*2*2*2*2*2 = (64-2)*256= 15872 ips
252= 2^6= 64-2 ips per subnet 

Class B 10.10
Network Address
10.10.0.0
First Valid Subnet
10.10.64.0 
First Valid Subnet Host
10.10.64.1
Last Valid Subnet
10.10.128.0
Last Valid Subnet Host
10.10.128.1
BroadCast Address
10.10.192(-255).255

As recommended by cisco the first and the last subnet must not be used, it can cause problem. Only use it if you know what you're doing or if your router suports it.

Last edited by maginotjr; 08-16-2005 at 12:42 PM.
 
Old 08-16-2005, 10:34 PM   #5
dr_sad
Member
 
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
We are from different planets.

I see it in the following way:
Code:
10.10.24.0 netmask 255.255.255.252 - (/30) - 4 IPs - 2 Hosts
10.10.24.0 netmask 255.255.255.248 - (/29) - 8 IPs - 6 Hosts
10.10.24.0 netmask 255.255.255.240 - (/28) - 16 IPs - 14 Hosts
10.10.24.0 netmask 255.255.255.224 - (/27) - 32 IPs - 30 Hosts
10.10.24.0 netmask 255.255.255.192 - (/26) - 64 IPs - 62 Hosts
10.10.24.0 netmask 255.255.255.128 - (/25) - 128 IPs - 126 Hosts
10.10.24.0 netmask 255.255.255.0   - (/24) - 256 IPs - 254 Hosts
10.10.24.0 netmask 255.255.254.0   - (/23) - 512 IPs - 510 Hosts
10.10.24.0 netmask 255.255.252.0   - (/22) - 1024 IPs - 1022 Hosts 
10.10.24.0 netmask 255.255.248.0   - (/21) - 2048 IPs - 2046 Hosts
Do You think My DHCP problem in wrong IP subnetting? In fact I need DHCPD can determine the subnet of the host by its DHCP_DISCOVER packet.

And what is "2c"? Sorry, I learn English now.
 
Old 08-16-2005, 10:43 PM   #6
PenguinPwrdBox
Member
 
Registered: Oct 2003
Posts: 568

Rep: Reputation: 31
Here is the bottom line.
Your subnet mask is incorrect.

You are using 10.10.24.x with 255.255.252.0 as your subnet mask.
With 252, you are telling the system that you "don't care" about the last 2 bits in the third octet - 2 and 1.
Since these are the ONLY bits that change from 24-27 - they are interpreted as host addresses, not networks.
Either you need to change the subnet mask, or use a different network with the existing mask.

By the way - I'm assuming you aren't running a uBR7x in your home?
If you are - I'm movin' in

"2c" is short for 2 cents - it's an English expression for giving your opinion...like you were throwing in your 2 cents to pay for something :P

Last edited by PenguinPwrdBox; 08-16-2005 at 10:45 PM.
 
Old 08-16-2005, 11:11 PM   #7
dr_sad
Member
 
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
Code:
10.      10.      24.     .0
00001010.00001010.00011000.00000000

255.     255.     252.     0
11111111.11111111.11111100.00000000

so the third octet may be:
00011000 - 24
00011001 - 25
00011010 - 26
00011011 - 27
Why? Why my subnet mask is incorrect!? I need one subnet for 1024 IPs!
PenguinPwrdBox, I'm not running a uBR7x in my home. But you are welcome.
 
Old 08-16-2005, 11:24 PM   #8
PenguinPwrdBox
Member
 
Registered: Oct 2003
Posts: 568

Rep: Reputation: 31
Here's why:

Code:

network address               ||     host address

10.      10.      24.     .0
00001010 . 00001010 . 000110   ||   00 . 00000000

255.     255.     252.     0
11111111.11111111.111111       ||   00 . 00000000

__________________________________________

10.      10.      25.     .0
00001010 . 00001010 . 000110   ||   01 . 00000000

10.      10.      26.     .0
00001010 . 00001010 . 000110   ||   10 . 00000000

10.      10.      27.     .0
00001010 . 00001010 . 000110   ||   11 . 00000000
As you can see - for all of those "networks" - you aren't changing what is read as the
network because of the subnet mask. All the changes for those IP addy's are being
made on the host address side of the address. IP's 10.10.25-27.x
on network 10.10.24.0/22 are hosts, not valid subnets.

Last edited by PenguinPwrdBox; 08-16-2005 at 11:32 PM.
 
Old 08-16-2005, 11:42 PM   #9
dr_sad
Member
 
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
PenguinPwrdBox, Thank You that You are wasting Your time for me. I think we are don't understand one another. When i say "subnet" i mean dhcpd.conf subnet declaration:
Quote:
subnet 10.10.24.0 netmask 255.255.252.0 {
option routers 10.10.24.1;
option time-servers 217.8.80.1;
range 10.10.24.2 10.10.27.254;
}
Is it wrong?
 
Old 08-16-2005, 11:46 PM   #10
PenguinPwrdBox
Member
 
Registered: Oct 2003
Posts: 568

Rep: Reputation: 31
Yes. Change the subnet mask to 255.255.255.0.
Uncomment it, and it will work.

If you need to have enough IP's to accomodate 1024 hosts, and you have the IP space, consider:

10.11.24.0/24
10.12.24.0/24
10.13.24.0/24

And so on...
 
Old 08-17-2005, 12:03 AM   #11
dr_sad
Member
 
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
Why not 10.10.24.0/24, 10.10.25.0/24, 10.10.26.0/24 and so on... ?

So i will have to write on Cisco:

interface Cable3/0.1
description ###-I- | inet
ip address 10.10.24.1 255.255.255.0 secondary
ip address 10.10.25.1 255.255.255.0 secondary
ip address 10.10.26.1 255.255.255.0 secondary
...

And from what IP cisco will send a dhcp_discover packet to dchpd-server?
 
Old 08-17-2005, 12:07 AM   #12
PenguinPwrdBox
Member
 
Registered: Oct 2003
Posts: 568

Rep: Reputation: 31
That's fine too.
The router, if it is performing a DHCP discover, will not be using an IP to send
the discover packet. DHCP is a layer 2 technology. It sends a broadcast to 255.255.255.255,
and the server replies to the packet with a datagram addressed to the broadcasting MAC.
The point of DHCP is to obtain an IP address, therefore, you don't have a source IP in a
DHCP discover packet.

Last edited by PenguinPwrdBox; 08-17-2005 at 12:10 AM.
 
Old 08-17-2005, 12:55 AM   #13
dr_sad
Member
 
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
Ok. I will try. Thank You. Good luck on the lab.
 
Old 08-17-2005, 11:57 AM   #14
maginotjr
Member
 
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661

Rep: Reputation: 35
I have made a mistake, sorry, you have a jump of 4 in 4...

10.10.0.0 - 10.10.3.255 first invalid
10.10.4.0 - 10.10.7.255 first valid

6 bits for network, 2 bits for host + 8 bits from the last octet so 10 bits for host, 1024/256= 4
or
6 bits - 8 bits = 2^2 = 4.
sorry, I was wrong. Made a mistake.
Can you show your running config ?
#show running-config
 
Old 08-17-2005, 10:34 PM   #15
dr_sad
Member
 
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38

Original Poster
Rep: Reputation: 15
Hi. This thread has blasted my sense of this world. But now I have hope...

10.10.4.0 - 10.10.7.255 (10.10.4.0/22, netmask 255.255.252.0) - is a network for the 1022 hosts. First (10.10.4.0) is the network address. Last (10.10.7.255) - broadcast. Other addresses may be used as addresses for hosts and they can access one another without any router. Is it right?

What's wrong with 10.10.0.0/22? It is the first block of 4*256 subnets in 10.10.X.X while 10.10.4.0/22 is the second.

maginotjr, the cable interface configuration from the cisco i have posted in the first post of this thread. What part of the run-config do You want to see? The major problem is: The DHCP-server confuses IP-subnets.

#
# Aurora's CPE Network
#
subnet 10.10.24.0 netmask 255.255.252.0 {
#range 10.10.24.2 10.10.27.255;
option routers 10.10.24.1;
option time-servers 217.8.80.1;
option subnet-mask 255.255.252.0;
option broadcast-address 10.10.27.255;
}

#
# Aurora's CM Network
#
subnet 10.10.20.0 netmask 255.255.252.0 {
range 10.10.20.2 10.10.23.254;
filename "basic.cm";
next-server 10.10.20.1;
option routers 10.10.20.1;
option time-servers 217.8.80.1;
option subnet-mask 255.255.252.0;
option broadcast-address 10.10.23.255;
}



If I uncomment "range" parameter the DHCP-server does strange things. Look at its log:

Aug 17 12:57:11 mail dhcpd: DHCPDISCOVER from 00:11:1a:60:0c:aa via 10.10.20.1
Aug 17 12:57:11 mail dhcpd: DHCPOFFER on 10.10.27.254 to 00:11:1a:60:0c:aa via 10.10.20.1

So, the dhcp_discover packet has come via 10.10.20.1, i.e., from "Aurora's CM Network", but server offers IP from "Aurora's CPE Network". If the "range" is commented all thing work properly.
Now I start new uBR7246 with other address-space used on it. And when I add new "subnet" declaration block into the dhcpd.conf the dhcp-server starts confuse addresses.

Thank You for any assistance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Cisco uBR7246. Speed issue. dr_sad General 2 08-18-2005 12:17 PM
Linux DHCP server joperami Linux - Networking 3 05-17-2005 10:34 AM
Linux machine as DHCP server spony Linux - Networking 4 12-23-2003 08:47 AM
Redhat Linux server not getting ip comcast dhcp server munisp Linux - Networking 1 03-24-2003 12:26 PM
Cisco 678 modem/router and Linux server Q xmutex Linux - Networking 1 09-03-2001 04:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration