LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-13-2005, 12:05 AM   #1
neuroman
LQ Newbie
 
Registered: Jan 2005
Posts: 18

Rep: Reputation: 0
Local PCs see Internet but not each other


My apologies in advance for a question that must have been answered before, but I sure can't find the answer.

I have a very simple local net with two PCs that, given a fqhn, can communicate with anything on the internet, but the only way they can talk to each other is if I specify their dynamically assigned IP addresses.

Network architecture:
fantom and moth are PCs running RHL 7.3
They connect to two lan ports on a ZyXEL B-2000 router/firewall.
The B-2000's wan port is connected to a DSL modem (Efficient Networks Speedstream 5100, if that matters).

The ISP assigns the domain name via DHCP, and the router assigns IP addresses to fantom and moth.

So, for example, on fantom
ping moth
fails, but
ping 192.168.1.33 (IP address assigned to moth by the B-2000)
succeeds.

It is slowly dawning on me that I may need to assign static IP addresses to fantom and moth, and edit their hosts files accordingly. If this a belated realization of the obvious, fine (recognition of one's ignorance is the first step toward wisdom).

But also not so fine. What's the benefit of letting the router assign the PCs' IP addresses, if, in order to get them to talk to each other, the user has to know the actual numeric addresses? It also raises the question of what to do when I want to use moth (a laptop) in another room and connect via wireless card, because then I'll have no control over its IP address--the B-2000 (which, in additon to 4 lan ports, does 802.11b)
will assign it one--or am I wrong again?

Last edited by neuroman; 01-13-2005 at 12:11 AM.
 
Old 01-13-2005, 03:01 AM   #2
BinaryBob
Member
 
Registered: Aug 2002
Posts: 117

Rep: Reputation: 15
What you are attempting to do is a DHCP and DNS combination. So that you can ping moth, and have the DNS request answered by information created by the DHCP server, which in this case is a router. The good news is this Is possible, the bad news is, not likely in your current setup becasue of the nature of most consumer routers (I haven't looked into your specifically however). Even running an external DNS server wouldnt work becasue of the need to configure special options on the DHCP server. BTW this functionality as a whole is called Dynamic DNS.

IF HOWEVER, you wanted to remove the consumer router/firewall and replace it with a linux box, performing the same routing functions, then this would be a possibility. It would give you the freedom of control over both your DHCP and DNS server. But that is a significantly greater amount of work.

link for setup info if curious:
http://www.digitalpeer.com/id/setting

Other links widely available on google, use keywords: linux, DHCP, DDNS or "Dynamic DNS"

Good Luck
 
Old 01-13-2005, 03:04 AM   #3
bbk
Member
 
Registered: Jan 2005
Location: Budapest/Hungary
Distribution: knoppix-hdd/debian
Posts: 56

Rep: Reputation: 15
What you need is a DNS server. Check that your router does have one.
If you configure your router to assign dynamically addresses to clients in your internal network there should be a DNS server option too in the router.
If it does not have then you should not use its dynamic DHCP feature, should configure static IPs and edit hosts file.
It is not a unix bug, it is a router configuration issue.
I suggest you check your router's manual carefully and read DHCP and if exists DNS sections. Come back after then and will talk through if someting is missing.

Remember, DHCP + DNS is what you need.
 
Old 01-13-2005, 03:06 AM   #4
BinaryBob
Member
 
Registered: Aug 2002
Posts: 117

Rep: Reputation: 15
My appologies. Your router DOES suport Dynamic DNS internally, my mistake. BIG MISTAKE

What is the output of ifconfig -a
and the content of /etc/resolve.conf ?
 
Old 01-13-2005, 05:35 AM   #5
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
DNS can be tricky sometimes

Last edited by fotoguy; 01-13-2005 at 05:38 AM.
 
Old 01-13-2005, 08:53 AM   #6
k1mgy
Member
 
Registered: Jul 2004
Posts: 40

Rep: Reputation: 15
It might also be interesting to see the contents of resolv.conf and please also post the configuration files for your eth0 (or whichever one is used on your network).

I'm following this question as it is similar to an issue that I want to resolve (pun).

-m-
 
Old 01-13-2005, 03:03 PM   #7
neuroman
LQ Newbie
 
Registered: Jan 2005
Posts: 18

Original Poster
Rep: Reputation: 0
/sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:03:47:E5:F3:F7
inet addr:192.168.1.34 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25716 errors:0 dropped:0 overruns:0 frame:0
TX packets:22151 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:11458654 (10.9 Mb) TX bytes:4817732 (4.5 Mb)
Interrupt:11 Base address:0x9000

eth1 Link encap:Ethernet HWaddr 00:40:05:80:F1:23
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:9 Base address:0xdc00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:34 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2298 (2.2 Kb) TX bytes:2298 (2.2 Kb)


cat /etc/resolv.conf
nameserver 192.168.1.1
search sbcglobal.net


/etc/nsswitch.conf contains, among other stuff,
hosts: files nisplus dns


I've peered into the guts of the router, and discovered that it knows the names and IP addresses of both moth and fantom.
 
Old 01-13-2005, 03:22 PM   #8
BinaryBob
Member
 
Registered: Aug 2002
Posts: 117

Rep: Reputation: 15
All of that looks good. The problem must be within the router configuration somewhere.
 
Old 01-14-2005, 07:56 AM   #9
k1mgy
Member
 
Registered: Jul 2004
Posts: 40

Rep: Reputation: 15
Regarding the nameserver entry, at least in my setup, it's pointing to the nameservers that the isp assigns. Not that this will be a bother for internal addresses. I'm not familiar with your router. Does it act as a DNS server?

I think there may be two things to look at.

First, resolv.conf (I believe) wants the entry "search". This is germane, i believe, if you have a host controller on your local network. Do you?

Second, if you just want to resolve local machines, i think you can make entries in /etc/hosts.

The format is
ipaddress hostname alias

so for your machines it might be:


192.168.1.33 moth moth

I would strongly recommend using static ip's inside your local network. My wireless configuration allows me to set the laptop (on the wireless) to a static address, too.


I hope this is of some use.

-m-
 
Old 01-14-2005, 10:16 PM   #10
neuroman
LQ Newbie
 
Registered: Jan 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Ah, well, in the end the answer was simple: the router does not act as a DNS server. It does know the names and IP addresses of the local machines, but it's still not a DNS server. Manually adding the local PCs to /etc/hosts fixed the problem. Thanks to all for your suggestions.
 
Old 01-15-2005, 03:27 AM   #11
BinaryBob
Member
 
Registered: Aug 2002
Posts: 117

Rep: Reputation: 15
Strange, look at this link, then go to "datasheet" tis a PDF. It says all the features, and Dynamic DNS IS listed, maybe if you were to set up your own DNS it would do the updates, as you would require?

http://www.zyxel.com/product/model.p...lue=1021876859
 
Old 01-15-2005, 06:53 AM   #12
k1mgy
Member
 
Registered: Jul 2004
Posts: 40

Rep: Reputation: 15
DynamicDNS support won't do anything for this issue but it's great to see this in the new products coming out.
Setting up an internal dns server is way overkill, but educational. NeuroMan would likely earn part of his Linux degree in that class I think the right thing was to setup the hosts file and fix the nameservers entry. Good show!

Last edited by k1mgy; 01-15-2005 at 06:57 AM.
 
Old 06-01-2007, 04:54 AM   #13
dongyez
LQ Newbie
 
Registered: Jun 2007
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by neuroman
Ah, well, in the end the answer was simple: the router does not act as a DNS server. It does know the names and IP addresses of the local machines, but it's still not a DNS server. Manually adding the local PCs to /etc/hosts fixed the problem. Thanks to all for your suggestions.
I have the same problem. You said you Manually adding the local PCs to /etc/hosts fixed the problem. How do you give the local PCs the IP address since if you use router's DHCP to assign the IP address to your computers, you don't know what the IP address the DHCP assign to you pc.
Pls let me know what your /etc/hosts file looks like.
Thank you.
 
Old 06-01-2007, 08:36 AM   #14
neuroman
LQ Newbie
 
Registered: Jan 2005
Posts: 18

Original Poster
Rep: Reputation: 0
The router is not using DHCP.
/etc/hosts on fantom looks like this:

127.0.0.1 localhost.localdomain fantom
192.168.1.35 wasp

where fantom is assigned 192.168.1.34
 
Old 06-04-2007, 01:52 AM   #15
dongyez
LQ Newbie
 
Registered: Jun 2007
Posts: 2

Rep: Reputation: 0
IP address

Thank you for your help. I followed your advice and my small network is working now!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can go Local network, can't go internet!! nectron101 Linux - Hardware 2 11-27-2004 09:03 AM
Small local net with 2 PCs arthur_mueller Linux - Networking 7 05-17-2004 04:50 AM
can ping to/from pcs on home network but not connect to internet stumblefingers Linux - Networking 13 04-12-2004 09:34 AM
Internet sharing on Networked PCs running SuSE 9.0 (Pro) mookate Linux - Networking 3 04-04-2004 03:27 PM
local network okay - no internet Who Linux - Networking 7 03-26-2003 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration