Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHCP for many interfaces

Status
Not open for further replies.

MuanXi

ISP
Joined
Apr 26, 2005
Messages
1
Location
CZ
Topology:

router-switch-hosts

Betveen router an switch is a Trunk vith VLAN 10,20,30.

These VLANs are for hosts connected to a switch.

1) I need to enable DHCP server on router(no problem).

2) I need assign 3 different pools, to three VLANs.
Is it possible?

For example : FIRSTPOOL 192.168.1.0 /24 for hosts on VLAN10
SECONDPOOL 195.146.100.0 /24 for hosts on
VLAN20
THIRDPOOL 10.10.10.0 /24 for host on VLAN30

HOW CAN I DO THAT?
 
Assuming you'll reserve the first 30 addresses for each network, and assuming you're running 802.1q for the trunk on your switch:

!
ip dhcp excluded-address 192.168.1.1 192.168.1.30
ip dhcp excluded-address 195.146.100.1 195.146.100.30
ip dhcp excluded-address 10.10.10.1 10.10.10.30
!
ip dhcp pool FIRSTPOOL
import all
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
domain-name firstpool.com
netbios-name-server 1.2.3.4
netbios-node-type h-node
dns-server 1.2.3.5 1.2.3.6
lease 30
!
ip dhcp pool SECONDPOOL
import all
network 195.146.100.0 255.255.255.0
default-router 195.146.100.1
domain-name secondpool.com
netbios-name-server 1.2.3.4
netbios-node-type h-node
dns-server 1.2.3.5 1.2.3.6
lease 30
!
ip dhcp pool THIRDPOOL
import all
network 10.10.10.0 255.255.255.0
default-router 10.10.10.1
domain-name thirdpool.com
netbios-name-server 1.2.3.4
netbios-node-type h-node
dns-server 1.2.3.5 1.2.3.6
lease 30
!
interface f0/0
no ip address
speed 100
duplex full
no shut
!
interface f0/0.10
description VLAN10
encapsulation dot1Q 10
ip address 192.168.1.1 255.255.255.0
!
interface f0/0.20
description VLAN20
encapsulation dot1Q 20
ip address 195.146.100.1 255.255.255.0
!
interface f0/0.30
description VLAN30
encapsulation dot1Q 30
ip address 10.10.10.1 255.255.255.0
!
end
 
Forgot to tell you that I also assume you want to propagate WINS and DNS info to the DHCP clients such that WINS server = 1.2.3.4, DNS servers = 1.2.3.5 and 1.2.3.6
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top