cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1758
Views
0
Helpful
12
Replies
gnanavel.ns
Beginner

Configuring Secondary IP address in LAN Sub Interface

Hi,

I have a setup, in which two servers need to communicate with a Router in a VLAN Segment. The challenge is that we have created a sub interface in the LAN interface of the Router with encapsulation dot1q 310 with IP address 192.168.10.1/24. The servers are in a different IP range (10.250.14.9 and 10). The Router connects to Gig 1/4 in the core switch (managed by a 3rd party) and the servers connect to Gig 1/2 and Gig 1/3 in the same core switch which are assigned to VLAN 310.

Now if I configure a secondary IP address in the LAN sub interface of the Router with IP 10.250.14.1, can I establish connectivity between the Servers and Routers?

Also, can I advertise the secondary IP subnet in BGP, to the WAN?

Thanks for your time.

Regards

Gnanavel.

12 REPLIES 12
Jon Marshall
VIP Community Legend

Yes to both of your questions.

Jon

Thanks Jon.

Reza Sharifi
Hall of Fame Expert

Hi,

As long as vlan 310 is present on the core switch and it is add it to the trunk interface connecting to the router, you can create a new sub-interface on the router with dot1q and give it an IP address in the range you have assigned (10.250.14.x) than you should be fine.

HTH

Thanks Reza. So, should I create a new sub interface or can I configure a secondary IP address in the same sub interface?

Hi,

You need a new sub-interface just like the one you already have except the IP segment and vlan

sub-interface 310

interface gx/x.310

ip 10.250.14.x

etc..

HTH

Hi Reza,

The subinterface which is already there in the Router is Gig 0/0.310 configured with encapsulation dot1q 310. I cannot assign the same vlan id to another sub interface.

Regards

Gnanavel.

Ok, since 310 is already taken, you need a new vlan and sub-interface for it.

So, maybe 410?

But now the challenge is that you have to add the new vlan (410) to the switch, trunk port connecting to the router and than a sub-interface on the router.

HTH

Yes, the reason I am considering a secondary ip address is the core switch is managed by a 3rd Party and we cant get them to add the new VLAN immediately.

What type of router do you have?

I don't think you can add a secondary address to a sub-interface, or at least I have never done it. Even if you can, who know what limitations you will face and  I my opinion its much cleaner to just create a new vlan/sub-interface.

As far as I know you should be able to just assign a secondary IP.

Jon

Hi Jon,

You are correct!

I was able to assign an IP as secondary.

Here is the config:

interface GigabitEthernet0/0/4.310
 encapsulation dot1Q 310
 ip address 10.250.14.1 255.255.255.0 secondary
 ip address 192.168.10.1 255.255.255.0

Thanks!

Reza

Hi Reza

Thanks for confirming that.

Jon