1

i am using debian, i used to ssh to a machine 172.21.128.61 inside my local network a few weeks ago, probably after the updates i cannot ssh into that machine again, ssh [email protected] shows:

ssh: connect to host 172.21.128.61 port 22: No route to host

so i tried pinging the machine ping 172.21.128.61 shows:

PING 172.21.128.61 (172.21.128.61) 56(84) bytes of data.
From 172.21.0.1 icmp_seq=1 Destination Host Unreachable
From 172.21.0.1 icmp_seq=2 Destination Host Unreachable
From 172.21.0.1 icmp_seq=3 Destination Host Unreachable
^C
--- 172.21.128.61 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5128ms
pipe 4

Another windows machine in the same network is able to ssh into the machine 172.21.128.61 as well as getting the response on pinging.

i can ssh into [email protected] which is a demo ssh server (ofc not local)

I think i may have messed up my ssh client for local networks.

Additional info

My machine's local IP: 172.39.40.111/22

Default gateway: 172.39.40.1

ip addr returns:

2: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 14:f6:d8:f3:85:81 brd ff:ff:ff:ff:ff:ff
    inet 172.39.40.111/22 brd 172.39.43.255 scope global dynamic noprefixroute wlp0s20f3
       valid_lft 12379sec preferred_lft 12379sec
    inet6 fe80::2cfd:51da:c35:978b/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
2
  • 1
    The responding 172.21.0.1 is outside of your system's IP range, so it has to be the next-hop router after .40.1. It seems that 172.21.0.1 doesn't have a route to subnet 172.39.128.0/22. Can you check the routing table on that device? What's the IP address of the other system that can successfully ping? Can you run traceroute 172.21.128.61 on both 172.39.40.111 and the other system, and edit the question to add the results? Mar 18, 2023 at 19:45
  • Are you using Docker? It tends to create networks that will clash with your own real networks.
    – A.B
    Mar 19, 2023 at 11:05

1 Answer 1

0

You're mixing networks.

RFC1918 defines the Address Allocation for Private Internets for creating a Private network

These addresses are designed to be used inside a local network, and are not intended for links between networks (although they can be).

One of these address ranges is 172.16.0.0 - 172.31.255.255, or 172.16/12.

The IP address 172.21.128.61 is inside this network, but 172.39.40.111 is not inside it.

You're getting the error "Destination Host Unreachable" because the computer 172.39.40.111 doesn't know of a route for contacting the other network.

I have no idea what update was done and what it has changed, but you should define your local network so it uses just one IP range that is common to all the computers and routers. Otherwise, you will need to setup the router or routers so that forwarding messages between the two networks is defined.

If you need more information, please add a drawing of the schema of your network to your post so we can better understand the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .