Cannot ping out from a LAN

hi

I *can* ping my router, interface and loopback. I *can't* ping outside the LAN however:

# ping [url]http://www.google.com[/url]

Code:
ping: cannot resolve www.google.com: Host name lookup failure

My FreeBSD box is patched into the router with ethernet. My network configuration looks like:
http://drupal876.co.uk/img/network.jpg

Has anyone had similar problems?

Thanks in advance.
 
SirDice said:
Configure your DNS servers correctly in /etc/resolv.conf. See resolv.conf(5).

Thanks.

My /etc/resolv.conf currently looks like:

Code:
# Generated by resolvconf
nameserver 194.168.4.100
nameserver 194.168.8.100
If I'm not mistaken the first IP address showed up whilst I did a post
# sysinstall and went into the Networking options.

I've tried editing /etc/resolv.conf with

Code:
nameserver 192.168.0.5 # LAN machine address
nameserver 1.2.3.4     # WAN address ISP

Can't ping out though? Can you throw me a bone?
 
Your drawing shows 2 machines, one FreeBSD laptop and one desktop.
 
SirDice said:
Your drawing shows 2 machines, one FreeBSD laptop and one desktop.

That's correct. OK, the desktop computer is running Windows7 pro. I'm familiar with the cmd utility. My next question would be how do I find DNS settings in Windows? I wasn't aware my desktop would have any DNS server information.

Edit:

In Windows at the cmd:

[CMD=">"] ipconfig /all[/CMD]

It's showing the same DNS information as /etc/resolv.conf:

Code:
DNS servers..........................194.168.4.100
                                     194.168.8.100
 
OK, all machines are sharing the same DNS server settings namely:

194.168.4.100
194.168.8.100
 
Is the Windows 7 machine configured to "Obtain an IP address automatically"?

If that's the case configure your FreeBSD machine to use DHCP. It will get its IP address, subnet mask, default gateway and DNS settings automatically.
 
SirDice said:
Is the Windows 7 machine configured to "Obtain an IP address automatically"?

If that's the case configure your FreeBSD machine to use DHCP. It will get its IP address, subnet mask, default gateway and DNS settings automatically.

Thanks SirDice. Editing /etc/rc.conf with:

Code:
# ifconfig_re0="inet 192.168.0.5 netmask 255.255.255.0"
ifconfig_re0="DHCP"

I can now ping outside of the LAN. Brill. A couple more questions. Are the nameserver addresses from my ISP? 194.168.4.100 & 194.168.8.100.

My FreeBSD machine is running as a public web server as you know from earlier posts. I was under the impression that the FreeBSD box needed a static ip address to be accessible from outside the LAN i.e. via the public internet. Is this not the case?
 
c00kie said:
Are the nameserver addresses from my ISP? 194.168.4.100 & 194.168.8.100.
If your ISP is Cable Online Ltd, yes.

My FreeBSD machine is running as a public web server as you know from earlier posts. I was under the impression that the FreeBSD box needed a static ip address to be accesible from outside the LAN i.e. via the public internet. Is this not the case?
Strictly speaking no but it does make it a little easier. Simplest thing to do is to go in your modem/router configuration and configure it's DHCP server. You need to enter the machine's MAC address and the modem/router will make sure your machine always receives the same IP address. It's usually called 'reservations' or 'static assignment', you'll have to consult your modem/router's manual for that.
 
c00kie said:
A couple more questions. Are the nameserver addresses from my ISP? 194.168.4.100 & 194.168.8.100.
Yes
I was under the impression that the FreeBSD box needed a static ip address to be accesible from outside the LAN i.e. via the public internet.
Any service to be accessible by world deserves a global IP. It could be static or dynamic there's no difference. Of course many services like DNS prefer static because it not make sense to put them on dynamic IP.
 
SirDice said:
If your ISP is Cable Online Ltd, yes.

It's usually called 'reservations' or 'static assignment', you'll have to consult your modem/router's manual for that.

Excellent. Nice insight into networking also thanks.
 
Back
Top