08-07-2022 08:17 AM - last edited on 08-09-2022 11:35 PM by Translator
Hi all,
I have some routers that we connect via ssh to the Loopback0, I would like to know via what interface I'm connect to this Loopback.
I did a
show ip arp and show mac address and my mac-address
is not showing.
thanks.
Solved! Go to Solution.
08-07-2022 09:46 AM
show tcp brief all
under it you will see the the SSH port with IP use for access router.
08-07-2022 09:13 AM - last edited on 08-09-2022 11:38 PM by Translator
@Juraj Papic wrote:
... I would like to know via what interface I'm connect to this Loopback.
I assume you know this already, but I'll put it here for those who don't know
Since the loopback interface is by definition not connected on any physical media there is no purpose in a link local address (MAC address), MAC addresses are not supported on loopback interfaces.
about your question:
From router to which you connect to its loopback point of view:
In the following example there are 2 routers
if for example we want to connect from xrv10 to xrv loopback interface 4.4.4.4 via ssh
RP/0/0/CPU0:XRV10#show ip route 4.4.4.4
Routing entry for 4.4.4.4/32
Known via "ospf 1", distance 110, metric 2, type intra area
Routing Descriptor Blocks
100.30.40.4, from 4.4.4.4, via GigabitEthernet0/0/0/1
RP/0/0/CPU0:XRV10#show arp
Address Age Hardware Addr State Type Interface
100.30.40.4 02:47:12 5000.0009.0001 Dynamic ARPA GigabitEthernet0/0/0/1
08-07-2022 09:46 AM
show tcp brief all
under it you will see the the SSH port with IP use for access router.
08-07-2022 02:50 PM
The original post asks this question " I would like to know via what interface I'm connect to this Loopback." @pman makes a good point about the loopback interface being a virtual interface. So your Ssh does not connect directly to the loopback but goes through some other interface on the router. You can identify which interface it is by doing a traceroute (or tracert depending on the OS). The interface that generated the last response would be the interface you are looking for.
My other comment is that the arp table is typically just devices that are locally connected. Since your SSH is sourced from a remote device you would not find an entry in the arp table for your device.
08-07-2022 03:54 PM
the SSH is TCP traffic and it save in Router TCP table, so when he do
show tcp brief all
he can see all IP connect to LO for port 23 (SSH).
08-08-2022 05:05 AM
Hello, Thanks for the help with that and getting the Mac I was able to see from what interface I'm connecting.
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