time lag between /sbin/ifconfig eth2 up and when interface becomes usable...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi:

I realize this question may not be fedora specific but here it is.

I am trying to determine how soon after a

/sbin/ifconfig eth2 up 192.168.0.2


can I actually successfully send UDP packets out that interface. (UDP since i wanted to keep things simple, not TCP flow/congestion control entanglements.) I have a loop such as:

#!/usr/bin/perl -w

$utime = $ARGV[0];
while(1) {
  system "usleep $utime";
  system "/sbin/ifconfig eth2 down";
  system "date";
  print "after eth2 down\n";
  system "usleep $utime";
  system "/sbin/ifconfig eth2 up 192.168.0.2";
  system "date";
  print "after eth2 up\n";
}

From my tests it appears that it takes between 4 to 6 seconds after the "up" command before my UDP packets actually start going out. The tests are between two machines with addresses 192.168.0.2 <---> 192.168.0.3.

Any hints welcome. The "/sbin/ifconfig eth2 up 192.168.0.2" command returns right away, but the interface is not ready to go for a few seconds. What can this be due to?

Gautam


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux