Page 1 of 1

Routing

Posted: Mon Jun 25, 2012 12:59 pm
by antkamidiv
Hi all!
What src-address do packets generated by router itself have?

Illustration

Addresses:
1. address=1.1.1.1/24 interface=ether1-gateway
2. address=2.2.2.1/24 interface=ether5-local

Route table:
1. Active dst-address=0.0.0.0/0 gateway=1.1.1.254
2. Active dst-address=0.0.0.0/0 gateway=1.1.1.254 routing-mark=R1
3. Active dst-address=0.0.0.0/0 gateway=2.2.2.254 routing-mark=R2

Route rules:
1. src-address=1.1.1.1 table=R1
2. src-address=2.2.2.1 table=R2


If all 3 routes are active, then outbound packets go through specific gateway. It is ok.
But if I deactivate the second route, the outbound traffic will go through the first gateway according to the 1 route! I don't understand why?
Why the rule 2 aren't implemented? It is obvious I have a misunderstanding of the routing rules.
Thx!!!

Re: Routing

Posted: Mon Jun 25, 2012 1:31 pm
by mrz
If you deactivate second route then there is no rotues in R1 routing table, so destination is resolved using main routing table.

Re: Routing

Posted: Tue Jun 26, 2012 4:49 pm
by antkamidiv
Thank you!!!