yes you can do these commands to see what happens
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
You can repeat these commands before and after bringing a network interface
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
#!/bin/sh
/usr/bin/echo "start of bringup_wlan0" >> /etc/iface_scripts/udev.log
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
/sbin/ifconfig wlan0 up
/sbin/route add dafault gw 192.168.178.1 dev wlan0
/sbin/ifconfig eth0 down
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
/usr/bin/echo "end of bringup_wlan0" >> /etc/iface_scripts/udev.log
#!/bin/sh
/usr/bin/echo "Start of bringdown_wlan0" >> /etc/iface_scripts/udev.log
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
/sbin/ifconfig eth0 up
/sbin/route add default gw 192.168.178.1 dev eth0
/sbin/ifconfig wlan0 down
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
/usr/bin/echo "End of bringdown_wlan0" >> /etc/iface_scripts/udev.log
start of bringup_wlan0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default fritz.box 0.0.0.0 UG 0 0 0 eth0
192.168.178.0 * 255.255.255.0 U 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr
inet addr:192.168.178.200 Bcast:192.168.178.255 Mask:255.255.255.0
inet6 addr: fe80::2d0:4bff:fe91:71ff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3478 errors:0 dropped:0 overruns:0 frame:0
TX packets:1591 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:382361 (373.3 KiB) TX bytes:241404 (235.7 KiB)
Interrupt:11
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:284 errors:0 dropped:0 overruns:0 frame:0
TX packets:284 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27023 (26.3 KiB) TX bytes:27023 (26.3 KiB)
wlan0 Link encap:Ethernet HWaddr
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:284 errors:0 dropped:0 overruns:0 frame:0
TX packets:284 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27023 (26.3 KiB) TX bytes:27023 (26.3 KiB)
wlan0 Link encap:Ethernet HWaddr
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
end of bringup_wlan0
Start of bringdown_wlan0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:284 errors:0 dropped:0 overruns:0 frame:0
TX packets:284 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27023 (26.3 KiB) TX bytes:27023 (26.3 KiB)
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default fritz.box 0.0.0.0 UG 0 0 0 eth0
192.168.178.0 * 255.255.255.0 U 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr
inet addr:192.168.178.200 Bcast:192.168.178.255 Mask:255.255.255.0
inet6 addr: fe80::2d0:4bff:fe91:71ff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3482 errors:0 dropped:0 overruns:0 frame:0
TX packets:1597 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:382765 (373.7 KiB) TX bytes:241844 (236.1 KiB)
Interrupt:11
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:284 errors:0 dropped:0 overruns:0 frame:0
TX packets:284 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27023 (26.3 KiB) TX bytes:27023 (26.3 KiB)
End of bringdown_wlan0
start of bringup_wlan0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default fritz.box 0.0.0.0 UG 0 0 0 eth0
192.168.178.0 * 255.255.255.0 U 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr 00:D0:4B:91:71:FF
inet addr:192.168.178.200 Bcast:192.168.178.255 Mask:255.255.255.0
inet6 addr: fe80::2d0:4bff:fe91:71ff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:501 errors:0 dropped:0 overruns:0 frame:0
TX packets:838 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:125502 (122.5 KiB) TX bytes:45562 (44.4 KiB)
Interrupt:11
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:249 errors:0 dropped:0 overruns:0 frame:0
TX packets:249 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:26305 (25.6 KiB) TX bytes:26305 (25.6 KiB)
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:249 errors:0 dropped:0 overruns:0 frame:0
TX packets:249 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:26305 (25.6 KiB) TX bytes:26305 (25.6 KiB)
wlan0 Link encap:Ethernet HWaddr 00:0D:81:AC:5B:AD
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
end of bringup_wlan0
Start of bringdown_wlan0
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:249 errors:0 dropped:0 overruns:0 frame:0
TX packets:249 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:26305 (25.6 KiB) TX bytes:26305 (25.6 KiB)
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default fritz.box 0.0.0.0 UG 0 0 0 eth0
192.168.178.0 * 255.255.255.0 U 0 0 0 eth0
eth0 Link encap:Ethernet HWaddr 00:D0:4B:91:71:FF
inet addr:192.168.178.200 Bcast:192.168.178.255 Mask:255.255.255.0
inet6 addr: fe80::2d0:4bff:fe91:71ff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:537 errors:0 dropped:0 overruns:0 frame:0
TX packets:844 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:139141 (135.8 KiB) TX bytes:46010 (44.9 KiB)
Interrupt:11
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:249 errors:0 dropped:0 overruns:0 frame:0
TX packets:249 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:26305 (25.6 KiB) TX bytes:26305 (25.6 KiB)
End of bringdown_wlan0
#!/bin/sh
/usr/bin/echo "start of bringup_wlan0" >> /etc/iface_scripts/udev.log
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
udhcpc -b -i wlan0 -q -s /etc/simple.script
/sbin/ifconfig eth0 down
/sbin/ifconfig wlan0 up
/sbin/route add default gw 192.168.178.1 dev wlan0
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
/usr/bin/echo "end of bringup_wlan0" >> /etc/iface_scripts/udev.log
#!/bin/sh
/usr/bin/echo "Start of bringdown_wlan0" >> /etc/iface_scripts/udev.log
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
/sbin/ifconfig eth0 up
/sbin/route add default gw 192.168.178.1 dev eth0
/sbin/ifconfig wlan0 down
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
/usr/bin/echo "End of bringdown_wlan0" >> /etc/iface_scripts/udev.log
#!/bin/sh
/usr/bin/echo "start of bringup_wlan0" >> /etc/iface_scripts/udev.log
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
/sbin/ifconfig wlan0 up
/usr/bin/sleep 30s
/sbin/udhcpc -b -i wlan0 -q -s /etc/simple.script >> /etc/iface_scripts/udev.log
# /sbin/ifconfig wlan0 192.168.178.27 netmask 255.255.255.0
/sbin/route add default gw 192.168.178.1 dev wlan0
/sbin/ifconfig eth0 down
/usr/bin/sleep 5s
/sbin/route >>/etc/iface_scripts/udev.log
/sbin/ifconfig >>/etc/iface_scripts/udev.log
/usr/bin/echo "end of bringup_wlan0" >> /etc/iface_scripts/udev.log
Users browsing this forum: No registered users and 14 guests