generated from just-the-docs/just-the-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): Open Shortest Path First Version 3
Signed-off-by: Royal Simpson Pinto <[email protected]>
- Loading branch information
1 parent
d843e54
commit 121cc39
Showing
3 changed files
with
310 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,309 @@ | ||
--- | ||
title: Open Shortest Path First Version 3 | ||
grand_parent: Network Configuration | ||
parent: Routing and Forwarding | ||
nav_order: 4 | ||
layout: default | ||
--- | ||
|
||
# Open Shortest Path First Version 3 (OSPFv3) | ||
|
||
OSPFv3 is an interior gateway protocol (IGP) used for routing IPv6 packets within a single routing domain. It's an enhanced version of OSPFv2 specifically designed to support IPv6 networks. For more information, please refer- [OSPFv3](https://datatracker.ietf.org/doc/html/rfc5340). | ||
|
||
This document provides detailed instructions for installing and configuring OSPFv3 on DENT devices using FRR (Free Range Routing). | ||
|
||
## Installation of FRR | ||
|
||
To install FRR (Free Range Routing) with OSPF support on DENT Devices, follow the steps below: | ||
|
||
### Installation using APT: | ||
|
||
``` | ||
curl -s https://deb.frrouting.org/frr/keys.gpg | sudo tee /usr/share/keyrings/frrouting.gpg > /dev/null | ||
FRRVER="frr-stable" | ||
echo deb '[signed-by=/usr/share/keyrings/frrouting.gpg]' https://deb.frrouting.org/frr \ | ||
$(lsb_release -s -c) $FRRVER | sudo tee -a /etc/apt/sources.list.d/frr.list | ||
sudo apt update && sudo apt install frr frr-pythontools | ||
``` | ||
|
||
Note: Ensure that `apt-transport-https` and `curl` are installed before proceeding with the installation. | ||
|
||
### Installation using Snapcraft (Alternative Method): | ||
|
||
``` | ||
sudo apt update | ||
sudo apt install snapd | ||
sudo snap install core | ||
sudo snap install frr | ||
``` | ||
|
||
### Start and Enable FRR Service: | ||
|
||
``` | ||
sudo systemctl start frr | ||
sudo systemctl enable frr | ||
``` | ||
|
||
Output- | ||
|
||
``` | ||
Synchronizing state of frr.service with SysV service script with /lib/systemd/systemd-sysv-install. | ||
Executing: /lib/systemd/systemd-sysv-install enable frr | ||
``` | ||
|
||
## Example Configuration | ||
|
||
### Enable OSPF6d: | ||
|
||
Edit the FRR daemon configuration file on both the devices: | ||
|
||
``` | ||
sudo nano /etc/frr/daemons | ||
``` | ||
|
||
Ensure the following configuration: | ||
|
||
``` | ||
zebra=yes | ||
bgpd=no | ||
ospfd=no | ||
ospf6d=yes | ||
ripd=no | ||
ripngd=no | ||
``` | ||
|
||
<p align="center"> | ||
<img src="../../Images/ImagesForNetworkConfiguration/OSPFv3.png" alt="OSPFv3"> | ||
</p> | ||
|
||
### Assign IP Addresses: | ||
|
||
On Device 1 (dent3.2-1): | ||
|
||
``` | ||
ip -6 addr add 2001:db8:1::1/64 dev enp0s4 | ||
ip link set enp0s4 up | ||
``` | ||
|
||
On Device 2 (dent3.2-2): | ||
|
||
``` | ||
ip -6 addr add 2001:db8:1::2/64 dev enp0s4 | ||
ip link set enp0s4 up | ||
``` | ||
|
||
Ensure IPv6 forwarding is enabled on each device (`sysctl -w net.ipv6.conf.all.forwarding=1`). | ||
|
||
### Configure OSPF6: | ||
|
||
Edit the FRR configuration file on both the devices: | ||
|
||
``` | ||
sudo nano /etc/frr/frr.conf | ||
``` | ||
|
||
Add the following configuration to the file: | ||
|
||
``` | ||
! Enable OSPF6 routing process | ||
router ospf6 | ||
! Configure OSPF on the enp0s4 interface | ||
ospf6 router-id 1.1.1.1 | ||
interface enp0s4 area 0.0.0.0 | ||
``` | ||
|
||
**Note:** The configuration may vary depending on user requirements. | ||
|
||
### Restart FRR: | ||
|
||
``` | ||
sudo systemctl restart frr | ||
``` | ||
|
||
### Interacting with OSPF: | ||
|
||
To access the interactive OSPF shell: | ||
|
||
``` | ||
sudo vtysh | ||
``` | ||
|
||
Output- | ||
|
||
``` | ||
Hello, this is FRRouting (version 8.5). | ||
Copyright 1996-2005 Kunihiro Ishiguro, et al. | ||
``` | ||
|
||
After accessing the `vtysh` shell, you can execute OSPF-specific commands such as `show ip ospf6`, `show ipv6 route ospf`, `show ipv6 ospf6 neighbor`, and `show ipv6 ospf6 interface` to inspect OSPF configurations and neighbor relationships. | ||
|
||
- `show ip ospf6`: Displays OSPFv3 routing information, including OSPFv3 process details, areas, and neighbors. | ||
- `show ipv6 route ospf`: Shows IPv6 routes learned via OSPFv3, including network prefixes and next-hop information. | ||
- `show ipv6 ospf6 neighbor`: Provides information about OSPFv3 neighbors, including their IPv6 addresses, states, and interface details. | ||
- `show ipv6 ospf6 interface`: Displays OSPFv3 interface configuration and status, including IPv6 addresses, area assignments, and interface states. | ||
|
||
For more information on these and other available commands, please refer to [OSPFv3 FRR](https://docs.frrouting.org/en/latest/ospf6d.html). | ||
|
||
**Device 1 (dent3.2-1) Output:** | ||
|
||
``` | ||
localhost# show ip ospf6 | ||
OSPFv3 Routing Process (0) with Router-ID 1.1.1.1 | ||
Running 00:03:40 | ||
LSA minimum arrival 1000 msecs | ||
Maximum-paths 256 | ||
Administrative distance 110 | ||
Initial SPF scheduling delay 0 millisec(s) | ||
Minimum hold time between consecutive SPFs 50 millsecond(s) | ||
Maximum hold time between consecutive SPFs 5000 millsecond(s) | ||
Hold time multiplier is currently 1 | ||
SPF algorithm last executed 00:02:50 ago, reason R+, R- | ||
Last SPF duration 0 sec 52 usec | ||
SPF timer is inactive | ||
Number of AS scoped LSAs is 0 | ||
Number of areas in this router is 1 | ||
Authentication Sequence number info | ||
Higher sequence no 0, Lower sequence no 0 | ||
Area 0.0.0.0 | ||
Number of Area scoped LSAs is 4 | ||
Interface attached to this area: enp0s4 | ||
SPF last executed 170.617259s ago | ||
``` | ||
|
||
``` | ||
localhost# show ipv6 route ospf | ||
Codes: K - kernel route, C - connected, S - static, R - RIPng, | ||
O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table, | ||
v - VNC, V - VNC-Direct, A - Babel, F - PBR, | ||
f - OpenFabric, | ||
> - selected route, * - FIB route, q - queued, r - rejected, b - backup | ||
t - trapped, o - offload failure | ||
O 2001:db8:1::/64 [110/100] is directly connected, enp0s4, weight 1, 00:00:02 | ||
``` | ||
|
||
``` | ||
localhost# show ipv6 ospf6 neighbor | ||
Neighbor ID Pri DeadTime State/IfState Duration I/F[State] | ||
2.2.2.2 1 00:00:36 Full/DR 00:04:22 enp0s4[BDR] | ||
``` | ||
|
||
``` | ||
localhost# show ipv6 ospf6 interface | ||
enp0s4 is up, type BROADCAST | ||
Interface ID: 3 | ||
Internet Address: | ||
inet6: 2001:db8:1::1/64 | ||
inet6: fe80::e9d:13ff:fe80:1/64 | ||
Instance ID 0, Interface MTU 1500 (autodetect: 1500) | ||
MTU mismatch detection: enabled | ||
Area ID 0.0.0.0, Cost 100 | ||
State BDR, Transmit Delay 1 sec, Priority 1 | ||
Timer intervals configured: | ||
Hello 10(7.650), Dead 40, Retransmit 5 | ||
DR: 2.2.2.2 BDR: 1.1.1.1 | ||
Number of I/F scoped LSAs is 2 | ||
0 Pending LSAs for LSUpdate in Time 00:00:00 [thread off] | ||
0 Pending LSAs for LSAck in Time 00:00:00 [thread off] | ||
Authentication Trailer is disabled | ||
``` | ||
|
||
**Device 2 (dent3.2-2) Output:** | ||
|
||
``` | ||
localhost# show ip ospf6 | ||
OSPFv3 Routing Process (0) with Router-ID 2.2.2.2 | ||
Running 00:03:53 | ||
LSA minimum arrival 1000 msecs | ||
Maximum-paths 256 | ||
Administrative distance 110 | ||
Initial SPF scheduling delay 0 millisec(s) | ||
Minimum hold time between consecutive SPFs 50 millsecond(s) | ||
Maximum hold time between consecutive SPFs 5000 millsecond(s) | ||
Hold time multiplier is currently 1 | ||
SPF algorithm last executed 00:03:07 ago, reason R+, R- | ||
Last SPF duration 0 sec 52 usec | ||
SPF timer is inactive | ||
Number of AS scoped LSAs is 0 | ||
Number of areas in this router is 1 | ||
Authentication Sequence number info | ||
Higher sequence no 0, Lower sequence no 0 | ||
Area 0.0.0.0 | ||
Number of Area scoped LSAs is 4 | ||
Interface attached to this area: enp0s4 | ||
SPF last executed 187.89996s ago | ||
``` | ||
|
||
``` | ||
localhost# show ipv6 route ospf | ||
Codes: K - kernel route, C - connected, S - static, R - RIPng, | ||
O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table, | ||
v - VNC, V - VNC-Direct, A - Babel, F - PBR, | ||
f - OpenFabric, | ||
> - selected route, * - FIB route, q - queued, r - rejected, b - backup | ||
t - trapped, o - offload failure | ||
O 2001:db8:1::/64 [110/100] is directly connected, enp0s4, weight 1, 00:00:07 | ||
``` | ||
|
||
``` | ||
localhost# show ipv6 ospf6 neighbor | ||
Neighbor ID Pri DeadTime State/IfState Duration I/F[State] | ||
1.1.1.1 1 00:00:35 Full/BDR 00:05:39 enp0s4[DR] | ||
``` | ||
|
||
``` | ||
localhost# show ipv6 ospf6 interface | ||
enp0s4 is up, type BROADCAST | ||
Interface ID: 3 | ||
Internet Address: | ||
inet6: 2001:db8:1::2/64 | ||
inet6: fe80::ed5:1fff:fede:1/64 | ||
Instance ID 0, Interface MTU 1500 (autodetect: 1500) | ||
MTU mismatch detection: enabled | ||
Area ID 0.0.0.0, Cost 100 | ||
State DR, Transmit Delay 1 sec, Priority 1 | ||
Timer intervals configured: | ||
Hello 10(2.807), Dead 40, Retransmit 5 | ||
DR: 2.2.2.2 BDR: 1.1.1.1 | ||
Number of I/F scoped LSAs is 2 | ||
0 Pending LSAs for LSUpdate in Time 00:00:00 [thread off] | ||
0 Pending LSAs for LSAck in Time 00:00:00 [thread off] | ||
Authentication Trailer is disabled | ||
``` | ||
|
||
**Connectivity Verification:** | ||
|
||
``` | ||
dent3.2-1# ping 2001:db8:1::2 | ||
PING 2001:db8:1::2(2001:db8:1::2) 56 data bytes | ||
64 bytes from 2001:db8:1::2: icmp_seq=1 ttl=64 time=7.20 ms | ||
64 bytes from 2001:db8:1::2: icmp_seq=2 ttl=64 time=1.60 ms | ||
64 bytes from 2001:db8:1::2: icmp_seq=3 ttl=64 time=1.60 ms | ||
64 bytes from 2001:db8:1::2: icmp_seq=4 ttl=64 time=7.03 ms | ||
``` | ||
|
||
``` | ||
dent3.2-2# ping 2001:db8:1::1 | ||
PING 2001:db8:1::1(2001:db8:1::1) 56 data bytes | ||
64 bytes from 2001:db8:1::1: icmp_seq=1 ttl=64 time=2.62 ms | ||
64 bytes from 2001:db8:1::1: icmp_seq=2 ttl=64 time=6.10 ms | ||
64 bytes from 2001:db8:1::1: icmp_seq=3 ttl=64 time=4.90 ms | ||
64 bytes from 2001:db8:1::1: icmp_seq=4 ttl=64 time=1.33 ms | ||
``` | ||
|
||
By following these steps, you will have successfully installed and configured OSPFv3 on your DENT devices using FRR. This setup ensures efficient and scalable routing within your network. Adjust configurations as needed based on specific requirements. For further customization, refer to [OSPFv3 FRR](https://docs.frrouting.org/en/latest/ospf6d.html) documentation. |