?
Solved

Linux routing table question

Posted on 2012-09-10
8
Medium Priority
?
564 Views
Last Modified: 2012-10-10
I have a question regarding linux routing table. IF  I  understand correctly,   all the incoming traffic and icoming traffics are handle through routing table. I thought only  outgoing traffic go through  routing table


Please confirm
0
Comment
Question by:mokkan
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 800 total points
ID: 38385863
As long as your machine doesn't carry out router/gateway functions incoming traffic is not affected by the routing table.
0
 
LVL 19

Assisted Solution

by:jools
jools earned 400 total points
ID: 38386189
This is not specifically a Linux question.

This may provide some useful information
http://en.m.wikipedia.org/wiki/Routing_table
0
 

Author Comment

by:mokkan
ID: 38386855
Its a linux question. For an example if we look at the routing table (netstat  -rn) , we can see what traffic go through what interface. My question is that, when traffic comes in, does it forward it to necessary interface?
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 800 total points
ID: 38386935
Traffic comes in through its interface to reach the respective port/application. No routing takes place.

The statistics shown with "netstat -rCe" show under "Use" the number of packets sent via the particular route (Unix) or lookups (Linux) and the current number of active uses (Ref)
0
 
LVL 57

Assisted Solution

by:giltjr
giltjr earned 400 total points
ID: 38387998
In the most simplest terms, the routing table it used use to by the local host to figure out how to get to to a another host.  That is, it is used for outbound traffic only.

When the local host goes to send traffic out, it uses the routing table to figure out what interface to use to send the traffic out on.  If the destination host is on a different IP subnet than the local host, it the routing table is also used to identify which gateway/router it must used.

If a host has more than one IP address, inbound traffic is NOT routed to the local destination it is just "passed" if the traffic came in on a interface the destination address is not associated with.
0
 
LVL 19

Expert Comment

by:jools
ID: 38389872
I was trying to point out that the question is relevant to the way all routing works, not specifically Linux.

I always thought that the routing was for outgoing connections and anything coming in would have been directed by the local gateways/routers but your q just got me wondering.

Did the Wikipedia article not help.
0
 
LVL 27

Accepted Solution

by:
skullnobrains earned 400 total points
ID: 38401575
actually, most systems including linux go through the routing table when an incoming packet enters the system (and basically any time the IP stack is used, so the same applies for some of the loopback traffic).

The routing table contains "local" entries that will tell the system that the destination is local. It is a bad idea to toy with these entries but you can display them. All the information you will get is useless if you already know your machine's addresses.

These entries can be viewed on linux by using "ip route show dev ethX table local"

but conceptually, since these roots are automagically handled by the kernel, you do not care about these routes unless the packets are leaving your machine

---

/!\ just for the record, when we speak about incoming packets, we usually speak about packets routed by the host, bridged by the host or actually using the host as a destination, so much of the online documentations will be difficult to read not knowing this.
0
 

Author Closing Comment

by:mokkan
ID: 38481661
Thank you all.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month13 days, 22 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question