File: interfaces

package info (click to toggle)
guessnet 0.35-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,564 kB
  • ctags: 1,447
  • sloc: cpp: 6,188; sh: 1,009; perl: 118; makefile: 105
file content (68 lines) | stat: -rw-r--r-- 1,751 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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
	map default: none
	map timeout: 3
	map verbose: true

# Home network configuration
iface home inet static
	address 192.168.1.2
	netmask 255.255.255.0
	broadcast 192.168.1.255
	gateway 192.168.1.1
	dns-search home.loc
	dns-nameservers 192.168.1.1
	# Check for one of these hosts:
	test1-peer address 192.168.1.1 mac 00:01:02:03:04:05
	test2-peer address 192.168.1.3 mac 00:01:02:03:04:06

# Work network configuration
iface work inet static
	address 10.1.1.42
	netmask 255.255.255.0
	broadcast 10.1.1.255
	gateway 10.1.1.1
	dns-search work.loc
	dns-nameservers 10.1.1.1
	# the other guessnet scan:
	test-command /usr/local/bin/check_work

# Second job network configuration
iface work2 inet static
	address 192.168.2.23
	netmask 255.255.255.0
	broadcast 192.168.2.255
	gateway 192.168.2.1
	dns-search work2.loc
	dns-nameservers 192.168.2.1
	# Specify a source address in case the peer doesn't reply to
        # ARP packets coming from 0.0.0.0
	test-peer address 192.168.2.1 mac 00:01:02:03:04:05 source 192.168.2.23

# PPPOE network configuration
iface pppoe inet ppp
	test pppoe
	# It could also be:
	#test-pppoe please

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

# If nothing is found, try negotiating DHCP
iface none inet dhcp