Networking Forums

Networking Forums > Computer Networking > Linux Networking > Route tables

Reply
 
 
Scott Dortch
Guest
Posts: n/a

 
      02-03-2004, 01:21 PM
I am VERY new to linux and am installing my first linux server. I
have the OS installed and things seem to be going ok so far. However,
I can not get it to connect to my network (internet).

I have played around with the route tables for a couple of days now
and at one point had it working. The problem is that I do not
remember what the route table looked like when it was working. After
a reboot it no longer worked. I have been searching for what a route
table should look like, but can not find a clear answer. I was hoping
someone here could help.

The IP address for this machine is 192.168.1.222
After a route-n the table currently looks like:

Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.1.222 0.0.0.0 255.255.255.255 UH 0 0 0
eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0
eth0

Thanks in advance
 
Reply With Quote
 
 
 
 
jack
Guest
Posts: n/a

 
      02-03-2004, 06:13 PM
Scott Dortch wrote:

> The IP address for this machine is 192.168.1.222
> After a route-n the table currently looks like:
>
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 192.168.1.222 0.0.0.0 255.255.255.255 UH 0 0 0
> eth0
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
> lo
> 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0
> eth0


OK, first off all this routing table is a bit messed, but otherwise
valid. Firstly, You needn't have Your own IP in it, and secondly,
You needn't have Your loopback in it. Those entries are redundant
and hence senseless, but not harmful.

The thing is that Your default route (the last one) points to Your
"default gateway". Is that box with 192.168.1.1 up and running and
connected to Your network properly, _and_, is it configured to
allow forwarding (and NATting) traffic from Your client?

Try to check that step by step.


Cheers, Jack.

--
----------------------------------------------------------------------
My personal reading of the string "MicroSoft" expands to "NanoWeak"...

 
Reply With Quote
 
John Culleton
Guest
Posts: n/a

 
      02-03-2004, 06:13 PM
(E-Mail Removed) (Scott Dortch) wrote in message news:<(E-Mail Removed). com>...
> I am VERY new to linux and am installing my first linux server. I
> have the OS installed and things seem to be going ok so far. However,
> I can not get it to connect to my network (internet).
>
> I have played around with the route tables for a couple of days now
> and at one point had it working. The problem is that I do not
> remember what the route table looked like when it was working. After
> a reboot it no longer worked. I have been searching for what a route
> table should look like, but can not find a clear answer. I was hoping
> someone here could help.
>
> The IP address for this machine is 192.168.1.222
> After a route-n the table currently looks like:
>
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 192.168.1.222 0.0.0.0 255.255.255.255 UH 0 0 0
> eth0
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
> lo
> 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0
> eth0
>
> Thanks in advance



What kind of connection do you have to the internet? It may be one
where the ISP assigns your url to you dynamically. If so, try:
dhcpcd &

....and perhaps that will generate the necessary connection. If this
works then dig into the rc.inet1 or equivalent file where your startup
scripts are stored.
(this varies from distro to distro, unfortunately.) See if you can
cause the startup script to fire up dhcpcd on every boot.

HTH

John Culleton
 
Reply With Quote
 
P Gentry
Guest
Posts: n/a

 
      02-03-2004, 08:04 PM
(E-Mail Removed) (Scott Dortch) wrote in message news:<(E-Mail Removed). com>...
> I am VERY new to linux and am installing my first linux server. I
> have the OS installed and things seem to be going ok so far. However,
> I can not get it to connect to my network (internet).
>
> I have played around with the route tables for a couple of days now
> and at one point had it working. The problem is that I do not
> remember what the route table looked like when it was working. After
> a reboot it no longer worked. I have been searching for what a route
> table should look like, but can not find a clear answer. I was hoping
> someone here could help.
>
> The IP address for this machine is 192.168.1.222
> After a route-n the table currently looks like:
>
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 192.168.1.222 0.0.0.0 255.255.255.255 UH 0 0 0
> eth0
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0
> lo
> 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0
> eth0
>
> Thanks in advance


You should not normally need to manually adjust your routing tables.
The ISP should provide this info via DHCP and configure a DNS server
every time you boot up.

192.168.1.0 is the network you "belong" to. 192.168.1.1 is your
gateway (default router) to send your traffic out to other parts of
the network -- including out to the internet.

Suspect you do not have DHCP / DNS properly configured. You probably
have some sort of gui tool to help check/configure these -- for
newbies the command line can be intimidating. Eg., in Redhat you
could type these from a gui terminal (xterm or konsole or whatever):

[user@pbrain]$ /usr/bin/internet-druid
or
[user@pbrain]$ /usr/bin/neat-control

to bring up a gui/dialog to configure your system.

Check that DHCP is used and that DNS will be configured also. If
using another distro, check the docs for which tool to use.

If still confused or intimidated get back with info on your distro.
Would like to keep you off the command line for now -- you may have to
use these tools several times before you get it right. Have you
double checked with your ISP about proper settings? How are you
connecting to the ISP's network, ie., cable/dsl or dial-up modem?

hth,
prg
email above disabled
 
Reply With Quote
 
Scott Dortch
Guest
Posts: n/a

 
      02-04-2004, 01:27 PM
Thank you for the suggestions.

Our connection to the internet here is over a T1. I have a block of
IP addresses assigned by my ISP (MCI). I do not have a DHCP server.
All addresses on the network are assigned. Also, am I to understand
that the routing table should work if similar to?

Destination Gateway Genmask Flags Metric Ref Use
Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0
eth0

I am using the same gateway here as I am using (sucessfully) on my
windows machines. So I feel like it is working appropriately. The
gateway does do NAT.

The one question that I do not seem to understand in the setup is the
hostname. Is this the name of the linux box or something else?
 
Reply With Quote
 
P Gentry
Guest
Posts: n/a

 
      02-05-2004, 12:28 AM
(E-Mail Removed) (Scott Dortch) wrote in message news:<(E-Mail Removed). com>...
> Thank you for the suggestions.
>
> Our connection to the internet here is over a T1. I have a block of
> IP addresses assigned by my ISP (MCI). I do not have a DHCP server.
> All addresses on the network are assigned. Also, am I to understand
> that the routing table should work if similar to?
>
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0
> eth0
>
> I am using the same gateway here as I am using (sucessfully) on my
> windows machines. So I feel like it is working appropriately. The
> gateway does do NAT.
>
> The one question that I do not seem to understand in the setup is the
> hostname. Is this the name of the linux box or something else?


Your original table was OK, I imagine. It must agree with the
ethernet card's configuration (which is usually why the lo interface
shows up in the table -- most ethernet cards will be configured with a
loopback). Having your own host's IP in the table shouldn't hurt.
The H (for host) is just to distinguish the type of destination --
ie., G->gateway (router), H->host (computer), blank is a network
address.

Here is my picture of your net.

Of course, the 192.168.x.x is a "private" address range -- it cannot
be routed on the internet's public routes.

You have a T1 line from MCI. One end plugs into their router, your
end plugs into ???. Are you taking the feed into a local router on
your premises? If so, it really doesn't matter how you set up your
private net. Direct all traffic to your router, if it's not a local
dest, forward it to their router, either your's or their's provides
NATing.

You say MCI assigned you a _range_ of addresses. This makes me
believe that your LAN is using their router directly if these are all
private addresses (theirs is the gateway configured on each host). Is
this correct or did they assign you a # of static, public addresses?

Sometimes ISPs assign you private addresses when they provide other
services at their router, eg., firewall, NATing, sub-netting. In this
case, you will need to make sure _all_ your boxes, both Win and Linux
are using the same netmask, which would have to be provided by the
ISP. Your current tables are using the default netmask --
255.255.255.0 -- which would imply that you are OKed to use all 254
host addresses. ISPs are usually much stingier than that.

Things to check:
-- all hosts configured to use same network
-- all hosts configured to use same netmask
-- all hosts configured to use same gateway
-- you can ping between your local hosts
-- all hosts can ping the gateway
-- if you're responsible for local routing, make sure the router is
configured with proper ACLs

Other than telling you to "copy" the network setup from a working box
(except the address, of course) when configuring each host's ethernet
IP, you may want to look at these:
Linux HowTos at:
http://www.tldp.org/docs.html#howto
especially
Networking-Overview-HOWTO
Adv-Routing-HOWTO
and this:
http://www.netfilter.org/documentati...pts-HOWTO.html

You may want to review the route and ifconfig commands:
$man route
$man ifconfig
as well as manuals that go with your distro.

hth,
prg
email above disabled
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IP tables help CCW Linux Networking 0 05-17-2008 11:59 AM
IP Tables locally Vincent van Beveren Linux Networking 2 07-27-2006 11:42 AM
Access to the NAT tables Alvaro Linux Networking 2 12-05-2005 04:10 PM
VPN client adds wrong route to local route table snowdog_2112 Windows Networking 7 11-01-2005 02:05 PM
NAT tables chains lekkie.aydot@gmail.com Linux Networking 5 07-29-2005 07:21 PM



1 2 3 4 5 6 7 8 9 10 11