05-28-2013 05:41 AM - edited 03-07-2019 01:36 PM
Hi folks,
I am running a router-on-a stick topology with 2 different vlans, each one for a subnet for separate data and voice traffic.
The router has 2 Fa0/0 subinterfaces, one for each vlan I want to route.
Also, this router has 2 dhcp pools configured, again one for data and the other one for the ip phones.
The uplink interface on the switch connecting hosts and ip phones is configured as a trunk.
From the router, I can see the two subnets:
MADrouter#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
192.168.0.0/25 is subnetted, 2 subnets
C 192.168.0.0 is directly connected, FastEthernet0/0.1
C 192.168.0.128 is directly connected, FastEthernet0/0.10
MADrouter#
But the I cannot ping any host beyond the switch, and vice-versa.
Hosts are able to communicate between themselves and L2. Problem seems to be on the router.
Also, DHCP seems not to be working properly, any of the hosts/phones are taking ip addresses automatically.
/// Router config ///
!
!
ip dhcp excluded-address 192.168.0.1 192.168.0.10
ip dhcp excluded-address 192.168.0.129 192.168.0.139
!
ip dhcp pool VLAN_Datos
network 192.168.0.0 255.255.255.128
default-router 192.168.0.1
ip dhcp pool VLAN_VoIP
network 192.168.0.128 255.255.255.128
default-router 192.168.0.129
option 150 ip 192.168.0.9
!
interface FastEthernet0/0
description **Link a MADswitch**
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 192.168.0.1 255.255.255.128
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.0.129 255.255.255.128
ip helper-address 192.168.0.1
!
/// Switch config ///
!
interface FastEthernet0/1
description **Link a MADrouter**
switchport mode trunk
!
interface FastEthernet0/10
description **PBX ASTERISK**
switchport mode access
!
!
interface FastEthernet0/22
description **PC 2**
switchport access vlan 2
switchport mode access
!
interface FastEthernet0/23
description **Puesto de RRHH #3**
switchport access vlan 2
switchport voice vlan 3
!
interface FastEthernet0/24
description **PC 1**
switchport access vlan 2
switchport mode access
!
!
interface Vlan2
description DATOS
ip address 192.168.0.1 255.255.255.128
ip helper-address 192.168.0.1
!
interface Vlan3
description VoIP
ip address 192.168.0.129 255.255.255.128
ip helper-address 192.168.0.1
!
What I am doing wrong? Thanks in advance.
Solved! Go to Solution.
05-28-2013 07:26 AM
Hello Larua,
Your switch config is still not correct? You dont require two svi interfaces on a L2 switch.
As stated in my first posting, remove the svi on the L2 switch and add just one interface:
conf t
interface Vlan1
description DATOS
ip address 192.168.0.x 255.255.255.128
no interface Vlan2
no interface Vlan3
ip default-gateway 192.168.0.1
vlan2
exit
Then all DATOSaccess ports
switchport access vlan 1
Then all VOICE access ports
switchport access vlan 2
this should also resolve your server connection issue?
res
Paul
Please don't forget to rate any posts that have been helpful.
Thanks.
05-28-2013 05:57 AM
Hello
First of all, on the router you have specifed vlan 1 and 10 but on the switch you have vlan 2 & 3, and both have the same ip addresses!
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 192.168.0.1 255.255.255.128
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 192.168.0.129 255.255.255.128
Switch
the switch would only require to have one svi addrress of either of these vlans and make sure the L2 vlans are created on the switch.
lastly, try removing the ip helper addresses on the switch svi as clients should be able to obtain dhcp from the related sub interface on the router.
conf t
interface Vlan1
description DATOS
ip address 192.168.0.10 255.255.255.128
no interface Vlan2
no interface Vlan3
ip default-gateway 192.168.0.1
vlan2
exit
res
Paul
Please don't forget to rate any posts that have been helpful.
Thanks.
05-28-2013 06:04 AM
Hi Laura,
Modify the configuration as below
On Router
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 192.168.0.1 255.255.255.128
!
interface FastEthernet0/0.10
encapsulation dot1Q 2
ip address 192.168.0.129 255.255.255.128
On Switch
interface Vlan1
description DATOS
ip address 192.168.0.x 255.255.255.128
!
interface Vlan2
description VoIP
ip address 192.168.0.x 255.255.255.128
!
interface FastEthernet0/22
description **PC 2**
switchport access vlan 1
switchport mode access
!
interface FastEthernet0/23
description **Puesto de RRHH #3**
switchport access vlan 1
switchport voice vlan 2
!
interface FastEthernet0/24
description **PC 1**
switchport access vlan 1
switchport mode access
In short you need to match the "encapsulation dot1Q X " X value on the router with same VLAN number on the switch end.
Hope that helps
Regards
Najaf
Please rate when applicable or helpful !!!
05-28-2013 06:09 AM
Najaf
you have duplcate ip address assinment just like the OP has?
res
Paul
Please don't forget to rate any posts that have been helpful.
Thanks.
05-28-2013 06:12 AM
Thanks Paul for point this out. This is now corrected :-)
Regards
Najaf
Please rate when applicable or helpful !!!
05-28-2013 06:17 AM
Najaf
You have correctly identified that the basic issue is a mismatch between the VLANs specified in the router config and the VLANs configured on the switch. Unfortunately in your suggestion you are giving 192.168.0.1 on both the router interface and switch interface and the same duplicate use of 192.168.0.129.
HTH
Rick
05-28-2013 06:19 AM
Hi Rich,
Paul just pointed this out and i have corrected this now :-)
Thanks in advance.
Regards
Najaf
05-28-2013 06:48 AM
Thank you all for your valuable responses.
Based on your comments I made modifications on both the router and switch. I fixed the VLAN IDs mismatch and configured the default gw on the switch. Also removed the unnecessary ip helper command on the vlans. Now the DHCP assignment is working perfectly on all hosts and also on the phone !!For clarification, this is the resultant config:
//Router//
!
ip dhcp excluded-address 192.168.0.1 192.168.0.10
ip dhcp excluded-address 192.168.0.129 192.168.0.139
!
ip dhcp pool VLAN_Datos
network 192.168.0.0 255.255.255.128
default-router 192.168.0.1
ip dhcp pool VLAN_VoIP
network 192.168.0.128 255.255.255.128
default-router 192.168.0.129
option 150 ip 192.168.0.9
!
!
interface FastEthernet0/0
description **Link a MADswitch**
no ip address
duplex auto
speed auto
!
!
interface FastEthernet0/0.2
description **matches Vlan2 for Data**
encapsulation dot1Q 2
ip address 192.168.0.1 255.255.255.128
!
interface FastEthernet0/0.3
description **matches Vlan3 for Voice**
encapsulation dot1Q 3
ip address 192.168.0.129 255.255.255.128
ip helper-address 192.168.0.1
!
//Switch//
!
hostname MADswitch
!
!
spanning-tree mode pvst
!
interface FastEthernet0/1
description **Link a MADrouter**
switchport mode trunk
!
!
interface FastEthernet0/10
description **PBX ASTERISK**
switchport mode access
!
!
interface FastEthernet0/22
description **PC 2**
switchport access vlan 2
switchport mode access
!
!
interface FastEthernet0/23
description **Puesto de RRHH #3**
switchport access vlan 2
switchport voice vlan 3
!
interface FastEthernet0/24
description **PC 1**
switchport access vlan 2
switchport mode access
!
!
interface Vlan2
description DATOS
ip address 192.168.0.1 255.255.255.128
!
interface Vlan3
description VoIP
ip address 192.168.0.129 255.255.255.128
!
ip default-gateway 192.168.0.1
!
Now I have a second issue I wasn´t aware of.I have an asterisk server from which my phone is trying to register. This Asterisk server has a static ip address of 192.168.0.9 and mask 255.255.255.128 + gw 192.168.0.1
The thing is that this server isn´t reachable from any point of the network (router-switch or any of the hosts inside the LAN). I believe I should place it under some vlan? But I´m not sure, because if I do that I believe the ip automatic assigment will be overriden and I need it to be under an static IP.
!
interface FastEthernet0/10
description **PBX ASTERISK**
switchport mode access
!
Any suggestion?again, thank you very much ALL.
05-28-2013 07:16 AM
Laura
With this configuration your asterisk server is in vlan 1. And you do not have any addressing or routing configured for vlan 1 that I can tell. If you put FastEthernet0/10 into vlan 2 it should work just fine. And the static addressing would not be an issue because you have configured excluded addresses that include 192.168.0.9.
I will point out that your config has the same issue that we found in the original suggestion from Najaf. Your vlan interfaces on the switch are using the same IP addresses as the router. The easy thing would be to make them 1 larger than what is configured now.
HTH
Rick
05-28-2013 07:26 AM
Hello Larua,
Your switch config is still not correct? You dont require two svi interfaces on a L2 switch.
As stated in my first posting, remove the svi on the L2 switch and add just one interface:
conf t
interface Vlan1
description DATOS
ip address 192.168.0.x 255.255.255.128
no interface Vlan2
no interface Vlan3
ip default-gateway 192.168.0.1
vlan2
exit
Then all DATOSaccess ports
switchport access vlan 1
Then all VOICE access ports
switchport access vlan 2
this should also resolve your server connection issue?
res
Paul
Please don't forget to rate any posts that have been helpful.
Thanks.
05-28-2013 10:09 AM
Thank you all,
I put the PBX port under data vlan as per Richard advise and re-write vlan config as pdriver suggested. Now I have one data vlan (modified ip to avoid duplication with the router interfaces) and another "empty" voice vlan. This is now working and I have both end-to-end network connectivity.
Once again thank you very much for your great help !!
05-28-2013 10:23 AM
Laura
I am glad that our suggestions helped you to find solutions for these issues. Thank you for using the rating system to rate responses and to mark this question as answered. It makes the forum more useful when people can read about problems and can know that a solution was found. Your markings have contributed to this process.
HTH
Rick
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