DNS forwarding in L2 switch

Unanswered Question
Sep 14th, 2009

1. What are the commands to resolve the public DNS from switch? Even if public DNS added in switch with ip name-server commands.

2. How the DNS to be resolved in two seprate networks? &

3. The Network is: Internet-ADSL router- Router-Switch-PC desktop(

4. Why DNS resolved only in network?,that is directly connected to ADSL router.

5. Ping & browse through IP of any website open through network possible but why not resolved?

6. How to solve this issue for network for DNS forwarding?

Please help.Thanks in advance.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Giuseppe Larosa Mon, 09/14/2009 - 04:00

Hello Parag,

you may need to add

int vlan x

ip helper-address

on the switch SVi vlan interface that is in subnet so that DNS queries become routable.

DNS queries are sent with broadcast destination that cannot be routed. the above command modify the packet so that it can be routed.

The wan routed has then to modify the source ip address to make possible the answer to come back.

the fact that you can ping an browse using IP addresses means that internat subnet is correctly translated by NAT at wan router.


if the switch is only L2 the ip helper address has to be added to the router L3 interface in ip subnet

Hope to help


Jon Marshall Mon, 09/14/2009 - 04:09


"DNS queries are sent with broadcast destination that cannot be routed"

Are you sure about this ?. If the client has a DNS server configured then wouldn't it be a unicast packet with a destination IP address of the DNS server ?

Edit - Sorry Giuseppe should have mentioned that this is a follow on from this thread -



Giuseppe Larosa Mon, 09/14/2009 - 04:12

Hello Jon,

you are right of course it is the reason why ipconfig /all is checked on user pcs when they claim to have resolution problems to see what DNS servers they are trying to use.


I see there was a previous thread I remembered one with a similar title last days.

Hope to help


pp1326mah Tue, 09/15/2009 - 04:31


Till problem is the same.

Only ADSL router connected LAN segment subnet allowed for resolving the DNS but not for any other network? What else configuration required? or required internal DNS server for resolving the other networks?

Kindly help.

pp1326mah Tue, 09/15/2009 - 04:37


Thanks for valuable suggestion.

1. I tried mentioned commands with public address of WAN interface of ADSL router

int vlan x

ip helper-address

2. How to create this interface on L2 switch of SVi vlan interface?

Still problem is the same only segment connected to ADSL router of LAN is resolved DNS but not other else.

Kindly help.

Giuseppe Larosa Tue, 09/15/2009 - 05:08

Hello Sarag,

my suggestion as Jon has noted is out of context in your case.

I will review the previous thread that Jon has linked.

Hope to help



This Discussion