open-switch / opx-docs

OpenSwitch OPX documentation.
https://openswitch.net
123 stars 35 forks source link

switch configuration for bridging or routing by Linux commands #20

Closed jimmymagemtek closed 6 years ago

jimmymagemtek commented 6 years ago

Does Linux commands (like brctl addbr, or ip route) will let the underlying switch silicon perform bridging or routing ? How can OPX help it ?

Thanks.

atanu-mandal commented 6 years ago

Hi @jimmymagemtek , yes,OPX would propagate the information configured through Linux utilities like brctl addbr, ip route to underlying switch silicon. There is few restrictions like bridge (i.e. vlan) has to have one tagged port to be programmed into NPU.

e,g. below configuration will program the NPU with VLAN 100 (e101-001-0 as tagged member)

brctl addbr br100

ip addr flush dev e101-001-0

ip link add link e101-001-0 name e101-001-0.100 type vlan id 100

brctl addif br100 e101-001-0.100

Thanks, -Atanu

q2dg commented 5 years ago

Current configuration guide (http://archive.openswitch.net/docs/3.0.0/openswitch_opx_300_config_guide.pdf) shows the use of ifconfig command. Maybe you could consider its deprecation state. Moreover, you could consider replacing brctl command (which is deprecated, too, at least in Fedora) by bridge command (from iproute suite) Thanks

jeff-yin commented 5 years ago

Opened #25 to track this.