cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1513
Views
10
Helpful
5
Replies

SSH Connection

Juraj Papic
Level 3
Level 3

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.

1 Accepted Solution

Accepted Solutions

show tcp brief all 
under it you will see the the SSH port with IP use for access router.

View solution in original post

5 Replies 5

pman
Spotlight
Spotlight

@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:

  • will be The MAC address of the physical interface that receives the request (Gi0/0/0/0 in the next example)

In the following example there are 2 routers

example.png

if for example we want to connect from xrv10 to xrv loopback interface 4.4.4.4 via ssh

  • from xrv10 point of view it will be the mac address of xrv Gi0/0/0/0 100.30.40.4 (5000.0009.0001).
  • from xrv point of view it will be Gi0/0/0/0 interface (mac address 5000.0009.0001).
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

‏‏exam.PNG

show tcp brief all 
under it you will see the the SSH port with IP use for access router.

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.

 

HTH

Rick

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).

Hello, Thanks for the help with that and getting the Mac I was able to see from what interface I'm connecting.

 

Review Cisco Networking for a $25 gift card