cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
649
Views
18
Helpful
8
Replies

loopback interface

ney25
Level 2
Level 2

Hi Netpro,

just have a quick check , why loopback interface using /32 for subnet mask ? coz, i read from some configuration some others using /24 ? i am curious about /24 and /32 is that any differences ?

your reply will be highly appreciated.

regards,

Jack

8 Replies 8

illusion_rox
Level 1
Level 1

Dear Jack, you will see loopback advertised as a /32 in ospf, since ospf treats loopback as a stub network meaning no other routers can connect to it :-), in other routing protocols like rip and eigrp you will usually see original mask that is configured, its just the case in ospf, if you want to revert it to its original mask then run this command on loopback

int lo x

ip ospf network point-to-point

Dear jack, may be i was confused with your question, i think you meant to ask that when we are assigning ip addresses then in that case sometimes we use /32 and sometimes /24 ( or any other valid mask ), see, loopback is normally used to simulate LANS, now for example, in your practice you would like to implement an access-list that denies ip packet from 10.0.0.1 but not from 10.0.0.2 ! now you just have routers connected and no PC, how will you test it now ? if i use loopback 0 to assign 10.0.0.1/24 then i cannot assign this same network on any other interface ( including other loopbacks ) so what i will do, is that i will assign 10.0.0.1/32 and 10.0.0.2/32 to 2 different loopback interfaces to simulate my testing, also remember loopback interface are definetly used for some useful configuration in OSPF, BGP and others but mainly its purpose is for testing different situations as well

HTH

Hi Rox,

thanks FYI, so you will trying to say loopback with /24 which only just park there in case of OSPF start implement ? if so, is that any impaction for this while using loopback /24 ?

kindly correct me and thank you in advance.

regards,

Jack

Dear jack, sorry but i didnt get what you are trying to ask, can you repeat your question pls

Thanks

Hi Rox,

example 1:

interfacce Loopback0

ip add 192.168.1.1 255.255.255.0

example 2:

interfacce Loopback0

ip add 192.168.1.1 255.255.255.255

so, my question was is that any different using /24 and /32 ?

thanks.

regards,

Jack

Nope, no difference at all,

however i will repeat what i said before,

in example 1 if you want to assign 192.168.1.2 to any other loopback for any testing, u cant !

in example 2 you can easily assign 192.168.1.x to any other loopback interface

HTH

Hi Rox,

thanks for your information.

regards,

Jack

Jack,

The main difference between the 2 implementations is that with the first one you are wasting a whole Class C address on an interface while on the 2nd one, you are assigning a host IP, hence you can use 192.168.1.2 - 254 for loopbacks in other routers .

That's the main reason why loopbacks are assigned /32, for IP address preservation.

HTH,

__

Edison.

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: