DNS and Default-router

Unanswered Question
Oct 30th, 2007
User Badges:

A cisco switch(layer 3 and layer 2)can be configure so it contains dns-server and default gateway. What's the purpose for that. If i don't do this , might cause any problems.

Thanks

moses

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
ankbhasi Tue, 10/30/2007 - 10:05
User Badges:
  • Cisco Employee,

Hi Moses,


Default gateway is basically used on layer 2 switches or layer 3 switches working as a layer 2 switch.


Layer 2 switch has only one layer 3 interface for management purpose and when you try to manage your switch from some remote subnet then switch should know where to send the reply back and that is the job of default gateway on l2 switches.


If it is a layer 3 switch it will have default route.


HTH


Ankur


*Pls rate all helpfull post

moses12315 Tue, 10/30/2007 - 11:23
User Badges:

Ankur thanks a lot

What's the role of the DNS. Today for examble i put a pc on the net. I tried to ping a spesific name and i couldn't. The dhcp server (router)gave the right dns server to resolve the the name , but the pc couldn't. Meantime the pc was connected directly to a layer 3 switch which was not configured with the right dns server. After i put the rigth dns server at the swithc then the pc could resolve the name.

Why this is happenning?

Thanks a lot

moses

Jon Marshall Tue, 10/30/2007 - 13:59
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Hi Moses


DNS as you probably know is used to resolve names to IP addresses and IP addresses to names.


The dns-server option under the DHCP config on the router tells the PC which server to query when it needs to resolve something with DNS.


I'm not sure i entirely follow what your problem was. What dns-server entry were you handing out to PC and did that server have a record for the name you were pinging ?


Jon

moses12315 Wed, 10/31/2007 - 08:32
User Badges:

Hi jon and thanks

The network is like this.The router connected to a layer 3 switch and a PC connected to the layer 3 switch. The dns server has the ip 192.168.1.1/24(lets say dns.microsoft.com as an examble for Full name). The DHCP server of the router has the following configuration.

Ip dhcp pool net1

network 10.10.1.0 255.255.255.0

default-gateway 10.10.1.1/24 (which is the interface of the router).

dns server 192.168.1.1

So when the pc gets the ip from the router and write at cmd of the pc ipconfig/all we can see the dns server 192.168.1.1 .

At the layer 3 switch i did not put the 192.168.1.1 as a dns server.

When i ping from the pc 192.168.1.1 i can see it. When i ping with its name(dns.microsoft.com) i can not.

Then i put the 192.168.1.1 as a dns server on the layer 3 switch. Then from my pc i could ping with the name(dns.microsoft.com).

Why is that happening?

What's the purpose of putting a dns-server on a layer 3 switch?

Thanks

moses

Kevin Dorrell Wed, 10/31/2007 - 08:36
User Badges:
  • Green, 3000 points or more

The PC only reads the address of the DNS server when it does its DHCP request. If the router gives it a false DNS server address, the PC is stuck with it until next time it re-boots. Correcting the DNS server address in the router will not have any effect until next time the PC re-starts and gets its DHCP settings from the router.


Kevin Dorrell

Luxembourg

Actions

This Discussion