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

guessnet problem



I have my /etc/network/interfaces as below.
=========================
auto lo eth0

iface lo inet loopback

mapping eth0
       # Too bad there's no way to pass commandline options to script
       # script /usr/sbin/guessnet -i
       script /usr/sbin/guessnet-ifupdown
       # List of stanzas guessnet should scan for
       #   If none is specified, scans for all stanzas
       map home work disconnected none
       map default: home
       map timeout: 3
       map verbose: true

# Home network configuration
iface home inet static
       address 192.168.0.2
       netmask 255.255.255.0
       broadcast 192.168.0.255
       gateway 192.168.0.1
       #dns-search home.loc
       #dns-nameservers 192.168.1.1
       # Check for one of these hosts:
       test1 peer address 192.168.0.1 #mac 00:26:54:0E:8E:C0
       up echo "smarthost: main.home-`date`" > /etc/roaming/home_connection
       up rm -f /etc/roaming/not_online
       down rm -f /etc/roaming/home_connection
       #test2-peer address 192.168.1.3 mac 00:01:02:03:04:06

# Work network configuration
iface work inet static
      address 150.1.35.141
       netmask 255.255.0.0
#       test3 peer address 150.1.35.2 mac 00:50:8B:71:7E:D6 source 150.1.35.141
       test command $(arping -f 150.1.35.2)
       up echo "smarthost: main.work-`date`" > /etc/roaming/work_connection
       up rm -f /etc/roaming/not_online
       down rm -f /etc/roaming/work_connection

# I'd really appreciate a 'disabled' method for iface that just
# keeps the interface down)
iface disconnected inet static
       address 192.168.0.2
       netmask 255.255.255.0
       up echo "missing-cable" > /etc/roaming/not_online
       test2 missing-cable
       down rm -f /etc/roaming/not_online
       # It could also be:
       #test-missing-cable please



# If nothing else is found, try DHCP
iface none inet dhcp
======================================
 I can do
arping -f 150.1.35.2
ARPING 150.1.35.2 from 192.168.0.2 eth0
Unicast reply from 150.1.35.2 [00:50:8B:71:7E:D6]  1.260ms
Sent 1 probes (1 broadcast(s))
Received 1 response(s)

but with rebooting or doing  /etc/init.d/networking restart
 I don't get the static IP address of 150.1.35.141 as in work stanza.
I tried with both command and also peer test.
Any idea to get the desired result will be appreciated.
--
L.V.Gandhi
http://lvgandhi.tripod.com/
linux user No.205042

Reply to: