Re: routing to ping automatically via the correct network

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/5/20 4:20 PM, Marc Roos wrote:
# until this, enough to ping networks
# can ping 192.168.10.333, 192.168.10.2, cc.cc.cc.1
# not: own ip's?? cc.cc.cc.43, 192.168.10.232

Bring the loopback interface up in the network namespace. It's required to ping your local IPs.

ip route add default via cc.cc.cc.1 dev testeth1 table 81

What is the need for the separate routing table (81)?

Network namespaces have their own set of routing tables.

# necessary for the host 192.192.168.114 to ping cc.cc.cc.43
ip route add 192.168.10.114 dev testeth1 scope global table 81

ip rule add from all to cc.cc.cc.43 table 81
ip rule add from cc.cc.cc.43 table 81

# can ping dd.dd.dd.130

Do you have a route to dd.dd.dd.130 in the main / default routing tables inside the network namespace?

If you don't, chances are good that the kernel can't determine an outgoing interface to determine the source IP to match any ip rules.

I don't see any need for table 81 in any of this.



--
Grant. . . .
unix || die

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux