Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-22-2014, 04:01 AM
|
#1
|
LQ Newbie
Registered: Jul 2010
Posts: 18
Rep:
|
Can't forword packets to default gateway
Hi guys,
I wonder why I can't forward packets from one interface to default gateway through other interface in my linux host it only works when I initiate ping to this specific DGW from same host.
I tried to invistigate it further with tcpdump and noticed icmp frames comes in from one interface but not getting out from the interface on same network as DGW(eth0).
When I'm pinging DGW from the host it suddenly works! why ?
Some output below:
my PC is 10.60.247.139
Code:
[root@host1 ~]# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.60.73.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.60.72.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.60.74.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
10.60.76.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 10.60.72.59 0.0.0.0 UG 0 0 0 eth0
[root@host1 ~]# tcpdump -n -i eth3 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth3, link-type EN10MB (Ethernet), capture size 96 bytes
05:52:47.969541 IP 10.60.247.139 > 10.60.74.19: ICMP echo request, id 1, seq 10578, length 40
05:52:52.868889 IP 10.60.247.139 > 10.60.74.19: ICMP echo request, id 1, seq 10579, length 40
05:52:57.899993 IP 10.60.247.139 > 10.60.74.19: ICMP echo request, id 1, seq 10580, length 40
05:53:02.870666 IP 10.60.247.139 > 10.60.74.19: ICMP echo request, id 1, seq 10581, length 40
4 packets captured
4 packets received by filter
0 packets dropped by kernel
[root@host1 ~]# tcpdump -n -i eth0 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
0 packets captured
0 packets received by filter
0 packets dropped by kernel
I have many hosts with same issue. All are VMs with LNX 5.4.3.
|
|
|
04-22-2014, 05:03 AM
|
#2
|
Senior Member
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625
Rep:
|
Your PC has IP address 10.60.247.139, but lives on the 10.60.74.0/24 subnet? And, why do you expect the packet to be forwarded out through eth0 when the destination, 10.60.74.19, also lives on 10.60.74.0/24 (eth3)?
I suspect the packet was dropped as a martian. Check your logs for martian source, or google for the appropriate settings in sysctl to turn on/off martian logging/dropping.
|
|
|
04-22-2014, 06:07 AM
|
#3
|
LQ Newbie
Registered: Jul 2010
Posts: 18
Original Poster
Rep:
|
Quote:
Originally Posted by Berhanie
Your PC has IP address 10.60.247.139, but lives on the 10.60.74.0/24 subnet? And, why do you expect the packet to be forwarded out through eth0 when the destination, 10.60.74.19, also lives on 10.60.74.0/24 (eth3)?
I suspect the packet was dropped as a martian. Check your logs for martian source, or google for the appropriate settings in sysctl to turn on/off martian logging/dropping.
|
Thanks for your reply.
I tried to ping the host through 10.60.74.0/24 and the "echo request" reached the host's dedicated interface (eth3).
I'm expecting the packet to be forwarded through eth0 since host can't reply to me on same network 10.60.247.x , since none is relevant on its routing table, so host should reply only through default gateway assigned in eth0 network.
There's nothing wrong with it.
packet apperently droppen when reached to host but don't think because it identified as martain. 10.0.0.0 network reserved to use in private boundries ,It's not routed outside my company's network. Logs didnt say a thing about it either.
|
|
|
All times are GMT -5. The time now is 12:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|