cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4332
Views
0
Helpful
4
Replies

Configuring IP addresses on parent interface and subinterface?

Rich Lewis
Level 1
Level 1

Hi everyone

Is it considered bad practice to configure both a parent interface and its subinterfaces for IP forwarding? I'm talking about back to back routers here, no switches in between.

An example:

interface GigabitEthernet0/0/0

description Parent Interface - GRT

ip address 10.1.1.2 255.255.255.254

ip ospf message-digest-key 1 md5 7 <removed>

ip ospf network point-to-point

ip ospf 1 area 0

negotiation auto

cdp enable

!

interface GigabitEthernet0/0/0.900

description Subinterface - Client VRF

encapsulation dot1Q 900

vrf forwarding Client_VPN

ip address 10.0.252.4 255.255.255.254

ip pim sparse-mode

ip ospf message-digest-key 1 md5 7 <removed>

ip ospf network point-to-point

ip ospf 1 area 0

Or should you always keep the parent interface 'bare' and configure all IP forwarding on subinterfaces?

Thanks

Rich.

1 Accepted Solution

Accepted Solutions

Hi Rich,

Either way, it will work fine.  I just like to keep them all the same since the sub-interfaces will have vlan tags associated with them and the main interfaces does not.

HTH

View solution in original post

4 Replies 4

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

If you know, you don't need sub-interfaces, then just configure everything on the main interface.  No need for extra config and space taken by the sub-interface when you do "sh run".  This way, your config lines are shorter and simple.

HTH

Hi Reza

Thanks for your response.

I need multiple connections between the two routers (it's VRF-Lite), so I definitely need subinterfaces, but my question is, should all the connections use subinterfaces or is it okay to use the parent interface too?

My thinking is to run the GRT over the parent interface to kinda keep it separate from a human inspection point of view. That way, everyone knows the GRT runs on the parent interface in all situations. Technically I'm pretty sure it'll work fine, but I guess I'm asking more of a style/best practice question here. Or if there are any gotchas I haven't thought about. Do you see what I mean?

Thanks

Rich.

Hi Rich,

Either way, it will work fine.  I just like to keep them all the same since the sub-interfaces will have vlan tags associated with them and the main interfaces does not.

HTH

Okay, thanks for your help Reza.

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: