intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
446 stars 241 forks source link

wireless link loss rate #407

Closed amirmirzaeinia closed 3 years ago

amirmirzaeinia commented 3 years ago

I am trying to capture the loss rate but i see that the wireless link configuration lets you set the loss rate which is not in real wireless links. AFAK the loss rate of a wireless link changes based on mobility of the stations. if station come close to AP, loss rate reduce and speed increase, and vice versa. what is the best way to capture the loss rate of a link? thank you

ramonfontes commented 3 years ago

What would you do in the real world??

amirmirzaeinia commented 3 years ago

AFAK , the physical layer senses the level and quality of radio signal and adapt modulation and coding to protect the user traffic against low quality wireless links(due to mobility), therefore the speed of that user has to reduce since protection in physical layer is increased. all happen automatically.

ramonfontes commented 3 years ago

How would you capture the loss rate of a link in the real world? Isn't this your question?

ramonfontes commented 3 years ago

How would you capture the loss rate of a link in the real world? Isn't this your question?

amirmirzaeinia commented 3 years ago

No I mean how is it possible it to capture the link loss rate in mininet wifi.

ramonfontes commented 3 years ago

Great. But how would you capture the loss rate of a link in the real world?

amirmirzaeinia commented 3 years ago

I guess there are some checksum etc. but as a more abstract in simulator, I have following to instantiate the net()

Mininet_wifi(link=WirelessLink, wmediumd_mode=interference)

however when I print out my link objects I get "TCLinkWireless" which does not have loss record, checked the link file and TCLinkWireless class and its parent.

going into more details of the addlink in net file, i don't see an easy way to setup WirelessLink between AP and stations to be able to check its loss rate. thank you

amirmirzaeinia commented 3 years ago

Ramon, I also tried following code but after checking the link object , i still see that it is a mn_wifi.link.TCLinkWireless

net = Mininet_wifi(link=wmediumd , wmediumd_mode=interference)

sta1 = net.addStation('sta1', mac='00:00:00:00:00:02', min_x=10, max_x=30, min_y=50, max_y=70, min_v=5, max_v=10)
ap1 = net.addAccessPoint('ap1', wlans=1, ssid='ssid1', position='50,50,10')
c0 = net.addController('c0')
net.configureWifiNodes()
net.addLink(ap1, sta1, cls=WirelessLink)

I see that link object is <mn_wifi.link.TCLinkWireless object at 0x............................> i do nt see how it changes to TCLinkWireless rather than working as WirelessLink. thank you

ramonfontes commented 3 years ago

Can you please answer my question??

amirmirzaeinia commented 3 years ago

Ramon, AFAIK here is a simple definition of free space path loss that shows how it depends on distance and carrier frequency. This path loss changes as mobile user move around the access point. increasing path loss lead to Bit Error Rate after demodulation and decoding. then mod/coding adaptation change the redundancy (protection) against high loss channel and so on. in some cases, some known bit stream is added to the real data traffic to measure the bit error rate. This story becomes more complex when MIMO, OFDM and fading channels add to the system. I see that in Mininet-wifi, loss only depends on distance, as following. but I am still not sure in what situation get_loss is accessible.

class IntfWireless(Intf): "Basic interface object that can configure itself."

dist = 0
noise = 0
eqLoss = '(dist * 2) / 1000'
eqDelay = '(dist / 10) + 1'
eqLatency = '(dist / 10)/2'
eqBw = ' * (1.01 ** -dist)'

it also seems that line 583 of the net.py file should be updated. elif self.wmediumd_mode != interference: self.wlinks.append([intf1, intf2])

the reason is when a radio link is shared and there is interference then that should be also listed on wlinks rather than links.

ramonfontes commented 3 years ago

This doesn't answer the question. You are working with a network emulator that allows you to mimic the real world and use tools/commands you use with physical devices. I really appreciate if you use the mailing for questions like that. That's not an issue at all.

it also seems that line 583 of the net.py file should be updated

What??? Did you check the wmediumd code by any chance???

amirmirzaeinia commented 3 years ago

Roman, I also don't see that delay (RTT) change as station moves. I am tracking the RTT of a mobile station and see that not much change as it moves. is this developed as independent? thank you

ramonfontes commented 3 years ago

What? Firstly you say: I see no change. Then you see some change as the node moves. Can you please explain the issue with more details? BTW, this issue is about link loss and we are talking about RTT??