ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/doc/complex-example/if-up
(Generate patch)

Comparing gvpe/doc/complex-example/if-up (file contents):
Revision 1.1 by pcg, Sun Apr 13 15:19:36 2003 UTC vs.
Revision 1.2 by pcg, Thu Oct 16 21:12:43 2003 UTC

49 # the second node (doom in the config file) has the ip address 10.0.0.5, 49 # the second node (doom in the config file) has the ip address 10.0.0.5,
50 # which is the gateway for the 10.0/28 network and three additional ip 50 # which is the gateway for the 10.0/28 network and three additional ip
51 # addresses 51 # addresses
52 52
53 ipn 1 10.0.0.20 53 ipn 1 10.0.0.20
54 ipn 2 10.0.0.5 10.0.0.0/28 200.100.162.92 200.100.162.93 100.99.218.222 54 ipn 2 10.0.0.5 10.0.0.0/28 #200.100.162.92 200.100.162.93 100.99.218.222
55 ipn 3 10.0.0.17 55 ipn 3 10.0.0.17
56 ipn 4 10.0.0.18 56 ipn 4 10.0.0.18
57 ipn 5 10.0.0.19 57 ipn 5 10.0.0.19 10.3.0.0/16
58 ipn 6 10.0.0.21 10.0.2.0/26 200.100.162.17 58 ipn 6 10.0.0.21 10.0.2.0/26 #200.100.162.17
59 ipn 7 10.0.0.22 10.1.2.0/24 59 ipn 7 10.0.0.22 10.1.2.0/24 # wappla, off
60 ipn 8 10.0.0.23 60 ipn 8 10.0.0.23 # stefan, off
61 ipn 9 10.0.0.24 10.13.0.0/16 61 ipn 9 10.0.0.24 10.13.0.0/16
62 ipn 10 10.0.0.25 62 ipn 10 10.0.0.25
63 ipn 11 10.0.0.26 63 ipn 11 10.0.0.26
64 ipn 12 10.0.0.27 10.0.2.64/26 64 ipn 12 10.0.0.27 10.0.2.64/26
65 ipn 13 10.0.0.28 10.0.3.0/24 65 ipn 13 10.0.0.28 10.0.3.0/24
66 ipn 14 10.0.0.29 10.1.1.0/24 66 ipn 14 10.0.0.29 10.1.1.0/24 # fwkw, off
67 # mind the gateway ip gap 67 # mind the gateway ip gap
68 ipn 15 10.9.0.30 10.0.4.0/24 68 ipn 15 10.9.0.30 10.0.4.0/24
69 ipn 16 10.9.0.31 69 ipn 16 10.9.0.31
70 ipn 17 10.9.0.32 10.42.0.0/16
71 ipn 18 10.9.0.33
72 ipn 19 10.9.0.34
73 #ipn 20 10.9.0.35
70} 74}
71 75
72if [ "$1" == "--fw" ]; then 76if [ "$1" == "--fw" ]; then
73 FW=1 77 FW=1
74 78
79 83
80 [ $NODENAME = "ruth" ] && ip link set $IFNAME down # hack 84 [ $NODENAME = "ruth" ] && ip link set $IFNAME down # hack
81 85
82 # first set the link up and initialize the interface ip 86 # first set the link up and initialize the interface ip
83 # address. 87 # address.
84 ip link set $IFNAME address $MAC mtu $MTU up 88 ip link set $IFNAME address $MAC
89 ip link set $IFNAME mtu $MTU up
85 ADDR_ONLY=1 ipns # set addr only 90 ADDR_ONLY=1 ipns # set addr only
86 91
87 # now initialize the main vpn routes (10.0/8) 92 # now initialize the main vpn routes (10.0/8)
88 # the second route is a hack to to reach some funnily-connected 93 # the second route is a hack to to reach some funnily-connected
89 # machines. 94 # machines.
106 ip route flush table 103 111 ip route flush table 103
107 ip route add table 103 default src 100.99.218.222 via 10.0.0.19 112 ip route add table 103 default src 100.99.218.222 via 10.0.0.19
108 113
109 elif [ $NODENAME = marco ]; then 114 elif [ $NODENAME = marco ]; then
110 ip addr add 200.100.162.17 dev $IFNAME 115 ip addr add 200.100.162.17 dev $IFNAME
116
117 for addr in 79 89 90 91 92 93 94 95; do
111 ip route add 200.100.162.79 dev ppp0 118 ip route add 200.100.162.$addr dev ppp0
112 ip route add 200.100.162.95 dev ppp0 119 done
113 ip route add 200.100.76.0/23 dev ppp0 120 ip route add 200.100.76.0/23 dev ppp0
114 ip route add src 200.100.162.17 200.100.0.0/16 via 10.0.0.17 dev $IFNAME 121 ip route add src 200.100.162.17 200.100.0.0/16 via 10.0.0.17 dev $IFNAME
122
123 elif [ $NODENAME = ruth ]; then
124 ip route add 200.100.162.17 via 10.0.0.21 dev vpn0
125 ip route add 200.100.162.92 via 10.0.0.5 dev vpn0
126 ip route add 200.100.162.93 via 10.0.0.5 dev vpn0
115 127
116 fi 128 fi
117 129
118 # and this is the second part of the 10.0/27 hack. don't ask. 130 # and this is the second part of the 10.0/27 hack. don't ask.
119 [ $NODENAME != fwkw ] && ip route add 10.0.0.0/24 via 10.0.0.29 dev $IFNAME 131 [ $NODENAME != fwkw ] && ip route add 10.0.0.0/24 via 10.0.0.29 dev $IFNAME

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines