Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-01-2009, 12:21 PM   #1
LQ Newbie
Registered: May 2009
Distribution: SUSE
Posts: 20

Rep: Reputation: 0
Writing routes in "route" file...

Hi all;

I am using SUSE Enterprise Server 10 SP2;

When I use YaST to add default gateway to one of my interfaces, everything went well, but when I open the "route" file, I see something as:

default - -

What is "- -"?

Old 06-01-2009, 01:18 PM   #2
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
An excerpt from man 5 routes
There are 5 columns with special meaning. Write a dash "-" if you want to omit an entry for a field. If all following fields in the line are empty too, you can even omit the dash.

The first column gives the destination, written as the IP-address of a host or a network. The heading default indicates that the route is the default gateway. Do not use for this purpose. A prefix-length can be used; e.g., is valid.

The second column contains the gateway. Write here the regular IP-address of a host which routes the packets to a remote host or remote network. You can omit this information for rejecting routes.

The third column gives the netmask for a remote host or remote network behind a gateway. For the default route or if you were using a prefix-length in the first column, you can omit it.

The fourth column gives the name of the interface of the local networks (lo, eth0, eth1,isdn0, ppp0, dummy0, ...).
They are the netmask and the interface fields that have been omitted.


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
tshark gives "permission denied" writing to (any) file in home dir. kr0m3 Linux - Networking 5 08-16-2016 11:22 AM
how can I "cat" or "grep" a file to ignore lines starting with "#" ??? callagga Linux - Newbie 7 08-16-2013 06:58 AM
IPTABLES: interface on "" won't route clients from "" zivota Linux - Networking 2 06-09-2008 01:35 PM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM
Writing to "/dev/usb/hiddev*" and to "/proc/bus/usb/00B/00S" throw an arror EI stpg Programming 0 07-14-2004 05:44 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:06 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration