Understand configuration of static routing with each router act as DHCP server


This article is all about how to configure static routing with each router acts as DHCP server itself. In the previous articles in the CCNA category we learn about static routing configuration, RIP version 1 routing configuration and many of configurations on routers and switches with appropriate labs in cisco packet tracer. Now in this lab, we mix two labs one is static routing configuration and one DHCP server configuration on routers and create a new lab. In this lab, we learn how to configure static routing with each router acting as DHCP server and provide IP address to all the PCs via these DHCP servers. So let’s start here how to configure this lab with ease. 

If you don’t know about how to configure static routing on routers and how to configure DHCP server on routers read given below routers.

How to configure static routing on routers

How to configure DHCP server on a router

Now we take a new lab in cisco packet tracer in this lab we take four routers, four switches, and eight PCs to understand this configuration easily.

configure static routing with each router act as DHCP server

Now after that, we divide this whole lab into three parts. In the first part, we assign the IP address to all the interfaces of the routers and up all the routers using no shut command. Now in the second part, we configure DHCP server on all the PCs according to their need of network and after that provide IP address to all the PCs through the DHCP servers. Now in the third part, we configure static routing on all the routers and check whether that they are communicating with each other or not by using the ping command. So let’s start with first part

Part 1: – Now to provide IP address to all the interfaces of the routers use given  below commands

For router R1: –

— System Configuration Dialog —

Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R1

R1(config)#interface FastEthernet0/0

R1(config-if)#ip address 172.0.0.1 255.0.0.0

R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

R1(config-if)#exit

R1(config)#interface FastEthernet0/1

R1(config-if)#ip address 173.0.0.1 255.0.0.0

R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

R1(config-if)#exit

 

 

For router R2 

— System Configuration Dialog —

Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R2

R2(config)#interface FastEthernet0/0

R2(config-if)#ip address 173.0.0.2 255.0.0.0

R2(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R2(config-if)#exit

R2(config)#interface FastEthernet0/1

R2(config-if)#ip address 175.0.0.1 255.0.0.0

R2(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

R2(config-if)#exit

R2(config)#interface Ethernet0/0/0

R2(config-if)#ip address 174.0.0.1 255.0.0.0

R2(config-if)#no shutdown

%LINK-5-CHANGED: Interface Ethernet0/0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0/0, changed state to up

R2(config-if)#exit

 

For router R3

— System Configuration Dialog —

Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R3

R3(config)#interface FastEthernet0/0

R3(config-if)#ip address 175.0.0.2 255.0.0.0

R3(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R3(config-if)#exit

R3(config)#interface FastEthernet0/1

R3(config-if)#ip address 177.0.0.1 255.0.0.0

R3(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

R3(config-if)#exit

R3(config)#interface Ethernet0/0/0

R3(config-if)#ip address 176.0.0.1 255.0.0.0

R3(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

R3(config-if)#exit

 

For router R4

— System Configuration Dialog —

Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R4

R4(config)#interface FastEthernet0/0

R4(config-if)#ip address 177.0.0.2 255.255.0.0

R4(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

R4(config-if)#exit

R4(config)#interface FastEthernet0/1

R4(config-if)#ip address 178.0.0.1 255.255.0.0

R4(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

R4(config-if)#exit

 

Part 2: – Now to create DHCP pool on the router use given below command

For router R1

R1>enable

R1#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

R1(config)#ip dhcp pool sw1

R1(dhcp-config)#network 172.0.0.0 255.0.0.0

R1(dhcp-config)#default-router 172.0.0.1

R1(dhcp-config)#exit

 

For router R2

R2>enable

R2#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

R2(config)#ip dhcp pool sw2

R2(dhcp-config)#network 174.0.0.0 255.0.0.0

R2(dhcp-config)#default-router 174.0.0.1

R2(dhcp-config)#exit

 

For router R3

R3>enable

R3#configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

R3(config)#ip dhcp pool sw3

R3(dhcp-config)#network 176.0.0.0 255.0.0.0

R3(dhcp-config)#default-router 176.0.0.1

R3(dhcp-config)#exit

 

For router R4

R4>enable

R4#configur terminal

Enter configuration commands, one per line. End with CNTL/Z.

R4(config)#ip dhcp pool sw4

R4(dhcp-config)#network 178.0.0.0 255.0.0.0

R4(dhcp-config)#default-router 178.0.0.1

R4(dhcp-config)#exit

Now DHCP server configuration on all the routers is done. Now provide IP address to all the routers according to their networks via DHCP servers.

 

Part 3: – Now to configure static routing on routers use given below commands

For router R1

R1(config)#ip route 174.0.0.0 255.0.0.0 173.0.0.2

R1(config)#ip route 175.0.0.0 255.0.0.0 173.0.0.2

R1(config)#ip route 176.0.0.0 255.0.0.0 175.0.0.2

R1(config)#ip route 177.0.0.0 255.0.0.0 175.0.0.2

R1(config)#ip route 178.0.0.0 255.0.0.0 177.0.0.2

 

For router R2

R2(config)#ip route 172.0.0.0 255.0.0.0 173.0.0.1

R2(config)#ip route 176.0.0.0 255.0.0.0 175.0.0.2

R2(config)#ip route 177.0.0.0 255.0.0.0 175.0.0.2

R2(config)#ip route 178.0.0.0 255.0.0.0 177.0.0.2

 

For router R3

R3(config)#ip route 174.0.0.0 255.0.0.0 175.0.0.1

R3(config)#ip route 173.0.0.0 255.0.0.0 175.0.0.1

R3(config)#ip route 172.0.0.0 255.0.0.0 173.0.0.1

R3(config)#ip route 178.0.0.0 255.0.0.0 177.0.0.1

 

For router R4

R4(config)#ip route 176.0.0.0 255.0.0.0 177.0.0.1

R4(config)#ip route 175.0.0.0 255.0.0.0 177.0.0.1

R4(config)#ip route 174.0.0.0 255.0.0.0 175.0.0.1

R4(config)#ip route 173.0.0.0 255.0.0.0 175.0.0.1

R4(config)#ip route 172.0.0.0 255.0.0.0 173.0.0.1

THAT’S IT

Now all the configuration will be done on the routers. Now check PCs whether they are communicating with each other or not using the ping command. If they are communicating with each other that means your configuration correctly takes place on the routers. If you have any queries regarding this solved out through the comment section and also provide feedback to us because your feedback is valuable for us.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s