- Posts: 13
- Thank you received: 0
How to connect inter VLANs?
13 years 6 months ago #36850
by payeh
How to connect inter VLANs? was created by payeh
Hi there,
Im beginner here,need advises from experts here
OK,let me start, i have setup simple networking system for connection between two VLANs using 2950 switch and 1841 router. The problem is I dont know how to configure 1841 router to enable VLAN1 and VLAN2 to communicate each other(to enable PC VLAN1 can ping PC VLAN2).Please refer the diagram:
Please advise me how to configure 1841 router to make VLAN1 and VLAN2 can communicate.
Thanks
Im beginner here,need advises from experts here
OK,let me start, i have setup simple networking system for connection between two VLANs using 2950 switch and 1841 router. The problem is I dont know how to configure 1841 router to enable VLAN1 and VLAN2 to communicate each other(to enable PC VLAN1 can ping PC VLAN2).Please refer the diagram:
Please advise me how to configure 1841 router to make VLAN1 and VLAN2 can communicate.
Thanks
13 years 6 months ago #36853
by beepee
0101001101110111011000010110110001101100011011110111011100100000011101000110100001100101001000000111001001100101011001000010000001110000011010010110110001101100001011100010111000101110
Replied by beepee on topic Re: How to connect inter VLANs?
Good evening,
For communication to work between VLAN's, there are two configurations you can choose from.
1. Traditional Inter-VLAN Routing
2. Router-on-a-stick
For the topology you have provided, Router-on-a-stick would work best, since you are only using one router interface.
You will need to make the link between the router and switch a trunk link and assign sub-interfaces to the connected router interface. (i.e. For Fa0/0 you would have Fa0/0.10 and Fa0/0.20) Follow? Assign VLAN 10 to sub-interface Fa0/0.10 and VLAN 20 to Fa0/0.20.
Before you assign IP addresses to the sub-interfaces, you must configure an encapsulation method (i.e. dot1q) on the router for EACH INTERFACE.
Assign IP addresses to the sub-interfaces according to the subnet used in each corresponding VLAN AFTER the previous step.
You will receive an error if you do otherwise.
[code:1]R1(config)# interface fa0/0.10
R1(config-subif)# encapsulation dot1q 10
R1(config-subif)# ip address 10.10.10.1 255.255.255.0[/code:1]
Follow?
For communication to work between VLAN's, there are two configurations you can choose from.
1. Traditional Inter-VLAN Routing
2. Router-on-a-stick
For the topology you have provided, Router-on-a-stick would work best, since you are only using one router interface.
You will need to make the link between the router and switch a trunk link and assign sub-interfaces to the connected router interface. (i.e. For Fa0/0 you would have Fa0/0.10 and Fa0/0.20) Follow? Assign VLAN 10 to sub-interface Fa0/0.10 and VLAN 20 to Fa0/0.20.
Before you assign IP addresses to the sub-interfaces, you must configure an encapsulation method (i.e. dot1q) on the router for EACH INTERFACE.
Assign IP addresses to the sub-interfaces according to the subnet used in each corresponding VLAN AFTER the previous step.
You will receive an error if you do otherwise.
[code:1]R1(config)# interface fa0/0.10
R1(config-subif)# encapsulation dot1q 10
R1(config-subif)# ip address 10.10.10.1 255.255.255.0[/code:1]
Follow?
0101001101110111011000010110110001101100011011110111011100100000011101000110100001100101001000000111001001100101011001000010000001110000011010010110110001101100001011100010111000101110
13 years 6 months ago #36854
by payeh
Replied by payeh on topic Re: How to connect inter VLANs?
At last someone have replied my question,thanks beepee
Ok,i'll give the some details.Basically i have setup VLAN10 and VLAN20:
VLAN 10 (192.168.1.1/24)
-PC1 (192.168.1.2/24)
-PC2 (192.168.1.3/24)
VLAN 20 (192.168.2.1/24)
-PC3 (192.168.2.2/24)
-PC4 (192.168.2.3/24)
In router mode, I have configured:
Router(config-if)#no ip address
Router(config-if)#no shutdown
---VLAN 10----
Router(config-if)#int fastethernet 0/0.10
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#ip address 192.168.1.4 255.255.255.0
---VLAN 20----
Router(config-if)#int fastethernet 0/0.20
Router(config-subif)#encapsulation dot1q 20
Router(config-subif)#ip address 192.168.2.4 255.255.255.0
but still I cannot ping between host in VLAN10 and VLAN20. Did I miss something or wrong configuration?
Ok,i'll give the some details.Basically i have setup VLAN10 and VLAN20:
VLAN 10 (192.168.1.1/24)
-PC1 (192.168.1.2/24)
-PC2 (192.168.1.3/24)
VLAN 20 (192.168.2.1/24)
-PC3 (192.168.2.2/24)
-PC4 (192.168.2.3/24)
In router mode, I have configured:
Router(config-if)#no ip address
Router(config-if)#no shutdown
---VLAN 10----
Router(config-if)#int fastethernet 0/0.10
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#ip address 192.168.1.4 255.255.255.0
---VLAN 20----
Router(config-if)#int fastethernet 0/0.20
Router(config-subif)#encapsulation dot1q 20
Router(config-subif)#ip address 192.168.2.4 255.255.255.0
but still I cannot ping between host in VLAN10 and VLAN20. Did I miss something or wrong configuration?
13 years 6 months ago #36858
by apit
Replied by apit on topic Re: How to connect inter VLANs?
have you set gateway for the both pc at vlan 10 & vlan 20?
From PC2(Vlan 1) , try to ping to gateway 1st before you ping to pc5(Vlan2).
From PC2(Vlan 1) , try to ping to gateway 1st before you ping to pc5(Vlan2).
13 years 6 months ago #36859
by payeh
yes. I have set the gateway. I can ping from PC2(VLAN1) 192.168.1.3 to its gateway 192.168.1.1.
But cannot ping from PC2(VLAN1) 192.168.1.3 to router VLAN1 interface 192.168.1.4.
Anyone?
Replied by payeh on topic Re: How to connect inter VLANs?
have you set gateway for the both pc at vlan 10 & vlan 20?
From PC2(Vlan 1) , try to ping to gateway 1st before you ping to pc5(Vlan2).
yes. I have set the gateway. I can ping from PC2(VLAN1) 192.168.1.3 to its gateway 192.168.1.1.
But cannot ping from PC2(VLAN1) 192.168.1.3 to router VLAN1 interface 192.168.1.4.
Anyone?
13 years 6 months ago #36860
by apit
Replied by apit on topic Re: How to connect inter VLANs?
ermmm....let's try review step by step...
1- Switch Configuration
//Create Vlan At Switch level //
Switch#
Switch#vlan database
Switch(vlan)#vlan 10
VLAN 10 added:
Name: VLAN0010
Switch(vlan)#vlan 20
VLAN 20 added:
Name: VLAN0020
Switch(vlan)#apply
APPLY completed.
Switch(vlan)#
//Assume Switch connected to router using port f0/24 //
Switch(config)#int f0/24
Switch(configif)#switchport trunk encapsulation dot1q
Switch(configif)#switchport mode trunk
Switch(configif)#
//Assume PC1 using port f0/1 at switch level //
Switch(configif)#
Switch(configif)#int f0/1
Switch(configif)#switchport access vlan 10
Switch(configif)#switchport mode access
//Assume PC2 using port f0/2 at switch level //
Switch(configif)#
Switch(configif)#int f0/2
Switch(configif)#switchport access vlan 20
Switch(configif)#switchport mode access
Switch(configif)#
Switch#wr
1- Switch Configuration
//Create Vlan At Switch level //
Switch#
Switch#vlan database
Switch(vlan)#vlan 10
VLAN 10 added:
Name: VLAN0010
Switch(vlan)#vlan 20
VLAN 20 added:
Name: VLAN0020
Switch(vlan)#apply
APPLY completed.
Switch(vlan)#
//Assume Switch connected to router using port f0/24 //
Switch(config)#int f0/24
Switch(configif)#switchport trunk encapsulation dot1q
Switch(configif)#switchport mode trunk
Switch(configif)#
//Assume PC1 using port f0/1 at switch level //
Switch(configif)#
Switch(configif)#int f0/1
Switch(configif)#switchport access vlan 10
Switch(configif)#switchport mode access
//Assume PC2 using port f0/2 at switch level //
Switch(configif)#
Switch(configif)#int f0/2
Switch(configif)#switchport access vlan 20
Switch(configif)#switchport mode access
Switch(configif)#
Switch#wr
Time to create page: 0.132 seconds