facebookarchive / augmented-traffic-control

Augmented Traffic Control: A tool to simulate network conditions
https://facebook.github.io/augmented-traffic-control
Other
4.33k stars 600 forks source link

Running ATC from a laptop using 'create_ap' #315

Open akoidan opened 7 years ago

akoidan commented 7 years ago

I'm trying to simulate low network conditions on my real android device based on this answer. I'm using a laptop (x86) with archlinux as a router. In the laptop I have wired enp61s0 and wireless wlp62s0 interfaces. So I created wifi access point using create_ap command, to be specific sudo create_ap wlp62s0 enp61s0 MSI_AP. That thing creates ap0 interface, which I'm connecting my android device to. I specified ap0 as wlan interface in atc and enp61s0 as another one. (enp61s0 is connected to internet)

Unfortunately rules do not work ( I set up up and down speeds to 1kbs, but android's speedtest app shows 20mb/s). Any idea what I'm doing wrong?

create_ap output dump_system_info output log from atc is here

chantra commented 7 years ago

Hi @Deathangel908 it seems you inverted wan and lan. Did you start atcd with something like:

atcd --wan ap0 --lan enp61s0

?

It should be the opposite. e.g

atcd --lan ap0 --wan enp61s0
akoidan commented 7 years ago

Thanks for your response. I overrode it in AtcdThriftHandlerTask.py

    DEFAULT_LAN = 'enp61s0'
    DEFAULT_WAN = 'ap0'

So I guess there's no way I messed up with this

chantra commented 7 years ago

well, you LAN is ap0 and WAN is enp61s0. WAN is for the interface that connects to the Internet as in Wide Area Network, not Wireless (A) Network.