how to send response via received interface in linux - Networking

This is a discussion on how to send response via received interface in linux - Networking ; I have two ether net port. PC1 eth0 = 192.168.3.131 and also eth1 = 10.10.1.15, gateway = 192.168.3.1 (but this is not a gateway PC ) eth1 is unplugged ( no link) but eth1 is active. PC2 connects is gatway ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: how to send response via received interface in linux

  1. how to send response via received interface in linux

    I have two ether net port.
    PC1 eth0 = 192.168.3.131 and also eth1 = 10.10.1.15, gateway =
    192.168.3.1
    (but this is not a gateway PC ) eth1 is unplugged ( no link) but eth1
    is active.

    PC2 connects is gatway eth0= 192.168.3.1 eth1= 10.10.1.1
    (This PC is connected with gatway PC which connects 192 series and and
    10 series network.)

    PC3 is in 10 series network eth0=10.10.1.12 .whos gateway is
    10.10.1.1

    The three PC from intra network.

    The Problem is follows
    -----------------------
    Scenario 1
    -----------------
    When i pinging 192.168.3.131 from PC3
    i.e ] # ping 192.168.3.131
    ping 10.10.1.12 from 192.168.3.131 <=== look here, i have
    unplugged eth1 but it try to send
    ping via
    this eth1 automatically...so fails.
    request timeout
    request timeout
    request timeout
    request timeout

    Scenario 2
    -----------------
    but when i down the PC1's eth1 down ( by using ]# ifconfig eth1
    down ])
    after i pinging 192.168.3.131 from PC3
    ie]# ping 192.168.3.131
    ping 10.10.1.12 from 192.168.3.131 <===== look here i have
    told force to use eth0

    successfully pings....
    sucessfully pingged
    sucess......
    ............
    MY need:
    ------------------
    Problem is when eth1 is active , it tries to


    how to send response via received interface in linux


  2. Re: how to send response via received interface in linux

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    ,--- VimaleshS writes:
    | I have two ether net port.
    | PC1 eth0 = 192.168.3.131 and also eth1 = 10.10.1.15, gateway =
    | 192.168.3.1
    | (but this is not a gateway PC ) eth1 is unplugged ( no link) but eth1
    | is active.

    | PC2 connects is gatway eth0= 192.168.3.1 eth1= 10.10.1.1
    | (This PC is connected with gatway PC which connects 192 series and and
    | 10 series network.)

    | PC3 is in 10 series network eth0=10.10.1.12 .whos gateway is
    | 10.10.1.1

    You've not mentioned any network masks, so I'm assuming your networks are
    192.168.3/24 and 10/8 .

    | The three PC from intra network.

    | The Problem is follows
    | -----------------------
    | Scenario 1
    | -----------------

    | When i pinging 192.168.3.131 from PC3
    | i.e ] # ping 192.168.3.131

    above statements means you're on PC3, and executed "ping
    192.168.3.131" i.e. trying to 'ping' PC1's 'eth0' .

    | ping 10.10.1.12 from 192.168.3.131 <=== look here, i have

    Above sentence means you're on PC1, trying to 'ping' 10.10.1.12 (PC3's
    eth0). I'm assuming this statment and the statement above this, are two
    different statements, not some typo. So, on PC1, why your ICMP request
    is being timed out because you've unplugged 'eth1', leading to 10/8
    network unreachable but since 'eth1' is still UP, it'll keep trying
    until it times out.

    | unplugged eth1 but it try to send
    | ping via
    | this eth1 automatically...so fails.
    | request timeout
    | request timeout
    | request timeout
    | request timeout


    | Scenario 2
    | -----------------
    | but when i down the PC1's eth1 down ( by using ]# ifconfig eth1
    | down ])
    | after i pinging 192.168.3.131 from PC3
    | ie]# ping 192.168.3.131
    | ping 10.10.1.12 from 192.168.3.131 <===== look here i have
    | told force to use eth0

    What to look here, how you forced eth0....

    | successfully pings....
    | sucessfully pingged
    | sucess......
    | ...........
    | MY need:
    | ------------------
    | Problem is when eth1 is active , it tries to


    | how to send response via received interface in linux

    What is received interface ?


    Your description above is quite confusing. Please paste proper
    output to illustrate what you're trying to say.

    - --
    Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
    ·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.7 (GNU/Linux)

    iD8DBQFHKi9THy+EEHYuXnQRAvu6AJwJ0GsFJ6Ap+Oyci7b7AL LhkK7L5gCfU6Wq
    NisVVLA3W8GeD6xNPu6qm9s=
    =bGt1
    -----END PGP SIGNATURE-----

  3. Re: how to send response via received interface in linux

    > What is received interface ?
    >
    > Your description above is quite confusing. Please paste proper
    > output to illustrate what you're trying to say.
    >
    > - --


    Let me explain simple senario

    One Linux PC1 having two interfaces
    eth0 = 192.168.3.131
    eth1 = 10.10.1.15 ( Network cable is unplugged)
    i.e, eth1 is alive but Ethernet cable is not connected in that
    interface
    gateway = 192.168.3.1


    When i ping address 10.10.1.2 from PC1
    it sending request from
    Output
    -======
    # ping 10.10.1.2
    ping 10.10.1.2 from 10.10.1.15
    Request timeout
    Request timeout

    Problem is when i ping Class A network it tries to send
    packets from eth1 interface , but Ethernet cable is unplugged

    But if it tried to send packets from
    Output
    ======
    # ping 10.10.1.2 eth0
    ping 10.10.1.2 from 192.168.3.131
    Successfully pings

    Here i forced ping to use eth0 interface so it pings successfully.

    .......But in case of FTP
    If i ftp 10.10.1.2 .from PC1..
    FTP fails ........
    because i cannot able to force to use the eth0 interface in FTP as i
    did
    in ping .


  4. Re: how to send response via received interface in linux

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    ,--- VimaleshS writes:
    || What is received interface ?
    ||
    || Your description above is quite confusing. Please paste proper
    || output to illustrate what you're trying to say.
    ||
    || - --

    | Let me explain simple senario

    | One Linux PC1 having two interfaces
    | eth0 = 192.168.3.131
    | eth1 = 10.10.1.15 ( Network cable is unplugged)
    | i.e, eth1 is alive but Ethernet cable is not connected in that
    | interface
    | gateway = 192.168.3.1


    | When i ping address 10.10.1.2 from PC1
    | it sending request from
    | Output
    | -======
    | # ping 10.10.1.2
    | ping 10.10.1.2 from 10.10.1.15
    | Request timeout
    | Request timeout

    I asked you paste the proper output.

    | Problem is when i ping Class A network it tries to send
    | packets from eth1 interface , but Ethernet cable is unplugged

    | But if it tried to send packets from
    | Output
    | ======
    | # ping 10.10.1.2 eth0
    | ping 10.10.1.2 from 192.168.3.131
    | Successfully pings

    I asked you paste the proper output. probably you missed some argument
    to 'ping'.

    | Here i forced ping to use eth0 interface so it pings successfully.

    Anyways, I'm assuming you're using '-I' switch of 'ping' utility to
    specify the outgoing interface.

    | ......But in case of FTP
    | If i ftp 10.10.1.2 .from PC1..
    | FTP fails ........
    | because i cannot able to force to use the eth0 interface in FTP as i
    | did
    | in ping .

    Because, there's already a route to 10/8 network present. Default
    route won't be used unless you remove 10/8 network route. So whatever
    network utility you use, if it allows you to explicitly specify
    outgoing interface, then you don't need to modify your routing table
    to use that utility, but if that don't then you need to modify your
    routing table.

    HTH
    - --
    Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
    ·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFHPRunHy+EEHYuXnQRAjElAKCompGc6Q8lSe99AeIEA3 VmGIEjnACcD35r
    ajGUhYKsMw3bR2MHMZDgHgg=
    =iH0G
    -----END PGP SIGNATURE-----

+ Reply to Thread