Skip to content

Commit 2d99dbd

Browse files
committed
fix code exec blocks for easy copy paste
1 parent 4e98c91 commit 2d99dbd

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

Diff for: docs/blog/posts/2024/srl-vlans.md

+30-10
Original file line numberDiff line numberDiff line change
@@ -612,13 +612,18 @@ All switch interfaces are configured with the `vlan-tagging` **not enabled**, wh
612612

613613
Let's see how this configuration affects the traffic between the clients by running our pinger script:
614614

615-
```diff
616-
❯ ./ping.sh all
615+
```{.bash .no-select}
616+
sudo ./ping.sh all
617+
```
618+
619+
<div class="embed-result">
620+
```{.diff .no-select .no-copy}
617621
+ Ping to 10.1.0.2 (no tag) was successful.
618622
+ Ping to 10.1.1.2 (single tag VID: 10) was successful.
619623
+ Ping to 10.1.2.2 (single tag VID: 11) was successful.
620624
+ Ping to 10.1.3.2 (double tag outer VID: 12, inner VID: 13) was successful.
621625
```
626+
</div>
622627

623628
Hey, all pings succeeded! And this is because this happened:
624629

@@ -630,7 +635,7 @@ When the parent interface has not enabled `vlan-tagging`, all the incoming frame
630635

631636
Let's now enable `vlan-tagging` on the `ethernet-1/1` interface of both SR Linux switches. To automate the configuration we leverage [gnmic](https://gnmic.openconfig.net) in the CLI mode and run the following command:
632637

633-
```bash
638+
```{.bash .no-select}
634639
./set-iface.sh single-tag
635640
```
636641

@@ -661,13 +666,18 @@ A:srl1# info interface ethernet-1/1
661666

662667
This command enables `vlan-tagging` on the `ethernet-1/1` interface and configures a single-tagged VLAN with ID `10` on the `ethernet-1/1.0` subinterface. Re-run the pinger to see how this affects our setup:
663668

664-
```diff
665-
❯ ./ping.sh all
669+
```{.bash .no-select}
670+
sudo ./ping.sh all
671+
```
672+
673+
<div class="embed-result">
674+
```{.diff .no-select .no-copy}
666675
- Ping to 10.1.0.2 (no tag) failed.
667676
+ Ping to 10.1.1.2 (single tag VID: 10) was successful.
668677
- Ping to 10.1.2.2 (single tag VID: 11) failed.
669678
- Ping to 10.1.3.2 (double tag outer VID: 12, inner VID: 13) failed.
670679
```
680+
</div>
671681

672682
Well, entirely different picture now:
673683

@@ -717,13 +727,18 @@ A:srl1# info interface ethernet-1/1
717727

718728
Running the pinger:
719729

720-
```diff
721-
❯ ./ping.sh all
730+
```{.bash .no-select}
731+
sudo ./ping.sh all
732+
```
733+
734+
<div class="embed-result">
735+
```{.diff .no-select .no-copy}
722736
- Ping to 10.1.0.2 (no tag) failed.
723737
+ Ping to 10.1.1.2 (single tag VID: 10) was successful.
724738
+ Ping to 10.1.2.2 (single tag VID: 11) was successful.
725739
+ Ping to 10.1.3.2 (double tag outer VID: 12, inner VID: 13) was successful.
726740
```
741+
</div>
727742

728743
Let's look at the packet diagram to see what happened:
729744

@@ -738,7 +753,7 @@ But frames without VLAN tags will be dropped, since they don't match the configu
738753
One last for today. Let's configure the `ethernet-1/1` interface of both SR Linux switches with the `untagged` VLAN encapsulation type. This configuration will accept only untagged frames and will drop all the tagged frames. Let's apply this configuration:
739754

740755
```bash
741-
./set-iface.sh untagged
756+
./set-iface.sh untagged
742757
```
743758

744759
///details | Interface configuration
@@ -767,13 +782,18 @@ A:srl1# info interface ethernet-1/1
767782

768783
Running the pinger:
769784

770-
```diff
771-
❯ ./ping.sh all
785+
```{.bash .no-select}
786+
sudo ./ping.sh all
787+
```
788+
789+
<div class="embed-result">
790+
```{.diff .no-select .no-copy}
772791
+ Ping to 10.1.0.2 (no tag) was successful.
773792
- Ping to 10.1.1.2 (single tag VID: 10) failed.
774793
- Ping to 10.1.2.2 (single tag VID: 11) failed.
775794
- Ping to 10.1.3.2 (double tag outer VID: 12, inner VID: 13) failed.
776795
```
796+
</div>
777797

778798
Let's look at the packet diagram to see what happened:
779799

0 commit comments

Comments
 (0)