Find the answer to your Linux question:
Results 1 to 3 of 3
I have a question maybe someone can help with. The O/S I am running is pretty much a vanilla install of Fedora Core 3. I have two NIC's in the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Posts
    1

    Kernel/network Routing, Kernel/Network Routing


    I have a question maybe someone can help with.

    The O/S I am running is pretty much a vanilla install of Fedora Core 3.

    I have two NIC's in the machine. Eth0 and Eth1

    I am attempting to separate the two networks and its traffic.

    Here is an image: http://www.xnote.com/~alan/web/routing_problem.jpg

    ETH0 has a network of 166.70.122.0 mask 255.255.255.128 and gw 166.70.122.1
    ETH1 has a network of 166.70.133.128 mask 255.255.255.224 and gw
    166.70.133.129

    Since I have to have a default gateway, I have it set to 166.70.122.1

    However, all traffic from the ETH1 goes out the default gateway, which I guess makes sense.

    I attempted to add a gw for that network through the route command, so I get
    this:

    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt
    Iface
    166.70.133.128 166.70.133.129 255.255.255.224 UG 0 0 0
    eth1
    166.70.133.128 0.0.0.0 255.255.255.224 U 0 0 0
    eth1
    166.70.122.0 0.0.0.0 255.255.255.128 U 0 0 0
    eth0
    0.0.0.0 166.70.122.1 0.0.0.0 UG 0 0 0
    eth0


    However the outbound traffic from IP 166.70.133.133 still goes out the default gateway.


    My goal is to essentially create a router or something that directs all traffic for each network to its proper gateway.

    Thanks in advance for any help.

    -Alan
    alan@xnote.com

  2. #2
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    It is possible A good read is http://www.lartc.org/howto/ .
    You could think of using conditional multipath routing using a firewall mark using iptables . I made something like that some years ago and that worked. I head three external ip's in the same network but that is history

    But I think you will find means to accomplish this when reading the HOWTO, at least I did .
    Good luck
    I\'m so tired .....
    #200472

  3. #3
    Linux Enthusiast
    Join Date
    Feb 2005
    Location
    SE, Stockholm
    Posts
    512
    But what happens to your routing table when you add an extra default route at your command shell?
    I.e.
    Code:
    route add -net 0.0.0.0 -netmask 0.0.0.0 gw 166.70.133.129 eth1

  4. $spacer_open
    $spacer_close

Posting Permissions

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