-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vjunosswitch ssh issue. #231
Comments
Hi, I am having the same issue. As a workaround, I tried running a socat instance on the container (but on different port, i.e., 222) - and that works.
It seems that for some reason the qemu/kvm process is not able to perform correct "internal" port forwarding. Using socat, like other containers do, could solve the problem. |
I built the image today - but I'll do some more deep testing |
Seems like some devices work with In example, in addition to vjunos-switch:
tcp three ways handshake seems ok, but then no data is forwarded.
tried to force lower mtu, clamp mss, but no changes in the result. maybe it could be worth adding a per-device-flag to enable direct hostfwd vs using socat? |
Ok, seems like I found the issue. When using OTOH, when using i.e., starting bash+tcpdump on aruba cx vm:
That means all the vrnetlab devices must have a default route on the management interface (via 10.0.0.2) - even better if it's on a dedicated management vrf, to avoid clashing with any other routes of the lab. After adding the management default route, I was able to connect via SSH and hostfwd. wrt vSRX vs vJunos-switch, if you look at the initial config, the first one has the default route on the mgmt_junos routing instance, while the second one has only the IP address. |
The root cause might be that some devices don't want to accept the default route from DHCP, and once the device is so far that the script can start configuring it, the DHCP response has already been processed. It might be better to make this configurable and switch to hostfwd only when someone tests that it works on a particular device (or fixes the code like @ssasso did). Who knows how much stuff is broken right now (hopefully nothing else, but...) |
Thanks @ssasso Thanks for spotting this. I did it a long time ago for SR OS, and other contributors did it for some other NOSes, but not consistently. |
Unfortunately very few device initial config has the def route set. I.e. Cisco Cat, Nexus, ... is missing the default route, OcNOS is missing it, openwrt is missing it, PanOS is missing it, sonic is missing it, vEOS is missing it... :( I can try to fix some of them, but I won't be able to test them. Could be worth try to ask to the "initial device contributor" - opening issues and assigning to them? |
Which effectively means vrnetlab is currently broken for all of them as most devices use static IP configuration on the management interface, not DHCP (I've spent too long in the libvirt world ;). Maybe it's not a good idea to open the issues and wait for someone to fix stuff? |
sonic automatically installed the default route @kaelemc added def routes to all cisco gear (#238) openwrt/panos/ocnos might have issues still |
Great job. Thank you all! |
Hi,
I pulled the latest updates from the repo and rebuilt my vjunosswitch image.
I'm not able to ssh to it anymore.
ssh debug just says:
debug1: Connecting to 172.20.20.3 [172.20.20.3] port 22.
debug1: Connection established.
and just hangs.
If I connect to the docker container and do an ssh to localhost, I get access to the vjunos cli.
Thanks,
Heikki
The text was updated successfully, but these errors were encountered: