version 1.2, 2013/01/28 01:47:36
|
version 1.3, 2017/02/13 16:52:47
|
Line 6 PORTS="fxp0 fxp1"
|
Line 6 PORTS="fxp0 fxp1"
|
|
|
MEDIA="autoselect" |
MEDIA="autoselect" |
|
|
OPT="" | OPTS="" |
| #IP="auto" |
IP="" |
IP="" |
|
ALIASES="" |
|
#IP6="auto" |
|
IP6="" |
|
ALIASES6="" |
|
|
|
[ -z "$IFACE" ] && exit |
|
|
echo "Config Ethernet-Link aggregation interface $IFACE ..." |
echo "Config Ethernet-Link aggregation interface $IFACE ..." |
ifconfig $IFACE create | |
| ifconfig $IFACE create || exit |
ifconfig $IFACE laggproto $PROTO |
ifconfig $IFACE laggproto $PROTO |
for p in $PORTS; do |
for p in $PORTS; do |
ifconfig $IFACE laggport $p |
ifconfig $IFACE laggport $p |
done |
done |
ifconfig $IFACE inet $IP media $MEDIA $OPT up | |
#dhclient $IFACE | if [ -n "$MEDIA" ]; then |
| ifconfig $IFACE media $MEDIA |
| fi |
| if [ -n "$IP" ]; then |
| if [ "$IP" = "auto" ]; then |
| dhclient $IFACE |
| else |
| ifconfig $IFACE inet $IP |
| fi |
| fi |
| for i in $ALIASES; do |
| ifconfig $IFACE inet alias $i |
| done |
| if [ -n "$IP6" ]; then |
| if [ "$IP" = "auto" ]; then |
| ifconfig $IFACE accept_rtadv |
| else |
| ifconfig $IFACE inet6 $IP6 |
| fi |
| fi |
| for i in $ALIASES6; do |
| ifconfig $IFACE inet6 alias $i |
| done |
| |
| ifconfig $IFACE $OPTS up |