LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 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



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

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

All times are GMT -5. The time now is 06:43 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