LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-25-2007, 11:31 PM   #1
thedeep
LQ Newbie
 
Registered: Jun 2007
Posts: 2

Rep: Reputation: 0
can't seem to add a default gateway


hi, I'm having some issues with my fedora 7 install.

actually, the install went fine, I was good for a couple of days, everything was working fine, and then all of a sudden the networking went out. Wasn't doing anything suspicious, just web browsing.

anyhow, on boot, bringing up the eth0 interface fails. I can bring it up manually, using ifconfig eth0 up [with netmask/gw args or not], but trying to add a default gateway doesn't work, I get:

# route add default gw 192.168.1.1
SIOCADDRT: No such process

ifconfig output looks like this (I can't cut and paste, so bear with the handwave):
link enca:Ehternet HWaddress....
inet6 addr
up broadcast runnning mulitcast mut:1500 metric:1
rx
tx
...
...


and otherwise the outpute of route or netstat -rn is empty aside from the dest/gateway/... headers



any thoughts? This is making me a bit irrated as I can't seem to do much to affect it either way.

thanks!
 
Old 06-26-2007, 12:26 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You aren't providing any information with your rendition of the ifconfig command.

You can copy in konsole, or redirect the output to a file and then copy it in an editor, or open the file in the web browser. I'll guess that you don't have a network device.

Even if you did, you need to have the static router on that device set up first before adding the default gateway.
It may already be setup for you.

Code:
/sbin/route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
jesnet          *               255.255.255.128 U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         linksys         0.0.0.0         UG    0      0        0 eth0
Here I would need the jesnet route (line 1) before creating the default router (line 3)
If you are wondering, I edited my /etc/networks file. That is why the destination has a name instead of 192.168.1.0. I also entered the routers IP address in /etc/hosts.

The first two lines of the ifconfig output for you network device should look similar to this:
Code:
/sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0F:B0:0C:EF:AB
          inet addr:192.168.1.105  Bcast:192.168.1.127  Mask:255.255.255.128
eth0 is the device name. These are private IP address. The router is at 192.168.1.1 (where almost everyone's home NAT router is).

At one time, I had two subnets. That is why the netmask is 255.255.255.128.

You can download the "Network Administrator's Guide (2nd. Ed.)" from the www.tldp.org website. It explains how networks work and are configured. You can download a pdf, Postscript or html based document. It is the same O'Reily book as in the book stores, just an earlier edition.

Last edited by jschiwal; 06-26-2007 at 12:31 AM.
 
Old 06-26-2007, 11:31 PM   #3
thedeep
LQ Newbie
 
Registered: Jun 2007
Posts: 2

Original Poster
Rep: Reputation: 0
uh, nevermind I guess. I tried running through those docs, but nothing seemed to take, except when I configured everything manually down to nameservers.

then I ran dhclient and everything popped back up. weird, it didn't work before.
 
  


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
add sunnet mask & default gateway Dawar Linux - Networking 3 01-25-2007 08:36 PM
Guardian OS - cannot add default gateway thejackel Linux - Server 1 08-27-2006 07:12 AM
How to add default gateway in /etc/sysconfig/network-scripts/* zamri Linux - Networking 2 09-06-2005 10:32 AM
default gateway avikosan Linux - Networking 3 12-09-2003 05:47 PM
how do I add script to set default gateway on boot for eth1 abg Linux - Networking 3 10-01-2003 05:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:49 PM.

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