IP address on swith/bridge

Hello,

Typical switch/bridge operates as L2-layer device, and do not have IP-addresses.

I can use Routerboard interfaces as:

  1. as Network interface with IP address = L3 layer
  2. as Port (switch or bridge) = L2 layer

but, in RouterOS possible set IP-address to switch/bridge!
how is it possible to understand? can you explain?

When you set an IP address on a bridge in RouterOS it becomes an L3 interface towards the routing core.
So you can route traffic into/out of the bridge towards other networks.
Inside the bridge it has no meaning, the bridge itself operates on MAC addresses.

>>When you set an IP address on a bridge in RouterOS it becomes an L3 interface

I can not understand it.
How L2-device acts as L3-device?
switch/bridge have multiple ether interfaces, how one IP address assigned to multiple ether interfaces??

If you’ve ever used a Cisco switch, there is an interface type called a VIF (virtual IP interface) - these are named, e.g. vlan101
So if a switch has vlan 101, and some interfaces are members of vlan101, then devices connected to these interfaces are connected at layer 2 as you state. Any device connected to vlan101 may be configured with an IP address, and talk to other devices in the same broadcast using the IP protocol…
The VIF interface is a way for the switch itself to participate in the layer3 protocol present in that broadcast domain…

This is exactly the same as putting an IP address on the bridge interface in a Mikrotik router.

The bridge forwards ethernet frames between the various ports connected to it - and you are right, this traffic is only treated at layer 2. The bridge interface itself is the Mikrotik’s own port participating in the bridge - think of it like one more port in the switch: ether1, ether2, and cpu
It wouldn’t seem strange to you if you had a (non bridged / non-switched) ethernet interface of a Mikrotik router and configured it with an IP address and then plugged that interface into some switch. The bridge interface is a logical equivalent of this action.

>>The bridge interface itself is the Mikrotik’s own port participating in the bridge

ok, but if the bridge interface is one more interface like ether1, ether2…, why i can add IP address only to bridge interface, and cannot use IP addresses to ether1/2… interfaces?? see http://forum.mikrotik.com/t/how-can-i-add-interface-to-two-bridge/97015/1

Your drawing is incorrect, the bridge exists in the CPU not at the outside border. That would be the switch.

ok, i delete this picture