You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Latest WSL release has distro install functionality we rely on. Hence I have updated the README.
- Removed reference to manual installation of WSL 2.4.4.
- Add instructions on adding routes to Windows.
- Added SSH Tunnel instructions for SecureCRT.
- Added note to DevPod instructions for using inbuilt SSH.
> You may have to tick 'Use Builtin Ssh' for correct behaviour.
234
+
235
+
# Accessing lab nodes
236
+
237
+
You probably want to access your nodes from a terminal application your computer, such as SecureCRT, MobaXTerm, PuTTY etc.
238
+
239
+
There are two ways you can achieve this:
240
+
- On Windows, add a static route to the lab management network.
241
+
- SSH Tunneling/Proxy (depends on terminal/console application support).
242
+
243
+
## Adding a static route
244
+
245
+
You can add a static route to Windows, where the destination subnet is your labs management subnet, and the next hop is the IP of Containerlab WSL.
246
+
247
+
### Step 1 - Get the IP Address of Containerlab WSL
248
+
249
+
In Containerlab WSL -- Execute and copy/note down the outputted IP address
250
+
```bash
251
+
ip addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}'
252
+
```
253
+
254
+
### Step 2 - Add the route
255
+
256
+
By default the Containerlab management subnet is `172.20.20.0/24`. If you have used a custom management subnet in your toplogy, please adjust the below command accordingly.
257
+
258
+
In Windows, open an elevated Command Prompt Window (Run as Administrator). Execute the following (replace `<Management Subnet>`, `<Management Mask>` and `<WSL IP Address>`)
259
+
```cmd
260
+
route add <Management Subnet> MASK <Management Mask> <WSL IP ADDRESS>
261
+
```
262
+
263
+
For example, if using the default management subnet of `172.20.20.0/24`, and the Containerlab WSL IP address was `172.28.121.79`; The command would be:
If for some reason you need to remove the route, say the subnet or WSL IP address changed, you can execute the following in an elevated Command Prompt window:
271
+
```cmd
272
+
route delete <Management Subnet>
273
+
```
274
+
275
+
## Configuring SSH tunneling (SecureCRT)
276
+
277
+
In SecureCRT you can configure SSH tunneling so you can access your lab nodes (running in WSL) without having to modify routes in Windows.
278
+
279
+
### Step 1 - Configure an SSH session to WSL Containerlab
280
+
281
+
In SecureCRT create and save an SSH session to WSL Containerlab. Session parameters are below:
282
+
283
+
**Session Parameters**
284
+
285
+
- Hostname: `wsl.localhost`
286
+
- Port: `2222`
287
+
- Username: `clab`
288
+
289
+
Ensure you save the session.
290
+
291
+
### Step 2 - Add sessions to your lab nodes
292
+
293
+
The only remaining step is when adding lab nodes, ensure you go to the 'Firewall' settings -> 'Select Session' -> Select the saved session to WSL (default name: `wsl.localhost`).
294
+
295
+
Now you should be able to 'natively' connect to your lab nodes from within Windows.
296
+
239
297
# Developers
240
298
241
299
Development should be performed from another WSL distribution.
0 commit comments