Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

OSPF with Loopback interface

Do you happen to have or direct me to a config of OSPF and loopback interface on  layer3 switch (WS-C3560G-24TS) using VLAN. I know how to do on a router with Serial and ethernet interface, but not on a switch where i have to use the Vlan interface to assing my /30 IP.

Thanks much in advance,


Hall of Fame Super Blue

Re: OSPF with Loopback interface


Not sure what you are asking here ?

Is the 3560 doing inter-vlan routing ?

Could you provide some more details ?


New Member

Re: OSPF with Loopback interface

Sorry about that.

I have BGP running on that switch to my ISP provider which i do not want to touch, I have about 6 VLANs distributed in for different network segments. I now need to connect to a 2nd provider thru a cat5 hand off which i plugged into the switch port 23, created VLAN23 and interface loopback23 so that i can connecto that 2nd provider which will give me a /30 IP and a /32 IP, i will assign the /30 ip to VLAN23 and /32 IP to loopback23 interface and use OSPF.

I will then send VoIP traffic from my VoIP gateway thru another network switch which will hit my FW, then the FW will route to the L3 switch where I will have the OSPF config to direct the VoIP traffic to the 2nd provider, since i am running BGP with my primary provider, i do not want the Voip traffic to go to/thru them, but instead to that 2nd provider which will be expecting that traffic. Should i create some soft of static routes, VLAN routing, etc. to make happen,


VIP Super Bronze

Re: OSPF with Loopback interface


For your connection to the service provider, the port does not have to be in a vlan.  You can make the port a later-3 point-to-point port and assign an IP address to it as long as the SP does the same thing on there side.

As for your loopback address, the config is the same as a router

this is from a 3750 but it is the same for 3560:

Switch-1(config-if)#do sh run in lo23
Building configuration...

Current configuration : 68 bytes
interface Loopback23
ip address




New Member

Re: OSPF with Loopback interface


Thanks a lot Reza