Skip to content
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

Clone of korels repository #6

Merged
merged 9 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
257 changes: 257 additions & 0 deletions BasicNetworkConfiguration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
---
title: Basic Networking
nav_order: 3
layout: default
---

# Getting Started With Network Configuration

To familiarize yourself with the DENT NOS we designed a
simple tutorial for you. This tutorial will quickly cover interfaces
and how to configure a simple network.


***

## **Interfaces**
A network interface is the point of connection between a computer
and a network. As a system administrator you may want to know the
available network interfaces in your system to manage network
configurations.


### Links
The term Link is another name for a network interface. Once you start your DENT NOS
and login, you may display the available links associated with your machine using
the following command:

```
$ ip link show
...
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ma1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:00 brd ff:ff:ff:ff:ff:ff
3: enp0s4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:01 brd ff:ff:ff:ff:ff:ff
4: enp0s5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:02 brd ff:ff:ff:ff:ff:ff
...
```

Interfaces can be managed using iproute2 or any netlink supported utility.

*Note all the interfaces listed above are ``down``. To utilize a link it must be ``up``.*

You may bring a link ``up``using the following command
``sudo ip link set ${interface name} up``

*Note the output of ``ip link show`` will differ depending on whether
the port is in use.*

Ex.
```
$ ip link set dev enp0s4 up
[ 443.984073] e1000: enp0s4 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[ 443.991676] 8021q: adding VLAN 0 to HW filter on device enp0s4
[ 444.001685] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s4: link becomes ready
$ ip link set dev enp0s5 up
[ 451.350751] 8021q: adding VLAN 0 to HW filter on device enp0s5

```

In the output above notice that the interface ``enp0s4`` was inuse while ``enp0s5`` was not.

Rerunning ``ip link show`` will now depict ``enp0s4`` as ``up``
while ``enp0s5`` will remain unused:

```
$ ip link show
...
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ma1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:00 brd ff:ff:ff:ff:ff:ff
3: enp0s4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:01 brd ff:ff:ff:ff:ff:ff
4: enp0s5: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:02 brd ff:ff:ff:ff:ff:ff
...
```

To disable a link and bringing it back ``down`` use the following command
``sudo ip link set ${interface name} down``

Ex.
```
$ sudo ip link set enp0s4 down
```

### Loopback Interface

The loopback interface `` lo `` is a special type of virtual interface that allows the computer
to communicte with itself.


The two IP addresses associated with the loopback interface
are ``127.0.0.1/8`` for IPv4 and ``::1/128`` for IPV6.

***

## Network Configuraiton

While configuring your network you may need information on device IP addressing
to enable device communication. To show all addresses use the following command:

```
$ ip address show
...
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ma1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 0c:3f:f7:5c:00:00 brd ff:ff:ff:ff:ff:ff
3: enp0s4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0c:3f:f7:5c:00:01 brd ff:ff:ff:ff:ff:ff
...
```

To connect machines add an IP address on an interface of your choice using the following
command:

``` sudo ip address add ${address}/${mask} dev ${interface name}```

For example run the following command in your DENT NOS:

```ip address add 192.0.2.1/24 dev enp0s4```

Rerunning ``ip address show`` will now show that ``enp0s4`` has an ip address linked to it:

```
$ ip address show
...
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ma1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 0c:3f:f7:5c:00:00 brd ff:ff:ff:ff:ff:ff
3: enp0s4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 0c:3f:f7:5c:00:01 brd ff:ff:ff:ff:ff:ff
inet 192.0.2.1/24 scope global enp0s4
valid_lft forever preferred_lft forever

...
```
***
## Simple Configuration Example

Imagine the configuration below. We will be using GNS3 to help illustrate
this example.

![ImageOneOfSimpleConfigurationExample](./Images/ImagesForBasicNetworkConfiguration/DifferentSubNets.png)

Assume PC1 has an IP address of 10.1.1.1/24 and an associated gateway
10.1.1.254/24 PC2 will have an IP address of 10.1.2.1/24 and an associated gateway
10.1.2.254/24 Both PCs are connected to a switch running the DENT NOS.

### Enable Interfaces
The ports which these devices are connected to the switch with will be
represented by the interfaces on the switch. When logged into the switch
use ``ip link show`` to view a list of all available interfaces.


