How to configure loopback interfaces on cisco router

Posted: October 25, 2016 in CCNA
Tags: , ,

Learn how to configure loopback interfaces on cisco router.In this tutorial we will learn how to assign ip address on loopback interfaces.Loopback interfaces are logical interfaces or you can say virtual interfaces in cisco router.They are not real interfaces.That’s why they never goes down untill or unless the complete router itself goes down.Here using cisco packet tracer lab we will show you how to configure virtual interfaces or loopback interfaces on cisco router and use them in routing.

Configuration on Router R1:

here I am going to assign ip address on router real interfaces and also going to create virtual interfaces and loopback interfaces and assign ip address on loopback interfaces.

Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#int fa0/0
R1(config-if)#ip add 1.0.0.1 255.0.0.0
R1(config-if)#no shut

R1(config-if)#exit
R1(config)#int loopback 1
R1(config-if)#ip add 2.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#int loopback 2

R1(config-if)#ip add 3.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#
R1(config-if)#exit
R1(config)#int loopback 3

R1(config-if)#ip add 4.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#
R1(config-if)#exit

See router interface ip address:

R1#show ip int br
Interface IP-Address OK? Method Status Protocol
 
FastEthernet0/0 1.0.0.1 YES manual up down
 
FastEthernet0/1 unassigned YES unset administratively down down
 
Loopback1 2.0.0.1 YES manual up up
 
Loopback2 3.0.0.1 YES manual up up
 
Loopback3 4.0.0.1 YES manual up up
 
Vlan1 unassigned YES unset administratively down down
R1#

 

Configuration RIP Routing on Router R1:

 

R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router rip 
R1(config-router)#version 1
R1(config-router)#network 1.0.0.0
R1(config-router)#network 2.0.0.0
R1(config-router)#network 3.0.0.0
R1(config-router)#network 4.0.0.0
R1(config-router)#exit
R1(config)#exit

Now see RIP Routing DATABASES on Router R1:

R1#show ip rip database
1.0.0.0/8 auto-summary
1.0.0.0/8 directly connected, FastEthernet0/0
2.0.0.0/8 auto-summary
2.0.0.0/8 directly connected, Loopback1
3.0.0.0/8 auto-summary
3.0.0.0/8 directly connected, Loopback2
4.0.0.0/8 auto-summary
4.0.0.0/8 directly connected, Loopback3
5.0.0.0/8 auto-summary
5.0.0.0/8
 [1] via 1.0.0.2, 00:00:05, FastEthernet0/0
6.0.0.0/8 auto-summary
6.0.0.0/8
 [1] via 1.0.0.2, 00:00:05, FastEthernet0/0
7.0.0.0/8 auto-summary
7.0.0.0/8
 [1] via 1.0.0.2, 00:00:05, FastEthernet0/0
R1#

Configure IP ADDRESS on INTERFACES OF ROUTER R2:

Router>enable
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R2
R2(config)#int fa0/0
R2(config-if)#ip add 1.0.0.2 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int lo 1
R2(config-if)#ip add 5.0.0.1 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#int lo 2
R2(config-if)#ip add 6.0.0.1 255.0.0.0
R2(config-if)#no shut
R2(config-if)#
R2(config-if)#exit
R2(config)#int lo 3
R2(config-if)#ip add 7.0.0.1 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit

 

Let’s check Router R2 interfaces ip addresses:

R2#show ip interface brief
Interface IP-Address OK? Method Status Protocol
 
FastEthernet0/0 1.0.0.2 YES manual up up
 
FastEthernet0/1 unassigned YES unset administratively down down
 
Loopback1 5.0.0.1 YES manual up up
 
Loopback2 6.0.0.1 YES manual up up
 
Loopback3 7.0.0.1 YES manual up up
 
Vlan1 unassigned YES unset administratively down down

 

Configure Routing RIP on Router R2:

R2#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router rip
R2(config-router)#version 1
R2(config-router)#network 1.0.0.0
R2(config-router)#network 5.0.0.0
R2(config-router)#network 6.0.0.0
R2(config-router)#network 7.0.0.0
R2(config-router)#exit
R2(config)#exit
R2#

See RIP Databases on Router R2:

R2#show ip rip database 
1.0.0.0/8 auto-summary
1.0.0.0/8 directly connected, FastEthernet0/0
2.0.0.0/8 auto-summary
2.0.0.0/8
 [1] via 1.0.0.1, 00:00:26, FastEthernet0/0
3.0.0.0/8 auto-summary
3.0.0.0/8
 [1] via 1.0.0.1, 00:00:26, FastEthernet0/0
4.0.0.0/8 auto-summary
4.0.0.0/8
 [1] via 1.0.0.1, 00:00:26, FastEthernet0/0
5.0.0.0/8 auto-summary
5.0.0.0/8 directly connected, Loopback1
6.0.0.0/8 auto-summary
6.0.0.0/8 directly connected, Loopback2
7.0.0.0/8 auto-summary
7.0.0.0/8 directly connected, Loopback3

Now check every interfaces including loopback interfaces by pinging ip assigned on each loopback interfaces:

R1#ping 2.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/10/20 ms
R1#ping 3.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/16/40 ms
R1#ping 4.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 14/38/52 ms

 

R1#ping 5.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/4/20 ms

 

R1#ping 6.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 6.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms

 

R1#ping 7.0.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 7.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/0/1 ms

R1#
Comments
  1. This is a nice article om ccna. I am also write a blog in that computers and ccna related articles will be published for some more articles about windows and android also read my blog on https://technohelper24.wordpress.com

    Like

Leave a Reply

Please log in using one of these methods to post your comment:

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