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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-15-2005, 11:38 AM
|
#1
|
Member
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38
Rep:
|
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.
|
|
|
08-15-2005, 01:30 PM
|
#2
|
Member
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661
Rep:
|
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.
|
|
|
08-15-2005, 09:45 PM
|
#3
|
Member
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38
Original Poster
Rep:
|
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?
|
|
|
08-16-2005, 12:41 PM
|
#4
|
Member
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661
Rep:
|
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.
|
|
|
08-16-2005, 10:34 PM
|
#5
|
Member
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38
Original Poster
Rep:
|
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.
|
|
|
08-16-2005, 10:43 PM
|
#6
|
Member
Registered: Oct 2003
Posts: 568
Rep:
|
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.
|
|
|
08-16-2005, 11:11 PM
|
#7
|
Member
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38
Original Poster
Rep:
|
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.
|
|
|
08-16-2005, 11:24 PM
|
#8
|
Member
Registered: Oct 2003
Posts: 568
Rep:
|
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.
|
|
|
08-16-2005, 11:42 PM
|
#9
|
Member
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38
Original Poster
Rep:
|
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?
|
|
|
08-16-2005, 11:46 PM
|
#10
|
Member
Registered: Oct 2003
Posts: 568
Rep:
|
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...
|
|
|
08-17-2005, 12:03 AM
|
#11
|
Member
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38
Original Poster
Rep:
|
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?
|
|
|
08-17-2005, 12:07 AM
|
#12
|
Member
Registered: Oct 2003
Posts: 568
Rep:
|
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.
|
|
|
08-17-2005, 12:55 AM
|
#13
|
Member
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38
Original Poster
Rep:
|
Ok. I will try. Thank You. Good luck on the lab.
|
|
|
08-17-2005, 11:57 AM
|
#14
|
Member
Registered: Aug 2004
Location: BR - Floripa
Distribution: Ubuntu 9.10 - 2.6.x.x
Posts: 661
Rep:
|
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
|
|
|
08-17-2005, 10:34 PM
|
#15
|
Member
Registered: Apr 2005
Location: Russia, West Sibirian town Surgut.
Distribution: SuSE 10.0
Posts: 38
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 09:45 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|