O'Reilly logo

Cisco IOS Cookbook, 2nd Edition by Ian Brown, Kevin Dooley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required