0

I have 2 nic server. eth0 and eth1 eth0 conected internet and its connected Static IP address 192.168.1.200 DNS 192.168.1.1 GW 192.168.1.1

eth1 configured as dhcp server and assign ip address to clients. ip address 192.168.27.1 DNS 192.168.27.1 GW 192.168.27.1 RANGE 192.168.27.2, 192.168.27.200

DHCP client ping with eth0 and modem but the problem is i cannot access internet dhcp client cannot ping google.com

closed as unclear what you're asking by Ipor Sircer, Scott, Jeff Schaller, JigglyNaga, schily Nov 14 '18 at 15:03

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • @jimmij /etc/resolv.conf option domain-name-servers 192.168.1.1, 8.8.8.8, 8.8.4.4 – Kiran Mathew Nov 14 '18 at 9:07
  • @ jimmij option domain-name-servers 192.168.1.1, 8.8.8.8, 8.8.4.4 option domain-name-servers 192.168.1.1 ; generated by /sbin/dhclient-script search domain.name dhcp nameserver 192.168.1.1 nameserver 8.8.8.8 – Kiran Mathew Nov 14 '18 at 9:20
2

You've specified a default gateway 192.168.27.1 for eth1. This means you're saying any system on the IPv4 internet should be reachable by sending packets through 192.168.27.1.

The system is probably believing you and trying to connect to the internet through 192.168.27.1 because its gateway entry happens to be before the 192.168.1.1 gateway entry in the routing table.

If eth1 is not connected to the internet, don't specify a default gateway for it. Leave the GW entry for eth1 blank.

From the question comments:

/etc/resolv.conf option domain-name-servers 192.168.1.1, 8.8.8.8, 8.8.4.4

option domain-name-servers ... is the configuration syntax for dhcpd.conf; it is not correct for /etc/resolv.conf.

  • Thank you for ur information. But dhcp client can ping 192.168.1.1. It is the eth0 GATEWAY – Kiran Mathew Nov 14 '18 at 10:04
  • Yes, because it is clear to the server that any traffic to 192.168.1.* must go out of eth0. But the problem is in routing any traffic whose destination is neither 192.168.1.* nor 192.168.27.*. What does ip route show or /sbin/route -n say on the server? – telcoM Nov 14 '18 at 11:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.