Simple Bridging

Problem

You wish to configure a router to bridge between two interfaces.

Solution

You can configure a router to bridge between two or more interfaces, as follows:

Router1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#bridge 1 protocol ieee
Router1(config)#interface Ethernet0/0
Router1(config-if)#bridge-group 1
Router1(config-if)#exit
Router1(config)#interface Ethernet0/1
Router1(config-if)#bridge-group 1
Router1(config-if)#exit
Router1(config)#end

With Integrated Routing and Bridging (IRB), you can also create a Bridged Virtual Interface (BVI) for the bridge group:

Router1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#bridge 1 protocol ieee
Router1(config)#bridge irb
Router1(config)#interface Ethernet0/0
Router1(config-if)#bridge-group 1
Router1(config-if)#exit
Router1(config)#interface Ethernet0/1
Router1(config-if)#bridge-group 1
Router1(config-if)#exit
Router1(config)#interface BVI1
Router1(config-if)#ip address 10.10.10.1 255.255.255.0
Router1(config-if)#exit
Router1(config)#end

Discussion

In the first example, we just want to configure simple bridging between two interfaces on this router. This example simply bridges all Ethernet traffic between the two interfaces. There are three key commands here. The first is the bridge protocol command:

Router1(config)#bridge 1protocol ieee

In this case, we have associated bridge-group number 1 with the IEEE 802.1D Spanning Tree Protocol ...

Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.