Results 1 to 6 of 6

Thread: How to route 2 interface

  1. #1
    VeNoMiS NNTP User

    Default How to route 2 interface

    Hi guys,
    this is my scenario:

    I have a suse with 2 eth interface both connected :
    eth0 is configured with public ip
    Code:
    eth0      Link encap:Ethernet  HWaddr 00:1E:0B:48:7E:D2
              inet addr:87.*.*.*  Bcast:87.*.*.*  Mask:255.255.255.240
    and eth1 with internal ip
    Code:
    eth1      Link encap:Ethernet  HWaddr 00:1E:0B:48:7E:DA
              inet addr:172.16.1.9  Bcast:172.16.255.255  Mask:255.255.0.0
    my route table
    Code:
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    87.*.*.*    *               255.255.255.240 U     0      0        0 eth0
    172.16.0.0      *               255.255.0.0     U     0      0        0 eth1
    link-local      *               255.255.0.0     U     0      0        0 eth0
    loopback        *               255.0.0.0       U     0      0        0 lo
    default         87.*.*.*    0.0.0.0         UG    0      0        0 eth0
    what i need is the posibility to access the local network,
    using
    Code:

    route add -net 172.16.0.0 gw 172.16.1.3

    i can't ping any host of the lan

    anyone have a hint?

    tnx a lot
    (and sorry for my poor english)
    VeNoMiS is online now Report Post Edit/Delete Message

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,721

    Default Re: How to route 2 interface

    When I recap what you have in the routing table:
    Code:
    172.16.0.0      *               255.255.0.0     U     0      0        0 eth1
    this means that all traffic to the 172.16.0.0/16 network goes through eth1.
    Now with:
    Code:
    route add -net 172.16.0.0 gw 172.16.1.3
    you tell that all traffic to the net 172.16.0.0/16 must go to gateway 172.16.1.3.
    Both can not be true at the same time. Moreover how can the gateway 172.16.1.3 be reached when traffic to it (being inside 172.16.0.0/16) should go to 172.16.1.3 (sort of enternal loop there).

    Please try to explain how your network looks like on the eth1 side. I get the impression that it is something like:
    yoursystem:eth1:172.16.1.9 - LAN172.16.0.0/16 - 172.16.1.3:gateway:172.16.?.? - LAN172.16.0.0/16
    As said, this can not function. Please provide more information.

    And you say you can not ping. But I love it to see what happens, and not to be told what you think that happens. So please copy and past your ping trial in the same way that you gave us the output of netstat.
    Henk van Velden

  3. #3
    VeNoMiS NNTP User

    Default Re: How to route 2 interface

    I have change a bit the routing setting
    Code:
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    87.*.*.*    *               255.255.255.240 U     0      0        0 eth0
    172.16.0.0      plutone.sede.ig 255.255.0.0     UG    0      0        0 eth1
    link-local      *               255.255.0.0     U     0      0        0 eth0
    loopback        *               255.0.0.0       U     0      0        0 lo
    default         87.*.*.*    0.0.0.0         UG    0      0        0 eth0
    172.16.1.3 is the gw for the internal lan (is an isa server)

    Code:
    PING 172.16.1.3 (172.16.1.3) 56(84) bytes of data.
    64 bytes from 172.16.1.3: icmp_seq=1 ttl=128 time=0.499 ms
    64 bytes from 172.16.1.3: icmp_seq=2 ttl=128 time=0.164 ms
    64 bytes from 172.16.1.3: icmp_seq=3 ttl=128 time=0.210 ms
    and it works
    but if I ping 172.16.1.7 (is alive)
    Code:
     ping -vvv 172.16.1.7
    PING 172.16.1.7 (172.16.1.7) 56(84) bytes of data.
    
    --- 172.16.1.7 ping statistics ---
    20 packets transmitted, 0 received, 100% packet loss, time 18999ms
    and also using the eth1 interface
    Code:
     ping -vvv -I eth1 172.16.1.7
    PING 172.16.1.7 (172.16.1.7) from 172.16.1.9 eth1: 56(84) bytes of data.
    this is the configuration

    router->switch

    switch->isa_server

    isa_server 2 eth 1 public 87.*.*.* 1 private 172.16.1.3 (the gateway)

    switch->linux machine 1 eth public 1 private (i can ping only the gw)not working

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,721

    Default Re: How to route 2 interface

    this is the configuration

    router->switch

    switch->isa_server

    isa_server 2 eth 1 public 87.*.*.* 1 private 172.16.1.3 (the gateway)

    switch->linux machine 1 eth public 1 private (i can ping only the gw)not working
    I am very sorry, but This is not a picture that I understand. Can we give consistent names to the systems that hold longer then half an hour? I called the system your are all the time talking about yoursystem. Now you talk about linux system. Is that the same? Does it look like

    Code:
                     |- <-> isa_server <-> ???????
    router <-> switch
                     |- <-> linux_system  <-> ????????
    Please complete this and fill in for every <-> which LAN/network it is by giving the network specification (like 172.16.0.0/16, etc.)

    Did you understand what I said about linux_system allready being connected to the 172.16.0.0.16 network and you wanting it to connect to the 172.16.0.0/16 network through 172.16.1.3, which is impossible?

    Please try to give as much information as possible and not as less as possible. I can not look to your setup from here, nor in your head.
    Henk van Velden

  5. #5
    VeNoMiS NNTP User

    Post Re: How to route 2 interface

    Solved using
    Code:
    route add default gw 172.16.1.3 eth1
    route add default gw 87.*.*.* eth0
    the configuration is
    Code:
                    |- <-> isa_server <-> 87.*.*.*         -|
                    |- <-> isa_server <-> 172.16.0.0/16    -|
    router <-> switch                                      <->switch
                    |- <-> linux_system  <-> 172.16.0.0/16 -|
                    |- <-> linux_system  <-> 87.*.*.*      -|

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,721

    Default Re: How to route 2 interface

    This can not be true. You made a mess of it. You can not have two default routes. That denies. what the name default means. Your picture is still bogus to me, partly becausr it is difficult to make such pictures using the means we have (a real drawing using some drawing software would be better) and partly because (imho) you do not realy understand what a network is and how traffic is routed.

    But as you say it is solved, you will most probably not be interested in my objections. Wishing you all the best with your network.
    Henk van Velden

Tags for this Thread

Posting Permissions

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