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 - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-01-2009, 12:21 PM   #1
imprise
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 192.168.1.1 - -

What is "- -"?

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

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
An excerpt from man 5 routes
Quote:
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 0.0.0.0 for this purpose. A prefix-length can be used; e.g., 10.10.0.0/16 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.
 
  


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
tshark gives "permission denied" writing to (any) file in home dir. kr0m3 Linux - Networking 6 10-08-2019 06:45 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 "192.168.1.0/24" won't route clients from "10.65.0.0" 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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