Router Gateway
Hello all again, I am having some issues concerning my small LAN at home. Just for the moment I have two computers, both are able to ping each other etc. What I am wanting to do is to give each machine a static IP address (computer a for example is 192.168.1.1 and the second machine is 192.168.1.2 and are registered with the /etc/host). I am running slackware so I am using the netconfig tool that is so handy and I am asked for my internet gateway. I am using a SMC 7004VBR soon to be replaced mind you, and I looked at my router configuration at i tells me the gateway address is something along the lines of 24.108.....then it asks me if I am using a name server I know that my ISP does so I pass along the gateway IP address as the DNS so it can get it from my ISP. At this point rather frustrated and coming to the brilliant minds at LinuxQuestions for help. Thanks again guys I look forward for to hear your thoughts.
|
First, the gateway is the point from which you leave your local network to access the internet. So the gateway address should be the address of the router. Second, the DNS is the computer that takes a URL address and matches it to an IP address. These address(es) should be stored in /etc/resolv.conf. You get these addresses from your ISP after making a successful connection. If you know them you can manually edit resolv.conf, but it's not your gateway.
|
I realise what my gateway is what I am asking is what the correct address would be. My router reports the following.
Connection Status DHCP Client Connected. WAN IP: 24.108.194.51 Subnet Mask: 255.255.252.0 Gateway: 24.108.192.1 Primary DNS: 64.59.160.13 Secondary DNS: 64.59.160.15 Barricade Settings IP Address: 192.168.2.1 Subnet Mask: 255.255.255.0 DHCP Server: Enabled Firewall: Disabled UPnP: Disabled During the netconfig setup I enter in the gateway which is listed about there and for the DNS I use the same addresss. Any more thoughts? |
First I think you need to change the computer's IP address from x.x.x.1 to x.x.x.3. Normally routers reserve the first address of the network range for itself. If two hosts have the same IP address, conflicts will occur. I'm guessing Barricade is your router. You're using a 192.168.2.0/24 subnet and the router's address is 192.168.2.1. Set the router's address as the gateway and the router will handle the rest using NAT. You don't need to set DNS servers in netconfig, just type them into /etc/resolv.conf using a text editor. The DNS addresses should be the Primary and Secondary addresses that you posted.
|
Quote:
Maybe you should also enable the router's firewall using the browser interface -> see your manual hope that helps |
Your router may well be running a caching nameserver. Do you get a response from the following?:
dig @192.168.2.1 www.linuxquestions.org If yes, it would be better to: echo "nameserver 192.168.2.1" > /etc/resolv.conf |
I still have no access, do you think the issue may be because my router is running as a DHCP server?
|
What is the output of:
dhclient eth0 After you run this, what is the output of: /sbin/ifconfig eth0 |
Let me have a look when I get home I am at work right now so I will let you know, thanks for your help.
|
From your pc's can you ping the Barricade IP 192.168.2.1. If yes you may disregard the next line.
My thoughts are this. Your using a Class C address for your barricade which is not compatible with your pc's addresses. If you can ping the Barricade, then try pinging the Wan Gateway 24.108.192.1 this is the router at your ISP. If you can ping this you at least have connectivity to your ISP. This would make me suspect that your problem may be DNS. If you know the IP address for a website, (one of google's is 216.239.57.99)put that in the browser address window and hit enter. If this get's the web page then you are connected to the internet. If you cannot put in a URL(www.google.com) in the address window and get the webpage then your problem is DNS. Quote:
|
Well I can ping my router but I am unable to ping the gateway, I get the "network is unreachable". I also have no IP address obviously. When I enter the command dhclient eth0 I get and message with continuous intervals. Thanks again.
|
Can you ping the public interface of the your router? 24.108.194.51
Also some routers have diagnostic functions, mine has a web page interface and a tool to ping. If you have this use the router to ping the ISP Gateway 24.108.192.1 So far it appears that your lan may be fine (ie you can ping the router) The problem may be between the router and the ISP or just inside the router. I would still recommend changing the routers internal IP to a 192.168.1.xxx . 255.255.255.0 That address range is a Class C. Now in the past I have seen some devices treat it as a Class B. However by strict definition 192.168.1.xxx /24 should not be able to communicate with 192.168.2.xxx /24, without the use of Routing between the networks (the /24 means 255.255.255.0) |
All times are GMT -5. The time now is 09:18 PM. |