08-13-2021 08:52 AM
Hi everyone,
I have a cisco 891F vpn router and would like to have more than one dhcp pool. Possible?
Current dhcp pool is 192.168.1.0/254, gateway 192.168.1.1
I would like to create a new pool with 192.168.30.0/24 with gateway 192.168.30.1
Is this possible and would really appreciate if someone guided me on this with the IOS scripts.
Many thanks in advance
Solved! Go to Solution.
08-21-2021 01:10 AM
08-21-2021 01:44 AM
Hello,
it won't work. If all devices are connected to GigabitEthernet4, than all devices will get an IP address from the 192.168.30.0/24 range, since that port is assigned to Vlan 100.
I don't know if the 891F supports subinterfaces, try the config below:
Current configuration : 3186 bytes
!
! Last configuration change at 15:56:09 GMT Fri Aug 20 2021 by admin1
version 15.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Pxxxc_Swww-Cisco800
!
boot-start-marker
boot-end-marker
!
aqm-register-fnf
!
enable secret 5 $xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
aaa new-model
!
aaa session-id common
clock timezone GMT 8 0
!
--> ip dhcp excluded-address 192.168.1.1 192.168.1.30
ip dhcp excluded-address 192.168.30.1
!
ip dhcp pool one
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 165.21.83.88 165.21.100.88
!
--> ip dhcp pool VLAN100
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
dns-server 165.21.83.88 165.21.100.88
!
ip domain name pxxxxx.com
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
license udi pid C891F-K9 sn Fxxxxxxxxxxxxx
!
username admin privilege 15 secret 5 $xxxxxxxxxxxxxxxxxxxxxxxxxxxx
username admin1 privilege 15 password 0 xxxxxxxx
!
crypto isakmp policy 1
encr aes 256
authentication pre-share
group 5
lifetime 2880
crypto isakmp key sxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx hostname kxxxxxx
crypto isakmp keepalive 30
!
crypto ipsec transform-set IPSEC esp-aes 256 esp-sha-hmac
mode tunnel
!
crypto dynamic-map sa1-dynamic 10
set transform-set IPSEC
set pfs group5
!
crypto map sa1 1 ipsec-isakmp dynamic sa1-dynamic
!
interface BRI0
no ip address
encapsulation hdlc
shutdown
isdn termination multidrop
!
interface FastEthernet0
no ip addres
duplex full
speed auto
!
interface GigabitEthernet0
no ip address
duplex full
!
interface GigabitEthernet1
no ip address
!
interface GigabitEthernet2
no ip address
!
interface GigabitEthernet3
no ip address
!
interface GigabitEthernet4
ip address 192.168.1.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
!
interface GigabitEthernet4.100
encapsulation dot1q 100
ip address 192.168.1.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
!
interface GigabitEthernet5
no ip address
!
interface GigabitEthernet6
no ip address
!
interface GigabitEthernet7
no ip address
!
interface GigabitEthernet8
ip address 42.xx.xxxx.xxx 255.255.255.252
ip nat outside
ip virtual-reassembly in
duplex full
speed 1000
crypto map sa1
!
--> no interface Vlan1
ip address 192.168.1.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
!
--> no interface Vlan100
ip address 192.168.30.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
!
interface Async3
no ip address
encapsulation slip
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
ip nat inside source route-map nonat interface GigabitEthernet8 overload
ip route 0.0.0.0 0.0.0.0 42.xx.xxx.xxx
!
route-map nonat permit 10
match ip address 101
match interface GigabitEthernet8
!
access-list 101 deny ip 192.168.30.0 0.0.0.255 172.31.1.0 0.0.0.255
--> access-list 101 permit ip 192.168.1.0 0.0.0.255 any
--> access-list 101 permit ip 192.168.30.1 0.0.0.255 any
!
control-plane
!
mgcp behavior rsip-range tgcp-only
mgcp behavior comedia-role none
mgcp behavior comedia-check-media-src disable
mgcp behavior comedia-sdp-force disable
!
mgcp profile default
!
line con 0
no modem enable
line aux 0
line 3
modem InOut
speed 115200
flowcontrol hardware
line vty 0 4
transport input ssh
!
scheduler allocate 20000 1000
!
end
08-21-2021 02:02 AM
08-21-2021 05:58 AM
Hello,
adding a spare switch to GigabitEthernet5 would certainly be easier.
You don't need to rename the DHCP pool, I just thought it looks weird when the pool is named Vlan2, but the actual Vlan it serves is Vlan 100. It will work just fine as is...
08-21-2021 07:45 AM
08-21-2021 08:06 AM
Hello,
it is quite simple actually, you first need to delete the existing pool:
no ip dhcp pool VLAN100
and then simply readd the new pool, with the new name:
ip dhcp pool VLAN2
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
dns-server 165.21.83.88 165.21.100.88
08-21-2021 08:32 AM
08-21-2021 10:43 AM
Hello,
make sure the config looks like this:
Current configuration : 3186 bytes
!
! Last configuration change at 15:56:09 GMT Fri Aug 20 2021 by admin1
version 15.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Pxxxc_Swww-Cisco800
!
boot-start-marker
boot-end-marker
!
aqm-register-fnf
!
enable secret 5 $xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
aaa new-model
!
aaa session-id common
clock timezone GMT 8 0
!
--> ip dhcp excluded-address 192.168.1.1 192.168.1.30
ip dhcp excluded-address 192.168.30.1
!
ip dhcp pool one
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 165.21.83.88 165.21.100.88
!
--> ip dhcp pool VLAN2
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
dns-server 165.21.83.88 165.21.100.88
!
ip domain name pxxxxx.com
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
license udi pid C891F-K9 sn Fxxxxxxxxxxxxx
!
username admin privilege 15 secret 5 $xxxxxxxxxxxxxxxxxxxxxxxxxxxx
username admin1 privilege 15 password 0 xxxxxxxx
!
crypto isakmp policy 1
encr aes 256
authentication pre-share
group 5
lifetime 2880
crypto isakmp key sxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx hostname kxxxxxx
crypto isakmp keepalive 30
!
crypto ipsec transform-set IPSEC esp-aes 256 esp-sha-hmac
mode tunnel
!
crypto dynamic-map sa1-dynamic 10
set transform-set IPSEC
set pfs group5
!
crypto map sa1 1 ipsec-isakmp dynamic sa1-dynamic
!
interface BRI0
no ip address
encapsulation hdlc
shutdown
isdn termination multidrop
!
interface FastEthernet0
no ip addres
duplex full
speed auto
!
interface GigabitEthernet0
no ip address
duplex full
!
interface GigabitEthernet1
no ip address
!
interface GigabitEthernet2
no ip address
!
interface GigabitEthernet3
no ip address
!
interface GigabitEthernet4
no ip address
!
interface GigabitEthernet5
no ip address
switchport access vlan 2
!
interface GigabitEthernet6
no ip address
!
interface GigabitEthernet7
no ip address
!
interface GigabitEthernet8
ip address 42.xx.xxxx.xxx 255.255.255.252
ip nat outside
ip virtual-reassembly in
duplex full
speed 1000
crypto map sa1
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
!
interface Vlan2
ip address 192.168.30.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
!
interface Async3
no ip address
encapsulation slip
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
ip nat inside source route-map nonat interface GigabitEthernet8 overload
ip route 0.0.0.0 0.0.0.0 42.xx.xxx.xxx
!
route-map nonat permit 10
match ip address 101
match interface GigabitEthernet8
!
access-list 101 deny ip 192.168.30.0 0.0.0.255 172.31.1.0 0.0.0.255
access-list 101 permit ip 192.168.1.0 0.0.0.255 any
access-list 101 permit ip 192.168.30.1 0.0.0.255 any
!
control-plane
!
mgcp behavior rsip-range tgcp-only
mgcp behavior comedia-role none
mgcp behavior comedia-check-media-src disable
mgcp behavior comedia-sdp-force disable
!
mgcp profile default
!
line con 0
no modem enable
line aux 0
line 3
modem InOut
speed 115200
flowcontrol hardware
line vty 0 4
transport input ssh
!
scheduler allocate 20000 1000
!
end
08-21-2021 02:36 PM
I agree that a new switch on a separate interface for the new vlan is the easy way to get this to work.
As far as vlan2 or vlan100 is concerned, this is a cosmetic issue. Looking at it from the human perspective it seems better that the vlan name and the name of the dhcp pool should be the same. But looking at it from the perspective of the switch it does not matter whether the name of the pool matches the name of the vlan or not.
08-24-2021 06:39 AM
Thanks again everyone! I'm just marking this part of the replies as a workable solution with the cli codes and all. Of course there are later parts to assign vlan to selected GE ports in the later parts of our discussion. But this generally works! Cheers everyone
08-15-2021 02:05 AM - edited 08-15-2021 02:05 AM
Hello
@hochgenub wrote:
Current dhcp pool is 192.168.1.0/254, gateway 192.168.1.1
I would like to create a new pool with 192.168.30.0/24 with gateway 192.168.30.1
You can add multiple dhcp scopes to a single dhcp pool, just need to add the secondary and overide keywords to the addtiional scopes
Example:
ip dhcp pool DHCP
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
network 192.168.30.0 255.255.255.0 secondary
override default-router 192.168.30.1
network 192.168.31.0 255.255.255.0 secondary
override default-router 192.168.31.1
domain-name mynetwork.net
dns-server 8.8.8.8 8.8.8.4
lease 0 8
08-15-2021 04:38 AM
08-15-2021 06:37 AM
Hello
No they wont, excluded addressing isnt part of the actual pool but they do relate to them, so you be good
Note - the default-gatway of each scope is excluded by default anyway.
08-15-2021 08:45 AM - edited 08-15-2021 08:46 AM
I believe you can also do this with inheritance. I was looking for some examples as I think I have done this in the past, but I could not find it right away. To me, something like this seems cleaner.
ip dhcp pool parent
network 192.168.0.0 255.255.0.0
domain-name mynetwork.net
dns-server 8.8.8.8 8.8.8.4
lease 0 8
08-17-2021 08:03 PM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide