Move network config blocks out of ifconfig
[akaros.git] / kern / kfs / etc / network / default
1 #!/bin/ash
2
3 # known good.
4 hossinMAC=00241d1054e1
5 c89MAC=001e67652333
6 c99MAC=001e67c2f479
7 altdraMAC=525400b0c2ec
8 qemuMAC=525400123456
9 tower1MAC=00032d196d88
10 tower2MAC=00032d196ddd
11 tower3MAC=00032d196d46
12 tower4MAC=00032d196db0
13 tower5MAC=00032d196daa
14
15 # qemu is the default
16 me=10.0.2.15
17 mask=255.255.255.0
18 # brho: i don't know what exactly 'remote' is supposed to be, but that is
19 # the third argument processed by adding to an ipifc.  if we pass nothing,
20 # it'll build 'remote' by masking me & mask.
21 remote=10.0.2.0
22 route=10.0.2.2
23
24 if [ "$MAC" = "$qemuMAC" ]
25 then
26     echo "Welcome to QEMU!"
27 fi
28
29 # the tower of ... tower
30 # all defaults are fine.
31 if [ "$MAC" = "$tower1MAC" ]
32 then
33     me=10.0.2.15
34 fi
35 if [ "$MAC" = "$tower2MAC" ]
36 then
37     me=10.0.2.16
38 fi
39 if [ "$MAC" = "$tower3MAC" ]
40 then
41     me=10.0.2.17
42 fi
43 if [ "$MAC" = "$tower4MAC" ]
44 then
45     me=10.0.2.18
46 fi
47 if [ "$MAC" = "$tower5MAC" ]
48 then
49     me=10.0.2.19
50 fi
51
52 if [ "$MAC" = "$c89MAC" ]
53 then
54         # c89's config.  use c96 for eth0 (.196).
55         # $ cat /9/net/ipifc/clone (get e.g. 2)
56         # $ echo "add 169.229.49.196 255.255.255.0" > /9/net/ipifc/2/ctl
57         me=169.229.49.196
58         mask=255.255.255.0
59         remote=169.229.49.0
60         route=169.229.49.1
61         # the i350 NIC that is plugged in is the first NIC
62         NIC="0"
63 fi
64
65 if [ "$MAC" = "$c99MAC" ]
66 then
67         # c99's config.  use c95 for eth0 (.195).
68         # $ cat /9/net/ipifc/clone (get e.g. 2)
69         # $ echo "add 169.229.49.195 255.255.255.0" > /9/net/ipifc/2/ctl
70         me=169.229.49.195
71         mask=255.255.255.0
72         remote=169.229.49.0
73         route=169.229.49.1
74         # the i350 NIC that is plugged in is the first NIC
75         NIC="0"
76 fi
77
78 if [ "$MAC" = "$altdraMAC" ]
79 then
80         # yuzhu's soda hall bridged vm
81         me=128.32.37.37
82         mask=255.255.255.0
83         remote=128.32.37.0
84         route=128.32.37.1
85 fi
86
87 if [ "$MAC" = "$hossinMAC" ]
88 then
89         # brho's soda hall desktop
90         me=128.32.37.46
91         mask=255.255.255.0
92         remote=128.32.37.0
93         route=128.32.37.1
94 fi