Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

this isn't programming at all, but I've seen related topics so I thought why not. I am using ubuntu and currently trying to learn basic networking. I read a lot of theory, so I understand the terms (gateway, netmask etc...) but I can't seem to understand my own network at home. I have a router that serves my laptop (wireless) and my desktop computer (ethernet). When I run route in my desktop computer this is the output:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.255.255.0   U     1      0        0 eth0
link-local      *               255.255.0.0     U     1000   0        0 eth0
default         RTA1025W.home   0.0.0.0         UG    0      0        0 eth0

I can't understand it. I know the table specifies routing rules, I just can't understand those rules. An example would be highly appreciated: if I send a datagram to another computer on my home network, the first rule should match right? What column specifies where the datagram is redirected to?

Also, just to make sure, if I am trying to reach a website then all datagrams are directed to my router, right?

Also, what is link-local? It is defined in my /etc/networks file, I just don't know what that is.

I hope I was clear with what I am trying to understand, if not it's only because I'm a complete novice. Thanks anyway!

EDIT: to make it clear, I did read man route. As far as I understand: Destination refers to the destination of the datagram currently being routed. The same goes for Gatway and Genmas. That's great but what I don't understand is where will it be routed to? That's what I am trying to understand

Yotam

share|improve this question

1 Answer 1

up vote 2 down vote accepted

For a quick overview of route command (or any commands that you might not fully understand just yet) you can type man route in a terminal and that will give you an overview of the command.

You can also search for man route in google and that will return you the man page for route for online viewing.

Have a look here, the output in your case is pretty straight forwards.

About the link-local entry it is normal as you can see here.

About your current entries in your route table:

First entry tell you the following:

  • Any traffic with destination 10.0.0.0 will not be using a gateway (thats the * on the line), will be using a 255.255.255.0 net mask, route is UP (that's the meaning of the U) and which interface the route uses. If you do ifconfig -a you will probably see that your eth0 IP address is within the 10.0.0.0 range, so this is you local network route.

Third entry tells you the following:

  • If any traffic does not fit the traffic defined on any other rules then use this route. Imagine you want to visit www.yahoo.com. The address will be translated (I don't know what the exact result, but it won't be in the 10.0.0.0 range for sure). Since it won't fit on the 1st or the 2nd route, it will be routed using the RTA1025W.home gateway. The metric will not matter and it will be using the interface defined on the default route line.
share|improve this answer
    
Great, thanks! One more: if I send a datagram to a computer in my network, doesn't it have to go through the router? If so, isn't it using a gateway? Thanks –  yotamoo Oct 6 '11 at 10:38
    
You router is your gateway in your route table, is your router not RTA1025W? –  Bruno Pereira Oct 6 '11 at 10:47
    
Yes it is. So when two computers in my home network communicate, they have to go through the router right? I'm asking because for the first rule it is not defined as a gateway. Maybe its a gateway only when it is used to send information outside of the network? –  yotamoo Oct 6 '11 at 10:53
    
Yeah, but the first rule tells your system that if the address translate from a hostname fits the first line (so all 10.0.0.0 addresses you can create with a netmask of 255.255.255.0), will not be routed to a gateway, that way your computers can communicate with each other without having to pass on the router (you can actually turn it off and your computers can contact each other). –  Bruno Pereira Oct 6 '11 at 10:56
    
Man pages aren't exactly user friendly, much less so for newbies... –  Cerin Nov 20 '13 at 21:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.