Windows Directory ns-3-dev Doesn't Exist

83 views
Skip to first unread message

Johny Why

unread,
Apr 6, 2023, 5:05:59 PM4/6/23
to ns-3-users
I'm trying to install ns3 on Windows 11. 

In "ns-3 Installation Guide Release ns-3-dev",  "Section 6.2.2 Accessing the MinGW64 shell", the path is shown "C:\ns-3-dev\".

That path doesn't exist on my PC. 

What am i doing wrong?

Thx

Johny Why

unread,
Apr 6, 2023, 5:06:53 PM4/6/23
to ns-3-users
I'm curious why the word "dev" is there, since i'm not trying to developing ns3. 

Tommaso Pecorella

unread,
Apr 6, 2023, 6:35:53 PM4/6/23
to ns-3-users
I don't know about the windows quirks, but I can answer about the "-dev".

The "-dev" suffix indicates the development version, i.e., the most up-to-date version, where the maintainers add stuff and fix bugs almost daily.
It's not meant to be used only by developers. Also users willing to use the latest version are encouraged to use it (and keep it updated).

Gabriel Ferreira

unread,
Apr 6, 2023, 7:07:34 PM4/6/23
to ns-3-users
It's just an example path.

I usually keep my source files for projects in C:\tools\source. 
You may prefer to clone the ns-3-dev git repository to C:\Users\Johny\Desktop\ns-3-dev
Or to download and unpack a release tarball to the desktop. 

Or clone it with your IDE and let it pick where your copy will be placed. 

It's a matter of preference. 

Johny Why

unread,
Apr 6, 2023, 7:18:28 PM4/6/23
to ns-3-users
Am i supposed to create that directory before proceeding with steps in the Windows chapter of the installation guide?

Does  "2.1 Prerequisites" apply to Windows? Or just Linux installs? I'm guessing some of those are already installed in Windows Subsystem for Linux, eg `make`. 

Johny Why

unread,
Apr 6, 2023, 7:52:02 PM4/6/23
to ns-3-users
Ok, i see that the prereq's are needed for Windows. My error (i just jumped ahead to the Windows chapter). 
That creates the directory :D

Johny Why

unread,
Apr 6, 2023, 7:56:33 PM4/6/23
to ns-3-users
New issue:
```
c:\ns-allinone-3.38\ns-3.38\ns-3-dev>ns3 configure --enable-examples --enable-tests
'ns3' is not recognized as an internal or external command,
operable program or batch file.
```


What am i missing? Here's the contents of the dirs:

```
c:\ns-allinone-3.38\ns-3.38>dir
 Volume in drive C has no label.
 Volume Serial Number is 24DB-CF61

 Directory of c:\ns-allinone-3.38\ns-3.38

04/06/2023  04:32 PM    <DIR>          .
04/06/2023  04:25 PM    <DIR>          ..
03/16/2023  08:54 PM               682 .clang-format
03/16/2023  08:54 PM             1,686 .clang-tidy
03/16/2023  08:54 PM               691 .editorconfig
04/06/2023  04:25 PM    <DIR>          .vscode
03/16/2023  08:54 PM            13,148 AUTHORS
04/06/2023  04:25 PM    <DIR>          bindings
04/06/2023  04:25 PM    <DIR>          build-support
03/16/2023  08:54 PM           193,039 CHANGES.md
03/16/2023  08:54 PM             5,777 CMakeLists.txt
04/06/2023  04:25 PM    <DIR>          contrib
03/16/2023  08:54 PM            18,354 CONTRIBUTING.md
04/06/2023  04:25 PM    <DIR>          doc
04/06/2023  04:25 PM    <DIR>          examples
03/16/2023  08:54 PM            17,987 LICENSE
04/06/2023  04:52 PM    <DIR>          ns-3-dev
03/16/2023  08:54 PM            71,013 ns3
03/16/2023  08:54 PM             4,587 README.md
03/16/2023  08:54 PM           197,019 RELEASE_NOTES.md
04/06/2023  04:25 PM    <DIR>          scratch
04/06/2023  04:25 PM    <DIR>          src
03/16/2023  08:54 PM            83,622 test.py
04/06/2023  04:25 PM    <DIR>          utils
03/16/2023  08:54 PM             4,219 utils.py
03/16/2023  08:54 PM                 5 VERSION
              14 File(s)        611,829 bytes
              12 Dir(s)  36,310,728,704 bytes free
```

```
c:\ns-allinone-3.38\ns-3.38\ns-3-dev>dir
 Volume in drive C has no label.
 Volume Serial Number is 24DB-CF61

 Directory of c:\ns-allinone-3.38\ns-3.38\ns-3-dev

04/06/2023  04:52 PM    <DIR>          .
04/06/2023  04:32 PM    <DIR>          ..
04/06/2023  04:32 PM               682 .clang-format
04/06/2023  04:32 PM             1,686 .clang-tidy
04/06/2023  04:52 PM               163 .codespellrc
04/06/2023  04:32 PM               691 .editorconfig
04/06/2023  04:52 PM    <DIR>          .git
04/06/2023  04:32 PM                42 .gitattributes
04/06/2023  04:32 PM    <DIR>          .github
04/06/2023  04:32 PM               474 .gitignore
04/06/2023  04:32 PM             6,841 .mailmap
04/06/2023  04:32 PM    <DIR>          .vscode
04/06/2023  04:32 PM            13,148 AUTHORS
04/06/2023  04:32 PM    <DIR>          bindings
04/06/2023  04:52 PM    <DIR>          build-support
04/06/2023  04:52 PM           193,039 CHANGES.md
04/06/2023  04:32 PM             5,777 CMakeLists.txt
04/06/2023  04:32 PM    <DIR>          contrib
04/06/2023  04:32 PM            18,354 CONTRIBUTING.md
04/06/2023  04:52 PM    <DIR>          doc
04/06/2023  04:33 PM    <DIR>          examples
04/06/2023  04:32 PM            17,987 LICENSE
04/06/2023  04:52 PM            71,013 ns3
04/06/2023  04:32 PM             4,587 README.md
04/06/2023  04:52 PM           197,019 RELEASE_NOTES.md
04/06/2023  04:33 PM    <DIR>          scratch
04/06/2023  04:33 PM    <DIR>          src
04/06/2023  04:52 PM            83,622 test.py
04/06/2023  04:52 PM    <DIR>          utils
04/06/2023  04:33 PM             4,219 utils.py
04/06/2023  04:52 PM                 5 VERSION
              18 File(s)        619,349 bytes
              13 Dir(s)  36,310,282,240 bytes free
```

Gabriel Ferreira

unread,
Apr 6, 2023, 8:34:43 PM4/6/23
to ns-3-users
Windows instructions are for Windows native builds. 
If you are going to use WSL, follow the Linux instructions.

Gabriel Ferreira

unread,
Apr 6, 2023, 8:36:43 PM4/6/23
to ns-3-users
That's a known thing. Windows is stupid and doesn't support shebang lines. https://en.wikipedia.org/wiki/Shebang_(Unix)
As a result, Python scripts are not executed but open by the default text editor for .py files.

So you will need to add the `python` before the ns3 commands. e.g. `python ns3 configure --enable-examples`

johny why

unread,
Apr 6, 2023, 8:57:40 PM4/6/23
to ns-3-...@googlegroups.com
Are you sure? But the Linux chapter doesn't discuss WSL. 

 the windows chapter explains how to use WSL. Is it wrong? 

I thought ns3 isn't supported by windows native. 

Gabriel Ferreira

unread,
Apr 6, 2023, 9:18:40 PM4/6/23
to ns-3-users
Well, I'm the windows maintainer, so yes. Native windows support is available since 3.37 using the MinGW64 toolchain. 

It tells you where to get wsl and install it, but that's it. 

> Users starting with WSL2 can follow the Linux installation instructions to fill out other package prerequisites. Note that ns-3 emulation features using WSL2 are not tested/supported. 

Johny Why

unread,
Apr 6, 2023, 9:20:33 PM4/6/23
to ns-3-users
Is  MinGW64 toolchain preferable to Linux Subsystem?

Gabriel Ferreira

unread,
Apr 6, 2023, 9:34:15 PM4/6/23
to ns-3-users
It depends on your use case. Generally, it doesn't make much of a difference. 

I prefer MinGW64 because using IDEs and working with WSL is kind of cumbersome. 

Also, there's an overhead between Windows<->WSL filesystem, that you can mitigate by either moving files to the WSL filesystem or work with windows. 

Keeping files in the windows filesystem and reading/modifying them can drastically slow down simulations. 

Gabriel Ferreira

unread,
Apr 6, 2023, 9:44:56 PM4/6/23
to ns-3-users
Just a correction.

Keeping files in the windows filesystem and reading/modifying them via WSL can drastically slow down simulations. 

Johny Why

unread,
Apr 7, 2023, 5:45:25 AM4/7/23
to ns-3-users
On Thursday, April 6, 2023 at 3:35:53 PM UTC-7 Tommaso Pecorella wrote:
The "-dev" suffix indicates the development version, i.e., the most up-to-date version, where the maintainers add stuff and fix bugs almost daily.
It's not meant to be used only by developers. Also users willing to use the latest version are encouraged to use it (and keep it updated).

Is there a NON-DEV installation guide? 

Charles Pandian

unread,
Apr 7, 2023, 6:20:55 AM4/7/23
to ns-3-...@googlegroups.com
Under Ubuntu/Debian, it is possible to install and use the readily available binary version of ns-3 library.

image.png
Check this link for the package detail :
https://community.linuxmint.com/software/view/libns3-3v5#

But as far as I know, nobody is really using ns-3 in that way. Because it is not a common software that we see on computers. ns-3 is simulator or a library that can be used to write network simulations.

Installing it is not that much hard thing.
If you are ok with a old version (ns-3-35),  you may simply follow a procedure like this one to install it under WSL2 of Windows 11.

Installing ns-3 and NetAnim Under New Windows 11 Using WSL2 
Even it is possible to install the latest dev version on wsl2 using a "CMake" based installation procedure.

Ns-3 is not like other software that you commonly use on computers. So, installing it and using it will require some preliminary understanding on it.
But before trying to install ns-3 you may need to understand "what is ns-3". The following blog articles may help you to understand it.
Charles Pandian,



--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/30d45334-e098-442a-94c0-21f83a4f30a9n%40googlegroups.com.

Johny Why

unread,
Apr 7, 2023, 6:12:38 PM4/7/23
to ns-3-users
It seems you posted the same article twice. 

The article you posted contains phrases like " am I wrong?" , " Do I miss something here?", and " Please someone explain it."
That doesn't give me confidence.
Reply all
Reply to author
Forward
0 new messages