Skip to content

IS-IS Graceful Support #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open

IS-IS Graceful Support #423

wants to merge 33 commits into from

Conversation

SuryyaKrJana
Copy link
Contributor

@SuryyaKrJana SuryyaKrJana commented Apr 21, 2025

IS-IS Graceful Restart Support

Example Test configuration and Graceful Restart Trigger on IS-IS router on Port-1 and whereas IS-IS Router is configured as Restarter Helper:

// Config Creation
func IsisGRConfig(client *api.ApiClient) gosnappi.Config {
	config := gosnappi.NewConfig()
	port1 := config.Ports().Add().SetName("port1").SetLocation(opts.IxiaCPorts()[0])
	port2 := config.Ports().Add().SetName("port2").SetLocation(opts.IxiaCPorts()[1])

	// port 1 device 1
	p1d1 := config.Devices().Add().SetName("p1d1")
	// port 1 device 1 ethernet
	p1d1Eth := p1d1.Ethernets().Add().
		SetName("p1d1Eth").
		SetMac("00:00:01:01:01:01").
		SetMtu(1500)
	p1d1Eth.Connection().SetPortName(port1.Name())

	// port 1 device 1 ipv4
	p1d1Ipv4 := p1d1Eth.Ipv4Addresses().
		Add().
		SetAddress("1.1.1.2").
		SetGateway("1.1.1.1").
		SetName("p1d1Ipv4").
		SetPrefix(24)

	// port 1 device 1 isis
	p1d1Isis := p1d1.Isis().SetName("p1d1Isis").SetSystemId("640000000001")

	// port 1 device 1 isis basic
	p1d1Isis.Basic().SetIpv4TeRouterId(p1d1Ipv4.Address())
	p1d1Isis.Basic().SetHostname("ixia-c-port1")
	p1d1Isis.Basic().SetLearnedLspFilter(true)

	// port 1 device 1 isis advance
	p1d1Isis.Advanced().SetAreaAddresses([]string{"490001"})
	p1d1Isis.Advanced().SetEnableAttachedBit(false)

	// Enable Graceful restarting mode only on IS-IS Router on Port1.
	p1d1Isis.GracefulRestart().SetHelperMode(false)

	// port 1 device 1 isis interface
	p1d1IsisIntf := p1d1Isis.Interfaces().Add().
		SetEthName(p1d1Eth.Name()).
		SetNetworkType("point_to_point").
		SetLevelType(gosnappi.IsisInterfaceLevelType.LEVEL_2).
		SetMetric(10).
		SetName("p1d1IsisIntf")

	// l2 settings
	p1d1IsisIntf.L2Settings().
		SetDeadInterval(30).
		SetHelloInterval(10).
		SetPriority(0)
	p1d1IsisIntf.
		Advanced().SetAutoAdjustSupportedProtocols(true)

	// port 1 device 1 isis v4 routes
	p1d1Isisv4routes := p1d1Isis.
		V4Routes().
		Add().
		SetName("p1d1IsisIpv4").
		SetLinkMetric(10).
		SetOriginType(gosnappi.IsisV4RouteRangeOriginType.INTERNAL)
	p1d1Isisv4routes.Addresses().Add().
		SetAddress("10.10.10.1").
		SetPrefix(32).
		SetCount(1).
		SetStep(1)

	// port 2 device 1
	p2d1 := config.Devices().Add().SetName("p2d1")
	// port 2 device 1 ethernet
	p2d1Eth := p2d1.Ethernets().Add().
		SetName("p2d1Eth").
		SetMac("00:00:02:03:03:03").
		SetMtu(1500)
	p2d1Eth.Connection().SetPortName(port2.Name())

	// port 2 device 1 ipv4
	p2d1Ipv4 := p2d1Eth.Ipv4Addresses().
		Add().
		SetAddress("2.2.1.2").
		SetGateway("2.2.1.1").
		SetName("p2d1Ipv4").
		SetPrefix(24)

	// port 2 device 1 isis
	p2d1Isis := p2d1.Isis().SetName("p2d1Isis").SetSystemId("650000000001")

	// port 2 device 1 isis basic
	p2d1Isis.Basic().SetIpv4TeRouterId(p2d1Ipv4.Address())
	p2d1Isis.Basic().SetHostname("ixia-c-port2")
	p2d1Isis.Basic().SetLearnedLspFilter(true)

	// port 2 device 1 isis advance
	p2d1Isis.Advanced().SetAreaAddresses([]string{"490001"})
	p2d1Isis.Advanced().SetEnableAttachedBit(false)

	// Enable Graceful restart & helper mode on IS-IS Router on Port2.
	p1d1Isis.GracefulRestart().SetHelperMode(true)

	// port 2 device 1 isis interface
	p2d1IsisIntf := p2d1Isis.Interfaces().Add().
		SetEthName(p2d1Eth.Name()).
		SetNetworkType("point_to_point").
		SetLevelType(gosnappi.IsisInterfaceLevelType.LEVEL_2).
		SetMetric(10).
		SetName("p2d1IsisIntf")

	//l2 Settings
	p2d1IsisIntf.L2Settings().
		SetDeadInterval(30).
		SetHelloInterval(10).
		SetPriority(0)
	p2d1IsisIntf.
		Advanced().SetAutoAdjustSupportedProtocols(true)

	// port 2 device 1 isis v4 routes
	p2d1Isisv4routes := p2d1Isis.
		V4Routes().
		Add().
		SetName("p2d1IsisIpv4").
		SetLinkMetric(10).
		SetOriginType(gosnappi.IsisV4RouteRangeOriginType.INTERNAL)
	p2d1Isisv4routes.Addresses().Add().
		SetAddress("20.20.20.1").
		SetPrefix(32).
		SetCount(1).
		SetStep(1)

	// P1 ---> P2
	f1 := config.Flows().Add().SetName("f1:p1->p2")
	f1.Metrics().SetEnable(true)
	f1.Size().SetFixed(300)
	f1.Rate().SetPps(100)
	f1.Duration().FixedPackets().SetPackets(1000)
	f1.
		TxRx().Device().
		SetTxNames([]string{p1d1Isisv4routes.Name()}).
		SetRxNames([]string{p2d1Isisv4routes.Name()})

	f1Eth := f1.Packet().Add().Ethernet()
	f1Eth.Src().SetValue(p1d1Eth.Mac())
	f1Eth.Dst().Auto()

	f1Ip := f1.Packet().Add().Ipv4()
	f1Ip.Src().SetValue("10.10.10.1")
	f1Ip.Dst().SetValue("20.20.20.1")

	// // P2 ---> P1
	f2 := config.Flows().Add().SetName("f2:p2->p1")
	f2.Metrics().SetEnable(true)
	f2.Size().SetFixed(300)
	f2.Rate().SetPps(100)
	f2.Duration().FixedPackets().SetPackets(1000)
	f2.
		TxRx().Device().
		SetTxNames([]string{p2d1Isisv4routes.Name()}).
		SetRxNames([]string{p1d1Isisv4routes.Name()})

	f2Eth := f2.Packet().Add().Ethernet()
	f2Eth.Src().SetValue(p2d1Eth.Mac())
	f2Eth.Dst().Auto()

	f2Ip := f2.Packet().Add().Ipv4()
	f2Ip.Src().SetValue("20.20.20.1")
	f2Ip.Dst().SetValue("10.10.10.1")

	return config
}

// Go test function showing Graceful Restart Trigger
func TestPdpIsisGR(t *testing.T) {
	
        .................................................
       ...................................................
	grAction := gosnappi.NewControlAction()
	isisRestart := grAction.Protocol().Isis().InitiateRestart()
	routerName := []string{"p1d1Isis"}
	isisRestart.SetRouterNames(routerName)
	unplanned := isisRestart.Unplanned()
	unplanned.SetHoldingTime(30)
	unplanned.SetRestartAfter(20)

	if _, err := client.Api().SetControlAction(grAction); err != nil {
		t.Fatal(err)
	}
       .................................................
       ...................................................
}

@SuryyaKrJana SuryyaKrJana self-assigned this Apr 22, 2025
@SuryyaKrJana SuryyaKrJana added the enhancement New feature or request label Apr 22, 2025
Copy link
Contributor

@apratimmukherjee apratimmukherjee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general , looks as per last discussion.
Some more clarifications esp. in descriptions might be needed.

x-field-uid: 3
last_lsdb_syncup_time:
description: >-
The time is taken to sync up the LSDB.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to specify that this means and unit of time. e.g might be time taken from adjacency being declared to be in Up state till all LSPs or CSNPs have been acknowledged ? Not sure , what is the exact thing an implementation will be measuring here is needed for clarity in the description. Otherwise not clear on what needs to be done for publishing this information.

unplanned:
$ref: "#/components/schemas/Isis.Action.Protocol.Isis.UnplannedRestart"
x-field-uid: 3
supress_adjacency:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suppress

$ref: "#/components/schemas/Isis.Action.Protocol.Isis.UnplannedRestart"
x-field-uid: 3
supress_adjacency:
$ref: "#/components/schemas/Isis.Action.Protocol.Isis.SupressAdjacency"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suppress

x-field-uid: 1
restart_after:
description: >-
Time (in seconds) after which the actually restart will be initiated in IIH with Restart Tlv having RR bit set.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should result in IIH to be Txed indicating restart is Completed , not started i.e. RR bit is cleared and hold_timer is reset to normal.

Initiates IS-IS Unplanned Graceful Restart process for the selected IS-IS routers.
If no name is specified then Graceful Restart will be sent to all configured IS-IS routers.
When an emulated IS-IS router is in the unplanned "Restarting" mode,
it sends to the neighbor router (DUT) an IIH containing a Restart TLV with the RR (Restart Request) bit set.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sit and hold_time updated to as specified by user to indicate the maximum time within which this router or routers will complete the graceful restart.

Container of the configuration for the initiation of IS-IS Graceful Restart.
Timers T1 and T2 are used both by a restarting router and a starting router. Timer T3 is used only by a restarting router.
- Timer T1 is maintained per interface and indicates the time after which an unacknowledged (re)start attempt will be repeated. Its value is 3 seconds.
- Timer T2 is maintained for each LSP database (LSPDB) for Level 1 and Level 2. Default value is 60 seconds.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LSPDB -> LSDB

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this expired, what should the impl. do ?

description: >-
This object contains the status of the last attempted Graceful Restart status of this router.
type: object
properties:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

choice:
pass
pass.l1sync ( 0 or value = CSNP + LSP done )
.l2sync
. adj_bringup_time
fail
. reason ( sync ... no adj)
not_applicable ( GR trigger not given or GR is still in progress )

l1_lsdb_syncup_time:
description: >-
The actual value of T2 timer (in second) is taken to synchronize the L1 LSDB by this Restarting router.
By this time, router deletes the T1 timers on all the interfaces and the CSNP list is cleared and all LSPs are collected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2 and T1 references not needed.

The time (in second) is taken to bring up adjacency by the Restarting Neighbor.
The time is counted by a Helper router when the Restart TLV with RR bit set in a IIH PDU is received
and till it receives the Restart TLV with RR bit unset in a IIH PDU from the Neighbor Router.
type: integer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The time is measured from when the Restart TLV with RR bit set in a IIH PDU is received up to the time when it receives the Restart TLV with RR bit and SA bit unset in a IIH PDU from the Neighbor Router.

properties:
l1_lsdb_syncup_time:
description: >-
The minimum time in second is taken to sync up the L1 LSDB by the Restarting Neighbor.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not as accurate as for local so better to remove these.

x-field-uid: 13
isis_iihs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isis_adjacencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants