This is a discussion on Route tables within the Linux Networking forums, part of the Linux Forums category; I am VERY new to linux and am installing my first linux server. I have the OS installed and things ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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"... |
|
|||
|
sdortch@tofg.com (Scott Dortch) wrote in message news:<a94d778a.0402030621.52a508cd@posting.google. 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 |
|
|||
|
sdortch@tofg.com (Scott Dortch) wrote in message news:<a94d778a.0402030621.52a508cd@posting.google. 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 |
|
|||
|
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? |
|
|||
|
sdortch@tofg.com (Scott Dortch) wrote in message news:<a94d778a.0402040627.42d02f76@posting.google. 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 |