09-18-2020 09:24 PM
I have configured gig 0/0/0 to connect to my ISP with ip address dhcp and ip nat outside --- my Cisco isr4331 router accepts the dynamic ip address and connects. Now --- I want to configure gig 0/0/1, gig 0/1/0 and gig 0/1/1 to automatically address from a range of 30 ip addresses. I have been studying "Cisco IP ADDRESSING: DHCP CONFIGURATION GUIDE" ?????
In order to automatically address from a range of 30 ip address, do I need to configure the DHCP Server or DHCP Server on-demand address pool manager? I'm a beginner and believe we all have to start some where ---------- thanks for your help (it should save much trial and error).
Solved! Go to Solution.
09-22-2020 01:38 PM
Hello,
add the lines marked in bold to your configuration:
Current configuration : 1734 bytes
!
version 15.5
service timestamps debug datetime msec
service timestamps log datetime msec
no platform punt-keepalive disable-kernel-core
!
hostname ThreeBears
!
boot-start-marker
boot-end-marker
!
vrf definition Mgmt-intf
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
enable secret cisco1
enable password cisco2
!
no aaa new-model
!
ip dhcp excluded-address 192.168.1.1
!
ip dhcp pool LAN
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8 8.8.4.4
!
subscriber templating
multilink bundle-name authenticated
!
license udi pid ISR4331/K9 sn FDO203323N0
!
spanning-tree extend system-id
!
username webui privilege 15 password 0 cisco
!
redundancy
mode none
!
vlan internal allocation policy ascending
!
interface GigabitEthernet0/0/0
description WAN
ip address dhcp
ip nat outside
negotiation auto
!
interface GigabitEthernet0/0/1
description LAN1
ip address 192.168.1.1 255.255.255.0
--> ip nat inside
negotiation auto
!
interface GigabitEthernet0/0/2
no ip address
shutdown
negotiation auto
!
interface GigabitEthernet0/1/0
!
interface GigabitEthernet0/1/1
!
interface GigabitEthernet0/1/2
!
interface GigabitEthernet0/1/3
!
interface GigabitEthernet0
vrf forwarding Mgmt-intf
ip address 198.162.1.1 255.255.255.0
negotiation auto
!
interface Vlan1
no ip address
shutdown
!
ip forward-protocol nd
ip http server
ip http authentication local
no ip http secure-server
ip tftp source-interface GigabitEthernet0
!
--> ip nat inside source list 1 interface GigabitEthernet0/0/0 overload
--> ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 dhcp
!
--> access-list 1 permit 192.168.1.0 0.0.0.255
!
snmp-server community public RO
!
control-plane
!
line con 0
stopbits 1
line aux 0
stopbits 1
line vty 0 4
password cisco3
login
!
end
09-25-2020 12:06 AM
Hello,
make sure all of the below is in your configuration:
ip dhcp excluded-address 172.16.1.30
interface gigabitethernet0/0/1
description LAN
ip address 172.16.1.30 255.255.255.0
ip nat inside
!
ip nat inside soure list 1 interface GigabitEthernet0/0/0 overload
!
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 dhcp
!
access-list 1 permit 172.16.1.0 0.0.0.255
09-19-2020 12:18 AM
Not sure I'm with you on this.
Are you asking if the ISP can supply multiple different IP address for your interfaces gi0/0/1 gi 0/1/0 & gi 0/1/1
In which case the answer is no. It can only supply a DHCP address for your connected interface(s).
Normally you would then assign each of the above interfaces the IP addresses from your range of 30 ip addresses. The hosts connected to these (gi0/0/1 gi 0/1/0 & gi 0/1/1) could then be assigned DHCP addresses from your ISR4000.
09-19-2020 12:20 AM
Hello,
as a matter of fact, it is not a good idea to use DHCP for IP addressing your fixed interfaces. You need to assign static IP addresses to the interfaces, and if you use a DHCP pool for clients, exclude these addresses from the pool:
ip dhcp excluded-address 192.168.1.1
!
ip dhcp pool LAN
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8 8.8.4.4
!
interface GigabitEthernet0/0
description LAN
ip addess 192.168.1.1 255.255.255.0
The On-Demand Address Pool Manager is used for MPLS and non-MPLS VPN client addressing, not for assigning IP addresses to local router interfaces.
09-21-2020 10:15 PM
09-21-2020 11:26 PM
Hello,
post the full running configuration (sh run) of your router. You are probably missing some NAT or access list related details.
09-22-2020 12:52 PM
09-22-2020 01:38 PM
Hello,
add the lines marked in bold to your configuration:
Current configuration : 1734 bytes
!
version 15.5
service timestamps debug datetime msec
service timestamps log datetime msec
no platform punt-keepalive disable-kernel-core
!
hostname ThreeBears
!
boot-start-marker
boot-end-marker
!
vrf definition Mgmt-intf
!
address-family ipv4
exit-address-family
!
address-family ipv6
exit-address-family
!
enable secret cisco1
enable password cisco2
!
no aaa new-model
!
ip dhcp excluded-address 192.168.1.1
!
ip dhcp pool LAN
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 8.8.8.8 8.8.4.4
!
subscriber templating
multilink bundle-name authenticated
!
license udi pid ISR4331/K9 sn FDO203323N0
!
spanning-tree extend system-id
!
username webui privilege 15 password 0 cisco
!
redundancy
mode none
!
vlan internal allocation policy ascending
!
interface GigabitEthernet0/0/0
description WAN
ip address dhcp
ip nat outside
negotiation auto
!
interface GigabitEthernet0/0/1
description LAN1
ip address 192.168.1.1 255.255.255.0
--> ip nat inside
negotiation auto
!
interface GigabitEthernet0/0/2
no ip address
shutdown
negotiation auto
!
interface GigabitEthernet0/1/0
!
interface GigabitEthernet0/1/1
!
interface GigabitEthernet0/1/2
!
interface GigabitEthernet0/1/3
!
interface GigabitEthernet0
vrf forwarding Mgmt-intf
ip address 198.162.1.1 255.255.255.0
negotiation auto
!
interface Vlan1
no ip address
shutdown
!
ip forward-protocol nd
ip http server
ip http authentication local
no ip http secure-server
ip tftp source-interface GigabitEthernet0
!
--> ip nat inside source list 1 interface GigabitEthernet0/0/0 overload
--> ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 dhcp
!
--> access-list 1 permit 192.168.1.0 0.0.0.255
!
snmp-server community public RO
!
control-plane
!
line con 0
stopbits 1
line aux 0
stopbits 1
line vty 0 4
password cisco3
login
!
end
09-19-2020 01:13 AM - edited 09-19-2020 01:14 AM
Hello
Even though a router can perform dhcp service, its not to say it recommended for it to do so, Having a dedicated server would be a better option especially if you anticipate growth and want to incorporate registration with DNS/Active Directory however as you are querying how a rtr can become a dhcp server and to run multiple dhcp scopes allocating upto 30 ip addresses the following example may be applicable.
Example
ip dhcp pool dhcp_sever
network 172.16.1.0 255.255.255.224
default-router 172.16.1.30
network 172.16.1.32 255.255.255.224 secondary
override default-router 172.16.1.62
network 172.16.1.64 255.255.255.224 secondary
override default-router 172.16.1.65
network 172.16.1.96 255.255.255.224 secondary
override default-router 172.16.1.126
dns-server x.x.x.x y.y.y.y
domain-name test.com
lease 0 8
ip dhcp excluded-address <range of ips you wish not to be allocated, the default router of each scope is automatically excluded.
09-24-2020 11:50 PM
Paul, thank you for your halp. I have entered:
router(config)# interface gigabitethernet0/0/0
router(config-if)# description WAN
router(config-if)# ip address dhcp
router(config-if)# ip nat outside
router(config-if)# no shutdown
router(config-if)# exit
router(config)# ip dhcp pool dhcp_server
router(dhcp-config)# network 172.16.1.0 255.255.255.224
router(dhcp-config)# default-router 172.16.1.30
router(dhcp-config)# exit
router(config)# interface gigabitethernet0/0/1
router(config-if)# description LAN
router(config-if)# ip address 172.16.1.30 255.255.255.0
router(config-if)# no shutdown
It assigns ip addresses correctly. However, No communication to isp with dynamic ip address. I get syntax error trying to enter dns-server line
09-25-2020 12:06 AM
Hello,
make sure all of the below is in your configuration:
ip dhcp excluded-address 172.16.1.30
interface gigabitethernet0/0/1
description LAN
ip address 172.16.1.30 255.255.255.0
ip nat inside
!
ip nat inside soure list 1 interface GigabitEthernet0/0/0 overload
!
ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0/0 dhcp
!
access-list 1 permit 172.16.1.0 0.0.0.255
09-25-2020 03:49 AM
I honestly did not see the similarity of these two solutions until I had to troubleshooting my work. BOTH ip address 192.168.1.1 solution and ip address 172.16.1.30 solution work. I chose the 172.16.1.30 solution because the 192.168.1.1 ip address seems to be VERY commonly used for switch / router addressing. I'm a beginner, and without this community helping, I would NEVER have gotten even basic functions programmed into this router. Thank you very much............................
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