cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2783
Views
5
Helpful
10
Replies

vlan routing through 871 router

Joli Martinez
Level 1
Level 1

I have a 2960 switch with three vlans connected to an 871 router.  Vlan10 for servers, Vlan20 for workstations and Vlan30 for testing purpose.  How can I get all three Vlans to go out the internet and have Vlan's 10 and 20 to talk to each other.

1 Accepted Solution

Accepted Solutions

darren.g
Level 5
Level 5

Joli Martinez wrote:

I have a 2960 switch with three vlans connected to an 871 router.  Vlan10 for servers, Vlan20 for workstations and Vlan30 for testing purpose.  How can I get all three Vlans to go out the internet and have Vlan's 10 and 20 to talk to each other.

You need to do two things.

1) Configure the port on the SWITCH you are using to link to the router as a trunk port, encapsulation 802.1q and allow the required VLAN's - the following command should do it

conf t

int

switchport mode trunk

switchport trunk allowed vlan 10,20,30

end

copy run start

Enter your interface number as appropriate

2) Configure the port on the ROUTER you are using to link to the switch with some sub interfaces in dot1q mode by doing something like this (I've assumed you're using interface f0/1 - put in the one you're actually using).

conf t

int f0/1.10

encapsulation dot1q 10

description VLAN 10 Servers

ip address

exit

int f0/1.20

encapsulation dot1q 20

description VLAN 20 Workstations

ip address

exit

int f0/1.30

encapsulation dot1q 30

description VLAN 30 testing

ip address

end

copy run start

Again, use your own interface designation - this means you only have to run one conenction between router and switch.

You may also have to fiddle with routing tables/NAT configurations if you are using your router to do NAT for your internet connection.

Cheers.

View solution in original post

10 Replies 10

vikz230884
Level 1
Level 1

Hi Joli,

You can create a subinterface on the router and make the connection from the switch to the router as trunk.

Regards,

is there a link or some instructions somewhere on how to do this?

darren.g
Level 5
Level 5

Joli Martinez wrote:

I have a 2960 switch with three vlans connected to an 871 router.  Vlan10 for servers, Vlan20 for workstations and Vlan30 for testing purpose.  How can I get all three Vlans to go out the internet and have Vlan's 10 and 20 to talk to each other.

You need to do two things.

1) Configure the port on the SWITCH you are using to link to the router as a trunk port, encapsulation 802.1q and allow the required VLAN's - the following command should do it

conf t

int

switchport mode trunk

switchport trunk allowed vlan 10,20,30

end

copy run start

Enter your interface number as appropriate

2) Configure the port on the ROUTER you are using to link to the switch with some sub interfaces in dot1q mode by doing something like this (I've assumed you're using interface f0/1 - put in the one you're actually using).

conf t

int f0/1.10

encapsulation dot1q 10

description VLAN 10 Servers

ip address

exit

int f0/1.20

encapsulation dot1q 20

description VLAN 20 Workstations

ip address

exit

int f0/1.30

encapsulation dot1q 30

description VLAN 30 testing

ip address

end

copy run start

Again, use your own interface designation - this means you only have to run one conenction between router and switch.

You may also have to fiddle with routing tables/NAT configurations if you are using your router to do NAT for your internet connection.

Cheers.

I understand but now my problem is creating the sub-interface in the 871

router(config)#interface FastEthernet 1/1.10

I get % Invalid input detected at '^' marker. at the "/"

my sh ver shows Version 12.3(8r)YI3

do I need the advanced IP services IOS or am I just doing something wrong?

Hi,

You must do this on the WAN port the other ones are L2 ports and i don't think you can put them as routed ports.

Regards.

Alain.

Don't forget to rate helpful posts.

Hi Alain,

Never heard of router on a stick using the WAN port.

Sent from Cisco Technical Support iPhone App

Hi John,

I meant it is not possible on a L2 port, it must be configured on a L3 port.

Regards.

Alain.

Don't forget to rate helpful posts.

Hi,  cadet alain.

Yeh, you are Correct.I did this thing using WAN Port. Sub Interfaces can be added only to WAN port in 871 Router

Hi Joli,

Could you try the below:

871(config)int vlan 10

871(config-if)#ip add 192.168.10.254 255.255.255.0

871(config)int vlan 20

871(config-if)#ip add 192.168.20.254 255.255.255.0

871(config)int vlan 30

871(config-if)#ip add 192.168.30.254 255.255.255.0

871(config)#int f0

871(config-if)#switchport trunk encapsulation dot1q

871(config-if)#switchport mode trunk

871(config-if)#switchport trunk allowed vlan 10,20,30

871(config-if)#no shut

Sent from Cisco Technical Support iPhone App

Joli Martinez wrote:

I understand but now my problem is creating the sub-interface in the 871

router(config)#interface FastEthernet 1/1.10

I get % Invalid input detected at '^' marker. at the "/"

my sh ver shows Version 12.3(8r)YI3

do I need the advanced IP services IOS or am I just doing something wrong?

Sorry, my bad - forgot that you were doing this on switchports, not router ports.

The reply posted above by johnlloyd_13 should work fine - creating SVI's for VLAN10, VLAN20 & VLAN30 on the 871 should sort this out.

Darren

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