Bug 93861 - Problem in source route of interfaces
Summary: Problem in source route of interfaces
Status: RESOLVED INVALID
Alias: None
Product: Networking
Classification: Unclassified
Component: IPV4 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-25 14:54 UTC by kidboy
Modified: 2015-02-28 10:58 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.10.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description kidboy 2015-02-25 14:54:29 UTC
I have 2 internet links, where do a test to assess the connection applying a ping on each output interface and getting the result, in version 2.6.XX i can ping and route source works fine, but in kernel 3.X.XX its not work anymore, i dont know why.

My configuration is here:

/etc/sysconfig/network-scripts/ifcfg-eth0
TYPE="Ethernet"
BOOTPROTO="static"
IPV4_FAILURE_FATAL="no"
NAME="eth0"
UUID="68ec71ab-62f4-41fc-9ad8-085bb3b78eae"
ONBOOT="yes"
HWADDR="10:FE:ED:07:B3:38"
IPADDR="192.168.25.2"
GATEWAY="192.168.25.1"
PREFIX="24"
NM_CONTROLLED="no"

/etc/sysconfig/network-scripts/ifcfg-eth1
TYPE="Ethernet"
BOOTPROTO="static"
IPV4_FAILURE_FATAL="no"
NAME="eth1"
UUID="6ddee48f-3296-4158-86e6-d4104593d942"
ONBOOT="yes"
HWADDR="50:E5:49:FB:AF:0D"
IPADDR="192.168.26.2"
GATEWAY="192.168.26.1"
PREFIX="24"
NM_CONTROLLED="no"

# /etc/rc.d/rc.local ( Permission is 755 in file )
ip route add 192.168.25.0 dev eth0 src 192.168.25.2 table 1
ip route add default via 192.168.25.1 table 1

# Rules for out ADSL1
ip route add 192.168.26.0 dev eth1 src 192.168.26.2 table 2
ip route add default via 192.168.26.1 table 2
# Rules for out ADSL2
ip route add 192.168.25.0 dev eth0 src 192.168.25.2
ip route add 192.168.26.0 dev eth1 src 192.168.26.2
# Rule for tables
ip rule add from 192.168.25.0 table 1
ip rule add from 192.168.26.0 table 2
ip rule add fwmark 1 lookup 1
ip rule add fwmark 2 lookup 2
ip route flush cached


So if i use command 'ping -I192.168.25.2 8.8.8.8' its work fine because its the default route of system, but if i use command 'ping -I192.168.26.2 8.8.8.8' its not work, in tcpdump report its out using lo interface. In kernel 2.6 the output of tcpdump is the interface 192.168.26.2 and works fine. I dont know what change for new kernel or if its a bug. The forwarding is enable, configuration in kernel 2.6 and 3.x is the same.
Comment 1 Marcelo Ricardo Leitner 2015-02-26 02:17:24 UTC
Why do you use
 ip rule add from 192.168.25.0 ...
instead of
 ip rule add from 192.168.25.2 ...
?
I'm not sure if you should be specifying a netmask in there then or if it defaults to /24.
Comment 2 kidboy 2015-02-26 12:48:37 UTC
I am using /24
Comment 3 kidboy 2015-02-27 22:21:39 UTC
Please discart this, i foud the error.

Note You need to log in before you can comment on or make changes to this bug.