Re: Can't ping or get some sites

From: David Efflandt (efflandt_at_xnet.com)
Date: 09/08/03


Date: Mon, 8 Sep 2003 06:57:45 +0000 (UTC)

On 2 Sep 2003 21:43:35 -0700, Chris <shock106@yahoo.com> wrote:
> From what it looks like I can't seem to resolve IP addresses from
> domain names when I am running my NAT script. The eth1 startup script
> is set for eth0 as the gateway, and eth1 gets its IP from a DHCP
> server. Is this how I am supposed to set eth1 to resolve IPs? If not
> how do I do that?

You made a slight typo. It appears that your eth0 (not eth1) gets its IP
from DHCP. The only reason a gateway would cause DNS failure, is if the
gateway is incorrect, which makes the nameserver(s) unreachable.

> /etc/sysconfig/network-script/ifcfg-eth0
>
> DEVICE=eth0
> ONBOOT=yes
> BOOTPROTO=dhcp
>
> /etc/sysconfig/network-script/ifcfg-eth1
>
> DEVICE=eth1
> ONBOOT=yes
> BOOTPROTO=static
> IPADDR=192.168.1.1
> NETMASK=255.255.255.0
> GATEWAY=eth0
>
> For eth1 should I set gateway to something else? If so what?

You should NOT set any gateway for eth1. It sounds like you are looping a
gateway back to yourself, which may be your problem. eth1 should just
have a net route for 192.168.1.0/255.255.255.0, which network scripts
should do automatically based on your IPADDR and NETMASK.

However, any other boxes on your eth1 network would need a default gw to
your eth1 IP and you would need to have ip_forward enabled. You would
also likely need to masquerade anything going out eth0 as your eth0 IP,
since your university probably knows nothing about your private network or
how to route to it.

-- 
David Efflandt - All spam ignored  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


Relevant Pages

  • RE: starting eth without IP address
    ... I'd got the same question and the most elegant way that I've found is to ... I don't know if this way is the debian way but sure it's a linux way;-) ... I want to start eth1 without an IP ... >script always complains about missing configuration and of course eth1 ...
    (Debian-User)
  • Re: Is it possible to manually activate an eth0 connection?
    ... iface eth1 inet static ... The gateway should be 192.168.1.1 ... so you are using a router. ... the gateway address for your laptop. ...
    (Ubuntu)
  • Re: Belkin and wireless modem
    ... Find a real news server. ... "GATEWAY" entry does not belong here. ... of the next hop router, and that can not be any address on "this" box. ... And what is the output of the commands '/sbin/ifconfig eth1' and ...
    (comp.os.linux.networking)
  • How do I add a gateway to eth1?
    ... I need help figuring out how to add a second gateway to eth1, ... the host system has a default gateway on the external NIC and network, ... The thing is, on our LAN network 192.168.0.1 we have a LAN router/gateway, so ...
    (Debian-User)
  • Re: Revisted Eth1 problem
    ... I have changed my ethernet card on Eth1. ... I would use a netmask of 255.255.255.0 and no default gateway. ... Internet connection. ... the DHCP server, and an update turned it off. ...
    (Fedora)