This Tutorial shows you how Routing works on Cisco Router. The above Image ‘CCNA-RS-IMG-3.0’ shows the router connected to two different network i.e, 192.168.10.0/24 & 192.168.20.0/24 through F0/0 & F0/1 Interface respectivley.
- Both these network are in different Broadcast Domain, so they can’t communicate with each other ideally. Router routes the packets of one network to another which is called routing process of router due that both these network are able to communicate with each other. Now let’s configure the router
- Router Configuration Wizard
Vishal_Router> enable
Vishal_Router# configure terminal
Vishal_Router(config)#
- Configuring IP on Router both Interfaces
Vishal_Router(config)# interface fastEthernet 0/0
Vishal_Router(config-if)# ip address 192.168.10.1 255.255.255.0
Vishal_Router(config-if)# no shutdown
Vishal_Router(config-if)# exit
Vishal_Router(config)# interface fastEthernet 0/1
Vishal_Router(config-if)# ip address 192.168.20.1 255.255.255.0
Vishal_Router(config-if)# no shutdown
Vishal_Router(config-if)# exit
Vishal_Router(config)#
- Enabling DHCP Service on Cisco Router
Vishal_Router(config)# service dhcp
- Configuring DHCP Server on Router for 192.168.10.0/24 & 192.168.20.0/24 Networks
Vishal_Router(config)# ip dhcp pool LAN_1_Address ( Where "LAN_1_Address" is Name of Pool for 192.168.10.0/24 Network )
Vishal_Router(dhcp-config)# network 192.168.10.0 255.255.255.0 ( DHCP Network )
Vishal_Router(dhcp-config)# default-router 192.168.10.1 ( IP Address of DHCP Server )
Vishal_Router(dhcp-config)# dns-server 8.8.8.8
Vishal_Router(dhcp-config)# exit
Vishal_Router(config)# ip dhcp excluded-address 192.168.10.2 192.168.10.10 ( Range to be excluded from DHCP Pool)
Vishal_Router(config)# ip dhcp pool LAN_2_Address ( Where "LAN_2_Address" is Name of Pool for 192.168.20.0/24 Network )
Vishal_Router(dhcp-config)# network 192.168.20.0 255.255.255.0 ( DHCP Network )
Vishal_Router(dhcp-config)# default-router 192.168.20.1 ( IP Address of DHCP Server )
Vishal_Router(dhcp-config)# dns-server 8.8.8.8
Vishal_Router(dhcp-config)# exit
Vishal_Router(config)# ip dhcp excluded-address 192.168.20.2 192.168.20.10 (Range to be excluded from DHCP Pool)
- Verifying IP Address on Router Interfaces
Vishal_Router(config)# do show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.10.1 YES manual up up
FastEthernet0/1 192.168.20.1 YES manual up up
Vlan1 unassigned YES unset administratively down down
- Verifying DHCP Pool on Router
Vishal_Router(config)# do show ip dhcp pool
Pool LAN_1_Address :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 3
Excluded addresses : 2
Pending event : none
1 subnet is currently in the pool
Current index IP address range Leased/Excluded/Total
192.168.10.1 192.168.10.1 – 192.168.10.254 3 / 2 / 254
Pool LAN_2_Address :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 3
Excluded addresses : 2
Pending event : none
1 subnet is currently in the pool
Current index IP address range Leased/Excluded/Total
192.168.20.1 192.168.20.1 – 192.168.20.254 3 / 2 / 254
- Router will route the packets to network which is on it’s routing table
- Routing table of router
Vishal_Router(config)# do show ip route
Codes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP
i – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area
* – candidate default, U – per-user static route, o – ODR
P – periodic downloaded static route
Gateway of last resort is not set
C 192.168.10.0/24 is directly connected, FastEthernet0/0
C 192.168.20.0/24 is directly connected, FastEthernet0/1
- As shown in above routing table 192.168.10.0/24 & 192.168.20.0/24 are directly connected to router, so they are in router’s routing table & it will route the packets from F0/0 & F0/1 Interface.
- Verifying Connectivity from 192.168.10.0/24 network to 192.168.20.0/24 network
- Pinging from PC having IP address 192.168.10.11 to 192.168.20.12 respectively
C:\>ipconfig
FastEthernet0 Connection:(default port)
Link-local IPv6 Address.........: FE80::2E0:8FFF:FE01:DC69
IP Address......................: 192.168.10.11
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.10.1
C:\>ping 192.168.20.12
Pinging 192.168.20.12 with 32 bytes of data:
Reply from 192.168.20.12: bytes=32 time<1ms TTL=127
Reply from 192.168.20.12: bytes=32 time<1ms TTL=127
Reply from 192.168.20.12: bytes=32 time=1ms TTL=127
Reply from 192.168.20.12: bytes=32 time=1ms TTL=127
Ping statistics for 192.168.20.12:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
Hence, Connection established.