LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-29-2005, 09:15 PM   #1
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Rep: Reputation: 15
Static IP problem


I just setup a home network with slackware box as a firewall/http/etc server. It has two network cards one outward and one inward. Outward my ISP uses DHCP and inward it is at 10.1.10.0. I have a firewall built with iptables that also nats any computer on my internal network. I have one other system on my internal network. I set it up with an ip of 10.1.10.1, netmask 255.255.255.0, and the gateway as 10.1.10.0. When on my 10.1.10.1 system in Gentoo everything works like it should, no problems what so ever. However when I am in Slackware I cannot reach anything on the net. I can ping my gateway, but I cannot login to it through ssh (not a problem in Gentoo).

Does anyone have any idea what my problem could be? I checked route and the gateway is configured. The driver for my network card is built in to the kernel as it is in gentoo, and when I do 'ifconfig' it shows that eth0 is active. I guess the fact that I can ping the gateway proves that.

I am all out of ideas. Help.

Thanks.

Last edited by IRIGHTI; 06-29-2005 at 09:28 PM.
 
Old 06-29-2005, 10:46 PM   #2
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
Re: Static IP problem

Quote:
Originally posted by IRIGHTI
However when I am in Slackware I cannot reach anything on the net.
What's in your /etc/resolv.conf file?
 
Old 06-29-2005, 10:52 PM   #3
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Original Poster
Rep: Reputation: 15
A list of 3 nameservers and a search.........thing.

nameserver *.*.*.*
nameserver *.*.*.*
nameserver *.*.*.*
search ks.cox.net

the *.*.*.* are actually IP addresses. I have that from before. I only had the Gentoo/Slack box hooked up to the net (straight into cable modem). And all of it was written by dhcpcd.

Last edited by IRIGHTI; 06-29-2005 at 10:53 PM.
 
Old 06-29-2005, 11:23 PM   #4
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
I don't get it... you've the same configuration on Slackware and Gentoo?
It should work if you do.
Check the output of ifconfig -a and route maybe your forgot the gateway.

Last edited by gbonvehi; 06-29-2005 at 11:25 PM.
 
Old 06-29-2005, 11:38 PM   #5
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Original Poster
Rep: Reputation: 15
I don't see anything wrong...

Code:
Output of route:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.1.10.0       *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo


Output of ifconfig -a:

dummy0    Link encap:Ethernet  HWaddr D2:FC:11:B1:4B:9A  
          BROADCAST NOARP  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:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
          inet addr:10.1.10.1  Bcast:10.1.10.255  Mask:255.255.255.0
          inet6 addr: fe80::250:8dff:fed1:e494/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:378 (378.0 b)
          Interrupt:18 Base address:0xa000 

ip6tnl0   Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:1460  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:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  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:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

sit0      Link encap:UNSPEC  HWaddr 00-00-00-00-31-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:1480  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:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

tunl0     Link encap:IPIP Tunnel  HWaddr   
          NOARP  MTU:1480  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:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Last edited by IRIGHTI; 06-29-2005 at 11:40 PM.
 
Old 06-29-2005, 11:49 PM   #6
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Try:
Code:
route add default gw GATEWAYIP metric 1
or
Code:
route add -net 10.1.10.0 default gw GATEWAYIP metric 1
As stated by route, you don't have a gateway for your network.

You can configure the IP address and gateway in /etc/rc.d/rc.inet1.conf and will be loaded at boot.

By the way, usually the last number as 0 refers to the whole network range, you shouldn't use that number in a IP address.

Last edited by gbonvehi; 06-29-2005 at 11:57 PM.
 
Old 06-30-2005, 12:05 AM   #7
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Original Poster
Rep: Reputation: 15
I get: "SIOCADDRT: Network is unreachable."

What the?

Going to set the gateway to 10.1.10.1 and the other to 10.1.10.2.

And btw, I did set that up in rc.inet1.conf, that is why I was confused as to why it didn't work. Now I know...the network was unreachable....

This is the first home networking stuff I have ever done so bear with me.
 
Old 06-30-2005, 12:16 AM   #8
IRIGHTI
Member
 
Registered: Oct 2003
Distribution: Slackware64 13.1 x86_64, Ubuntu 10.04 x86_64
Posts: 121

Original Poster
Rep: Reputation: 15
Sweet!

Once I changed the gateway to 10.1.10.1 and the other to 10.1.10.2, everything works now.

I wonder why gentoo didn't care and slackware had a fit?

Oh well, lesson learned.

Thanks alot for your help gbonvehi. *gives virtual cookie*
 
Old 06-30-2005, 10:22 AM   #9
davidsrsb
Member
 
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770

Rep: Reputation: 33
Slackware could have given a warning. The .0 address has come to be reserved for network name and .255 is subnet broadcast. The convention is to make the gateway either .1 or .254
 
Old 06-30-2005, 06:09 PM   #10
mcd
Member
 
Registered: Aug 2003
Location: Denver, CO
Distribution: CentOS, Debian
Posts: 825

Rep: Reputation: 33
i've had to manually add my default gateway several times in slackware, even though it's specified in /etc/rc.d/rc.inet1.conf. sometimes it just gets left out or something. could be something to do with assigning a static ip on a dhcp network maybe? i have no idea. most of the time it's fine though.
 
  


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
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 10:51 AM
g++ static build problem Joe-E Programming 7 10-21-2004 01:05 AM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
Static IP configuration Problem anorman Linux - Networking 8 08-22-2003 11:50 AM
smoothwall static ip problem virgil Linux - Networking 1 04-12-2003 08:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:20 AM.

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