Networking Forums

Networking Forums > Computer Networking > Linux Networking > DHCP through router

Reply
Thread Tools Display Modes

DHCP through router

 
 
S W Ellis
Guest
Posts: n/a

 
      01-12-2004, 02:47 PM
I have a location that was running DHCP on a cisco. I need to remove that
service from the cisco and place it on a central DHCP server, running on
Linux.

Linux box is at 10.100.150.1, and has this configuration (/etc/dhcpd.conf)

authoritative;
ddns-update-style ad-hoc;
option ip-forwarding true;

subnet 10.100.128.0 netmask 255.255.128.0 {
range 10.100.150.10 10.100.150.250;
range 10.100.160.10 10.100.160.250;
default-lease-time 1600;
max-lease-time 36000;
option subnet-mask 255.255.128.0;
option broadcast-address 10.100.255.255;
option routers 10.100.150.1;
option domain-name-servers 192.168.0.100, 192.168.1.100;
option domain-name "moxmonkeys.com";
}

subnet 192.168.200.128 netmask 255.255.255.128 {
range 192.168.200.200 192.168.200.250;
default-lease-time 1600;
max-lease-time 36000;
option subnet-mask 255.255.255.128;
option broadcast-address 192.168.200.255;
option routers 192.168.200.129;
option domain-name-servers 192.168.0.177, 192.168.1.2, 192.168.100.1;
option domain-name "fvnb.com";
}

--------------------------------------------------------

On the cisco

!
ip dhcp excluded-address 192.168.200.129 192.168.200.140
!
ip dhcp pool 192.168.200.128/25
network 192.168.200.128 255.255.255.128
domain-name moxmonkeys.com
dns-server 192.168.100.100 192.168.1.100
default-router 192.168.200.129
netbios-name-server 192.168.1.187
lease 0 1
!

---------------------------------------------

so, I changed the cisco to be

config t
no ip dhcp pool 192.168.200.128/25
no ip dhcp excluded-address 192.168.200.129 192.168.200.140
end
config t
int Fa0/0
ip helper-address 10.100.150.1
end

----------------------------------------------

I also tried

ip dhcp-server 10.100.150.1

----------------------------------------------

Nothing allows me to grab an address. Any suggestions?

Thank you,

sean
 
Reply With Quote
 
 
 
 
vern
Guest
Posts: n/a

 
      01-12-2004, 05:04 PM
the config line you need is:

ip forward-protocol DHCP_port_number

(not sure which UDP port(s) DHCP uses)

the helper-address forwards several localnet broadcast protocols but not
DHCP

cheers
vern

 
Reply With Quote
 
vern
Guest
Posts: n/a

 
      01-12-2004, 05:07 PM
On Mon, 12 Jan 2004 18:04:59 +0000, vern wrote:

> the config line you need is:
>
> ip forward-protocol DHCP_port_number
>
> (not sure which UDP port(s) DHCP uses)
>
> the helper-address forwards several localnet broadcast protocols but not
> DHCP
>
> cheers
> vern


of course I should have said that this needs to be used in conjunction
with the helper-address command

 
Reply With Quote
 
S W Ellis
Guest
Posts: n/a

 
      01-15-2004, 08:27 PM

Okay, now I am at wits' end with this thing.

Basically, I have network A (192.168.1.0/24) connected to a Cisco 2620
router, which is connected via T1 to another Cisco 2620 router. That
Cisco is connected to network B (192.168.2.0/24), which has a DHCP server
on it running Linux DHCPD. Here is the configuration:

Cisco A 192.168.1.1

hostname cisco-192-168-1-1
ip subnet-zero
ip domain-name moxmonkeys.com
ip name-server 192.168.2.2
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
ip helper-address 192.168.2.2
duplex auto
speed auto
!
interface Serial0/0
ip address 192.168.99.254 255.255.255.0
ip helper-address 192.168.2.2
no fair-queue
!
ip default-gateway 192.168.99.1
ip classless
no ip forward-protocol udp tftp
no ip forward-protocol udp nameserver
no ip forward-protocol udp domain
no ip forward-protocol udp time
no ip forward-protocol udp netbios-ns
no ip forward-protocol udp netbios-dgm
no ip forward-protocol udp tacacs
ip route 0.0.0.0 0.0.0.0 192.168.99.1
no ip http server
no ip pim bidir-enable
!
logging trap warnings
logging 192.168.2.2
!

(and, I have typed in ip forward-protocol udp bootps and bootpc without it
adding to the configuration.)

Cisco B is:

hostname cisco-192-168-2-1
ip subnet-zero
ip domain-name moxmonkeys.com
ip name-server 192.168.2.2
!
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0
ip helper-address 192.168.2.2
duplex auto
speed auto
!
interface Serial0/0
ip address 192.168.99.1 255.255.255.0
ip helper-address 192.168.2.2
no fair-queue
!
ip default-gateway 192.168.2.2
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.2.2
no ip http server
no ip pim bidir-enable
!
logging trap warnings
logging 192.168.2.2
!

Linux DHCPD (/etc/dhcpd.conf)

authoritative;
ddns-update-style interim;
option ip-forwarding true;
option domain-name "moxmonkeys.com";
option netbios-name-servers 192.168.2.3;
default-lease-time 1600;
max-lease-time 80000;

subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.50 192.168.2.99;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.2.255;
option routers 192.168.2.2;
}

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.99;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
}

DHCP works on 192.168.2.0/24, but nothing works on 192.168.1.0/24 with
regard to DHCP. Linux box has routes

route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.2.1
route add -net 192.168.99.0 netmask 255.255.255.0 gw 192.168.2.1

