Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Linux router question

  1. #1
    Join Date
    Aug 2002
    Posts
    3,959
    Rep Power
    25

    Default Linux router question

    I have been experimenting with Linux routers. I have discovered some interesting stuff.

    All I have to do is to type

    echo "1" > /proc/sys/net/ipv4/ip_forward

    and I have a router. I did not know it was so easy.

    Applications such as Quagga and Zebra are useful if you need to use dynamic routing protocols like rip, ospf, etc. If you have a simple LAN and need to route between a few segments, they are not necessary. Change the value of ip_forward, add some static routes and you are good to go.

    I have a question. I have set up a router on a test network. I type route -n to see the router's static routes. See the attachment for the output. I have formated the attachment for Linux and Windows.

    What does the following line mean? It is the third route.

    169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1

    At first the machine would not route the packets between the subnets. It started routing after I deleted this route.

    On Windows I see a 169 address when the workstation cannot connect to dhcp to get an address. The router is using fixed i.p. addresses so this should not be an issue.
    Last edited by jamrock; Jan 7, 2006 at 05:54 PM.

  2. #2
    Join Date
    Jan 2005
    Posts
    3,151
    Rep Power
    0

    Default

    Maybe you should do up a diagram of your network for us

    Having the static route: 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
    implies that there wont be any windows boxes on the eth0 interface.

  3. #3
    Join Date
    Aug 2002
    Posts
    3,959
    Rep Power
    25

    Default

    I have two subnets, 192.168.1.0 and 192.168.0.0. I would expect to see routing entries for these two subnets.

    From what I have read, when network cards are configured, routes are automatically added to the routing table for their subnets.

    Not sure how the 169.254.0.0 got there. If I delete it and restart the machine it gets re-created.

    Juba, Gillion, anyone?
    Last edited by jamrock; Jan 7, 2006 at 10:48 PM.

  4. #4
    Join Date
    Mar 2004
    Posts
    812
    Rep Power
    0

    Default

    Sounds like eth1 is setup for dhcp and because it did find a DHCP server is assigns itself a 169.254 address.

  5. #5
    Join Date
    Aug 2002
    Posts
    3,959
    Rep Power
    25

    Default

    Sounds like eth1 is setup for dhcp and because it did find a DHCP server is assigns itself a 169.254 address.
    I guess you mean because it did not find a dhcp server. That would be logical but I don't think so. I will double check it tomorrow.

    Why would there be 2 route entries for eth1?

    BTW I have been reading this book:

    Linux Routers. A Primer for Network Administrators by Tony Mancill.

    It starts with the basics behind routing and goes on to describe how to set up routers for different types of environments. I would recommend it for anyone interested in setting up Linux based routers.
    Last edited by jamrock; Jan 7, 2006 at 10:59 PM.

  6. #6
    Join Date
    Oct 2004
    Posts
    4,814
    Rep Power
    24

    Default

    strange I would like to know how that happened.. This is funny cause I was saying to my friend the other day that routers are too important to be left up to penguins.

    Anyways isnt it possible that some windows machine transmitting the rip for its subnet? or some other factor like one machine having an ip address on that subnet?, its a long shot but those ips are usually used by windows by default.

  7. #7
    Join Date
    Aug 2002
    Posts
    3,959
    Rep Power
    25

    Default

    This is funny cause I was saying to my friend the other day that routers are too important to be left up to penguins.
    If you read the Quagga mailing list you will see that admins are using Linux routers on some big networks with hundreds of users.

    I know of one major financial institution in Jamaica that uses Linux routers extensively. Some of their I.T. guys did a presentation on Quagga at JALUG last year.
    Last edited by jamrock; Jan 7, 2006 at 11:17 PM.

  8. #8
    Join Date
    Mar 2004
    Posts
    812
    Rep Power
    0

    Default

    Quote Originally Posted by jamrock
    I guess you mean because it did not find a dhcp server. That would be logical but I don't think so. I will double check it tomorrow.

    Why would there be 2 route entries for eth1?

    BTW I have been reading this book:

    Linux Routers. A Primer for Network Administrators by Tony Mancill.

    It starts with the basics behind routing and goes on to describe how to set up routers for different types of environments. I would recommend it for anyone interested in setting up Linux based routers.
    Yes, that is what I meant.

    I think that initially because the DHCP was not available, it assigned the 169.254 IP and route, then when you "IPed" eth1, it kept both of them.

  9. #9
    Join Date
    Aug 2002
    Posts
    3,959
    Rep Power
    25

    Default

    I think that initially because the DHCP was not available, it assigned the 169.254 IP and route, then when you "IPed" eth1, it kept both of them.
    Okay... I will watch it for a while.

  10. #10
    Join Date
    Jan 2005
    Posts
    3,151
    Rep Power
    0

    Default

    So, what happens if you unplug eth1 and boot the box?

    Linux doesnt create static routes by itself, set traps for the elves.

Posting Permissions

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