Lines Matching full:bridge
75 # | bridge (ng_bridge) |
147 # Get current number of bridge interfaces in the system. This number
148 # is used to create a name for new bridge.
149 BRIDGE_COUNT=`ngctl l | grep bridge | wc -l | sed -e "s/ //g"`
150 BRIDGE_NAME="bridge${BRIDGE_COUNT}"
153 # Connect ng_ether:lower hook to bridge:link0 when creating bridge and
154 # connect ng_ether:upper hook to bridge:link1 after bridge name is set.
156 echo "Creating bridge interface: ${BRIDGE_NAME}..."
157 ngctl mkpeer ${ETHER_INTF}: bridge lower link0 || exit 1
160 echo "Bridge ${BRIDGE_NAME} is created and ${ETHER_INTF} is connected."
162 # In the above code block two hooks are connected to bridge interface,
164 # hooks on the bridge interface.
167 # Write name of the bridge to temp file. Clean-up procedure will use
168 # this name to shutdown bridge interface.
169 echo "bridge ${BRIDGE_NAME}" > ${TEMP_FILE}
196 # object has a hook that can be connected to one of bridge
252 # Connect virtual interface to bridge interface. Syntax is :
253 # ngctl connect INTERFACE: BRIDGE: INTERFACE_HOOK EMPTY_LINK.
255 # ether hook to bridge's first unconnected link.
262 # Now, bridge has one more connected link thus link count is
277 echo -n "Shutdown bridge interface.."
278 OBJECTS=`cat ${TEMP_FILE} | grep bridge | awk '{print $2}'`
279 for BRIDGE in ${OBJECTS}; do
280 ngctl shutdown ${BRIDGE}: >/dev/null 2>&1