LinuxQuestions.org
Review your favorite Linux distribution.
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 10-18-2004, 12:18 PM   #1
scylla
LQ Newbie
 
Registered: Oct 2004
Posts: 16

Rep: Reputation: 0
default route without a gateway


Hi,

I have a question about adding a default route without a gateway. What is the difference between:

route add default gw 192.168.0.1 eth0

and

route add default eth0

Both work for me, so I don't understand why specifying the gateway is neccesary. Either way eth0 dumps the packet out on the network and either way 192.168.0.1 seems to route it.

Thanks for clearing up my confusion
 
Old 10-21-2004, 01:40 AM   #2
BillJennings
Member
 
Registered: Oct 2004
Location: Big River, California, USA
Distribution: Debian
Posts: 48

Rep: Reputation: 15
If you default route has no gateway, then you will not be able to connect to any computers beyond your local subnet. Also, adding a default route to an interface without a gateway will cause any attempts to connect to computers beyond you local subnet to generate ARP requests on the local subnet (which, presumably will never be answered).

Does it also work with NO default route?

Sincerely
Bill Jennings
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
My gateway can't route michaelsanford Linux - Networking 0 04-20-2005 05:05 PM
dhclient not setting default gateway - no WAN route kadissie Linux - Networking 2 03-10-2005 04:55 AM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM
Route and Gateway Issues shaggz Linux - Networking 2 10-29-2003 12:33 PM
Ip Route Voice Gateway digicom Linux - Networking 1 08-22-2001 10:43 AM


All times are GMT -5. The time now is 09:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration