LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Router Gateway (https://www.linuxquestions.org/questions/linux-networking-3/router-gateway-364911/)

inescapeableus 09-19-2005 11:26 AM

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.

dracolich 09-19-2005 03:02 PM

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.

inescapeableus 09-19-2005 03:33 PM

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?

dracolich 09-19-2005 03:52 PM

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.

pastulio 09-19-2005 03:59 PM

Quote:

Originally posted by inescapeableus
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?

As you can see DHCP is enabled so you can simply set your connection via dhcp. I don't know if netconfig supports this, but it should. If not use 'dhclient eth0'. Also I'm not sure if dns gets set via dhcp but i think so, too. If not, 'echo "nameserver 64.59.160.13" > /etc/resolv.conf; echo "nameserver 64.59.160.15" >> /etc/resolv.conf' as root.

Maybe you should also enable the router's firewall using the browser interface -> see your manual

hope that helps

Snowbat 09-19-2005 04:24 PM

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

inescapeableus 09-19-2005 09:17 PM

I still have no access, do you think the issue may be because my router is running as a DHCP server?

Snowbat 09-20-2005 06:09 AM

What is the output of:
dhclient eth0

After you run this, what is the output of:
/sbin/ifconfig eth0

inescapeableus 09-20-2005 11:59 AM

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.

fataldata 09-20-2005 04:05 PM

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:

Originally posted by inescapeableus
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



inescapeableus 09-20-2005 10:16 PM

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.

fataldata 09-21-2005 10:39 AM

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.