OSPF on Virtual Interfaces?

in CCNA & CCENT
Hi there, I am to setup OSPF in a relatively simple network consisting of two Cisco 2911 with CME installed and a few switches. We are using vlan interfaces for the routes, I've never done it this way so I'm just wondering if there is anything different or preferred method of doing it?
For example, can I just:
R1(config)#int vlan 20
R1(config-if)#ip ospf 1 area 100
and then....
R1(config)#router ospf 1
R1(config-router)#network 10.0.20.0 0.0.0.255 area 100
and then apply OSPF to the physical interface participating...
R1(config)#int Gig0/2
R1(config-if)#ip ospf 1 area 100
I have heard it is best to only route the management vlan using OSPF? Do I have the right idea or is it best to just let OSPF source these routes by itself as directly connected and then redistribute them? Or does it even make a difference?
I have noticed when I bring the native vlan 20 up in our network I loose all layer 3 connectivity and when I shut vlan 20 down the network comes back up immediately.
I know this is probably a trivial question for some of you gurus but your help is appreciated!
For example, can I just:
R1(config)#int vlan 20
R1(config-if)#ip ospf 1 area 100
and then....
R1(config)#router ospf 1
R1(config-router)#network 10.0.20.0 0.0.0.255 area 100
and then apply OSPF to the physical interface participating...
R1(config)#int Gig0/2
R1(config-if)#ip ospf 1 area 100
I have heard it is best to only route the management vlan using OSPF? Do I have the right idea or is it best to just let OSPF source these routes by itself as directly connected and then redistribute them? Or does it even make a difference?
I have noticed when I bring the native vlan 20 up in our network I loose all layer 3 connectivity and when I shut vlan 20 down the network comes back up immediately.
I know this is probably a trivial question for some of you gurus but your help is appreciated!
Comments
-
Forsaken_GA Member Posts: 4,024 ■■■■■■■■■■
just put the port you're wanting to route over into the vlan (i guess in your case you're using vlan20 as your management vlan) and then have that SVI (vlan interface) as the one that participates in OSPF, not the physical interface.
If you want to source your other directly connected SVI's into OSPF, redistribute connected subnets -
Heero Member Posts: 486
Forsaken_GA wrote: »just put the port you're wanting to route over into the vlan (i guess in your case you're using vlan20 as your management vlan) and then have that SVI (vlan interface) as the one that participates in OSPF, not the physical interface.
If you want to source your other directly connected SVI's into OSPF, redistribute connected subnets
Have a few odd ones like this were i work. Uplink connecting dist switch to core switch. Uplink is a trunk, but only carries one vlan, and that vlan is ONLY on that trunk. Then SVIs are used to do ospf on that link. I dont get why they dont just used routed ports, but w/e. It works fine.