Anyone have a linux dhcpd running with workstations pulling addresses
across a route? Any insight would be appreciated.

Sean
 
Reply With Quote
 
Allen Kistler
Guest
Posts: n/a

 
      01-16-2004, 06:29 PM
S W Ellis wrote:
> Okay, now I am at wits' end with this thing.
>
> [snip]
>
> Anyone have a linux dhcpd running with workstations pulling addresses
> across a route? Any insight would be appreciated.
>
> Sean


My dhcp server is 192.168.1.2.
I've got a small office router between 192.168.1.0/24 (e0 wired) and
192.168.2.0/24 (e1 mostly wireless). It's not the most secure setup,
but it's monitored like crazy.

!
version 12.0
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname 1605R_
!
username ... password 7 ...
ip subnet-zero
no ip source-route
no ip finger
no ip domain-lookup
ip dhcp-server 192.168.1.2
clock timezone CST -6
!
!
!
interface Ethernet0
ip address 192.168.2.1 255.255.255.0
ip access-group 2 in
ip helper-address 192.168.1.2
no ip directed-broadcast
no ip proxy-arp
no keepalive
media-type 10BaseT
no cdp enable
!
interface Ethernet1
ip address 192.168.1.254 255.255.255.0
no ip directed-broadcast
no ip proxy-arp
no keepalive
no cdp enable
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.8 permanent
!
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 2 permit 0.0.0.0
access-list 2 permit 255.255.255.255
access-list 2 permit 192.168.2.0 0.0.0.255
no cdp run
!
line con 0
transport input none
line vty 0 4
session-timeout 60 output
access-class 1 in
exec-timeout 60 0
password 7 ...
!
end


max-lease-time 14400;
default-lease-time 14400;
option domain-name-servers x.x.x.x y.y.y.y;
ddns-update-style interim;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.192 192.168.1.200;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
}

subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.128 192.168.2.254;
option broadcast-address 192.168.2.255;
option routers 192.168.2.1;
}

 
Reply With Quote
 
Allen Kistler
Guest
Posts: n/a

 
      01-16-2004, 07:00 PM
Allen Kistler wrote:
>
> [snip]
>
> My dhcp server is 192.168.1.2.
> I've got a small office router between 192.168.1.0/24 (e0 wired) and
> 192.168.2.0/24 (e1 mostly wireless). It's not the most secure setup,
> but it's monitored like crazy.
>
> [snip]


Just to avoid confusion, I really meant

192.168.1.0 (e1 wired)
192.168.2.0 (e0 mostly wireless)

Oh, well....

 
Reply With Quote
 
Carl
Guest
Posts: n/a

 
      01-16-2004, 08:00 PM


vern wrote:
> On Mon, 12 Jan 2004 18:04:59 +0000, vern wrote:
>
>
>>the config line you need is:
>>
>>ip forward-protocol DHCP_port_number
>>
>>(not sure which UDP port(s) DHCP uses)
>>
>>the helper-address forwards several localnet broadcast protocols but not
>>DHCP
>>
>>cheers
>>vern

>
>
> of course I should have said that this needs to be used in conjunction
> with the helper-address command
>


DHCP uses ports?

 
Reply With Quote
 
S W Ellis
Guest
Posts: n/a

 
      01-16-2004, 08:07 PM

> DHCP uses ports?


udp port 67
 
Reply With Quote
 
brettg
Guest
Posts: n/a

 
      01-17-2004, 10:34 PM
S W Ellis wrote:
> Okay, now I am at wits' end with this thing.


Just a thought, but if you configure an IP address manually (with the
appropriate def gw setting of course) on a local host can you actually
ping the ip_address of the DHCP server on the other network? You need to
make sure your basic IP routing is up and running before you muck about
with DHCP. You have probably already done this but I didn't see you
mention it and you seem to have changed your addressing scheme since
your first posting.





 
Reply With Quote
 
S W Ellis
Guest
Posts: n/a

 
      01-18-2004, 08:54 PM
On Sat, 17 Jan 2004 23:34:33 +0000, brettg wrote:

> S W Ellis wrote:
>> Okay, now I am at wits' end with this thing.

>
> Just a thought, but if you configure an IP address manually (with the
> appropriate def gw setting of course) on a local host can you actually
> ping the ip_address of the DHCP server on the other network? You need to
> make sure your basic IP routing is up and running before you muck about
> with DHCP. You have probably already done this but I didn't see you
> mention it and you seem to have changed your addressing scheme since
> your first posting.


Thank you, but yes, I have checked this. I thought once, "Oh, crap, what
if I don't even have forwarding enabled on the cisco!". Basic networking
is working. I still cannot figure this out, but am building an ethernet
to ethernet router with sniffer capabilities to watch what exactly is
happening. That is my job tomorrow (Monday, my only day off this week).

As far as the addressing, I just changed it to make things more simplified
for whomever might read it.

Sean
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which should issue the DHCP I.P. addresses? (modem-router/wireless router) Siegen Network Routers 5 03-01-2007 11:06 AM
DHCP through Wireless Router? Tom Lake Network Routers 2 01-01-2007 09:26 AM
newb: clients are picking up router DHCP, not DC DHCP sklett Windows Networking 3 07-29-2006 04:07 AM
Help Please - Router using Fixed WAN IP and DHCP Lan JR Tolkin Wireless Internet 4 01-28-2006 12:22 AM
DNS with DHCP on NAT router Tim Milstead Linux Networking 3 09-01-2004 11:47 AM



1 2 3 4 5 6 7 8 9 10 11