Not able to set the ip address that I want for a loopback address on a router

JockVSJockJockVSJock Member Posts: 1,118
I'm showing with this question, I still don't have a solid grasp on subnetting, how to implement and assign addresses to interfaces on various devices.

However I want to add a Loopback address to a Router. Here are my current interfaces:
east#show ip int br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down
Serial1/0                  10.0.1.2        YES NVRAM  up                    up
Serial1/1                  unassigned      YES manual up                    down
Serial1/2                  unassigned      YES NVRAM  administratively down down
Serial1/3                  unassigned      YES NVRAM  administratively down down
Serial1/4                  unassigned      YES NVRAM  administratively down down
Serial1/5                  unassigned      YES NVRAM  administratively down down
Serial1/6                  unassigned      YES NVRAM  administratively down down
Serial1/7                  unassigned      YES NVRAM  administratively down down
Loopback0                  unassigned      YES manual up                    up



I want to give the Loopback an address that falls after 10.0.1.2, however I keep getting an overlap error. See below.

east#show ip int br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down
Serial1/0                  10.0.1.2        YES NVRAM  up                    up
Serial1/1                  unassigned      YES manual up                    down
Serial1/2                  unassigned      YES NVRAM  administratively down down
Serial1/3                  unassigned      YES NVRAM  administratively down down
Serial1/4                  unassigned      YES NVRAM  administratively down down
Serial1/5                  unassigned      YES NVRAM  administratively down down
Serial1/6                  unassigned      YES NVRAM  administratively down down
Serial1/7                  unassigned      YES NVRAM  administratively down down
Loopback0                  unassigned      YES manual up                    up
east#
east#
east#
east#
east#
east#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
east(config)#int Loopback0
east(config-if)#ip address 10.0.1.3 255.255.255.0
% 10.0.1.0 overlaps with Serial1/0
east(config-if)#ip address 10.0.1.25 255.255.255.0
% 10.0.1.0 overlaps with Serial1/0
east(config-if)#ip address 10.0.2.1 255.255.255.0
east(config-if)#end
east#show
*May 22 22:04:42.667: %SYS-5-CONFIG_I: Configured from console by console
east#show ip int br
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down
Serial1/0                  10.0.1.2        YES NVRAM  up                    up
Serial1/1                  unassigned      YES manual up                    down
Serial1/2                  unassigned      YES NVRAM  administratively down down
Serial1/3                  unassigned      YES NVRAM  administratively down down
Serial1/4                  unassigned      YES NVRAM  administratively down down
Serial1/5                  unassigned      YES NVRAM  administratively down down
Serial1/6                  unassigned      YES NVRAM  administratively down down
Serial1/7                  unassigned      YES NVRAM  administratively down down
Loopback0                  10.0.2.1        YES manual up                    up


I'm not sure what that error means.

In my mind, I think that the addresses that I'm trying to use above should work.

However, once I use a different number on the 3rd Octet, then it works.
***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

"Its easier to deceive the masses then to convince the masses that they have been deceived."
-unknown

