Configure DHCP IPv4 on Cisco Router with 2 Networks

  • Post category:Blog
  • Post comments:0 Comments
  • Reading time:3 mins read

Configure DHCP IPv4 on Cisco Router with 2 Networks

In this tutorial, we will configure DHCP IPv4 on a Cisco router for two different networks. This setup is useful for managing IP address allocation dynamically within separate network segments.

Topology Overview

The topology consists of a router connected to two different switches, each serving its own network segment:

  • LAN1 (Network 1): 192.168.10.0/24
  • LAN2 (Network 2): 192.168.20.0/24

Each LAN is connected to its respective PCs as shown in the diagram.

Configure DHCP IPv4 on Cisco Router with 2 Networks Topology
Configure DHCP IPv4 on Cisco Router with 2 Networks Topology

Type of DHCP IPv4

  1. DHCP IPv4 on Cisco Router
  2. DHCP IPv4 on Cisco Layer 3 Switch or Multilayer Switch
  3. DHCP IPv4 on Cisco Router with 2 Networks
  4. DHCP IPv4 on Cisco Layer 3 Switch or Multilayer Switch with 2 VLANs

Configuration Steps

Follow these steps to configure DHCP IPv4 on the Cisco router for both networks:

  1. Access the Router:
    Router>enable
    Router#configure terminal
  2. Set Hostname:
    Router(config)#hostname R1
  3. Configure GigabitEthernet Interfaces:For LAN1:
    R1(config)#interface gigabitEthernet 0/0/0
    R1(config-if)#no shutdown
    R1(config-if)#ip address 192.168.10.1 255.255.255.0
    R1(config-if)#exit

    For LAN2:

    R1(config)#interface gigabitEthernet 0/0/1
    R1(config-if)#no shutdown
    R1(config-if)#ip address 192.168.20.1 255.255.255.0
    R1(config-if)#exit
  4. Configure DHCP Pools:For LAN1:
    R1(config)#ip dhcp pool LAN1
    R1(dhcp-config)#network 192.168.10.0 255.255.255.0
    R1(dhcp-config)#default-router 192.168.10.1
    R1(dhcp-config)#dns-server 8.8.8.8
    R1(dhcp-config)#exit

    For LAN2:

    R1(config)#ip dhcp pool LAN2
    R1(dhcp-config)#network 192.168.20.0 255.255.255.0
    R1(dhcp-config)#default-router 192.168.20.1
    R1(dhcp-config)#dns-server 8.8.8.8
    R1(dhcp-config)#exit

Verification

After configuring the DHCP pools, connect the PCs to their respective networks and verify that they receive IP addresses dynamically from the DHCP server. You can use the ipconfig command on the PCs to check their IP configuration.

By following these steps, you have successfully configured DHCP IPv4 on a Cisco router with two networks. This setup helps in efficient IP address management and ensures that devices in different network segments receive their IP configurations automatically.

5 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments