cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3569
Views
0
Helpful
8
Replies

interVLAN, OSPF, BGP

sheryarqazi4
Level 1
Level 1

Hello, 

What is Difference between usage of Inter VLAN, OSPF and BGP. Please Describe with Scenario? Furthermore how these three can be used at a time

1 Accepted Solution

Accepted Solutions

Your drawing shows 2 switches connected by some link and 2 vlans that appear to be active on both switches. In this case the switches will be routing for locally connected subnets. This does not need OSPF and does not need BGP.

 

If you want to use OSPF then you would need to introduce another switch (or perhaps a router). The new switch would connect to one of the existing switches on a link that was in a separate vlan (perhaps vlan 30). That separate vlan would have its own IP subnet. On the new switch configure another new vlan (perhaps vlan 40) which would have its own new subnet. Then you would run OSPF between the new switch and the existing switch. The new switch would have network statements for vlans 30 and 40 and the existing switch would have network statements for vlans 10, 20, and 30. In this way the existing switches would learn about the subnet for vlan 40 and the new switch would learn about the subnets for vlan 10 and 20.

 

If you want to use BGP then you would need to introduce another device (logically this would probably be a router, but it could perhaps be a switch). This new device would represent some external network. Usually it would represent an ISP that provides access to the Internet, but it could be some other company with which you want to exchange routes. The new device would connect to one of your switches on a new subnet. You would run BGP on the connection between these devices to advertise your subnets to that  external network and they would advertise networks to you.

 

Note that I do not process pkt files and so can not comment on your configurations. 

HTH

Rick

View solution in original post

8 Replies 8

Richard Burts
Hall of Fame
Hall of Fame

I am not clear what you are trying to get at in this question but let me offer these explanations and hope that they help you.

- inter vlan means between vlans. I assume that you are asking about routing between vlans.Using vlans implies that you are using switches to create the vlans and to have access ports in various vlans which need to communicate with each other. Some switches might operate as layer 2 only having vlans and access ports (and perhaps some interfaces as trunks). Some switches might operate as layer 3 switches and could route between vlans. The routing between vlans might be based on static routes or might be based on a dynamic routing protocol such as OSPF or BGP. It is also possible to do the routing between vlans using a router. In this case the switch connecting to the router would configure the interface connecting to the router as a trunk and allow traffic from all vlans to use that trunk. You would configure an interface on the router with vlan subinterfaces which would allow the router to communicate with each of the vlans. And that routing might be based on static routes or on a dynamic routing protocol.

- OSPF is a dynamic routing protocol. It can be used on layer 3 switches or on routers. The devices running OSPF advertise the subnets that are connected to themselves and learn the subnets connected to other OSPF devices. There are several advantages in running a dynamic routing protocol like OSPF including

# when there is more than one path toward the destination address the dynamic routing protocol can choose the best available path.

# if a new route becomes available or if an existing route becomes unavailable the dynamic routing protocol automatically adjusts the routing table to reflect the change and no manual effort is required.

OSPF is generally considered to be an Interior routing protocol which runs within the network of some entity. It is possible, but unusual, to run OSPF between your company network and your ISP or between your company network and some other company network.

- BGP is a dynamic routing protocol. It can be used on layer 3 switches or on routers. The explanation about dynamic routing protocols also applies to BGP. BGP is generally considered to be an Exterior routing protocol which runs between your network and an ISP network or between your network and some other company network. It is possible, but unusual, to run BGP just within your network.

HTH

Rick

Reading through the post again the original poster asks for a scenario and how the three can be used. So here is a scenario: assume that you have a company that has 2 sites (siteA and siteB). At siteA there is a layer 3 switch with 5 vlans configured. The layer 3 switch is providing routing/packet forwarding for traffic between users on the 5 local vlans. The layer3 switch in siteA has a connection to a router at siteB. The company runs OSPF over that connection so that siteB has the ability to send packets to the 5 vlans at siteA, and the switch at siteA learns the subnets that are available at siteB. The router at siteB runs BGP to communicate with an ISP and using that is able to provide Internet access for users at both siteA and at siteB.

HTH

Rick

As per your guidance, Here i have configured 2 VLANs with OSPF. Please guide me how i will Apply BGP further in case extending network. And how how this whole network scenario will do its work. PKT File attached please

Your drawing shows 2 switches connected by some link and 2 vlans that appear to be active on both switches. In this case the switches will be routing for locally connected subnets. This does not need OSPF and does not need BGP.

 

If you want to use OSPF then you would need to introduce another switch (or perhaps a router). The new switch would connect to one of the existing switches on a link that was in a separate vlan (perhaps vlan 30). That separate vlan would have its own IP subnet. On the new switch configure another new vlan (perhaps vlan 40) which would have its own new subnet. Then you would run OSPF between the new switch and the existing switch. The new switch would have network statements for vlans 30 and 40 and the existing switch would have network statements for vlans 10, 20, and 30. In this way the existing switches would learn about the subnet for vlan 40 and the new switch would learn about the subnets for vlan 10 and 20.

 

If you want to use BGP then you would need to introduce another device (logically this would probably be a router, but it could perhaps be a switch). This new device would represent some external network. Usually it would represent an ISP that provides access to the Internet, but it could be some other company with which you want to exchange routes. The new device would connect to one of your switches on a new subnet. You would run BGP on the connection between these devices to advertise your subnets to that  external network and they would advertise networks to you.

 

Note that I do not process pkt files and so can not comment on your configurations. 

HTH

Rick

I am glad that our explanations have been helpful.  Thank you for marking this question as solved. This will help other participants in the community to identify discussions which have helpful information. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick

balaji.bandi
Hall of Fame
Hall of Fame

Can you be more elaborate on your question so we can understand better and suggest as expected to meet the requirement?

 

give us an example of what are you trying to achieve? or is this an education question?

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Basically i have a self imposed target to understand and design a sample Inter VLAN, OSPF and BGP Based network. However i am confused somewhere about their proper job and how they will operate at once in internetworks? please elaborate these protocols with proper scenario of how they will work with each other

Perhaps it might help to think about your question in terms of the scope within which each of these operates. Thinking particularly in terms of the scenario that I suggested we see that

- a layer 3 switch or router performs inter vlan routing for subnets that are locally connected (physically connected to the L3 switch or router)

- OSPF is used to provide routing information for subnets and networks within an enterprise network

- BGP is used to provide routing information for networks between enterprise networks

HTH

Rick