This is a screenshot from a Cisco book. It says that 2 VLANs can be bridged using some L2 device also. As far as I know it is possible only by using some L3 device. Can someone please explain it how 2 VLANs can be bridged using a L2 device?
A bridge / L2 device forwards frames based on the destination MAC address. Most often this is a common switch. If you bridge two VLANs they become a single L2 broadcast domain. Normally you wouldn't want that.
A router / L3 device forwards packets based on the destination IP address. If you use it to connect two VLANs they can communicate across the router (on L3/IP) but stay separate L2 broadcast domains.
Yes, bridging VLANs into a single broadcast domain (allowing them to be on the same IP subnet) is a fairly simple matter. And it does not necessarily require an external switch.
I would not recommend bridged VLANs as a permanent/production solution, But it can be quite useful in transitional evolutions; consolidation of subnets for instance. I use it during deployment of new sites to bridge an upstream management VLAN to the local one.
Here is an example configuration using a Cisco SG220-26 switch:
sg220-oi#sho run interfaces GigabitEthernet 2,3,25 interface gi2 switchport mode access switchport access vlan 262 spanning-tree bpdufilter enable description "Vlan262-256bridge" no cdp enable no cdp log mismatch native ! interface gi3 switchport mode access switchport access vlan 256 spanning-tree bpdufilter enable description "Vlan262-256bridge" no cdp enable no cdp log mismatch native ! interface gi25 switchport trunk allowed vlan add 2,260,262 description "Uplink (vlan2/outside)" !
External management VLAN 262 is "trunked" to the switch on port 25
VLAN 262 is then bridged to the local management VLAN 256 using access ports 2 & 3.
You must disable spanning-tree on the two ports you will bridge (bpdufilter enable) or the switch may perceive a loop with undesirable results.
Also, if present, you should disable cisco discovery protocol/mismatch logging to keep from flooding your switches logs with VLAN mismatch errors.
Once configured, simply patch the two access ports together with a CAT6 patch cable - no external switch required.
Hope someone finds this useful.