Multiple Wireless Interfaces¶
In real life, many wireless devices have multiple radios so that they can communicate on multiple wireless networks simultaneously. Examples of such devices are mobile phones that have cellular, WiFi and Bluetooth interfaces, or a dual-band wireless router. This showcase demonstrates how such devices can be simulated in INET.
In this showcase, we will simulate a dual-band wireless router. Our dual-band wireless router will have two 802.11 interfaces, one operating on the 2.4 GHz band, and the other on 5 GHz. Both interfaces operate in infrastructure mode and implement two different wireless LANs. The router will provide L2 connectivity (bridging) between the two LANs.
We will use INET’s AccessPoint type for the wireless router,
and configure it to have two 802.11 interfaces. This is as simple
as setting the
numWlanInterfaces parameter to 2. The same
would work to configure a StandardHost, its derivatives
like WirelessHost and AdhocHost, or a Router
to have multiple wireless interfaces.
To test the router, we’ll use two hosts, one on each wireless LAN. The network will look like the following:
The network contains the wireless router named
two WirelessHost’s named
host2. The model
also contains the usual support components, a medium model, a
configurator, and a visualizer.
The important part of the configuration is shown below:
# access point *.accessPoint.numWlanInterfaces = 2 *.accessPoint.wlan.mgmt.ssid = "wlan2.4" *.accessPoint.wlan.mgmt.ssid = "wlan5" *.accessPoint.wlan.radio.bandName = "5 GHz" # host1 is associated with wlan2.4, host2 is associated with wlan5 *.host1.wlan[*].agent.defaultSsid = "wlan2.4" *.host2.wlan[*].agent.defaultSsid = "wlan5" *.host2.wlan.radio.bandName = "5 GHz"
The wireless networks advertised by the two interfaces of
are configured to have the names
wlan5, and the second
interface is configured to operate on 5 GHz using the
Of the hosts,
host1 is configured to connect to the
host2’s wireless interface is also
configured to use the 5 GHz band so that it finds the access point.
The rest of the configuration (omitted) configures traffic
host2) and configures visualization.
The following video has been captured from the simulation. Note how
host1 is pinging
accessPoint. The radio signals are visualized
as disks, and successful transmissions between nodes’ data link layers are visualized by arrows.
The transmissions for the two different networks (both disks and arrows) are colored
differently (red for wlan2.4 and blue for wlan5.)