Skip to content

Commit

Permalink
Add IPv6 link-local address handling
Browse files Browse the repository at this point in the history
  • Loading branch information
superchild authored and zhangyanzhao committed Jun 14, 2023
1 parent ed64df7 commit 950267e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
Binary file modified doc/sag/images/sag-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions doc/sag/sag-HLD.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ The IP address configured on the VLAN interface is not changed.
The VLAN interface will use static anycast gateway MAC address to replace CPU MAC address if static anycast gateway MAC address is specified and it's enabled on the VLAN interface.
The enable/disable knob on the VLAN interface can let user to determine to use CPU MAC or static anycast gateway MAC address.

In IPv6 link-local address management, the system MAC generated IPv6 link-local to me route is added by RouteOrch in its initialization.
If the MAC address is changed between system and SAG, we need to call RouteOrch's API to delete old MAC gerenated IPv6 link-local to me route and then add new MAC generated IPv6 link-local to me route.
The static anycast gateway on the VLAN interface will be disabled by default.

The following diagram describes the sequence between DBs and modules.
Expand Down Expand Up @@ -131,6 +133,8 @@ Example:
admin@edgecore:~$ sudo config static-anycast-gateway mac_address add 00:11:22:33:44:0f
```

It doesn't allow to change SAG MAC via this command, the SAG MAC needs to be removed first.

**Delete static anycast gateway MAC address**

```
Expand Down
29 changes: 28 additions & 1 deletion doc/sag/sag-flow.wsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ boundary "CLI" as UI
box "Orchagent" #LightGrey
control IntfMgrD
control IntfsOrch
control RouteOrch
control VrfOrch
end box
participant kernel
box "DB" #LightBlue
Expand All @@ -23,13 +25,38 @@ IntfsOrch <-- APPL_DB
IntfsOrch -> ASIC_DB: create router interface and change to SAG MAC address
IntfMgrD -> APPL_DB: config VLAN interface IP
IntfsOrch <-- APPL_DB
IntfsOrch -> ASIC_DB: add IP2ME route and net route
alt VLAN interface in default VRF
IntfsOrch -> RouteOrch: delete system MAC generated IPv6 link-local to me route
RouteOrch -> ASIC_DB: remove route entry
IntfsOrch -> RouteOrch: add SAG MAC generated IPv6 link-local to me route
RouteOrch -> ASIC_DB: add route entry
else VLAN interface in VRF
IntfsOrch -> VrfOrch: delete system MAC generated IPv6 link-local to me route
VrfOrch -> RouteOrch
RouteOrch -> ASIC_DB: remove route entry
IntfsOrch -> VrfOrch: add SAG MAC generated IPv6 link-local to me router
VrfOrch -> RouteOrch
RouteOrch -> ASIC_DB: add route entry
end
group Disable SAG on the VLAN interface
UI -> CONFIG_DB: disable SAG on the VLAN interface
IntfMgrD <-- CONFIG_DB
IntfMgrD -> kernel: change VLAN interface's MAC address to CPU MAC address
IntfMgrD -> APPL_DB: Modify INTF_TABLE entry from SAG MAC address to CPU MAC address
IntfsOrch <-- APPL_DB
IntfsOrch -> ASIC_DB: change router interface's MAC address to CPU MAC address
alt VLAN interface in default VRF
IntfsOrch -> RouteOrch: delete SAG MAC generated IPv6 link-local to me route
RouteOrch -> ASIC_DB: remove route entry
IntfsOrch -> RouteOrch: add system MAC generated IPv6 link-local to me route
RouteOrch -> ASIC_DB: add route entry
else VLAN interface in VRF
IntfsOrch -> VrfOrch: delete SAG MAC generated IPv6 link-local to me route
VrfOrh -> RouteOrch
RouteOrch -> ASIC_DB: remove route entry
IntfsOrch -> VrfOrch: add system MAC generated IPv6 link-local to me route
VrfOrch -> RouteOrch
RouteOrch -> ASIC_DB: add route entry
end
end
@enduml

0 comments on commit 950267e

Please sign in to comment.