Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Attention: The Community will be in read-only mode on 12/14/2017 from 12:00 am pacific to 11:30 am.

During this time you will only be able to see content. Other interactions such as posting, replying to questions, or marking content as helpful will be disabled for few hours.

We apologize for the inconvenience while we perform important updates to the Community.

New Member

DNS and Default-router

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

5 REPLIES
Cisco Employee

Re: DNS and Default-router

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

New Member

Re: DNS and Default-router

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

Hall of Fame Super Blue

Re: DNS and Default-router

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

New Member

Re: DNS and Default-router

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

Re: DNS and Default-router

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

401
Views
0
Helpful
5
Replies
CreatePlease to create content