Subinterface not routing

Answered Question
Mar 4th, 2008

Hi,


The issue i'm having is that i have two subinterfaces configured on my 2611XM router however i get no response from hosts on the LAN's unless the subinterface is specified as the native vlan. Is that right? i thought you could have as many subinterfaces as you wanted and could communicate between all networks and hosts no problem? I've attached a copy of the config and a network diagram.


Any help would be appreciated.



Correct Answer by aijaz802 about 8 years 11 months ago

Hi,


You didn't mentioned whether you are using any vlans in your network. If yes you need to provide the vlan id after the encapsulation command encapsulation dot1Q XX.


You need to make the port as trunk on the switch which is connecting to the router.


interface FastEthernet x/y

switchport trunk encapsulation dot1q

switchport trunk allowed vlan 1,2,x,y

switchport mode trunk


-------


If your LAN is a flat network without any VLANs then you dont need subinterfaces, instead you can add the ip addresses as secondary on the main interface..


interface FastEthernet0/1

ip address 112.16.20.1 255.255.255.224

ip address 112.16.40.1 255.255.255.248 secondary

no shut


Pls rate if it helps


BR

*aijaz*

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
aijaz802 Tue, 03/04/2008 - 04:08

Hi,


You didn't mentioned whether you are using any vlans in your network. If yes you need to provide the vlan id after the encapsulation command encapsulation dot1Q XX.


You need to make the port as trunk on the switch which is connecting to the router.


interface FastEthernet x/y

switchport trunk encapsulation dot1q

switchport trunk allowed vlan 1,2,x,y

switchport mode trunk


-------


If your LAN is a flat network without any VLANs then you dont need subinterfaces, instead you can add the ip addresses as secondary on the main interface..


interface FastEthernet0/1

ip address 112.16.20.1 255.255.255.224

ip address 112.16.40.1 255.255.255.248 secondary

no shut


Pls rate if it helps


BR

*aijaz*

scopecisco Tue, 03/04/2008 - 04:25

Hi Aijaz,


The switch i have connected to is an unmanaged switch so i wont be able to trunk to it, the reason i'm using subinterfaces is that i want to be able to add more networks, i've started with two just to prove the concept. My understanding is that if i add a secondary IP to FE0/1 then i will be limited to two netowrks only?


Also, i've assigned vlans to each interface FE0/1.1 VLAN 1 and FE0/1.2 VLAN 2, the issue is the routing to the Native assigned vlan only.



Attachment: 
keeleym@o2.ie Tue, 03/04/2008 - 04:27

Hi Arif


Your network diagram cannot be a true reflection of your network topology as it is not possible to connect two hosts into a single interface on a router.


So my question is, do these hosts connect to a hub/switch which is uplinked to the 2611 and if so what is the configuration on this device?



Best Regards,


Michael



aijaz802 Tue, 03/04/2008 - 04:36

Hi Arif,


There is no restrictions on subinterfaces...you can have more than 2.


interface FastEthernet0/1

ip address 112.16.20.1 255.255.255.224

ip address 112.16.40.1 255.255.255.248 secondary

ip address network mask secondary

ip address network mask secondary

ip address network mask secondary


you can't create vlans in unmanaged switch so there is no point in having sub interface with encapsulation dot1aq vlan-id...


Go for the subinterface concept...I hope it will work...


Pls rate if it works...


Best Regards,

*aijaz*

scopecisco Tue, 03/04/2008 - 04:51

Aijaz,


OK, just so i understand this correctly, sub-interfaces are to be used in trunking only scenarios when routing bewtween VLANS on a manged switch, wheres as secondary IP's are used on a flat network?


How many secondary IP's can be assigned to a FE interface?


Regards,


Arif.

scopecisco Tue, 03/04/2008 - 04:40

Hi michael,


I've updated my netowrk diagram, u can see the true connections now, its attached to my previous post.


Regards,


Arif.

srue Tue, 03/04/2008 - 04:50

It's unlikely you can use trunking on your unmanaged switch, so having subinterfaces won't work. what is the make/model of your switch?

aijaz802 Tue, 03/04/2008 - 05:10

Hi,


Yes, subinterfaces are used for the intervlan routing purpose.


Secondary ip addresses can be used in flat network or in vlan scenario. One of the use of secondary IP is in migrating from one IP block network to another network without any network disruption.


In vlan scenario if a vlan X is having mutiple ip address blocks then the secondary option can be used on the sub interface.


I dont know the exact number of subinterfaces allowed on an interface, but u can have many. Usually we dont need that many subinterfaces to create in a flat network.


I hope this clarifies.....If so Pls. rate the post.


*aijaz*

Richard Burts Tue, 03/04/2008 - 05:27

Arif


I do not believe that anyone has yet directly addressed your question of how many secondary addresses you can have on an interface. There is not any particular limit on the number of secondary addresses. You can have as many as make sense to you. The more secondary addresses you add it implies that there are more and more hosts on that interface. At some point as the number of hosts increases the router interface may become a bottleneck. But the limiting factor is not the number of secondary addresses but is the traffic volume.


HTH


Rick

Actions

This Discussion