Find the answer to your Linux question:
Results 1 to 8 of 8
Hello, check the ttached file. I have a host in 192.168.3.x and another in 192.168.4.x Both conect to same server with 2 interfaces ending in .254 I have no iptables ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    12

    eth1 routes to eth2, but no the opposite


    Hello, check the ttached file.


    I have a host in 192.168.3.x and another in 192.168.4.x

    Both conect to same server with 2 interfaces ending in .254


    I have no iptables rules, i activated /proc/sys/net/ipv4/ipv4_forwarding to 1


    The host 192.168.3.3 can ping 192.168.3.254 but not 192.168.4.254
    The host 192.168.4.4 can ping 192.168.3.254 and can ping 192.168.4.254


    Why?
    Attached Images Attached Images

  2. #2
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    119
    You need to add a route for the .4 subnet so that the .3 knows where to go.

  3. #3
    Just Joined!
    Join Date
    Jan 2009
    Posts
    12
    Quote Originally Posted by markcole View Post
    You need to add a route for the .4 subnet so that the .3 knows where to go.

    this are the default routes when this problem is taking place:


    192.168.4.0........0.0.0.0...........255.255.255.0 .... u .... 0 ..... 0 .... eth1
    192.168.3.0........0.0.0.0...........255.255.255.0 .... u .... 0 ..... 0 .... eth0
    0.0.0.0 ........ 192.168.3.1...........0.0.0.0.... ug .... 0 ..... 0 .... eth0



    i didnt add a route for the .3, so why does it happen?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    119
    Quote Originally Posted by fdelval View Post
    this are the default routes when this problem is taking place:


    192.168.4.0........0.0.0.0...........255.255.255.0 .... u .... 0 ..... 0 .... eth1
    192.168.3.0........0.0.0.0...........255.255.255.0 .... u .... 0 ..... 0 .... eth0
    0.0.0.0 ........ 192.168.3.1...........0.0.0.0.... ug .... 0 ..... 0 .... eth0



    i didnt add a route for the .3, so why does it happen?
    The system set 3.1 as the default route for whatever reason. The reason you cannot ping the .4 network from the .3 network is because it doesn't know where to send it, so I tries the default route, which is wrong for the .4.

    You need to add a route for the 192.168.4.0 and tell it to go to 192.168.4.1 (eth1).

  6. #5
    Just Joined!
    Join Date
    Jan 2009
    Posts
    12
    Quote Originally Posted by markcole View Post
    The system set 3.1 as the default route for whatever reason. The reason you cannot ping the .4 network from the .3 network is because it doesn't know where to send it, so I tries the default route, which is wrong for the .4.

    You need to add a route for the 192.168.4.0 and tell it to go to 192.168.4.1 (eth1).


    mmm i dont know; i deleted the default route, rebooted the server, checked that no route default gw is present, and still, the stange problem persists

  7. #6
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    119
    What happened when you added the route for the .4 network?

    What does a "route -n" give you?

  8. #7
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    STOP!!!!!!

    There is no need to add/remove any routes they are all there.

    192.168.4.0........0.0.0.0...........255.255.255.0 .... u .... 0 ..... 0 .... eth1
    192.168.3.0........0.0.0.0...........255.255.255.0 .... u .... 0 ..... 0 .... eth0
    0.0.0.0 ........ 192.168.3.1...........0.0.0.0.... ug .... 0 ..... 0 .... eth0
    The mask tells us that the network is for a class C.
    The first route is to inform the system that anything going to .4.* is to use eth1
    The second route is to inform the system that anything going to .3.* is to use eth0
    The last route says anything else is to go out eth0.

    Since .4 is known as we can see from the first route the pings should be going out eth1 but there are not.
    Next thought is maybe the firewall.

    What does the firewall look like? Is it blocking?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  9. #8
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    119
    Quote Originally Posted by Lazydog View Post
    STOP!!!!!!

    There is no need to add/remove any routes they are all there.

    The mask tells us that the network is for a class C.
    The first route is to inform the system that anything going to .4.* is to use eth1
    The second route is to inform the system that anything going to .3.* is to use eth0
    The last route says anything else is to go out eth0.

    Since .4 is known as we can see from the first route the pings should be going out eth1 but there are not.
    Next thought is maybe the firewall.

    What does the firewall look like? Is it blocking?
    Good catch. For some reason I read it as eth0.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •