Diabling eth

Diabling eth

Post by John » Thu, 30 Jan 2003 04:57:30



Hi,

Is there a specifc procedure to shut down a _removable_ (wireless)
ethernet device (USB, PCMCIA) ?

What commands? ifconfig, iwconfig, rmmod ...

I have a USB eth device and I share it between 2 machines. Unplugging it
during use, causes bizarre problems.

--

John
----------------------------
Remove 'NOSPAM' to email me.

 
 
 

Diabling eth

Post by Armin Krawinke » Thu, 30 Jan 2003 15:46:52



> Hi,

> Is there a specifc procedure to shut down a _removable_ (wireless)
> ethernet device (USB, PCMCIA) ?

> What commands? ifconfig, iwconfig, rmmod ...

> I have a USB eth device and I share it between 2 machines.
> Unplugging it during use, causes bizarre problems.

ifdown ethX

--

Beer....Helping uglY people have sex since 1862!

 
 
 

Diabling eth

Post by Eric P. McC » Fri, 31 Jan 2003 02:02:00



> Is there a specifc procedure to shut down a _removable_ (wireless)
> ethernet device (USB, PCMCIA) ?

The relevant part here is "removable."

Quote:> I have a USB eth device and I share it between 2 machines. Unplugging
> it during use, causes bizarre problems.

I'm strongly inclined to call this a bug.  USB is a plug and play bus,
which means you aren't supposed to need to tell the OS "I'm about to
remove such-and-such device."  The OS should just detect the removal
and do what it has to do.

Linux is capable of working this way: I know because I have several
USB devices and they all can be hot-swapped without causing any
problems.  If your Linux isn't working this way, it's probably a bug
(and probably in your distro).

--

"Last I checked, it wasn't the power cord for the Clue Generator that
was sticking up your ass." - John Novak, rasfwrj

 
 
 

Diabling eth

Post by Eric P. McC » Fri, 31 Jan 2003 02:02:37



> > I have a USB eth device and I share it between 2 machines.
> > Unplugging it during use, causes bizarre problems.
> ifdown ethX

The USB on-unplug script should run this for him when he removes the
device.

--

"Last I checked, it wasn't the power cord for the Clue Generator that
was sticking up your ass." - John Novak, rasfwrj

 
 
 

Diabling eth

Post by John » Fri, 31 Jan 2003 03:47:25




>>Is there a specifc procedure to shut down a _removable_ (wireless)
>>ethernet device (USB, PCMCIA) ?

> The relevant part here is "removable."

>>I have a USB eth device and I share it between 2 machines. Unplugging
>>it during use, causes bizarre problems.

> I'm strongly inclined to call this a bug.  USB is a plug and play bus,
> which means you aren't supposed to need to tell the OS "I'm about to
> remove such-and-such device."  The OS should just detect the removal
> and do what it has to do.

> Linux is capable of working this way: I know because I have several
> USB devices and they all can be hot-swapped without causing any
> problems.  If your Linux isn't working this way, it's probably a bug
> (and probably in your distro).

I get the same behavior in Redhat 7.3 and 8.0, default kernels. As well
as 2.4.19 on both and 2.4.20 on both. Ack!

--

John
----------------------------
Remove 'NOSPAM' to email me.

 
 
 

Diabling eth

Post by John » Fri, 31 Jan 2003 03:48:09




>>>I have a USB eth device and I share it between 2 machines.
>>>Unplugging it during use, causes bizarre problems.

>>ifdown ethX

> The USB on-unplug script should run this for him when he removes the
> device.

Any hint on how to verify if the 'USB on-unplug script' ran ?

--

John
----------------------------
Remove 'NOSPAM' to email me.

 
 
 

Diabling eth

Post by Eric P. McC » Fri, 31 Jan 2003 06:29:25



> Any hint on how to verify if the 'USB on-unplug script' ran ?

It's been too long since I had to do this manually, but as I recall,
the GPhoto website was the first place where I heard about it.  The
basic procedure, I _think_, is there's a sysctl that gives the name of
a program to run when the bus status changes, and that program somehow
figures out what it needs to do.

--

"Last I checked, it wasn't the power cord for the Clue Generator that
was sticking up your ass." - John Novak, rasfwrj

 
 
 

Diabling eth

Post by Michael Buchenriede » Fri, 31 Jan 2003 16:41:18




>> Is there a specifc procedure to shut down a _removable_ (wireless)
>> ethernet device (USB, PCMCIA) ?
>The relevant part here is "removable."
>> I have a USB eth device and I share it between 2 machines. Unplugging
>> it during use, causes bizarre problems.
>I'm strongly inclined to call this a bug.  USB is a plug and play bus,

[...]

In theory, yes. Practice tells differently, though.
Try to unplug an USB HD from a running Win* session, if you want
some fun. But you're right: That should not happen; the unplug
script should be called and do all the needed things (like ifdown
etc.) automatically. Time for debugging.

Michael
--

          Lumber Cartel Unit #456 (TINLC) & Official Netscum
    Note: If you want me to send you email, don't munge your address.

 
 
 

1. route based on incoming eth out ppp - two eth / two ppp

I have two ethernet connections to an internal lan and two
outbound connections via ppp - two seperate isp's

I need to be able to route traffic based on incoming source.

                   25
 ------->| eth0    | --------->ppp0 ---------> Internet
              |    80        |
              |              |
              |    26        |
 ------->| eth0:1  | --------->ppp1 ---------> Internet
                  8080  

I have two squid and two sendmail daemons running each
bound to it's interface.
Outbound mail needs to be able to go through it's
respective isp's smtp server as a smart host - hence
the traffic shaping.

I have scripted the connection and then added the following
iptables setup. Unfortunately it is not working.

#/bin/bash!
p0=`/sbin/ifconfig |grep P-t-P | awk '{print $2}' \
|sed -e 's/addr\://g;' |grep 209`
p1=`/sbin/ifconfig |grep P-t-P | awk '{print $2}' \
|sed -e 's/addr\://g;' |grep 129`
#
echo $p0
echo $p1
# Setup IPTABLES
                iptables -t mangle -A PREROUTING -i eth0 -j MARK --set-mark 20
                iptables -t mangle -A PREROUTING -i eth1 -j MARK --set-mark 21
                ip route add default via $p0 dev ppp0 table 22
                ip route add default via $p1 dev ppp1 table 23
                ip rule add fwmark 20 table 22
                ip rule add fwmark 21 table 23

Can anyone see where i have made a mistake in this?

Thanks for any and all help,

Cheers,

Chris

2. sendmail and diald

3. How to diable "Ctrl-Alt-Del" from Normal Users?

4. ICMP Spoofing?

5. What file do I need to edit to diable passwd rules?

6. Let ".plan" appear!

7. How to diable "Ctrl-Alt-Del" from normal users?

8. Installing Unix for the first time

9. diable a "popup save screen dialog "while working on RH 9

10. Windowmaker: Diable XMMS AppIcon?

11. How to diable cntl-alt-del

12. Help!!, How to diable STOP-A?

13. diable the annoying beep of pcmcia card???