Toggle navigation
Toggle navigation
This project
Loading...
Sign in
UT
/
ipw
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Artyom A Anikeev
2014-04-21 15:14:21 +0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
79fac52a52c789e619c6aee98a9d99fb9062eb5b
79fac52a
1 parent
c6d6dfa5
fixed IPCMD for vlan
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
11 deletions
ipw
man/man1/ipw.1
ipw
View file @
79fac52
...
...
@@ -235,6 +235,10 @@ case "$CMD" in
;;
delbr
)
;;
addif
)
#allow to add interface without bridging
;;
delif
)
;;
addipcmd
)
#allow to add ip commnds for bridges/vlans
NEWCONFIG
=
1
# we need to update the config after the command
NEW_BRIDGE
=
"
$1
"
;
shift
...
...
@@ -521,6 +525,13 @@ case "$CMD" in
ip link
set
dev
"
$FULL_VLAN_NAME
"
up
fi
fi
ip addr flush dev
"
$FULL_VLAN_NAME
"
IP_CMDS_VARIABLE
=
"vlan
${
VLANNAME
//[.]/_
}
_IP"
IP_CMDS_VARIABLE
=
"
${
IP_CMDS_VARIABLE
}
[@]"
for
IP_CMD
in
"
${
!IP_CMDS_VARIABLE
}
"
;
do
ip
$IP_CMD
dev
"
$FULL_VLAN_NAME
"
done
fi
#BRIDGE STUFF
...
...
@@ -536,8 +547,6 @@ case "$CMD" in
#echo "ip link add "$BRNAME" type bridge"
ip link add
"
$BRNAME
"
type
bridge
fi
[[
"
$SUBVLAN
"
!
=
""
]]
&&
ip link
set
dev
"
$BRNAME
"
mtu 1496
if
[[
"
$VLAN
"
!
=
""
]]
;
then
#OLD_BRNAME="`brctl show | grep "$FULL_VLANNAME" | awk '{print $1}'`"
...
...
@@ -569,13 +578,6 @@ case "$CMD" in
[[
"
$IP_CMD
"
!
=
""
]]
&&
ip
$IP_CMD
dev
"
$BRNAME
"
done
else
ip addr flush dev
"
$VLANNAME
"
IP_CMDS_VARIABLE
=
"vlan
${
VLANNAME
//[.]/_
}
_IP"
IP_CMDS_VARIABLE
=
"
${
IP_CMDS_VARIABLE
}
[@]"
for
IP_CMD
in
"
${
!IP_CMDS_VARIABLE
}
"
;
do
ip
$IP_CMD
dev
"
$VLANNAME
"
done
fi
done
done
...
...
man/man1/ipw.1
View file @
79fac52
...
...
@@ -29,6 +29,36 @@ bringes all interfaces down, deletes bondings and bridges.
.PP
.RE
.\" .B add1qif
.\" $BONDING $SLAVE
.\" .RS 8
.\" changes
.\" .I /etc/ipw/conf
.\" by enslaving the $SLAVE interface into the $BONDING.
.\" .PP
.\" .RE
.\" .B del1qif
.\" $BONDING $SLAVE
.\" .RS 8
.\" changes
.\" .I /etc/ipw.conf
.\" by setting nomaster for the $SLAVE.
.\" .PP
.\" .RE
.\" .B addbrif
.\" $BONDING $VLAN.$SUBVLAN $BRIDGE
.\" .RS 8
.\" changes
.\" .I /etc/ipw.conf
.\" by adding bridged vlan into the bonding. If $BRIDGE variable is not
.\" set, then "vlan$VLAN.$SUBVLAN"/"vlan$VLAN" is used as bridge name.
.\" \.$SUBVLAN should be used in case of QinQ interfaces for a daughter
.\" (inner tag) vlan (see 802.1ad).
.\" .PP
.\" .RE
.SH EXAMPLES
TODO
.RE
...
...
@@ -102,8 +132,8 @@ specifies bonding mode for each master. Default is 802.3ad.
.HP
.BR $NAME _VLAN_N_BRIDGES
specifies vlans and bridges for each master. Syntax is as foolow:
vlan.subvlan:bridge-name. Subvlan means
parent (outer tag) vlan for
QinQ vlan (inn
er tag) interfaces (see 802.1ad).
vlan.subvlan:bridge-name. Subvlan means
daughter (inner tag) vlan
for QinQ vlan (out
er tag) interfaces (see 802.1ad).
Symbol `.' in bridge name is not a special symbol.
...
...
Please
register
or
login
to post a comment