Loopback Interfaces

cpohladcpohlad Member Posts: 43 ■■□□□□□□□□
I realize that it is a BP to have loopback interfaces setup for routing. What I've been trying to figure out is exactly why? Can someone give me a brief rundown. I know I've read through that before, but can't remember the logic behind it.

Comments

  • xbuzzxbuzz Member Posts: 122
    Well i'm just going through CCENT material atm. The only reason i've come across for loopback interfaces are for simulating a host in a home lab. Maybe there's more reasons and someone with more knowledge will chime in. :p
  • networker050184networker050184 Mod Posts: 11,962 Mod
    A loopback interface never goes down unless the router itself goes down. So if you want a stable IP for next hops, router ID, etc then a loopback is the way to go. Interface IPs change as links are moved, decommissioned or plenty of other reasons. A loopback is also best practice as a source for management such as syslog, SSH/telnet. Its an IP that never (or rarely) changes unlike interface IPs.
    An expert is a man who has made all the mistakes which can be made.
  • cpohladcpohlad Member Posts: 43 ■■□□□□□□□□
    I think I found my answer. It's used in OSPF due to it's reliability and availability. Is it ever used in EIGRP?
  • martell1000martell1000 Member Posts: 389
    on ccent level loopbacks are not used for anything important. but they are used in things like ospf router id selection or configuring bgp.

    Sample Configuration for iBGP and eBGP With or Without a Loopback Address  [IP Routing] - Cisco Systems
    as you can see here at the bottom of the page bgp forms relationships with the the loopback interfaces.

    one benefit of loopbacks is that they never can go down like other interfaces, unless the whole device goes down.
    And then, I started a blog ...
  • MrBrianMrBrian Member Posts: 520
    Loopbacks can have all sorts of uses and magical powers lol. I'll tell you some reasons I know of for using them, but there's a ton more I'm sure.

    Yes, they're good in labs. You can emulate a physical interface, thus representing a network.. so you can add them to a routing protocol so there's more routes that you're sending around. Also, they are used in part by a routing protocols selection of router-id (or you can hard code this using the "router-id" command under the routing protocol), but if the router-id is not specified, than the routing protocol will choose the highest loopback IP.

    The best thing I've seen for using a Loopback is with BGP... BGP uses a TCP connection for its peerings. You can set up the peerings using physical interfaces on the routers, but then if that physical interface goes down, then the TCP connection is torn down, thus killing your BGP peer. However, its possible to establish the BGP peer using Loopback interfaces.. each router will need a route to the other routers Loopback interface though (going out one of its physcial interfaces). Bottom line is if one physical interface goes down, but you have multiples paths to reach the other router's Loopback, the TCP connection will stay up, keeping that peer alive. Since the peers are setup through logical interfaces, when a physical interface dies it won't bring down the peer (granted you have multiple paths). Hopefully that wasn't too long winded.
    Currently reading: Internet Routing Architectures by Halabi
  • martell1000martell1000 Member Posts: 389
    cpohlad wrote: »
    I think I found my answer. It's used in OSPF due to it's reliability and availability. Is it ever used in EIGRP?

    Preventing Duplicate EIGRP Router IDs  [IP Routing] - Cisco Systems

    yep similar to ospf, you can use loopbacks to determine the router id.
    And then, I started a blog ...
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Loopbacks are a good practice regardless of routing. Its basically your routers "name" and is usually tied into DNS. SNMP traps, logs, netflow, basically anything the router reports should be sourced from this address.
    An expert is a man who has made all the mistakes which can be made.
  • alxxalxx Member Posts: 755
    Also for monitoring the router/management and as destinations for tunnels
    Goals CCNA by dec 2013, CCNP by end of 2014
Sign In or Register to comment.