Best practice to connect 3750 L3 switch and 3825 router running BGP

Unanswered Question
Nov 20th, 2008

3825 running EBGP connects to WAN and IBGP to exchange with 3750.

3750 L3 switch has Four VLANs running iBGP

192.168.1.1 VLAN 1

192.168.2.1 VLAN 2

192.168.3.1 VLAN 3

192.168.4.1 VLAN 4

Should I have 4 sub interfaces on the router for the 4 VLANS on the switch?

Does anyone have a good example or reference?

The default gateways for the VLANs will reside on switch.

I can provide more info if needed

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (3 ratings)
Loading.
Collin Clark Thu, 11/20/2008 - 08:15

I prefer to connect L3 switches to routers using routed interfaces. The iBGP process can still use a loopback or physical interface of the L3 switch.

Hope that helps.

Jon Marshall Thu, 11/20/2008 - 08:26

Thomas

I'm in total agreement with Collin on this. Pick and unused subnet for a P2P link between the 3750 and the 3825 eg. 192.168.5.0/30.

On the port connected to the 3825 router

int gi0/1

no switchport

ip address 192.168.5.1 255.255.255.252

and then config the 3825 interface

int gi0/1

ip address 192.168.5.2 255.255.255.252

This is so much simpler than creating vlan subinterfaces on your 3825 router.

Jon

riedmueller Thu, 11/20/2008 - 08:34

All of your inter-vlan switching will happen on the L3 switch; all you need is a routed circuit between the router and L3 switch -- that is, on the 3750, you configure the uplink port as "no switchport", assign it an IP address in the same network as the IP on the Router's ethernet interface, and establish the routing protocol connection from that point.

I happen to be messing with BGP today, so I ask this based on my own "fun" in the lab -- why run BGP on the L3 switch? An IGP like OSPF or EIGRP would be just as simple and keep BGP at the edge of your network...

L3 Switch:

conf t

ip routing

! enables L3 switching

int f1/0/1

! uplink port

no switchport

ip address 10.0.0.2 255.255.255.0

no shut

! turns off the 'switching' function of the port and enables ip routing on it, asssigns an ip address, etc

router bgp 65000

neighbor 10.0.0.1 remote-as 65000

network 192.168.1.0 mask 255.255.255.0

! repeat for the rest of the networks -- or I *think* "REDISTRIBUTE CONNECTED" will work too

no auto-summary

interface VLAN 1

ip add 192.168.1.1 255.255.255.0

interface VLAN 2

ip add 192.168.2.1 255.255.255.0

! and so on... hosts connecting to ports on the switch are set to access whatever VLAN and their default gateway should be configured as the interface VLAN supporting the VLAN they are assigned to

On the router-

conf t

int f0/0

! port to 3750

ip address 10.0.0.1 255.255.255.0

no shut

router bgp 65000

! in addition to WAN-pointing BGP statements

neighbor 10.0.0.2 remote-as 65000

network 10.0.0.0 mask 255.255.255.0

I haven't tried this specific config in a lab, but it should be close...

thomuff Thu, 11/20/2008 - 09:33

You have a good point. I am thinking it was never brought up in discussion is the reason that we are using BGP instead of EIGRP or OSPF for the IGP. I will run it by management. Thanks all for your replies. They definitely helped in making a decision.

Actions

This Discussion