Comments

  • prtechprtech Member Posts: 163
    You have serial1/0 configured with 10.0.1.2/24 so you won't be able to use 10.0.1.x on any other interfaces including loopback interfaces because it overlaps with the network configured on serial1/0.
    If at first you do succeed, try something harder.
  • chXchX Member Posts: 100 ■■■□□□□□□□
    First consider that generally you won't see routers with multiple interfaces connecting to the same network.

    Now think about the IP addresses that you tried, you have:
    10.0.1.2 (255.255.255.0)
    10.0.1.3 (255.255.255.0)
    10.0.1.25 (255.255.255.0)

    What's the significance of the subnet mask? Are these 3 IP addresses in the same subnet?

    I encourage you to research and answer those two questions, and if it's still unclear, we can go from there.
    2019 Goals:
    [ ] Recertify CCNA
  • JockVSJockJockVSJock Member Posts: 1,118
    prtech wrote: »
    You have serial1/0 configured with 10.0.1.2/24 so you won't be able to use 10.0.1.x on any other interfaces including loopback interfaces because it overlaps with the network configured on serial1/0.

    I understand what you are saying, but I still don't understand the WHY behind it.

    You say it overlaps with the network, but I'm still not clear on this.


    Also, this just hit me. Is the Loopback address used as the physical address for that device? I know that the Loopback Address is just like a PC loopback address (127.0.0.1). Often used to test to make sure device is up and can respond to pings.
    ***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

    "Its easier to deceive the masses then to convince the masses that they have been deceived."
    -unknown
  • JoshyJJoshyJ Member Posts: 32 ■■□□□□□□□□
    Well what is the purpose of a router? To take incoming packets and route them out of which interface is needed to get it to a specific destination.

    So how does a router know which interface to use? When it has two interfaces as part of the same network?
  • NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    JockVSJock wrote: »
    I know that the Loopback Address is just like a PC loopback address (127.0.0.1).

    Not at all. This is partly where you're getting confused. :)

    Consider this--

    PC(A)
    PC(B)

    If I'm on PC(A) and I ping 127.0.0.1, I am pinging from PC(A) to PC(A). If I'm on PC(B) and I ping 127.0.0.1, I am pinging from PC(B) to PC(B). Pinging the loopback address (127.0.0.1) is the same as pinging yourself.

    Now for routers. Say Rtr(A)'s Loop0 i/f has the address 1.1.1.1 and Rtr(B)'s Loop0 i/f has the address 2.2.2.2.

    Rtr(A)
    Rtr(B)

    If I'm on Rtr(A) and I ping 2.2.2.2, I am pinging Rtr(B). If I'm on Rtr(B) and I ping 1.1.1.1, I am pinging Rtr(A). Clearly, the concept of a loopback interface w/ an IP address is quite different than the 127.0.0.1 address.
  • mdominomdomino Member Posts: 81 ■■□□□□□□□□
    Because you are using a /24 mask on on s1/0 you have effectively reserved the IPs from 10.0.1.0 - 10.0.1.255 to that interface. Any data that comes through with an IP in that range will be forwarded out that port. The router would have isues if it allowedy ou to set a loopback as 10.0.1.25 as it falls in the /24 subnet you have already used.

    If the router allowed you to overlap the subnet like that, you could get some strange and unexpected behavior whenever you tried to reach 10.0.1.25. Once you subnet the IP address consider them used and that they can't be employed anywhere else.
  • PCHoldmannPCHoldmann Member Posts: 450
    The loopback address 127.0.0.1 is a reserved address that is used to refer to the local host. Pinging or connecting to 127.0.0.1 is roughly equivalent to pinging or connecting to the IP address that is assigned to that interface, except that you can only use it from that host.

    A loopback interface on a router is a virtual interface that is used for a variety of purposes, primarily to give it an interface/IP address that will never be down (unless you shutdown the interface) and for testing.

    Let's say you have 3 Ethernet interfaces on a router, 10.10.10.1/24, 10.20.20.1/24, and 10.30.30.1/24. You are polling the router from an SNMP server, and want to be able to even if one of the interfaces goes down. Even if you have a router from the server to any of the interfaces, if that specific interface went down, you would not be able to connect to the device. However, if you define a loopback, say 192.168.255.1/32, you have an interface that is up unless it is administratively shut down.

    Another use for the loopback is as a router ID, since it will not change. When an OSPF, EIGRP, or BGP router loads, it selects the highest address on a loopback, followed by the highest address on an ACTIVE physical interface. In our previous example, without the loopback, normally the router would use 10.30.30.1 as the RID. Now consider a power failure where the switch attached to 10.30.30.1 boots more slowly than the switch attached to one of the other interfaces. Now the RID is 10.20.20.1. Unless 10.10.10.1 is the only one that is up when the routing process loads. With the loopback, the router will always be 192.168.255.1.

    You can't assign two interfaces an IP address on the same subnet because it becomes ambiguous where to route the traffic.

    There is a case where you could use the loopback address on the serial interface, which would be to use IP unnumbered on the serial. This is generally only done with PPP interfaces, which have methods of sorting out the correct outgoing interface.
    There's no place like ^$
    Visit me at Route, Switch, Blog
  • prtechprtech Member Posts: 163
    JockVSJock wrote: »
    I understand what you are saying, but I still don't understand the WHY behind it.

    You say it overlaps with the network, but I'm still not clear on this.
    Have you heard of the analogy comparing IP addresses to street addresses? An IP address is made up of two parts: network portion and host portion. So for something like 10.0.1.3/24, the network portion is "10.0.1" and the host portion is ".3". Think of the network portion as the street name and the host portion as the house number.
    So for a mailman to deliver mail to a specific person he will go to that specific street name (10.0.1) and then drop the mail off at the house number (.3).

    10.0.1.3 --> 3 West Elm Street
    10.0.1 --> West Elm Street
    .3 --> 3

    Now think of a router as a city.

    10.0.1.3 on R1 --> 3 West Elm Street in New York City
    R1 --> New York City

    If you configure two interfaces with the same network address (10.0.1), it's like having two West Elm Street in New York City. I'm sure you can see where there might be issues with two West Elm Street in New York City.
    If at first you do succeed, try something harder.
  • JockVSJockJockVSJock Member Posts: 1,118

    Clearly, the concept of a loopback interface w/ an IP address is quite different than the 127.0.0.1 address.

    I agree with this, however at the end of the day, both are used for testing in the troubleshooting process.

    For a pc, we are making sure that TCP/IP is enabled when pinging the loopback address.

    For a router/switch, we are confirming that the device is at least powered on and up when pinging the loopback address.
    ***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

    "Its easier to deceive the masses then to convince the masses that they have been deceived."
    -unknown
  • JockVSJockJockVSJock Member Posts: 1,118
    Ok, reading thru the responses...starting to make sense.

    I just need to start labbing more of this out to help.

    thanks
    ***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

    "Its easier to deceive the masses then to convince the masses that they have been deceived."
    -unknown
  • NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    JockVSJock wrote: »
    I agree with this, however at the end of the day, both are used for testing in the troubleshooting process.
    The loopback interfaces on routers are most often used for the functionality they provide. For example, BGP sessions are often established using loopback interfaces to make them immune to any one interface going down.
    For a router/switch, we are confirming that the device is at least powered on and up when pinging the loopback address.
    Pinging its physical interface from a neighboring device would be a better way to verify this. Pinging the loopback interface also requires, in additional to the router being powered and the interface up, that routing be functional.
  • JockVSJockJockVSJock Member Posts: 1,118
    The loopback interfaces on routers are most often used for the functionality they provide. For example, BGP sessions are often established using loopback interfaces to make them immune to any one interface going down.


    Pinging its physical interface would be a better way to check this. Pinging its loopback interface also requires routing to be up.

    Good to know...As for the pinging, I could have swore that Chris Bryant was teaching pining the loopback in the troubleshooting process to confirm if the router was physically powered on, if you were not able to physically get access to it directly.
    ***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)

    "Its easier to deceive the masses then to convince the masses that they have been deceived."
    -unknown
  • NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    JockVSJock wrote: »
    Chris Bryant was teaching pining the loopback in the troubleshooting process to confirm if the router was physically powered on

    R1
    R2

    Pinging the loopback interface verifies: powered up, interface up, good IPs, routing up.
    Pinging the physical interface verifies: powered up, interface up, good IPs.
    "show cdp neighbor" verifies: powered up, interface up, good cdp (the default).
    "show interface" verifies: powered up, interface up.
  • djlombadjlomba Member Posts: 59 ■■□□□□□□□□
    this threw me for a loop also.

    I saw Jeremy using interface loopback on a router to emulate a host. So the loopback address was an address on the same subnet as the router.

    ex:
    Router fa0/1 192.168.3.1/24
    loopback0 192.168.3.20

    how do you do this?
  • djlombadjlomba Member Posts: 59 ■■□□□□□□□□
    nevermind. i just noticed that the loopback int has a broadcast subnet mask which i believe represents a single host.
  • ralbertos21ralbertos21 Member Posts: 27 ■□□□□□□□□□
    wow, great stuff!! I knew about this analogy but the way you explained it further and layed it out is just great! Totally implying this :)icon_cheers.gif
Sign In or Register to comment.