dns relay(through dhcp)...

Jul 26, 2006 4 Replies

I have a cisco806 with 2 ethernet ports, (Ethernet1 is connected to the internet, Ethernet0 is connected to my LAN).



The router picks up everthing using DHCP, and passes everthing internally using DHCP.



But no-one,(not even the router itself), can connect to,(or even ping), either of the dns without adding the following 2 lines of code,(y.y.y.y is the ISP gateway):



ip route x.x.x.a 255.255.255.255 y.y.y.y ip route x.x.x.b 255.255.255.255 y.y.y.y



Why would this be?



fyi: I don't want to leave the ISP gateway in the configuration if possible.



Partial configuration follows: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! version 12.2 ! ip name-server x.x.x.a ip name-server x.x.x.b ip dhcp excluded-address 192.168.0.1 192.168.0.200 ! ip dhcp pool main import all network 192.168.0.0 255.255.255.0 default-router 192.168.0.1 dns-server x.x.x.a ! no ip dhcp-client network-discovery ! interface Ethernet0 ip address 192.168.0.1 255.255.255.0 no ip redirects ip nat inside no cdp enable ! interface Ethernet1 ip address dhcp no ip unreachables ip nat outside no cdp enable ! ip nat inside source list 101 interface Ethernet1 overload ip classless ip route x.x.x.a 255.255.255.255 y.y.y.y ip route x.x.x.b 255.255.255.255 y.y.y.y ! access-list 101 permit ip 192.168.0.0 0.0.0.255 any no cdp run ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Default route ???

ip route 0.0.0.0 0.0.0.0 dhcp

or

ip route 0.0.0.0 0.0.0.0 y.y.y.y

I don't have one.

fyi: Everything seems to work without one, and this way the dhcp seems to get the default route WITHOUT having to hard code it in.

However, the 2 dns IPs,(which again the dhcp picks up), seem to not route?!?!?!

You want to have a default route !!!

The dns servers IP addresses could change at any point in time.

IMHO configuring static routes for the current dns servers is not a good idea

So configure a default route. remove the current static and confirm that you have connectivity by name...

So post "show ip route" then. Do you perhaps have "no ip classless" configured?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required