-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Matej Feder <matej.feder@dnation.cloud>
- Loading branch information
Showing
11 changed files
with
224 additions
and
7 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# SONiC GNS3 testbed - unified FRR configuration | ||
|
||
This tutorial walks you through setting up and configuring a testbed environment in the GNS3 simulation platform. | ||
The setup includes just two SONiC switches (SW1, SW2) with community images and two PCs connected to them. | ||
|
||
The guide also covers an unnumbered BGP L3 underlay configuration using unified FRR and BGP unnumbered. | ||
|
||
![GNS3_basic.png](images/GNS3_bgp_unified.png) | ||
|
||
## Prerequisites | ||
|
||
* GNS3 | ||
* Select the installer for your favourite OS: https://www.gns3.com/software/download | ||
* SONiC GNS3 appliance | ||
* Follow instructions [here](../general.md#gns3-simulation-environment) | ||
* The tutorial is intended to use SONiC community images. It was tested with community image SONiC master build 656617 | ||
|
||
## SONiC GNS3 configuration | ||
|
||
* Drag and drop the SONiC switches and PCs, and wire them as shown in the architecture diagram | ||
* Remove arbitrary config defaults | ||
* The SONiC community image includes a default configuration that enables various ports and assigns arbitrary IP addresses | ||
to them. Replace this configuration with another default setting that avoids arbitrary configurations. | ||
For this purpose, we can use a predefined config template: | ||
```bash | ||
sudo su - | ||
sonic-cfggen -H --preset l3 -k Force10-S6000 > /etc/sonic/config_db.json | ||
config reload -y | ||
``` | ||
* Configure switches | ||
* Find the FRR unified config files `configs/sw1_frr_unified.json`, `configs/sw1_frr_unified.json`, and apply them as follows: | ||
```bash | ||
# copy <sonic-sw>_frr_unified.json file to the switch | ||
sudo config load <sonic-sw>_frr_unified.json -y | ||
docker restart bgp | ||
# if you want to make the config persistent save it to the /etc/sonic.config_db.json | ||
sudo config save -y | ||
``` | ||
* Configure PC1 and PC2 | ||
* Configure PC's IP address and proper gateway | ||
```text | ||
PC1> ip 192.168.100.100/24 192.168.100.1 | ||
PC2> ip 192.168.200.100/24 192.168.200.1 | ||
``` | ||
## Validate the testbed | ||
* Validate the interfaces' setup | ||
* Connect to, for example, the switch 1 console (the default credential for login is admin/YourPaSsWoRd) and verify | ||
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)) | ||
```yaml | ||
$ show ipv6 link-local-mode | grep Enabled | ||
| Ethernet4 | Enabled | | ||
``` | ||
* Validate whether you see UP/UP state of connected interfaces via e.g. `$ show int status` | ||
* Explore interfaces configuration via `show runningconfiguration interfaces` or via `sudo cat /etc/sonic/config_db.json` | ||
* Validate the BGP configuration | ||
* Connect to, for example, the Spine switch and verify the routes propagated by the BGP protocol | ||
```bash | ||
$ show ip route | ||
Codes: K - kernel route, C - connected, S - static, R - RIP, | ||
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, | ||
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, | ||
F - PBR, f - OpenFabric, | ||
> - selected route, * - FIB route, q - queued route, r - rejected route | ||
C>*10.0.0.1/32 is directly connected, Loopback0, 03:02:15 | ||
B>*10.0.0.2/32 [20/0] via fe80::2047:61ff:feb2:b715, Ethernet4, 03:01:59 | ||
C>*10.1.0.1/32 is directly connected, Loopback0, 03:02:15 | ||
C>*192.168.100.0/24 is directly connected, Ethernet8, 03:02:15 | ||
B>*192.168.200.0/24 [20/0] via fe80::2047:61ff:feb2:b715, Ethernet4, 03:01:59 | ||
``` | ||
* Explore BGP configuration via `show runningconfiguration bgp` | ||
* Open console of the PC1 or PC2 and try to `ping` the whole infrastructure | ||
* 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 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"DEVICE_METADATA": { | ||
"localhost": { | ||
"docker_routing_config_mode": "unified", | ||
"frr_mgmt_framework_config": "true", | ||
"hostname": "sw1", | ||
"mac": "0c:2e:02:80:00:01" | ||
} | ||
}, | ||
"INTERFACE": { | ||
"Ethernet4": { | ||
"ipv6_use_link_local_only": "enable" | ||
}, | ||
"Ethernet8": {}, | ||
"Ethernet8|192.168.100.1/24": {} | ||
}, | ||
"LOOPBACK_INTERFACE": { | ||
"Loopback0": {}, | ||
"Loopback0|10.0.0.1/32": {}, | ||
"Loopback0|fd0c:cc24:75a0:1::1/128": {} | ||
}, | ||
"BGP_GLOBALS": { | ||
"default": { | ||
"local_asn": "65001", | ||
"log_nbr_state_changes": "true", | ||
"router_id": "10.0.0.1" | ||
} | ||
}, | ||
"BGP_PEER_GROUP": { | ||
"default|core": { | ||
"peer_group_name": "core", | ||
"admin_status": "true", | ||
"asn": "external", | ||
"peer_type": "external" | ||
} | ||
}, | ||
"BGP_NEIGHBOR": { | ||
"default|Ethernet4": { | ||
"peer_group_name": "core" | ||
} | ||
}, | ||
"BGP_NEIGHBOR_AF": { | ||
"default|core|ipv4_unicast": { | ||
"admin_status": "true", | ||
"route_map_in": [ | ||
"ALLOW" | ||
], | ||
"route_map_out": [ | ||
"ALLOW" | ||
] | ||
}, | ||
"default|core|ipv6_unicast": { | ||
"admin_status": "true", | ||
"route_map_in": [ | ||
"ALLOW" | ||
], | ||
"route_map_out": [ | ||
"ALLOW" | ||
] | ||
} | ||
}, | ||
"ROUTE_MAP": { | ||
"ALLOW|1": { | ||
"route_operation": "permit" | ||
} | ||
}, | ||
"ROUTE_REDISTRIBUTE": { | ||
"default|connected|bgp|ipv4": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"DEVICE_METADATA": { | ||
"localhost": { | ||
"docker_routing_config_mode": "unified", | ||
"frr_mgmt_framework_config": "true", | ||
"hostname": "sw2", | ||
"mac": "0c:2e:02:80:00:02" | ||
} | ||
}, | ||
"INTERFACE": { | ||
"Ethernet4": { | ||
"ipv6_use_link_local_only": "enable" | ||
}, | ||
"Ethernet8": {}, | ||
"Ethernet8|192.168.200.1/24": {} | ||
}, | ||
"LOOPBACK_INTERFACE": { | ||
"Loopback0": {}, | ||
"Loopback0|10.0.0.2/32": {}, | ||
"Loopback0|fd0c:cc24:75a0:1::2/128": {} | ||
}, | ||
"BGP_GLOBALS": { | ||
"default": { | ||
"local_asn": "65002", | ||
"log_nbr_state_changes": "true", | ||
"router_id": "10.0.0.2" | ||
} | ||
}, | ||
"BGP_PEER_GROUP": { | ||
"default|core": { | ||
"peer_group_name": "core", | ||
"admin_status": "true", | ||
"asn": "external", | ||
"peer_type": "external" | ||
} | ||
}, | ||
"BGP_NEIGHBOR": { | ||
"default|Ethernet4": { | ||
"peer_group_name": "core" | ||
} | ||
}, | ||
"BGP_NEIGHBOR_AF": { | ||
"default|core|ipv4_unicast": { | ||
"admin_status": "true", | ||
"route_map_in": [ | ||
"ALLOW" | ||
], | ||
"route_map_out": [ | ||
"ALLOW" | ||
] | ||
}, | ||
"default|core|ipv6_unicast": { | ||
"admin_status": "true", | ||
"route_map_in": [ | ||
"ALLOW" | ||
], | ||
"route_map_out": [ | ||
"ALLOW" | ||
] | ||
} | ||
}, | ||
"ROUTE_MAP": { | ||
"ALLOW|1": { | ||
"route_operation": "permit" | ||
} | ||
}, | ||
"ROUTE_REDISTRIBUTE": { | ||
"default|connected|bgp|ipv4": {} | ||
} | ||
} |
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.