This is the first edition of my answer to the question below
http://superuser.com/questions/1069956/all-outgoing-tcp-packets-have-source-ip-address-0-0-0-0
It's all about Avahi daemon, Link-Local, scope link, etc. It's possible to solve this problem.
You have to make scope global
on the host's IP address and make right routing table.
Below is my story.
We have such a local subnet (169.254.0.0/16
) too. Nobody had known that it's wrong when it was built.
So it works, and Windows hosts go through a router (a Linux machine with Fedora 12 and IP 169.254.0.34
)
to the Internet well. Fedora 12 hosts go to the Internet well too.
I have been trying a VM with Fedora-Live-LXDE-x86_64-23-10.iso just now and figured out
that all outgoing IP packets from this VM to the Internet have the source IP address set to 0.0.0.0
.
The IP address and the routing table of the host were as follow:
[root@fedora23x64 sysconfig]# ip address
....
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:94:ff:a1 brd ff:ff:ff:ff:ff:ff
inet 169.254.55.180/16 brd 169.254.255.255 scope link dynamic eno16777736
valid_lft 3565sec preferred_lft 3565sec
inet6 fe80::20c:29ff:fe94:ffa1/64 scope link
valid_lft forever preferred_lft forever
....
[root@fedora23x64 sysconfig]# ip route
default via 169.254.0.34 dev eno16777736 proto static metric 100
169.254.0.0/16 dev eno16777736 proto kernel scope link src 169.254.55.180 metric 100
192.168.1.0/24 via 169.254.0.34 dev eno16777736 proto dhcp metric 100
It seems that scope link
there is that is preventing packets from having right source IP.
The first and third routes are from the router which is an DHCP server too.
Then I remembered that it might relate to Avahi. I turned off the firewall (stopped firewalld
service), removed avahi-daemon
. Stopped NetworkManager service. It is absolutely not helped. Then I removed the IP address given by DHCP server and added it again, with scope global
. And so, I removed all the routes and added one default route to the router. (There were some intermediate ifup
s/ifdown
s). Now it works.
After all, the ip address and route table were as below:
[root@fedora23x64 sysconfig]# ip address
....
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:0c:29:94:ff:a1 brd ff:ff:ff:ff:ff:ff
inet 169.254.55.179/16 brd 169.254.255.255 scope global dynamic eno16777736
valid_lft 3608sec preferred_lft 3608sec
inet6 fe80::20c:29ff:fe94:ffa1/64 scope link
valid_lft forever preferred_lft forever
....
[root@fedora23x64 sysconfig]# ip route
default via 169.254.0.34 dev eno16777736
P.S.
Sorry for not giving a clear method. Just posted it to show that the issue can be solved by that clumsy way. Also, it might be one simple configuration line somewhere to instruct the system to not treat the 169.254.0.0/16
as Link-Local, but I've not found it yet.. Let me know, please, if you do. Adding NOZEROCONF=yes
to the /etc/sysconfig/network
no longer works..