reason for dropped packets? - Networking

This is a discussion on reason for dropped packets? - Networking ; Hello everyone, I am using a linux box as a router. I have enabled packet forwarding in my Linux machine (kernel 2.6.16-13) via the echo 1 > /proc/sys/net/ipv4/ip_forward command. Packet forwarding over the various interfaces is working fine. I am ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: reason for dropped packets?

  1. reason for dropped packets?

    Hello everyone,

    I am using a linux box as a router. I have enabled packet
    forwarding in my Linux machine (kernel 2.6.16-13) via the

    echo 1 > /proc/sys/net/ipv4/ip_forward command.


    Packet forwarding over the various interfaces is working fine.


    I am sending anonymized packets (using a tool called Click) which
    generates addresses from the entire IPv4 address space to this
    machine. My routing table (which is about 167K entries long) is set up
    to forward all the incoming packets to one of two interfaces eth0 and
    eth1 (there are a total of 4 interfaces in the box). A couple of other
    boxes at the other end of these interfaces are collecting these
    packets and couting them.

    I keep observing a certain amount of packets being dropped by the
    router. The number of dropped packets vary each time I run my test
    script. Some are being dropped by the incoming NIC itself (as observed
    by the output of ifconfig ), but these are very few
    compared to the ones being dropped by the router itself.

    Nothing is turning up in /var/log/messages and I have set the
    printk verbosity to 8 using the
    echo 8 > /proc/sys/kernel/printk command.

    Two questions:
    ---------------------
    How do I figure out why these packets are being dropped?
    How do I count the number of packets being dropped?


    Just an aside:
    When I send non-anonymized packets to this machine (ie.
    by using the IP addresses of the subnets attached to the router) no
    packets are being lost at all even for much higher packets per second
    injection rate. Also, the switches are not losing packets because I
    ran the tests using short cross-over cables also.


    Thank You.

    Azeem Khan
    Bombay, India.


  2. Re: reason for dropped packets?

    Hello,

    Azeem a écrit :
    >
    > I am sending anonymized packets (using a tool called Click) which
    > generates addresses from the entire IPv4 address space to this
    > machine. [...]
    > I keep observing a certain amount of packets being dropped by the
    > router. The number of dropped packets vary each time I run my test
    > script. Some are being dropped by the incoming NIC itself (as observed
    > by the output of ifconfig ), but these are very few
    > compared to the ones being dropped by the router itself.

    [...]
    > How do I figure out why these packets are being dropped?
    > How do I count the number of packets being dropped?
    >
    > Just an aside:
    > When I send non-anonymized packets to this machine (ie.
    > by using the IP addresses of the subnets attached to the router) no
    > packets are being lost


    Check /proc/sys/net/ipv4/conf/*/rp_filter which controls source address
    validation by reversed path.

  3. Re: reason for dropped packets?

    Hello Pascal,

    Thank you for responding. The rp_filter was set to 1 for all my
    interfaces. I set them all to 0. It did not help. I still lost a lot
    of packets.

    Then I enabled the log_martians capability and I noticed a bunch
    of invalid addresses being logged by the system. The addresses were
    those whose first octet was zero '0'.

    However, the number of messages/packets logged is far fewer than
    the number of packets being dropped.


    Therefore 3 questions:
    1. I assume, martian logging is rate limited somehow?
    1.1 If so, how can I at least get a count
    of the martian packets?
    1.2 Can I modify kernel code somewhere to
    get this count?


    Thank you.

    Azeem Khan
    Bombay, India.

    On Apr 26, 5:51 pm, Pascal Hambourg
    wrote:
    > Hello,
    >
    > Azeem a écrit :
    >
    >
    >
    >
    >
    > > I am sending anonymized packets (using a tool called Click) which
    > > generates addresses from the entire IPv4 address space to this
    > > machine. [...]
    > > I keep observing a certain amount of packets being dropped by the
    > > router. The number of dropped packets vary each time I run my test
    > > script. Some are being dropped by the incoming NIC itself (as observed
    > > by the output of ifconfig ), but these are very few
    > > compared to the ones being dropped by the router itself.

    > [...]
    > > How do I figure out why these packets are being dropped?
    > > How do I count the number of packets being dropped?

    >
    > > Just an aside:
    > > When I send non-anonymized packets to this machine (ie.
    > > by using the IP addresses of the subnets attached to the router) no
    > > packets are being lost

    >
    > Check /proc/sys/net/ipv4/conf/*/rp_filter which controls source address
    > validation by reversed path.




+ Reply to Thread