cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4256
Views
0
Helpful
10
Replies

ospf routing on a trunk

Network Pro
Level 1
Level 1

hi,

I have seen this config on the internet and wondering is this correct ?

say for example we have two company A and B. Company A is running ospf all in the  backone area 0

Company B is also running ospf in backbone area 0

now there is a  link from company B to company A. they have connceted to a fastethernet interface on both sides and trunked them - both sides have a vlan 100 address (so this is layer 2 connectivity, isnt it )

now they have advertised this ospf on router ospf 10 on both sides (apart from ospf 1) and advertised this network in area 0 - is this correct?

I have attached the confg:

Comapny A

router ospf 1

redistribute ospf 100

network 10.1.1.0 0.0.0. 255 area 0 (this is internal network)

int fa0/48

desc link to compan B

switch port mode trunk

switch access vlan 100

int vl100

ip address 192.168.1.1 255.255.255.0 (this is for company B)

router ospf 100

redistrubite ospf 1

network 192.168.1.0 0.0.0.255 area 0  (this is company B network)

Company B

router ospf 100

network 192.168.1.0 0.0.0.255 area 0 (this is internal network)

will this work ?  (basically company A connects the link for Company B as trunk and advertised two ospf routing process )

10 Replies 10

Hi,

Yes it will work. But you will need mutual redistribution between the internal and the transit OSPF process on both companies, in order to have bidirectional communication.

A

router ospf 1

redistribute ospf 100

router ospf 100

redistribute ospf 1

B

router ospf 100

redistribute ospf 1

router ospf 1

redistribute ospf 100

Also the port configuration is not quite the expected one :

your config states :

int fa0/48

desc link to compan B

switch port mode trunk

switch access vlan 100

If you set the port to trunk then there is no need for "access vlan 100" . This command is used in conjunction with " switchport mode access".

Dan

John Blakley
VIP Alumni
VIP Alumni

It should work. The reason for the redistribution is because of the separate processes on the same router. The way that Company B is set up wouldn't allow them to see the 10 side without the redistribution.

HTH,

John

HTH, John *** Please rate all useful posts ***

i am confused here because when you make the config on the port as switch access vlan 100 then its on layer 2 connectiviety, isnt it ?

1. i understand that A is on a a 10 subnet and company B is on 192,168.0.0 subnet but if you stick in static routes on company B to get to company A will this not work ?

2. in case if there are too many static to be used, i agree with the concept of routing but if this was the case then why the need to create vlan on the port, instead cant it be given ip at both end and routed ? and even if routed it should be routed under the same ospf routing process id, isnt it ? (in this case both are on backbone area but even if they are on different areas then you can still use it as ABR)

As per my understanding of your setup, was that also Company B has configured VLAN 100. Before getting to ospf configuration you must offer the edge routers of both companies IP connectivity, in order to be able to form adjacency between those edge routes. The easy way is to configure also on B vlan 100 interface.

Dan

yep say B also has vlan 100 as its their network...but my confusion is why to use routing when you can see on layer 2. cant you switch and if you need to reach 10 subnets or others in company A, can you use static routes ?

2. if the above is difficult process then i agree with routing but should this be applied on the interface with an ip - why create a vlan and put the port in access mode and then do routing ?

Yes you can use static, without a doubt.

But there are advatanges of using routing protocols, if there were no advatages we would not hear about OSPF.

If both companies have large networks, you must redistrubute the static into OSPF. Furthermore, if there are some other networks added on any of the companies you will have some config overhead ( which can appear in the dyniamic routing protocols when filtering is involved ) Also if you have more then one link, the dynamic routing protocol it will offer failover.

Dan

yep agree with you but is there a reason why routing should this be applied on an vlan - why create a vlan and put the port in access mode and then do routing - instead shoudlnt the ports be given an ip and routed

The reason in doing anything is the requirement.

Technicaly speaking you can configure the port as layer 3 (no switchport) or connect it direcly to a router and you can run OSPF on that interface. But then again, what you saw, was an example. The main idea of the example I do not think that was the layer 2 connectivity, but the OSPF configuration.

Dan

Hi,

This seems to be a scenario when the companies are about to merge and hence they try to connect to each other. Now, from your original configuration, you won't be able to communicate on those L3 vlans. Although you have access vlan on the trunk port but the switchport mode trunk overrides the access vlan config. So , essentially you will be just spanning the vlan across from company B to company A. so if you are going to have 2 different subnets assigned to the vlan SVI 100 then it won't work.

In regards to why we need to have L3 routing where we could just have L2 switching. Well this is purely design. If its just one link than you can use L2. But imagine if you have more than a couple then spanning tree kicks in and it might not be a best design if only few links are used and others are not. Hence you go L3 whereby you can leverage on load balancing, load sharing ECMP etc and also QoS and other stuff.

HTH

Kishore

in ospf if you have 2 routing process, do you need to redistrubute because i thought only eigrp relies on AS and has seperate tables, does ospf work the same way ?

and in the above example couldnt they have advertised the company B network in the same routing ospf process id (ospf 1) - would that work ?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card