Ex.
```
$ ip link show
...
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ma1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:00 brd ff:ff:ff:ff:ff:ff
3: enp0s4: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:01 brd ff:ff:ff:ff:ff:ff
...
```

*Note by default all interfaces will be down. You must enable all interfaces that are
associated with a port that is in use.*

To enable an interface, use ``ip link set dev ${interface name} up``.

In the diagram above PC1 is connected to the port Ethernet7 which corresponds to the interface ``enp0s11`` of the switch.
PC2 is connected to the port Ethernet0 which corresponds to the interface ``enp0s4`` of the switch.

Run the following commands to bring these interfaces up

``$ ip link set dev enp0s11 up``
``$ ip link set dev enp0s4 up``

Once the interfaces are ``up`` you should see something similar to the following:

```
$ ip link show
...
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ma1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:00 brd ff:ff:ff:ff:ff:ff
3: enp0s4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:01 brd ff:ff:ff:ff:ff:ff
...
10: enp0s11: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 0c:3f:f7:5c:00:08 brd ff:ff:ff:ff:ff:ff
...
```

### Add the Gateway Addresses to the Switch
Next add the gateway addresses to your switch on the appropriate interface.
To add the gateway addresses use the following command
``ip address add ${address}/${mask} dev ${interface name}``.

In the diagram above PC1 is connected to the port Ethernet7 which corresponds to
the interface ``enp0s11`` of the switch. PC1 will also use the gateway address
10.1.1.254/24. On the switch run the following command to add the gateway address
for PC1 to the switch:

```ip address add 10.1.1.254/24 dev enp0s11```


In the diagram above PC2 is connected to the port Ethernet0 which corresponds to
the interface ``enp0s4`` of the switch. PC2 will also use the gateway address
10.1.2.254/24. On the switch run the following command to add the gateway address
for PC2 to the switch:

```ip address add 10.1.2.254/24 dev enp0s4```


You should now be able to ping your PCs to your switch and your switch to your PCs.

*NOTE: Forward packeting must be enabled to ping between the PCs over the switch.*

If forward packeting is enabled on your router you should now also be able to ping between the PCs.


### How to enable Forward Packeting

To enable Packet forwarding check on the router to make sure the value
of the file ``ip_forward`` is "1". To view the contents of the file execute the
following command:

``cat /proc/sys/net/ipv4/ip_forward``

If the file content is "0", packet forwarding is disabled.
To enable packet forwarding the content of the file must be "1".

Use the following command to write overwrite the contents of the file to
the value of '1':

``sudo sh -c 'echo 1 > /proc/sys/net/ipv4/ip_forward' ``

Congratulations!
You should now be able to ping PC1 and PC2 through your router.
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ GEM
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.16.3)
ffi (1.16.3-x64-mingw-ucrt)
forwardable-extended (2.6.0)
google-protobuf (3.25.1-arm64-darwin)
google-protobuf (3.25.1-x64-mingw-ucrt)
google-protobuf (3.25.1-x86_64-linux)
http_parser.rb (0.8.0)
i18n (1.14.1)
Expand Down Expand Up @@ -66,6 +68,8 @@ GEM
safe_yaml (1.0.5)
sass-embedded (1.69.5-arm64-darwin)
google-protobuf (~> 3.23)
sass-embedded (1.69.5-x64-mingw-ucrt)
google-protobuf (~> 3.23)
sass-embedded (1.69.5-x86_64-linux-gnu)
google-protobuf (~> 3.23)
terminal-table (3.0.2)
Expand All @@ -75,6 +79,7 @@ GEM

PLATFORMS
arm64-darwin-23
x64-mingw-ucrt
x86_64-linux

DEPENDENCIES
Expand Down
Binary file added Images/ImageForOutline/ImageForFrontPage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageEightOfLocalUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageEightOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageElevenOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageFiveOfLocalUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageFiveOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageFourOfLocalUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageFourOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageNineOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageOneOfLocalUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageOneOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageSevenOfLocalUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageSevenOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageSixOfLocalUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageSixOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageTenOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageThirteenOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageThreeOfLocalUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageThreeOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageTwelveOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageTwoOfLocalUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/ImagesForGNS3/ImageTwoOfVmUsage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions Install the DENT NOS on GNS3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Install the DENT NOS on GNS3
nav_order: 2
has_children: true
layout: default
---

# Install the DENT NOS on GNS3

**Whether you are intending on using the DENT Network Operating System
in GNS3 with a remote server, a virtual machine or your local machine,
this guide will show you the step-by-step instructions on how
to complete this.**

*Note the installation on a remote server, virtual machine, and your
local machine will be similar.*

93 changes: 93 additions & 0 deletions Install the DENT NOS on GNS3/LocalMachine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: Using your local machine to run the DENT NOS in GNS3
parent: Install the DENT NOS on GNS3
nav_order: 1
layout: default
---

## Using your local machine to run the DENT NOS in GNS3

**DENT NOS, a Linux Foundation project, redefines network operating
systems by leveraging the Linux Kernel and Switchdev. Treating all
infrastructure equally, it simplifies abstractions.**

**This guide explores integrating DENT NOS with GNS3, streamlining the
simulation of disaggregated networks. Uncover the power of DENT NOS
in a virtualized environment with a quick installation walkthrough.
Let’s dive in!**

![ImageOneOfLocalUsage](../Images/ImagesForGNS3/ImageOneOfLocalUsage.png)

### Prerequisites
- [GNS3](https://docs.gns3.com/docs/) installed on your system.

### Installation Steps

### 1. Download DENT NOS Files
Visit the DENT NOS repository on OneDrive to download the required
files:
[DENT NOS Files](https://onedrive.live.com/?authkey=%21AJV2rWTocq%5FG6KI&id=B4D5FD54A1A7D444%2144829&cid=B4D5FD54A1A7D444)

### 2. Uncompress Disk Image
Uncompress the downloaded disk image file.

### 3. Import Appliance to GNS3

![ImageTwoOfLocalUsage](../Images/ImagesForGNS3/ImageTwoOfLocalUsage.png)

1. Open GNS3 and go to `File -> Import Appliance. `
2. Select the GNS3 appliance file _(gns3a file)_ you downloaded
from the OneDrive link.
3. Choose the server on which to run the appliance.

![ImageThreeOfLocalUsage](../Images/ImagesForGNS3/ImageThreeOfLocalUsage.png)

### 4. Choose QEMU Binary
1. Choose the QEMU binary that will be used to run the DENT NOS
appliance.
2. The recommended option is `/bin/qemu-system-x86_64 (v8.0.4).`

![ImageFourOfLocalUsage](../Images/ImagesForGNS3/ImageFourOfLocalUsage.png)

### 5. Import DENT NOS Image
1. Click on the DENT NOS image file and import it.
2. Wait for the upload to finish; this may take some time.

![ImageFiveOfLocaLUsage](../Images/ImagesForGNS3/ImageFiveOfLocalUsage.png)

### 6. Confirm Installation
1. You will be prompted with an installation confirmation.
2. Click “Yes” to confirm the installation.


<p align="center" width="100%">
<img width="50%" src=../Images/ImagesForGNS3/ImageSixOfLocalUsage.png>
</p>

### 7. DENT NOS Installation Complete
Congratulations!
You have successfully installed DENT NOS on GNS3.

### 8. Start Using DENT NOS in GNS3
1. Drag the DENT NOS appliance into the main window of your GNS3 project.
2. Create your network topology, adding DENT NOS appliances as needed.
3. Right-click on each appliance and select “Start” to initiate the simulation.

![ImageSevenOfLocaLUsage](../Images/ImagesForGNS3/ImageSevenOfLocalUsage.png)

### 9. Default Credentials
- DENT login: root
- Password: onl

![ImageEightOfLocaLUsage](../Images/ImagesForGNS3/ImageEightOfLocalUsage.png)

### Conclusion
Congratulations! You’ve seamlessly integrated DENT NOS with GNS3, unlocking the potential for streamlined simulations of disaggregated networks.

As you explore the power of DENT NOS within this virtualized environment, experiment with diverse network configurations and scenarios to enhance your understanding.

**Happy networking!**

For more information on how to set up DENT in GNS3 with a local
machine feel free to contact the author Royal Simpson Pinto at
[email protected]
Loading
Loading