ip route src not working

Bug #1093999 reported by Sets
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

I need to use several IPs on interface in Linux, and switch it, but it's not working.<br>
for example:

    # ifconfig
    eth0 Link encap:Ethernet HWaddr 90:2b:34:33:80:65
              inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
              inet6 addr: fe80::922b:34ff:fe33:8065/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
              RX packets:13220652 errors:0 dropped:32864 overruns:0 frame:0
              TX packets:8296620 errors:0 dropped:0 overruns:0 carrier:1
              collisions:0 txqueuelen:1000
              RX bytes:16166162509 (16.1 GB) TX bytes:2186645852 (2.1 GB)
              Interrupt:48

    eth0:1 Link encap:Ethernet HWaddr 90:2b:34:33:80:65
              inet addr:192.168.1.99 Bcast:192.168.1.255 Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
                  Interrupt:48

    lo Link encap:Локальная петля (Loopback)
              inet addr:127.0.0.1 Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING MTU:16436 Metric:1
              RX packets:276685 errors:0 dropped:0 overruns:0 frame:0
              TX packets:276685 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:21387439 (21.3 MB) TX bytes:21387439 (21.3 MB)

    # ip route
    169.254.0.0/16 dev eth0 scope link metric 1000
    192.168.1.0/24 dev eth0 scope link src 192.168.1.99

    # ping 192.168.1.50
    PING 192.168.1.50 (192.168.1.50) 56(84) bytes of data.
    64 bytes from 192.168.1.50: icmp_req=1 ttl=255 time=1.21 ms
    64 bytes from 192.168.1.50: icmp_req=2 ttl=255 time=1.07 ms
    64 bytes from 192.168.1.50: icmp_req=3 ttl=255 time=1.05 ms

and then i use Curl

    # curl 192.168.1.50

and tcpdump:

    13:24:02.009094 IP 192.168.1.1 > 192.168.1.50: ICMP echo request, id 8919, seq 347, length 64
    E..T..@.@..%.......2...s"..[...P....q#...................... !"#$%&'()*+,-./01234567
    13:24:02.010087 IP 192.168.1.50 > 192.168.1.1: ICMP echo reply, id 8919, seq 347, length 64
    E..T...........2.......s"..[...P....q#...................... !"#$%&'()*+,-./01234567
    13:43:40.006264 IP 192.168.1.1.48275 > 192.168.1.50.80: Flags [S], seq 3496592766, win 14600, options [mss 1460,sackOK,TS val 15698502 ecr 0,nop,wscale 7], length 0
    E..<O8@.@.h........2...P.i.~......9............
    ...F........
    13:43:40.007663 IP 192.168.1.50.80 > 192.168.1.1.48275: Flags [S.], seq 3006420619, ack 3496592767, win 5792, options [mss 1460,sackOK,TS val 151247914 ecr 15698502,nop,wscale 0], length 0
    E..<..@.@..8...2.....P...2V..i.................
     ..*...F....

and source ip is still 192.168.1.1, what am i doing wrong?

UPD: BTW, just tryed same thing on Ubuntu 10.04 with 2.6.32 kernel, everything works good, and you even dont need to add "-I" to "ping" command, it seams in my kernel (3.2.0) somebody broken this feature.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: kernel-package (not installed)
ProcVersionSignature: Ubuntu 3.2.0-34.53-generic 3.2.33
Uname: Linux 3.2.0-34-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu15
Architecture: amd64
Date: Thu Dec 27 14:29:48 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
SourcePackage: kernel-package
UpgradeStatus: No upgrade log present (probably fresh install)
---
ApportVersion: 2.6.1-0ubuntu9
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: sets 2893 F.... pulseaudio
 /dev/snd/controlC0: sets 2893 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
DistroRelease: Ubuntu 12.10
InstallationDate: Installed on 2012-08-01 (147 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MachineType: Gigabyte Technology Co., Ltd. To be filled by O.E.M.
MarkForUpload: True
NonfreeKernelModules: nvidia
Package: linux (not installed)
ProcFB: 0 EFI VGA
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-21-generic root=UUID=56bd663f-860b-4d3d-b9f7-af02f9129847 ro
ProcVersionSignature: Ubuntu 3.5.0-21.32-generic 3.5.7.1
RelatedPackageVersions:
 linux-restricted-modules-3.5.0-21-generic N/A
 linux-backports-modules-3.5.0-21-generic N/A
 linux-firmware 1.95
RfKill:
 0: hci0: Bluetooth
  Soft blocked: no
  Hard blocked: no
Tags: quantal running-unity
Uname: Linux 3.5.0-21-generic x86_64
UpgradeStatus: Upgraded to quantal on 2012-12-27 (0 days ago)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo vboxusers
dmi.bios.date: 10/24/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F18
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: Z77X-UD3H
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrF18:bd10/24/2012:svnGigabyteTechnologyCo.,Ltd.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnGigabyteTechnologyCo.,Ltd.:rnZ77X-UD3H:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: To be filled by O.E.M.
dmi.product.version: To be filled by O.E.M.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Sets (sets88) wrote :
affects: kernel-package (Ubuntu) → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1093999

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Sets (sets88) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected quantal
description: updated
Revision history for this message
Sets (sets88) wrote : BootDmesg.txt

apport information

Revision history for this message
Sets (sets88) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Sets (sets88) wrote : IwConfig.txt

apport information

Revision history for this message
Sets (sets88) wrote : Lspci.txt

apport information

Revision history for this message
Sets (sets88) wrote : Lsusb.txt

apport information

Revision history for this message
Sets (sets88) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Sets (sets88) wrote : ProcEnviron.txt

apport information

Revision history for this message
Sets (sets88) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Sets (sets88) wrote : ProcModules.txt

apport information

Revision history for this message
Sets (sets88) wrote : PulseList.txt

apport information

Revision history for this message
Sets (sets88) wrote : UdevDb.txt

apport information

Revision history for this message
Sets (sets88) wrote : UdevLog.txt

apport information

Revision history for this message
Sets (sets88) wrote : WifiSyslog.txt

apport information

Revision history for this message
Sets (sets88) wrote :

i just upgraded Ubuntu to 12.10 to check if there is no this bug, but it persist, is it ok that i sended collected information from my upgraded Ubuntu?

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.8 kernel[0] (Not a kernel in the daily directory) and install both the linux-image and linux-image-extra .deb packages.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.8-rc1-raring/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Sets (sets88)
tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Sets (sets88) wrote :

Just tested on 3.8.0, got this two debs:

linux-image-3.8.0-030800rc2-generic_3.8.0-030800rc2.201301022235_amd64.deb
linux-image-extra-3.8.0-030800rc2-generic_3.8.0-030800rc2.201301022235_amd64.deb

from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.8-rc2-raring/
Unity's pannel doesnt start, there were some errors in console about apparmor, but booted normaly, tested described bug, it still exists.

Revision history for this message
Sets (sets88) wrote :

Downloaded and compiled last stable kernel from https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.9.2.tar.xz, "ip route src" work perfectly.

Revision history for this message
penalvch (penalvch) wrote :

Sets, could you please confirm this issue exists with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ . If the issue remains, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Sets (sets88) wrote :

Yep, bug fixed in image you gave, but, i tried only in live cd "mode", maybe there'll be another behaviour when installed.

Revision history for this message
penalvch (penalvch) wrote :

Sets, would you need a backport to a release prior to Saucy, or may we close this as Status Invalid?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.