View Full Version : Router share VLAN
mrworldwarrior
10-27-2009, 09:32 PM
Router = 1841
Switch = 2960
All cisco
2 groups of VLAN
VLAN 10 port range = 1 - 10 - IP=192.168.1.1/24 - 192.168.1.10/24
VLAN 20 port range = 11 - 20 - IP=192.168.1.11/24 - 192.168.1.20/24
port 21 and 22 = default
port 23 and 24 = switchport mode trunk
Router f 0/1 connect to switch port f 0/24
Router IP f 0/1 = 192.168.1.24/24
I m new with cisco device... and don't have any cisco certifcate. (prepare)..
I have configure the switch, But i not sure how to configure the router.. To make all vlan or subnet can go to internet....Already set vlan can't communicate each others in switch. I have bought your CCNA study guide books, very good explaination, But need no know the setting of router. Any setting example for it.
sorry bad English from me..
Thanks
crissa
10-28-2009, 01:38 AM
Router = 1841
Switch = 2960
All cisco
2 groups of VLAN
VLAN 10 port range = 1 - 10 - IP=192.168.1.1/24 - 192.168.1.10/24
VLAN 20 port range = 11 - 20 - IP=192.168.1.11/24 - 192.168.1.20/24
port 21 and 22 = default
port 23 and 24 = switchport mode trunk
Router f 0/1 connect to switch port f 0/24
Router IP f 0/1 = 192.168.1.24/24
I m new with cisco device... and don't have any cisco certifcate. (prepare)..
I have configure the switch, But i not sure how to configure the router.. To make all vlan or subnet can go to internet....Already set vlan can't communicate each others in switch. I have bought your CCNA study guide books, very good explaination, But need no know the setting of router. Any setting example for it.
sorry bad English from me..
Thanks
Hello,
my suggestion: Start reading the book! ;-)
Look for "router on a stick".
You need different subnets for your vlans. Keep in mind: Different vlan, different subnet.
VLAN 10 => 192.168.10.0/28
VLAN 20 => 192.168.20.0/28
On the router you need subinterfaces, Fa0/1.10 with the IP address 192.168.10.1/28 and Fa0/1.20 with the IP address 192.168.20.1. With this you could use 2 upto 14 for the clients.
HTH!
Bye, Tore
mrworldwarrior
10-28-2009, 02:53 AM
Hello,
my suggestion: Start reading the book!
Look for "router on a stick".
You need different subnets for your vlans. Keep in mind: Different vlan, different subnet.
VLAN 10 => 192.168.10.0/28
VLAN 20 => 192.168.20.0/28
On the router you need subinterfaces, Fa0/1.10 with the IP address 192.168.10.1/28 and Fa0/1.20 with the IP address 192.168.20.1. With this you could use 2 upto 14 for the clients.
HTH!
Bye, Tore
Thanks for suggestion,, Can provide me some command setting for its...One again what is 'dot' mean (eg; fa0/1'dot'20) mean?
crissa
10-28-2009, 07:38 AM
Thanks for suggestion,, Can provide me some command setting for its...One again what is 'dot' mean (eg; fa0/1'dot'20) mean?
Hello,
Fa0/1.20 is a "so called" subinterface.
Here is an example, Fa0/0 with two subinterfaces for vlans 100 and 101:
!interface FastEthernet0/0
description to SW1 FE 1/3
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.1
encapsulation dot1Q 100
ip address 192.168.100.3 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation dot1Q 101
ip address 192.168.101.3 255.255.255.0
!See <http://www.routerlabs.de/ethernet-switch/router-on-stick/index.html> for the full "router on a stick" example. The example is for Dynamips/Dynagen but you should get the drift.
By the way, it is a good practise to make the subinterface and the vlan number the same.
HTH!
Bye, Tore
PS See <http://www.eslpod.com (http://www.eslpod.com/)> for improving your English. :-)
Hello,
my suggestion: Start reading the book! ;-)
Look for "router on a stick".
You need different subnets for your vlans. Keep in mind: Different vlan, different subnet.
VLAN 10 => 192.168.10.0/28
VLAN 20 => 192.168.20.0/28
On the router you need subinterfaces, Fa0/1.10 with the IP address 192.168.10.1/28 and Fa0/1.20 with the IP address 192.168.20.1. With this you could use 2 upto 14 for the clients.
HTH!
Bye, Tore
am equally having the same problem.but Mr Tore are you saying on the interface on the router we can create another interface?am a bit confuse about that av read the router in the book but still a bit con fuse by your explanation maybe u can break it down.
thanx,
akyn
Hello,
my suggestion: Start reading the book! ;-)
Look for "router on a stick".
You need different subnets for your vlans. Keep in mind: Different vlan, different subnet.
VLAN 10 => 192.168.10.0/28
VLAN 20 => 192.168.20.0/28
On the router you need subinterfaces, Fa0/1.10 with the IP address 192.168.10.1/28 and Fa0/1.20 with the IP address 192.168.20.1. With this you could use 2 upto 14 for the clients.
HTH!
Bye, Tore
am equally having the same problem.but Mr Tore are you saying on the interface on the router we can create another interface?am a bit confuse about that av read the "router on a stick"in the book but still a bit confuse by your explanation maybe u can break it down.
thanx,
akyn
Big Evil
10-29-2009, 10:41 AM
The same way i helped you when you posted on CC.
How to provide routing between two VLANs on a simple Layer 2 switch using a Cisco router with just one interface. This is called also Router-on-a-stick.
http://www.cisco-tips.com/images/router-on-a-stick.jpg
A Cisco Layer 2 switch carries two VLANs (VLAN 10 – RED and VLAN 20 – GREEN) with two hosts connected on them as shown on the diagram above. The first host belongs to Network 10.10.10.0/24 (VLAN10) and the second one to 20.20.20.0/24 (VLAN20). By default, if the switch is just a normal Layer 2 switch the two hosts can not communicate between them because they belong to different VLANs and there is no routing. Thus, if we want to provide network connectivity between the two VLANs we need to have a Layer 3 engine somewhere in the network. This can be accomplished either if the switch is Layer 3 or if there is a router in place. In our example we use a router to provide Layer 3 connectivity as shown in our diagram.
The router uses just a single interface connected to a trunk port on the switch. The Router interface can be divided into two subinterfaces, with each subinterface belonging to the appropriate VLAN. The switch port connected to the router must be a trunk in order to be able to carry both VLANs towards the router port. Lets see the configuration below:
SWITCH CONFIGURATION
# conf t
(config)# vlan database
(config-vlan)# vlan 10 name RED
(config-vlan)# vlan 20 name GREEN
(config-vlan)# exit
(config)# interface FastEthernet1/0/1
(config-if)# description trunk-to-router-on-a-stick
(config-if)# switchport trunk encapsulation dot1q
(config-if)# switchport mode trunk
(config-if)# exit
(config)# interface FastEthernet1/0/2
(config-if)# description connection-to-RED-VLAN
(config-if)# switchport mode access
(config-if)# switchport access vlan 10
(config-if)# exit
(config)# interface FastEthernet1/0/3
(config-if)# description connection-to-GREEN-VLAN
(config-if)# switchport mode access
(config-if)# switchport access vlan 20
(config-if)# exit
(config)# exit
# copy run start
ROUTER CONFIGURATION
# conf t
(config)# interface fastethernet 0/0.10
(config-if)# encapsulation dot1q 10
(config-if)# ip address 10.10.10.2 255.255.255.0
(config-if)# exit
(config)# interface fastethernet 0/0.20
(config-if)# encapsulation dot1q 20
(config-if)# ip address 20.20.20.2 255.255.255.0
(config-if)# exit
Now, in order for the two hosts to communicate between them, they must set as default gateway the IP address of the corresponding router subinterface address (e.g for host in VLAN 10 the gateway must be 10.10.10.2 and for host in VLAN 20 the gateway must be 20.20.20.2).
The same way i helped you when you posted on CC.
How to provide routing between two VLANs on a simple Layer 2 switch using a Cisco router with just one interface. This is called also Router-on-a-stick.
http://www.cisco-tips.com/images/router-on-a-stick.jpg
A Cisco Layer 2 switch carries two VLANs (VLAN 10 – RED and VLAN 20 – GREEN) with two hosts connected on them as shown on the diagram above. The first host belongs to Network 10.10.10.0/24 (VLAN10) and the second one to 20.20.20.0/24 (VLAN20). By default, if the switch is just a normal Layer 2 switch the two hosts can not communicate between them because they belong to different VLANs and there is no routing. Thus, if we want to provide network connectivity between the two VLANs we need to have a Layer 3 engine somewhere in the network. This can be accomplished either if the switch is Layer 3 or if there is a router in place. In our example we use a router to provide Layer 3 connectivity as shown in our diagram.
The router uses just a single interface connected to a trunk port on the switch. The Router interface can be divided into two subinterfaces, with each subinterface belonging to the appropriate VLAN. The switch port connected to the router must be a trunk in order to be able to carry both VLANs towards the router port. Lets see the configuration below:
SWITCH CONFIGURATION
# conf t
(config)# vlan database
(config-vlan)# vlan 10 name RED
(config-vlan)# vlan 20 name GREEN
(config-vlan)# exit
(config)# interface FastEthernet1/0/1
(config-if)# description trunk-to-router-on-a-stick
(config-if)# switchport trunk encapsulation dot1q
(config-if)# switchport mode trunk
(config-if)# exit
(config)# interface FastEthernet1/0/2
(config-if)# description connection-to-RED-VLAN
(config-if)# switchport mode access
(config-if)# switchport access vlan 10
(config-if)# exit
(config)# interface FastEthernet1/0/3
(config-if)# description connection-to-GREEN-VLAN
(config-if)# switchport mode access
(config-if)# switchport access vlan 20
(config-if)# exit
(config)# exit
# copy run start
ROUTER CONFIGURATION
# conf t
(config)# interface fastethernet 0/0.10
(config-if)# encapsulation dot1q 10
(config-if)# ip address 10.10.10.2 255.255.255.0
(config-if)# exit
(config)# interface fastethernet 0/0.20
(config-if)# encapsulation dot1q 20
(config-if)# ip address 20.20.20.2 255.255.255.0
(config-if)# exit
Now, in order for the two hosts to communicate between them, they must set as default gateway the IP address of the corresponding router subinterface address (e.g for host in VLAN 10 the gateway must be 10.10.10.2 and for host in VLAN 20 the gateway must be 20.20.20.2).
Big bro, am so grateful thanx.
one love
The same way i helped you when you posted on CC.
How to provide routing between two VLANs on a simple Layer 2 switch using a Cisco router with just one interface. This is called also Router-on-a-stick.
http://www.cisco-tips.com/images/router-on-a-stick.jpg
A Cisco Layer 2 switch carries two VLANs (VLAN 10 – RED and VLAN 20 – GREEN) with two hosts connected on them as shown on the diagram above. The first host belongs to Network 10.10.10.0/24 (VLAN10) and the second one to 20.20.20.0/24 (VLAN20). By default, if the switch is just a normal Layer 2 switch the two hosts can not communicate between them because they belong to different VLANs and there is no routing. Thus, if we want to provide network connectivity between the two VLANs we need to have a Layer 3 engine somewhere in the network. This can be accomplished either if the switch is Layer 3 or if there is a router in place. In our example we use a router to provide Layer 3 connectivity as shown in our diagram.
The router uses just a single interface connected to a trunk port on the switch. The Router interface can be divided into two subinterfaces, with each subinterface belonging to the appropriate VLAN. The switch port connected to the router must be a trunk in order to be able to carry both VLANs towards the router port. Lets see the configuration below:
SWITCH CONFIGURATION
# conf t
(config)# vlan database
(config-vlan)# vlan 10 name RED
(config-vlan)# vlan 20 name GREEN
(config-vlan)# exit
(config)# interface FastEthernet1/0/1
(config-if)# description trunk-to-router-on-a-stick
(config-if)# switchport trunk encapsulation dot1q
(config-if)# switchport mode trunk
(config-if)# exit
(config)# interface FastEthernet1/0/2
(config-if)# description connection-to-RED-VLAN
(config-if)# switchport mode access
(config-if)# switchport access vlan 10
(config-if)# exit
(config)# interface FastEthernet1/0/3
(config-if)# description connection-to-GREEN-VLAN
(config-if)# switchport mode access
(config-if)# switchport access vlan 20
(config-if)# exit
(config)# exit
# copy run start
ROUTER CONFIGURATION
# conf t
(config)# interface fastethernet 0/0.10
(config-if)# encapsulation dot1q 10
(config-if)# ip address 10.10.10.2 255.255.255.0
(config-if)# exit
(config)# interface fastethernet 0/0.20
(config-if)# encapsulation dot1q 20
(config-if)# ip address 20.20.20.2 255.255.255.0
(config-if)# exit
Now, in order for the two hosts to communicate between them, they must set as default gateway the IP address of the corresponding router subinterface address (e.g for host in VLAN 10 the gateway must be 10.10.10.2 and for host in VLAN 20 the gateway must be 20.20.20.2).
Big bro, am so grateful thanx.
one love
The same way i helped you when you posted on CC.
How to provide routing between two VLANs on a simple Layer 2 switch using a Cisco router with just one interface. This is called also Router-on-a-stick.
http://www.cisco-tips.com/images/router-on-a-stick.jpg
A Cisco Layer 2 switch carries two VLANs (VLAN 10 – RED and VLAN 20 – GREEN) with two hosts connected on them as shown on the diagram above. The first host belongs to Network 10.10.10.0/24 (VLAN10) and the second one to 20.20.20.0/24 (VLAN20). By default, if the switch is just a normal Layer 2 switch the two hosts can not communicate between them because they belong to different VLANs and there is no routing. Thus, if we want to provide network connectivity between the two VLANs we need to have a Layer 3 engine somewhere in the network. This can be accomplished either if the switch is Layer 3 or if there is a router in place. In our example we use a router to provide Layer 3 connectivity as shown in our diagram.
The router uses just a single interface connected to a trunk port on the switch. The Router interface can be divided into two subinterfaces, with each subinterface belonging to the appropriate VLAN. The switch port connected to the router must be a trunk in order to be able to carry both VLANs towards the router port. Lets see the configuration below:
SWITCH CONFIGURATION
# conf t
(config)# vlan database
(config-vlan)# vlan 10 name RED
(config-vlan)# vlan 20 name GREEN
(config-vlan)# exit
(config)# interface FastEthernet1/0/1
(config-if)# description trunk-to-router-on-a-stick
(config-if)# switchport trunk encapsulation dot1q
(config-if)# switchport mode trunk
(config-if)# exit
(config)# interface FastEthernet1/0/2
(config-if)# description connection-to-RED-VLAN
(config-if)# switchport mode access
(config-if)# switchport access vlan 10
(config-if)# exit
(config)# interface FastEthernet1/0/3
(config-if)# description connection-to-GREEN-VLAN
(config-if)# switchport mode access
(config-if)# switchport access vlan 20
(config-if)# exit
(config)# exit
# copy run start
ROUTER CONFIGURATION
# conf t
(config)# interface fastethernet 0/0.10
(config-if)# encapsulation dot1q 10
(config-if)# ip address 10.10.10.2 255.255.255.0
(config-if)# exit
(config)# interface fastethernet 0/0.20
(config-if)# encapsulation dot1q 20
(config-if)# ip address 20.20.20.2 255.255.255.0
(config-if)# exit
Now, in order for the two hosts to communicate between them, they must set as default gateway the IP address of the corresponding router subinterface address (e.g for host in VLAN 10 the gateway must be 10.10.10.2 and for host in VLAN 20 the gateway must be 20.20.20.2).
Big bro, am so grateful thanx.i wish i can paste my experiment on this forum.i had one that am working on on a packet tracer,but i don't know how to get it here
one love
Big Evil
10-30-2009, 03:59 AM
No worries. Take a screen shot and copy it into MS paint, save as a jpg and upload here.
HTH.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.