cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2794
Views
25
Helpful
5
Replies

Loopback interface

kkct
Level 1
Level 1

Okay, I'm a newbie. My question: I have set up 2 routers, connected to each other:

 

R1

int s0/3/0

ip address 192.168.1.1 255.255.255.252

int lo0

ip address 1.1.1.1 255.255.255.0

 

R2

int s0/3/0

ip address 192.168.1.2 255.255.255.252

int lo0

ip address 1.1.1.2 255.255.255.0

 

I pinged the loopback addresses and failed. RIP version 2 is used. Why?

2 Accepted Solutions

Accepted Solutions

 

Hi,

 

You will need to change the subnet mask of the loopback addresses so that the router will use the RIP route instead of the directly connected interface. With your current configuration, 1.1.1.0/24 network is reachable through Loopback interface in both routers. Assuming RIP is configured correctly, change loopback interfaces configuration as follows:

 

R1:

int loo0

no ip add

ip add 1.1.1.1 255.255.255.255

 

 

R2:

int loo0

no ip add

ip add 1.1.1.2 255.255.255.255

 

 

HTH,

Meheretab

HTH,
Meheretab

View solution in original post

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello kkct,

you have been provided answers that can solve your specific issue

 

a) change the network masks on router loopbacks as suggested

+

router rip

no auto-summary

 

on both routers

 

(as noted by Rick the auto-summary feature would make ineffective the change of subnet mask with each router presenting network 1.0.0.0/8 to the other one because the shared link is in a different major network 192.168.1.0/24)

 

b) using host /32 static routes

 

However, I would like to point out the root cause of your issue, that is the addressing choices you made.

 

When you choice an IP address for a loopback interface you need to remember that:

1) the loopback interface is a logical interface that is alive up/up until the router is alive

2) the loopback interface is "isolated" it does not have an exit point to reach a device in the same IP subnet

 

So having two routers with their loopbacks interface in the same IP subnet is something that is conceptually wrong as there is no natural way to make them to communicate.

 

The other aspect of your RIPv2 lab is that using two subnets taken from the same major network 1.0.0.0/8 with the shared link in 192.168.1.0/24 triggers auto summary that happens at major network boundary.

RIPv2 uses auto-summary by default because it is a distance vector routing protocol.

 

Hope to help

Giuseppe

 

 

 

 

View solution in original post

5 Replies 5

 

Hi,

 

You will need to change the subnet mask of the loopback addresses so that the router will use the RIP route instead of the directly connected interface. With your current configuration, 1.1.1.0/24 network is reachable through Loopback interface in both routers. Assuming RIP is configured correctly, change loopback interfaces configuration as follows:

 

R1:

int loo0

no ip add

ip add 1.1.1.1 255.255.255.255

 

 

R2:

int loo0

no ip add

ip add 1.1.1.2 255.255.255.255

 

 

HTH,

Meheretab

HTH,
Meheretab

Hello,

 

on a side note (and as stated, RIPv2 won't work) you can add static host routes as well. The RIB will prefer the more specific entry.

 

R1

 

ip route 1.1.1.2 255.255.255.255 192.168.1.2

 

R2

 

ip route 1.1.1.1 255.255.255.255 192.168.1.1

Hello


@kkct wrote:

Okay, I'm a newbie. My question: I have set up 2 routers, connected to each other:

I pinged the loopback addresses and failed. RIP version 2 is used. Why?


Because both routers see their lookbacks subnet as directly connected and when you try to advertise these subnets the rtr didnt except these updates due to split horizon rule (the rtrs are seeing the same routes that originate from themselves coming back at them) plus the fact connected routes always take preference over advertised routes for the same prefix

 

If you changed the subnet masks as mentioned by @Meheretab Mengistu  to host routes then they would be accepted by each rtr.


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

If you use a host specific (/32) static route for the remote loopback interface then it should work whether you change the mask or not. If you use a dynamic routing protocol be careful about the default of some protocols to auto summarize at network boundaries. This would be a problem whether you changed the mask or not.

 

HTH

 

Rick

HTH

Rick

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello kkct,

you have been provided answers that can solve your specific issue

 

a) change the network masks on router loopbacks as suggested

+

router rip

no auto-summary

 

on both routers

 

(as noted by Rick the auto-summary feature would make ineffective the change of subnet mask with each router presenting network 1.0.0.0/8 to the other one because the shared link is in a different major network 192.168.1.0/24)

 

b) using host /32 static routes

 

However, I would like to point out the root cause of your issue, that is the addressing choices you made.

 

When you choice an IP address for a loopback interface you need to remember that:

1) the loopback interface is a logical interface that is alive up/up until the router is alive

2) the loopback interface is "isolated" it does not have an exit point to reach a device in the same IP subnet

 

So having two routers with their loopbacks interface in the same IP subnet is something that is conceptually wrong as there is no natural way to make them to communicate.

 

The other aspect of your RIPv2 lab is that using two subnets taken from the same major network 1.0.0.0/8 with the shared link in 192.168.1.0/24 triggers auto summary that happens at major network boundary.

RIPv2 uses auto-summary by default because it is a distance vector routing protocol.

 

Hope to help

Giuseppe

 

 

 

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco