09-29-2011 06:15 PM - edited 03-07-2019 02:31 AM
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.
Solved! Go to Solution.
09-29-2011 09:05 PM
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.
09-29-2011 06:45 PM
Hi Joli,
You can create a subinterface on the router and make the connection from the switch to the router as trunk.
Regards,
09-29-2011 06:50 PM
is there a link or some instructions somewhere on how to do this?
09-29-2011 09:05 PM
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.
09-30-2011 06:14 AM
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?
09-30-2011 07:16 AM
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.
09-30-2011 10:15 AM
Hi Alain,
Never heard of router on a stick using the WAN port.
Sent from Cisco Technical Support iPhone App
09-30-2011 11:05 AM
Hi John,
I meant it is not possible on a L2 port, it must be configured on a L3 port.
Regards.
Alain.
12-02-2022 02:49 AM
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
09-30-2011 10:02 AM
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
10-03-2011 07:58 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide