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 04-13-2004, 10:06 AM   #1
enjoyzj
LQ Newbie
 
Registered: Nov 2003
Posts: 29

Rep: Reputation: 15
Automatically adding default gateway when booting


Can anybody tell me how I can add a default gateway to the routing table automatically at startup?

route add default gw 192.168.0.1

Thanks a lot!
 
Old 04-13-2004, 10:25 AM   #2
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
what is your distro ?
u can add command in startup script. but the best way is adding it in network configuration.
in redhat like systems, edit "/etc/sysconfig/network" and add the following line
GATEWAY=192.168.0.1
 
Old 04-13-2004, 04:05 PM   #3
enjoyzj
LQ Newbie
 
Registered: Nov 2003
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks a lot. I am using mandrake 9.2, and it works!
 
  


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
adding a module to startup automatically mikegorb Linux - Hardware 1 11-20-2005 02:17 PM
Adding different gateway to the second NIC jomy Linux - Networking 3 12-25-2004 02:36 AM
Adding a gateway robotik Linux - Wireless Networking 5 10-20-2004 03:38 AM
Default Gateway rrosenkoetter Linux - Networking 3 08-27-2004 08:41 AM
What's a default gateway and do I need one? Travis86 Linux - Newbie 8 05-25-2003 05:44 PM

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

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