A
A
alexdob2014-06-11 08:47:43
DHCP
alexdob, 2014-06-11 08:47:43

How to distribute several subnets on Cisco 2901 (stock) via DHCP?

Good afternoon dear community.
There was another question about this brand.
We have:

interface GigabitEthernet0/1
 description LAN
 ip address 192.168.6.1 255.255.255.0
 ip address 192.168.7.1 255.255.255.0 secondary
 ip nat inside
 ip virtual-reassembly in
 duplex auto
 speed auto
!
ip dhcp pool LAN
 import all
 network 192.168.6.0 255.255.255.0
 address range 192.168.6.10 192.168.6.200
 default-router 192.168.6.1
 dns-server 192.168.6.1
 network 192.168.7.0 255.255.255.0 secondary
 override default-router 192.168.7.1
!
ip dhcp pool HOST20
 host 192.168.7.20 255.255.255.0
 client-identifier aabb.ccdd.eeff
 default-router 192.168.7.1
 dns-server 192.168.7.1
!

task: by default, issue addresses from 6.0/24, and to certain clients (statically linked) acc. addresses from 7.0/24
In googled mana, it says either about the need for an additional module with ports or L2 behind the router (but here you still need an additional module)
Thanks for the help!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Ars1s, 2014-06-11
@Ars1s

it would be more logical to divide it into vlans, and give each wealan its own dhcp pool. Where static is needed, add dhcp to the reserve.

D
dubidrubi, 2014-06-17
@dubidrubi

Perhaps you need to use not the secondary address on the port, but the sub interfaces. Try something like:

interface GigabitEthernet0/1.6
 ip address 192.168.6.1 255.255.255.0
 ip nat inside

interface GigabitEthernet0/1.7
 ip address 192.168.7.1 255.255.255.0
 ip nat inside

Well, accordingly, push these 2 vlans to the router interface with a trunk. Configure DHCP pools accordingly.
And more... As far as I remember, the secondary ip network address cannot be used in conjunction with DHCP.

P
peronik, 2014-07-10
@peronik

Cisco does not recommend interfering with 2 networks in one VLAN, usually this is fraught with glitches and difficulties during troubleshooting.
If you split into VLANs, like dubidrubi, then you also need to enable encapsulation on the interfaces:

interface GigabitEthernet0/1
encapsulation dot1Q

For VLAN 6
interface GigabitEthernet0/1.6
encapsulation dot1Q 6
<...>

For VLAN 7
interface GigabitEthernet0/1.7
encapsulation dot1Q 7
<...>

From the gigabit port of the router to any switch that supports VLAN and tagging, not necessarily Cisco. Next, configure this switch.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question