1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

P2p script like hyperwrt how does it work?

Discussion in 'Tarifa Firmware' started by nitro-, Dec 15, 2005.

  1. nitro-

    nitro- Network Guru Member

    Hallo I like Tarifa 11 and want to use the p2p script, how does it work at start ?

    echo 4096 > /proc/sys/net/ipv4/ip_conntrack_max
    echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
    echo 1 > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
    cho 512 > /proc/sys/net/ipv4/neigh/default/gc_thresh1
    echo 2048 > /proc/sys/net/ipv4/neigh/default/gc_thresh2
    echo 4096 > /proc/sys/net/ipv4/neigh/default/gc_thresh3
    echo "600 1800 120 60 120 120 10 60 30 120" > /proc/sys/net/ipv4/ip_conntrack_tcp_timeouts

    Thank You
     
  2. NateHoy

    NateHoy Network Guru Member

    What do you mean?

    If Tarifa 11 supports startup scripts, you just dump that text into the startup script screen, save the settings, and restart the router.

    Are you looking for an explanation of what they all mean? It's pretty simple.

    4096 increases the number of connections that can be tracked from the normal default to 4096. HyperWRT Tofu's default is 2048 but that will depend on the firmware.

    The next two block out anonymous connections and ping responses, which cuts down on "other" traffic.

    The thresholds set the number of connections to reach before starting cleanup, the number of connections to target as ideal, and the number of connections never to exceed.

    The most important (to P2P) is the tcp_timeouts, and the only really important one is the second number (1800). That's the number of seconds to wait between intervals of cleaning connections. The Linksys default for this is 5 whole days. Under the Linksys default, you will run out of connections LONG before cleanup ever starts. 1800 is a half an hour.

    So, the only REALLY important line for your startup script is that one, but you might want to start up a command line and issue the following command:

    cat /proc/sys/net/ipv4/ip_conntrack_tcp_timeouts

    Look at the result, especially at the second number. That is the number of seconds between connection cleanup cycles. If it's already low, then the startup script won't help you out a lot.
     
  3. nitro-

    nitro- Network Guru Member

    @ NateHoy

    Thank You for the fast answer,
    I mean that I can I copy and paste the script like hyperwrt startup, so what I have to do...sorry I´m not the cmd line user.
     
  4. nitro-

    nitro- Network Guru Member

    @ NateHoy

    Thank You for the fast answer,
    I mean that I can I copy and paste the script like hyperwrt startup, so what I have to do...sorry I´m not the cmd line user.
     
  5. NateHoy

    NateHoy Network Guru Member

    Re: @ NateHoy

    I've never used Tarifa, so I don't know how to set up a startup script in it. In HyperWRT Tofu, there's a "startup script" button on the Administration page, and you just copy-and-paste whatever startup script you desire into it, save it, and click the "reboot router" button.
     
  6. jchuit

    jchuit Network Guru Member

    It is very simple, the startup script is executed after booting. Just copy and paste it into the field at the Administration page, and the hit the save button. (All characters are converted to linux style and then saved in NVRAM)

    If everything is ok, the rc_startup variable is saved, every time you reboot the router, this script will be started.

    For checking the values in the specific ini-files, you can check them in telnet.

    In the manual there are some examples of how to setup these files:

    #!/bin/sh
    echo 4096 > /proc/sys/net/ipv4/ip_conntrack_max

    The above script will increase the max. possible connections from 1024 to 4096. (Every connection needs a amount of Ram space!)

    This above will work but, wihout any problem, I also found a link in German if you like to read it here is the Link:
    http://qdsl-support.de/showthread.php?p=129669#post129669

    Greetings,
    Jchuit
     
  7. nitro-

    nitro- Network Guru Member

    @ jchuit

    hallo jchuit,

    that´s what I neede that the syntax is the same like the sample with
    #!/bin/sh
    than the script code...like
    echo 4096 > /proc/sys/net/ipv4/ip_conntrack_max

    than the next script code line?
    echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

    thats all?
     
  8. jchuit

    jchuit Network Guru Member

    To nitro

    .....and indeed then the next line.

    That's all!
     
  9. ch0815

    ch0815 Network Guru Member

    LOL, that's my posting. :rofl:

    In Germany there is a phrase for this: "Die Welt ist klein!"

    In english: "It's a small world!"
     
  10. NateHoy

    NateHoy Network Guru Member

    Oh, by the way, important side note. Your cut-and-paste missed a letter. The 4th command should be "echo", and not "cho" as you have it listed.
     
  11. nitro-

    nitro- Network Guru Member

    thank You for fast support

    @NateHoy

    Thank You I will copy and paste the complete code and now I know the right syntax!
     

Share This Page