10-04-2024 07:06 AM
Hi and thanks in advance for the guidance.
Im tasked with designing a IPv4 and IPv6 addressing scheme for a small network (2 host PC's 3 routers with loopback interfaces and two switches)
I note in the Cisco IP Addressing Guide it makes reference to a special configuration reserved for loopback addresses, but I can't see in the document what it is , sorry if this is a novice question!
Thanks.
10-04-2024 07:11 AM
You can use any IP for loopback' I prefer use ip like 1.1.1.1/32 2.2.2.2/32.
There is no restrictions for LO IP.
MHM
10-04-2024 08:01 AM
This appears to be a fairly simple environment and there are a few things we need to understand to be able to give good advice:
- you mention 2 host PC. Are both PC intended to be in the same subnet or in different subnets?
- you mention 2 switches. Where are these switches to be connected? And will these switches have IP addresses?
You are clear about having 3 routers with loopback interfaces. You could do as MHM suggests and use 1.1.1.1 but I would prefer to use addresses that are not in "Public" address space.
You could do something very simple such as using 192.168.1.1, 192.168.1.2, and 192.168.1.3 as the router loopback addresses. But I would suggest putting each loopback into separate logical networks, such as 192.168.1.1, 192.168.2.1, and 192.168.3.1.
10-04-2024 09:09 AM
1.1.1.1 as example' he can use any IP.
And also I dont prefer using 192.168.x.x since it can overlapping with private IP in network.
MHM
10-04-2024 01:05 PM
@Richard Burts wrote:
You are clear about having 3 routers with loopback interfaces. You could do as MHM suggests and use 1.1.1.1 but I would prefer to use addresses that are not in "Public" address space.
You could do something very simple such as using 192.168.1.1, 192.168.1.2, and 192.168.1.3 as the router loopback addresses. But I would suggest putting each loopback into separate logical networks, such as 192.168.1.1, 192.168.2.1, and 192.168.3.1.
Actually, didn't see Rick's reply until after I posted mine, but some comments on both MHM's and Rick's replies.
Like Rick, I too would recommend not to use any public IP that's not my public IP. Even if you don't explicitly advertise something like 1.1.1.1/32 or 2.2.2.2/32, any loopback IP will be considered that (destination) IP on that router. I.e. by default, it would preclude routing to that IP elsewhere (across the router it's defined on).
A later MHM reply notes he wants to avoid overlapping a loopback IP with private IP addressing. What I believe he is concerned with, as a loopback IP is an interface IP, you would also need to be careful of "conflicts" on the same router.
For example, a Cisco router won't allow the following configuration if both interfaces are "no shut"
interface Loopback0
ip address 192.168.1.1 255.255.255.255
!
interface GigabitEthernet0/0/0
ip address 192.168.1.2 255.255.255.0
% 192.168.1.0 overlaps with Loopback0
GigabitEthernet0/0/0: incorrect IP address assignment
Rick recommends against, for example, 192.168.1.1, 192.168.1.2, and 192.168.1.3 (what I recommended) and recommends for 192.168.1.1, 192.168.2.1, and 192.168.3.1. Well, if you want to make these loopbacks routable, 192.168.1.1, 192.168.2.1, and 192.168.3.1. "burn" one /24 and one /23 or three /24s or . . . This has an impact on your address space usage. If you assign them sequential, .1, .2, .3, you only "burn" one /24. For a network only the size as in the OP, whatever you do, likely doesn't matter much, but may become more and more important as your network grows.
10-04-2024 02:44 PM
Joseph
If this were a more general discussion I might share your concern about how many /24 subnets are burned. But I paid attention to the OP which specifies a network with SEVEN devices in it. Burning /24s is not a realistic concern here. If the discussion was about a larger network then perhaps we would need to be more careful. I am thinking perhaps about a suggestion that loopbacks use addresses in the class C address space (192.168.x.x) while subnets for users/servers/etc use addresses in the class B space (172.16.x.x) or even in the class A space (10.x.x.x). And certainly as the size of the network increases we would need to be careful about how we allocate addresses and to use smaller addresses blocks. But for smaller networks I advocate let's make it very obvious how addresses are allocated.
You and I share the concern about using "Public" IPs in private networks. The original implementation may be very careful to isolate the Public IP used for a loopback. But down the road some network engineer is going to make changes which expose those addresses outside. It is much better in private networks to make sure that all addresses are private.
10-04-2024 05:57 PM
Rick, if you reread my prior reply's last sentence, I also made a distinction between a small network, such as explicitly the OP case, and larger networks, regarding the value of address space management. I.e. burning address space, in this case, likely wouldn't matter. So, we don't disagree on that point.
However, I still think it's valuable to instill "good habits", such as efficient (avoid needless waste) and intelligent (aggregation possibilities) utilization of address space. You concur, I believe, with me that it can become important. So we appear to agree on that too.
We appear to disagree whether there's value in raising this point in a case like OP presented, but I suspect the Cisco IP Addressing Guide reference the OP mentioned also was generic, which I also paid attention to. I.e. I took OP as being about how it should be done beyond on just a seven device network.
As to mixing address space blocks private classes suggestion (external to these replies?), well that also breaks up aggregation possibilities between them.
As to obvious loopbacks, personally I believe it easier to remember all loopbacks are allocated from a single address block, such as one /24, rather from consecutive /24s because with the latter you also need to keep in mind when those /24s are actually /24s. (Of course, if you allocate loopbacks, and only loopbacks, from the private class C address block, that's not a problem, just don't need more than 256 loopbacks.)
BTW, although granted a seven device network is unlikely to immediately run out of private address v4 address space, that's what happened in the last company I worked at. I.e. they exhausted all 3 private v4 address space blocks. (Mind you, there was lots of unused IPs, just not unused IPv4 address blocks of /24s or larger. Laugh, this did provide a very compelling reason to early adopt IPv6.)
Lastly, confession, when I build small labs in Packet Tracer or CML, I will indeed just allocate all network devices' IPs as sequential 192.168.x.0/24 subnets. I.e. as Rick suggests. But, I wouldn't do similar on any like sized production network if I'm doing classless.
10-05-2024 09:32 AM
Joseph
I certainly agree with your point about "good habits". And certainly agree that even small networks should follow good design practices.
10-04-2024 08:19 AM
Selection of loopback IPs can depend on whether you plan to make them routable (often useful), and if so, whether they might be aggregated in the same address scope used by other interface IPs on your network. Additionally, loopback IPs might be allocated out of an address block just for loopbacks.
As an example, if using OSPFv2, possibly each area is allocated its own 10.x.x.x/16 and all loopbacks are allocated out of a /24 in the area's /16. So, for further example, area 4 might be allocated out of 10.4.0.0/16 and loopbacks out of 10.4.1.0/24.
BTW, similar scheme might be used for p2p /30 or /31 allocations.
10-04-2024 02:25 PM
Generally, IPv4 Subnet Masks have a /32 Subnet Mask (255.255.255.255) and for IPv6, I recommend you make all masks /48 for simplicity.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide