Hello all,

I'm wanting to emulate network latency + packetloss between two OVS
bridges. My first idea was to pull out a tap from each bridge and
route/forward between those two taps and add a "tc qdisc" to each tap (ex
below). Is that my best bet for what I'm trying to do?

As an addendnum, it doesn't appear tc qdisc is supported within network
namespaces, which is another reason I was searching for a more elegant
solution.

Thanks,
Andrew

# add the namespaces
ip netns add anse-gridftp1
ip netns add anse-phoebus1
ip netns add anse-gridftp2
ip netns add anse-phoebus2

# create the switchs and ports
(set -x
for SUBNET in 1 2; do
BRIDGE="anse-bridge${SUBNET}"
# make the bridge
ovs-vsctl add-br $BRIDGE
# add ports
ovs-vsctl add-port $BRIDGE tapg${SUBNET} -- set interface tapg${SUBNET}
type=internal
ovs-vsctl add-port $BRIDGE tapp${SUBNET} -- set interface tapp${SUBNET}
type=internal
ovs-vsctl add-port $BRIDGE tapbr${SUBNET} -- set interface tapbr${SUBNET}
type=internal
# move the ports into the network namespace
ip link set tapg${SUBNET} netns anse-gridftp${SUBNET}
ip link set tapp${SUBNET} netns anse-phoebus${SUBNET}
# bring the interfaces up
ip netns exec anse-gridftp${SUBNET} ip link set dev tapg${SUBNET} up
ip netns exec anse-phoebus${SUBNET} ip link set dev tapp${SUBNET} up
ip link set dev tapbr${SUBNET}  up
# give them ip addresses
ifconfig tapbr${SUBNET} 192.168.20${SUBNET}.1/24 up
ip netns exec anse-gridftp${SUBNET} ifconfig tapg${SUBNET}
192.168.20${SUBNET}.2/24 up
ip netns exec anse-phoebus${SUBNET} ifconfig tapp${SUBNET}
192.168.20${SUBNET}.3/24 up
done

)


-- 
--
Andrew Melo
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to