WANEM – Bridging Interfaces

I have been having to configure a lot of QoS implemntations in the lab latley and have been needing to simulate WAN links to effectivly test my configurations. I found a great open-source tool called WanEM that works a treat whilst also having great documentation and tutorials. It can be run as a live knoppix CD on commodity hardware and is a piece of cake to configure and manage.

I found an old PC, populated it with old NIC’s lying around and in about 5 minutes I was ready to roll. It also supports NAT so you can set it up a production network without worrying about setting up routing etc.

The big issue I had was the setup wizard and all the tutorials were all geared around each interface being in a different broadcast domain/subnet. The only documented solution I found to emulate a WAN for hosts on the same Subnet was to run WANem “On-a-stick”, this works ok for Linux/Windows hosts but I wasn’t sure how IOS would handle static routes to a connected network via a gateway on THAT same connected network (If that makes sense).

I solved this issue by bridging the interfaces in knoppix and assigning a single IP to the bridge interface so I could still Manage the Web interface.

  • From the Console I executed the command “exit2shell” this dropped me out to the knoppix shell
  • I executed the following commands to remove any existing IP configuration and bring up all the interfaces:

ifconfig eth0 up
ifconfig eth1 up
ifconfig eth2 up
ifconfig eth3 up
ifconfig eth4 up

  • I created a Bridge-group interface called br0:

brctl addbr br0

  • I added each interface to the bridge-group br0

brctl addif br0 eth0
brctl addif br0 eth1
brctl addif br0 eth2
brctl addif br0 eth3
brctl addif br0 eth4

  • I assigned an ip address to the bridge-group br0 for management

ifconfig br0 netmask

  • I added a default Route so I could manage the WANem box from another network

route add default gw

  • I started the tool again with the command “wanem”

I then connected to and everything worked a treat!