cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
278
Views
25
Helpful
5
Replies
Beginner

Loopback interface

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

Re: Loopback interface

 

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

Highlighted
Hall of Fame Expert

Re: Loopback interface

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

 

 

 

 

5 REPLIES 5

Re: Loopback interface

 

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

VIP Mentor

Re: Loopback interface

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

VIP Advisor

Re: Loopback interface

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.



kind regards
Paul

Please rate and mark posts accordingly if you have found any of the information provided useful.
It will hopefully assist others with similar issues in the future
Hall of Fame Master

Re: Loopback interface

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

Highlighted
Hall of Fame Expert

Re: Loopback interface

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

 

 

 

 

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards