Query regarding implementation of Switch

21 views
Skip to first unread message

Dayma Khan

unread,
May 4, 2022, 11:24:19 PM5/4/22
to NeST users
Hi team,

While working with network namespaces in Linux kernal we create a switch by simply using the following command 'ip link <switch-name> type bridge'. However in NeST a switch is wrapped inside a namespace as shown in the attached screenshot. 

Can you please let me know the reason why we place a switch inside a node/namespace?

Regards,
Dayma Khan
Switch.png

Shanthanu Rai

unread,
May 4, 2022, 11:56:54 PM5/4/22
to Dayma Khan, NeST users
Hey Dayma, we moved switch inside the namespace because it had a good API design with relatively easy implementation. Inheriting Switch from Node class made Switch class work well with several existing APIs in NeST without a lot of changes (like connect, and Interface class). Also, we didn't want to create the bridge device in the default namespace, as it might conflict with existing interfaces in the user's default namespace.

--
You received this message because you are subscribed to the Google Groups "NeST users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nest-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nest-users/d92c5779-dab3-4af2-bf00-e4a436818880n%40googlegroups.com.


--
Regards,
Shanthanu S Rai

Dayma Khan

unread,
May 5, 2022, 3:53:25 AM5/5/22
to NeST users
Thanks for the explanation. 

Currently I am working on an open issue in NeST for which I need to design an API for assigning an IP address to the switch.  

So the issue is that instead of assigning one IP address to the switch, the address helper class assigns an IP address to each of the interface connected to the switch. The reason is that the switch is inherited from the Node class so it shows a behavior similar to namespace. 

Can you please elaborate what are the conflicts that might arise(with the existing interfaces) if we create the switch in the default namespace?

Thanks and Regards,
Dayma
Reply all
Reply to author
Forward
0 new messages