LinHES Forums http://forums.linhes.org/ |
|
Problem setting a permanent static route http://forums.linhes.org/viewtopic.php?f=2&t=17008 |
Page 1 of 1 |
Author: | etherealotaku [ Wed Oct 17, 2007 1:48 pm ] |
Post subject: | Problem setting a permanent static route |
Hi All, I'm having issues setting a permanent static route for my eth0 card to my router. I can do it temporarily with "route add default gw 100.0.0.1" but no permanent solution has worked yet. I've tried doing netcardconfig, setting the gateway in the /etc/network/interfaces, adding a eth0.route file and a route-eth0 file both containing: "ADDRESS0=100.0.0.19 NETMASK0=255.255.255.0 GATEWAY=100.0.0.1", but none of these options have been successful as of yet. I can successfully ping machines on my own network, but I can't reach the outside world unless i temporarily add the route via the route add command I mentioned above. Anyone have a solution? Thanks for your time. |
Author: | tscholl [ Wed Oct 17, 2007 2:25 pm ] |
Post subject: | |
I've made changes there and its always worked for me. Here is the contents of my /etc/network/interface file # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # The loopback interface # automatically added when upgrading auto lo eth0 iface lo inet loopback iface eth0 inet static address 192.168.2.50 netmask 255.255.255.0 network 192.168.2.0 broadcast 192.168.2.255 gateway 192.168.2.1 |
Author: | etherealotaku [ Thu Oct 18, 2007 4:39 pm ] |
Post subject: | still having problems |
Thanks for your reply tscholl, I've changed my interfaces file to look similar to yours, but it still doesn't work correctly. contents: auto lo eth0 iface lo inet loopback iface eth0 inet static address 100.0.0.19 netmask 255.255.255.0 network 100.0.0.0 broadcast 100.0.0.255 gateway 100.0.0.1 I took the eth0 interface down and then back up, and the route still doesn't work. the output of route looks like Destination Gateway Genmask Flags Metric Ref Use Iface 100.0.0.0 * 255.255.255.0 U 0 0 0 eth0 i still have to manually run "route add default gw 100.0.0.1" to get it to add the following line: "default 100.0.0.1 0.0.0.0 UG 0 0 0 eth0" without it, i get the following error when trying to ping the outside world: "connect: Network is unreachable" anyone have any other ideas about what I should try? or see any errors? Thanks for your help |
Author: | mjl [ Thu Oct 18, 2007 7:12 pm ] |
Post subject: | |
Hi, I don't understand your choice of ip ? Usually folks go for 10.x.x.x or the 192.168.x.x and run behind a firewall. You REALLY DON'T want to put the KM box on the net without some protection. Some reference material: http://kb.iu.edu/data/aijr.html Usually folks also use netcardconfig (as root) to set up networking. Mike |
Author: | etherealotaku [ Thu Oct 18, 2007 7:51 pm ] |
Post subject: | |
hi mjl, my card is running behind a firewall, I just don't like the defaults for networks... and its still a class c... but that's besides the point. I did run netcardconfig, and it still left me where I'm stuck at presently. It gets the ip correctly & the netmask, but it cannot see anything outside of my internal network. Any other advice? |
Author: | mihanson [ Thu Oct 18, 2007 8:18 pm ] |
Post subject: | |
Are you using jumbo frames? If your MTU set to something other than 1500 (or 1492 for PPoE connections) you may not be able to get to the internet. Code: # ifconfig eth0 | grep MTU
[edit]Have you looked into your router settings as well?[/edit] |
Author: | etherealotaku [ Fri Oct 19, 2007 5:37 am ] |
Post subject: | |
Thanks for the reply mihanson, No on the jumbo frames. My MTU is set to 1500. The router settings are all fine(i'm using dd-wrt firmware), and none of my other boxen have any issues getting out to the internet. I'm starting to think this is a NIC specific issue. It's a built in, and I was trying to save my other pci slots (its a matx board) for capture cards, but I might need to sacrifice one for a better nic. I'll post the output of ifconfig when I get back to my box. Thanks for your assistance. |
Author: | bigbro [ Fri Oct 19, 2007 5:44 pm ] |
Post subject: | |
Most people chose those two default address schemes of 10.x.x.x or 192.168.x.x because those were designed as non-routable addresses and specifically set aside for a private network. There are actually 3 sets. Reserved IP addresses for private networks 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255 For more information, see RFC 1918 Address Allocation for Private Internets. That said you can chose anything you want, but depending on what modem/router/firewall you are using you may need to do some digging into some other portions of your network config. I seem to remember (from an old network guy) that consumer routers had algorithms built into them so they handled the typical Network address Translation to those privates really easily, but translation to other addressing was very difficult and better handled by some of the more expensive commercial products. Some else that plays with a lot of the higher end consumer products told me he specifically chose early Linksys or even the new Buffalo routers because of the advanced firmware and some additional net config tweaking they would allow outside of the fantastic QOS features in products like tomato. I didn't dig further but I know he was running an extensive network on one of them. Anyway, that is about the extent of my network knowledge. There is a wealth of information on Google, you might be able to find an answer based on your combination and the type of routeable addressing you are trying to use. hth |
Author: | nbdwt73 [ Sun Oct 21, 2007 8:40 pm ] |
Post subject: | |
I had a similar problem in a brand new Dell box with a built in NIC card (although I was using a 192.xxx adress). My solution was to throw in a spare ethernet card and disable the onboard card. Has worked fine ever since... |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |