Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to verify/log/debug which route table being used?

Reply
Thread Tools Display Modes

How to verify/log/debug which route table being used?

 
 
Eric B.
Guest
Posts: n/a

 
      04-07-2008, 02:07 PM
Hi,

I'm trying to configure my server to route different packets via different
kernel route tables. I thought I had things configured properly, but from
some quick tests, return packets from my server don't seem to be making the
return trip. I look at my iptables log output and see that my packets are
formed as I would expect, but the logs on my router don't show them showing
up.

Is there a way I can verify / validate that my packets are acutally using
the routing table I have specified and are being retransmitted to the
correct gateway?

My setup is as follows (RHEL 4):
# iptables -t mangle -A PREROUTING -d 192.168.104.64 -j MARK --set-mark 3
# iptables -t nat -A POSTROUTING -m mark --mark 3 -j SNAT --to-source
192.168.104.64
# ip rule add fwmark 3 table 3
# ip route add unicast default via 192.168.104.251 table 3

My goal is as follows:
My server is multi-homed; the same NIC serving both 192.168.101.64 and
192.168.104.64.
I'm looking to configure it such that any packets destined for
192.168.104.64 get a mark added to them. Any response to that packet will
get routed to gateway 192.168.104.251 (from the default route in table 3),
and have its source address modified to 192.168.104.64.

However, if I check my logs on my router at 192.168.104.251, I don't see any
return packets showing up.

Is there any way I can debug (using tcpdump somehow? Although not quite
sure what to look for in its output - help would be appreciated how best to
use it) the outgoing packets to ensure that they are being sent to
192.168.104.251, and not my default gateway from my main routing table?

Thanks!

Eric



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN client adds wrong route to local route table snowdog_2112 Windows Networking 7 11-01-2005 02:05 PM
Route Table =?Utf-8?B?U2NvdHQ=?= Windows Networking 1 11-27-2004 12:32 AM
(difficult) pppd and route table KZ Linux Networking 3 10-05-2004 11:10 AM
Route Table problem with new Toshiba laptop Kerry Wireless Internet 0 04-29-2004 06:23 PM
Strange route table? Bob Linux Networking 2 02-21-2004 04:52 PM



1 2 3 4 5 6 7 8 9 10 11