Skip to content

Commit f9f3f5f

Browse files
committed
Update SONiC docs
Signed-off-by: Matej Feder <[email protected]>
1 parent cb8bfa8 commit f9f3f5f

File tree

11 files changed

+224
-7
lines changed

11 files changed

+224
-7
lines changed
File renamed without changes.

documentation/sonic/SONiC_Testing.md renamed to documentation/sonic/Testing.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,14 @@ outdated and refers to the depreciated SoNiC P4 Software switch image).
7474
```bash
7575
wget https://sonic.software/download-gns3a.sh
7676
chmod +x download-gns3a.sh
77-
./download-gns3a.sh <release number> # 202311
77+
./download-gns3a.sh <release number> # master
7878
```
79-
* The above will download the latest image for the giver release number and create a GNS3 appliance file named e.g. `SONiC-202012-27914.gns3a`
80-
* Note that the 202405 release of SONiC VS image is not working due to [#19399](https://github.com/sonic-net/sonic-buildimage/issues/19399)
81-
* The release 202311 has also some bugs, like [#13317](https://github.com/sonic-net/sonic-buildimage/issues/13317) but works "better" then 202405 (if you can live without sonic-cli)
79+
* The above will download the latest image for the giver release number and create a GNS3 appliance file named e.g. `SONiC-master-656617.gns3a`
80+
* Note that you may observe some issues with the stable SONiC VS builds:
81+
* `202405` release, e.g. [#19399](https://github.com/sonic-net/sonic-buildimage/issues/19399)
82+
* `202311` release, e.g. [#13317](https://github.com/sonic-net/sonic-buildimage/issues/13317)
83+
* Keep in mind that these and other issues may cause some unexpected behaviour of SONiC
8284
* From this point you can follow the instructions provided in https://pine-networks.com/blog/setting-up-sonic-on-gns3/.
83-
* Skip the initial instructions and start with the importing of appliance file you generated above e.g. `SONiC-202012-27914.gns3a`
85+
* Skip the initial instructions and start with the importing of appliance file you generated above e.g. `SONiC-master-656617.gns3a`
8486
* Once you import the SONiC image you can create a new project or open the existing one and start using the SONiC
8587
appliance in GNS3 by dragging the SONiC appliance into the main window of your GNS3 project

documentation/sonic/testbed/gns3-testbed.md renamed to documentation/sonic/testbed/GNS3_bgp_basic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The setup includes three SONiC switches (Spine, Leaf1, Leaf2) with community ima
55

66
The guide also covers a basic BGP L3 underlay configuration using FRR.
77

8-
![sonic-gns3-testbed.png](gns3-testbed.png)
8+
![GNS3_basic.png](images/GNS3_basic.png)
99

1010
## SONiC GNS3 testbed portable project
1111

@@ -74,7 +74,7 @@ To walk through the configuration, follow the steps outlined below.
7474
```
7575
* Save the interfaces configuration by running `config save -y` after making changes
7676
* Configure FRR BGP
77-
* Find the FRR config files `leaf1_frr.conf`, `leaf2_frr.conf`, `spine_frr.conf`, and apply them as follows:
77+
* Find the FRR config files `configs/leaf1_frr.conf`, `configs/leaf2_frr.conf`, `configs/spine_frr.conf`, and apply them as follows:
7878
```bash
7979
sudo cp <sonic-sw>_frr.conf /etc/sonic/frr/frr.conf
8080
sudo chown 300:300 /etc/sonic/frr/frr.conf
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SONiC GNS3 testbed - unified FRR configuration
2+
3+
This tutorial walks you through setting up and configuring a testbed environment in the GNS3 simulation platform.
4+
The setup includes just two SONiC switches (SW1, SW2) with community images and two PCs connected to them.
5+
6+
The guide also covers an unnumbered BGP L3 underlay configuration using unified FRR and BGP unnumbered.
7+
8+
![GNS3_basic.png](images/GNS3_bgp_unified.png)
9+
10+
## Prerequisites
11+
12+
* GNS3
13+
* Select the installer for your favourite OS: https://www.gns3.com/software/download
14+
* SONiC GNS3 appliance
15+
* Follow instructions [here](../general.md#gns3-simulation-environment)
16+
* The tutorial is intended to use SONiC community images. It was tested with community image SONiC master build 656617
17+
18+
## SONiC GNS3 configuration
19+
20+
* Drag and drop the SONiC switches and PCs, and wire them as shown in the architecture diagram
21+
* Remove arbitrary config defaults
22+
* The SONiC community image includes a default configuration that enables various ports and assigns arbitrary IP addresses
23+
to them. Replace this configuration with another default setting that avoids arbitrary configurations.
24+
For this purpose, we can use a predefined config template:
25+
```bash
26+
sudo su -
27+
sonic-cfggen -H --preset l3 -k Force10-S6000 > /etc/sonic/config_db.json
28+
config reload -y
29+
```
30+
* Configure switches
31+
* Find the FRR unified config files `configs/sw1_frr_unified.json`, `configs/sw1_frr_unified.json`, and apply them as follows:
32+
```bash
33+
# copy <sonic-sw>_frr_unified.json file to the switch
34+
sudo config load <sonic-sw>_frr_unified.json -y
35+
docker restart bgp
36+
# if you want to make the config persistent save it to the /etc/sonic.config_db.json
37+
sudo config save -y
38+
```
39+
* Configure PC1 and PC2
40+
* Configure PC's IP address and proper gateway
41+
```text
42+
PC1> ip 192.168.100.100/24 192.168.100.1
43+
PC2> ip 192.168.200.100/24 192.168.200.1
44+
```
45+
46+
## Validate the testbed
47+
48+
* Validate the interfaces' setup
49+
* Connect to, for example, the switch 1 console (the default credential for login is admin/YourPaSsWoRd) and verify
50+
the IPv6 link local mode is enabled for Ethernet4 (due to BGP unnumbered, for details read e.g. [this](https://support.edge-core.com/hc/en-us/articles/900002377366--Enterprise-SONiC-BGP-Unnumbered))
51+
```yaml
52+
$ show ipv6 link-local-mode | grep Enabled
53+
| Ethernet4 | Enabled |
54+
```
55+
* Validate whether you see UP/UP state of connected interfaces via e.g. `$ show int status`
56+
* Explore interfaces configuration via `show runningconfiguration interfaces` or via `sudo cat /etc/sonic/config_db.json`
57+
* Validate the BGP configuration
58+
* Connect to, for example, the Spine switch and verify the routes propagated by the BGP protocol
59+
```bash
60+
$ show ip route
61+
Codes: K - kernel route, C - connected, S - static, R - RIP,
62+
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
63+
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
64+
F - PBR, f - OpenFabric,
65+
> - selected route, * - FIB route, q - queued route, r - rejected route
66+
67+
C>*10.0.0.1/32 is directly connected, Loopback0, 03:02:15
68+
B>*10.0.0.2/32 [20/0] via fe80::2047:61ff:feb2:b715, Ethernet4, 03:01:59
69+
C>*10.1.0.1/32 is directly connected, Loopback0, 03:02:15
70+
C>*192.168.100.0/24 is directly connected, Ethernet8, 03:02:15
71+
B>*192.168.200.0/24 [20/0] via fe80::2047:61ff:feb2:b715, Ethernet4, 03:01:59
72+
```
73+
* Explore BGP configuration via `show runningconfiguration bgp`
74+
* Open console of the PC1 or PC2 and try to `ping` the whole infrastructure
75+
* SONiC switches should be reachable e.g. via its Loopback IPs and PC1 via 192.168.100.100 and PC2 via IP 192.168.200.100
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"DEVICE_METADATA": {
3+
"localhost": {
4+
"docker_routing_config_mode": "unified",
5+
"frr_mgmt_framework_config": "true",
6+
"hostname": "sw1",
7+
"mac": "0c:2e:02:80:00:01"
8+
}
9+
},
10+
"INTERFACE": {
11+
"Ethernet4": {
12+
"ipv6_use_link_local_only": "enable"
13+
},
14+
"Ethernet8": {},
15+
"Ethernet8|192.168.100.1/24": {}
16+
},
17+
"LOOPBACK_INTERFACE": {
18+
"Loopback0": {},
19+
"Loopback0|10.0.0.1/32": {},
20+
"Loopback0|fd0c:cc24:75a0:1::1/128": {}
21+
},
22+
"BGP_GLOBALS": {
23+
"default": {
24+
"local_asn": "65001",
25+
"log_nbr_state_changes": "true",
26+
"router_id": "10.0.0.1"
27+
}
28+
},
29+
"BGP_PEER_GROUP": {
30+
"default|core": {
31+
"peer_group_name": "core",
32+
"admin_status": "true",
33+
"asn": "external",
34+
"peer_type": "external"
35+
}
36+
},
37+
"BGP_NEIGHBOR": {
38+
"default|Ethernet4": {
39+
"peer_group_name": "core"
40+
}
41+
},
42+
"BGP_NEIGHBOR_AF": {
43+
"default|core|ipv4_unicast": {
44+
"admin_status": "true",
45+
"route_map_in": [
46+
"ALLOW"
47+
],
48+
"route_map_out": [
49+
"ALLOW"
50+
]
51+
},
52+
"default|core|ipv6_unicast": {
53+
"admin_status": "true",
54+
"route_map_in": [
55+
"ALLOW"
56+
],
57+
"route_map_out": [
58+
"ALLOW"
59+
]
60+
}
61+
},
62+
"ROUTE_MAP": {
63+
"ALLOW|1": {
64+
"route_operation": "permit"
65+
}
66+
},
67+
"ROUTE_REDISTRIBUTE": {
68+
"default|connected|bgp|ipv4": {}
69+
}
70+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"DEVICE_METADATA": {
3+
"localhost": {
4+
"docker_routing_config_mode": "unified",
5+
"frr_mgmt_framework_config": "true",
6+
"hostname": "sw2",
7+
"mac": "0c:2e:02:80:00:02"
8+
}
9+
},
10+
"INTERFACE": {
11+
"Ethernet4": {
12+
"ipv6_use_link_local_only": "enable"
13+
},
14+
"Ethernet8": {},
15+
"Ethernet8|192.168.200.1/24": {}
16+
},
17+
"LOOPBACK_INTERFACE": {
18+
"Loopback0": {},
19+
"Loopback0|10.0.0.2/32": {},
20+
"Loopback0|fd0c:cc24:75a0:1::2/128": {}
21+
},
22+
"BGP_GLOBALS": {
23+
"default": {
24+
"local_asn": "65002",
25+
"log_nbr_state_changes": "true",
26+
"router_id": "10.0.0.2"
27+
}
28+
},
29+
"BGP_PEER_GROUP": {
30+
"default|core": {
31+
"peer_group_name": "core",
32+
"admin_status": "true",
33+
"asn": "external",
34+
"peer_type": "external"
35+
}
36+
},
37+
"BGP_NEIGHBOR": {
38+
"default|Ethernet4": {
39+
"peer_group_name": "core"
40+
}
41+
},
42+
"BGP_NEIGHBOR_AF": {
43+
"default|core|ipv4_unicast": {
44+
"admin_status": "true",
45+
"route_map_in": [
46+
"ALLOW"
47+
],
48+
"route_map_out": [
49+
"ALLOW"
50+
]
51+
},
52+
"default|core|ipv6_unicast": {
53+
"admin_status": "true",
54+
"route_map_in": [
55+
"ALLOW"
56+
],
57+
"route_map_out": [
58+
"ALLOW"
59+
]
60+
}
61+
},
62+
"ROUTE_MAP": {
63+
"ALLOW|1": {
64+
"route_operation": "permit"
65+
}
66+
},
67+
"ROUTE_REDISTRIBUTE": {
68+
"default|connected|bgp|ipv4": {}
69+
}
70+
}
Loading

0 commit comments

Comments
 (0)