Reply To: Tcpip routing forward question?

Home Forums Discussions Support Tcpip routing forward question? Reply To: Tcpip routing forward question?

#5637
hoowaycn
Participant

    Oh, understand, thanks.

    Followed your suggestion.

    I do this, print all caught packet, NOT do any address subsititute action
    Just want to know I can catch that packet at external interface.

    /// set flag MSTCP_FLAG_SENT_TUNNEL|MSTCP_FLAG_RECV_TUNNEL

    if (PacketBuffer.m_dwDeviceFlags == PACKET_FLAG_ON_SEND)
    {
    /// tcpstack –> interface

    print(“tcpstack — > interface: %s”, interfaceName );
    for(i=0;i print(“%x: rn” , PacketBuffer.m_IBuffer);
    }

    if (PacketBuffer.m_dwDeviceFlags == PACKET_FLAG_ON_RECV)
    {
    /// interface — > tcpstack

    print(“interface —> tcpstack: %s”, interfaceName );
    for(i=0;i print(“%x: rn” , PacketBuffer.m_IBuffer
    );
    }

    I do a “ping 218.30.103.40” at the client computer, as the the correct result I should catch the packet at “TcpStack –> Interface: External”, but failed.
    I only get it at “Interface –> Stack: Internal”. As you have told before, I
    should get the packet at “TcpStack –> Interface: External”. Can you tell me where the error from?

    My environment is like below

    internet —- adsl modem — HUB


    inner client( 192.168.1.3)
    |
    NAT computer (192.168.1.2 WinXP)

    NAT computer use RasPPPoE to connect ADSL.

    Below is my route table

    =====================================
    Interface List
    0x1 ……………………… MS TCP Loopback interface
    0x2 …00 50 ba 63 2b bd …… VIA Compatable Fast Ethernet Adapter
    0x40004 …00 53 45 00 00 00 …… WAN (PPP/SLIP) Interface
    =====================================
    Active Routes:
    Network Destination Netmask Gateway Interface Metric
    0.0.0.0 0.0.0.0 61.50.227.147 61.50.227.147 1
    61.50.227.147 255.255.255.255 127.0.0.1 127.0.0.1 50
    61.149.96.1 255.255.255.255 61.50.227.147 61.50.227.147 1
    61.255.255.255 255.255.255.255 61.50.227.147 61.50.227.147 50
    127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
    192.168.1.0 255.255.255.0 192.168.1.2 192.168.1.2 20
    192.168.1.2 255.255.255.255 127.0.0.1 127.0.0.1 20
    192.168.1.255 255.255.255.255 192.168.1.2 192.168.1.2 20
    224.0.0.0 240.0.0.0 192.168.1.2 192.168.1.2 20
    224.0.0.0 240.0.0.0 61.50.227.147 61.50.227.147 1
    255.255.255.255 255.255.255.255 192.168.1.2 192.168.1.2 1
    Default Gateway: 61.50.227.147
    ============================
    Persistent Routes:
    None

    Here is one packet I caught

    interface–>tcpstack Local Connection (Internel)
    0: 50: ba: 63: 2b: bd: 0: 10: dc: 1: b8: 9f: 8: 0: 45: 0:
    0: 3c: 38: cf: 0: 0: 80: 1: fe: ff: c0: a8: 1: 3: da: 1e:
    67: 28: 8: 0: 29: 5c: 2: 0: 22: 0: 61: 62: 63: 64: 65: 66:
    67: 68: 69: 6a: 6b: 6c: 6d: 6e: 6f: 70: 71: 72: 73: 74: 75: 76:
    77: 61: 62: 63: 64: 65: 66: 67: 68: 69:

    This is a ICMP Echo Req packet