|
From: Serge L. <ser...@gm...> - 2010-08-30 20:24:36
|
Update of /cvsroot/devil-linux/build/config/etc/sysconfig/nic In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv22598/d/nic Modified Files: ifcfg-eth0.sample Added Files: ifcfg-tun0.sample Log Message: - added configuration for all types of routes (closed bug #87) - added configuration for ip rules - added tunnel interface configuration example - fixed improper bradcast address assignment Index: ifcfg-eth0.sample =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/sysconfig/nic/ifcfg-eth0.sample,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ifcfg-eth0.sample 9 Jan 2010 16:19:26 -0000 1.9 +++ ifcfg-eth0.sample 30 Aug 2010 19:59:02 -0000 1.10 @@ -15,29 +15,60 @@ MODULE=pcnet32 #MODULE_OPTS= # -### ROUTE="DESTINATION{:GATEWAY}" -# where DESTINATION is NET/NETMASK or a HOST -# the :GATEWAY is optional +######################################################## +# ROUTE=" ...... " +# where ROUTE is a keyword and the line with ROUTE +# should not have spaces between the beginning of +# the line and the keyword +# Route statement is a any valid "ip route"# command, +# without "ip route add" prefix - it will be added +# automatically # -## samples for all 4 possible scenarios +# IPV6ROUTE="...." +# IPV6ROUTE keyword can be used for ipv6 routes. +# +# RULE=" ...... " +# where RULE is a keyword and the line with RULE +# should not have spaces between the beginning of +# the line and the keyword +# Rule statement is a any valid "ip rule" command, +# without "ip rule add" prefix - it will be added +# automatically +# +# $DEVICE can be used to directly specify the interface +# +###### samples for several possible scenarios # # route to network 192.168.254.0/255.255.255.0 via gateway 10.90.1.252 -#ROUTE="$ROUTE 192.168.254.0/255.255.255.0:10.90.1.252" +#ROUTE="192.168.254.0/255.255.255.0 via 10.90.1.252" +# or +#ROUTE="192.168.254.0/24 via 10.90.1.252" +# # # route to host 192.168.3.1 via 10.90.1.252 -#ROUTE="$ROUTE 192.168.3.0:10.90.1.252" +#ROUTE="192.168.3.0/32 via 10.90.1.252" # # route to network that is also reachable via this interface -#ROUTE="$ROUTE 192.168.3.0/255.255.255.0" +#ROUTE="192.168.3.0/24 dev $DEVICE" # -# route to host that is also reachable via this interface -#ROUTE="$ROUTE 192.168.5.7" +# special routes +#ROUTE="unreachable 10.0.0.0/8" +#ROUTE="blackhole 192.168.1.0/24" # -# add as many ROUTE="$ROUTE ...." lines as you need routes +# add as many ROUTE="...." lines as you need routes # +# the next line shows how to set the default gateway +#ROUTE="default via 10.90.1.1". # -# the next line shows how to set the default gateway (the default gw needs -# "0" as a hostmask. -#ROUTE="$ROUTE default/0{:GATEWAY}" -# for example: -#ROUTE="$ROUTE default/0:10.90.1.1" +###### advanced routing +# make sure additional routing table is created +# +# echo "200 bypass" >> /etc/iproute2/rt_tables +# +#ROUTE="default via 1.234.123.1 table bypass" +#RULE="from 10.0.0.0/24 table bypass prio 500" +#RULE="from 10.0.1.0/24 table bypass prio 600" +#RULE="from 10.0.2.123/32 to 10.8.0.0/16 table main prio 400" +# + + --- NEW FILE: ifcfg-tun0.sample --- # # example for a tunnel INTERFACE # ONBOOT=yes TUNNEL=yes # bind the tunnel to the device DEVICE so that tunneled packets # will only be routed via this device and will not be able to escape # to another device when the route to endpoint changes. #DEVICE=eth4 # set the fixed local address for tunneled packets. LOCAL=10.90.1.200 # set the remote endpoint of the tunnel. REMOTE=10.90.2.200 # Available modes depend on the encapsulating address family. # Modes for IPv4 encapsulation available: ipip, sit, isatap and gre. # Modes for IPv6 encapsulation available: ip6ip6, ipip6 and any. MODE=ipip # addtional tunnel options if any TUN_OPTS="" |