NS3 WiFi模型內(nèi)容翻譯

ns3-model-library.pdf wifi-model 翻譯

wifi-model

33.1 Design Documentation

ns3 節(jié)點(diǎn)(nodes)能夠包含一系列網(wǎng)絡(luò)設(shè)備(NetDevice)對(duì)象,就像實(shí)際的計(jì)算機(jī)包含單獨(dú)的接口卡一樣,例如,以太網(wǎng)卡,WiFi,藍(lán)牙等。這一章描述ns3的WifiNetDevice和相關(guān)的模型。通過添加WifiNetDevice對(duì)象到ns3的節(jié)點(diǎn)(nodes)中,它就可以創(chuàng)建基于802.11的基礎(chǔ)設(shè)施和adhoc網(wǎng)絡(luò)模型。

33.1.1 Overview of the model

WifiNetDevice模型是一個(gè)基于IEEE802.11標(biāo)準(zhǔn)的無線網(wǎng)絡(luò)接口控制器。我們將會(huì)更加詳細(xì)的看到它的細(xì)節(jié),但只是簡(jiǎn)略的細(xì)節(jié),ns3提供了802.11模型的這些方面:

基本的802.11 DCF(Distributed coordination function)基礎(chǔ)設(shè)施和adhoc模式
802.11a 802.11b 802.11g 802.11n(包括2.4和5GHz帶寬) 和802.11ac物理層
延伸與802.11n的MSDU aggregation and MPDU aggregation ,同時(shí)支持兩種聚合的結(jié)合
延伸于802.11e的QoS-based EDCA and queueing
使用不同的傳播損耗模型和傳播延遲模型的能力,請(qǐng)參見章(Propagation)傳播獲取更多細(xì)節(jié)
不同的速率控制算法,包括Aarf,Arf,Cara,Onoe,Rraa,ConstantRate,Minstrel
802.11s(mesh),該協(xié)議在其他章節(jié)有描述

在ns3中提供的一系列802.11模型提供了一個(gè)精確的802.11規(guī)范的MAC層,并提供了802.11a/b/g/n/ac規(guī)范的不那么慢的PHY層模型。

在ns3,節(jié)點(diǎn)可以在不同的信道上有不同的WifiNetDevices,同時(shí)WifiNetDevices可以與其他的設(shè)備類型共存;這消除了在ns2中結(jié)構(gòu)的限制。然而,現(xiàn)在,還不存在交叉信道干擾或耦合的模型。

WifiNetDevices的源碼在目錄src/wifi下。

代碼的實(shí)現(xiàn)是模塊化的,大約提供了四個(gè)級(jí)別的模型:

    1.PHY layer models
    2.MAC low models: they implement DCF and EDCAF
    3.MAC high models:they implement the MAC-level beacon generation, probing, and association state machines
    4.可以被MAC low models使用的Rate control algorithms

下面,我們介紹每一層的概述。關(guān)于更多的細(xì)節(jié)稍候會(huì)討論。

MAC high models

現(xiàn)在已有三個(gè)MAC high models,該模型提供了三個(gè)無線拓?fù)湓?non-mesh,mesh equivalent,都是ns3::RegularWifiMac的子類,不再這里討論它):Access Point(AP)(ns3::ApWifiMac),non-AP Station(STA)(ns3::StaWifiMac),和獨(dú)立于基礎(chǔ)服務(wù)設(shè)備的STA(ns3::AdhocWifiMac).

三種模型中最簡(jiǎn)單的是ns3::AdhocWifiMac,它實(shí)現(xiàn)了無任何種類的信標(biāo)的產(chǎn)生,探測(cè)和關(guān)聯(lián)的WIFI MAC。

     The ns3::StaWifiMac class implements an active probing and association state machine that handles automatic re-association whenever too many beacons are missed. Finally, ns3::ApWifiMac implements an AP that generates periodic beacons, and that accepts every attempt to associate.

這三種MAC high models共享同一個(gè)父類ns3::RegularWifiMac,它暴露出MAC配置的幾個(gè)屬性:QosSupported屬性,允許配置802.11e/WMM-STYPE QOS支持;HtSupported屬性,允許配置802.11n高吞吐量形式;VhtSupported屬性,允許配置802.11ac更高吞吐量樣式支持。

MAC low layer

MAC low layer分為以下三個(gè)組件:

1. ns3::MacLow 該類管理 RTS/CTS/DATA/ACK交互。
2. ns3::DcfManager和ns3::DcfState,實(shí)現(xiàn)了DCF和EDCAF功能。
3. ns3::DcaTxop和ns3::EdcaTxopN,用于處理在需要的情況下的包隊(duì)列,包分組,包重傳等。The ns3::DcaTxop object is used high MACs that are not QoS-enabled,and for transmission of frames (e.g., of type Management) that the standard says should access the medium using the DCF. ns3::EdcaTxopN is is used by QoS-enabled high MACs and also performs 802.11n-style MSDU aggregation.

Rate control algorithms

有幾種MAC low layer使用的rate control algorithms.完整的可以使用的速率控制算法將會(huì)在一個(gè)單獨(dú)的一節(jié)中提供。

PHY layer models

PHY層是在ns3::WifiPhy類中單獨(dú)實(shí)現(xiàn)的。物理層模型的實(shí)現(xiàn)的完整的描述是在論文:Yet Another Network Simulator中,基于802.11b的可用的結(jié)果的驗(yàn)證報(bào)告在techinical report中。

33.1.2 The WifiChannel and WifiPhy models

無線信道wifichannel可以使用一組ns3::WifiNetDevice網(wǎng)絡(luò)接口連接在一起。ns3::WifiPhy對(duì)象是在wifinetdevice中的,用于接收從信道接收的數(shù)據(jù)比特。對(duì)于信道的傳播模型,可以使用傳播模塊;詳見Propagation一節(jié)。
本節(jié)總結(jié)了誤碼率計(jì)算的描述,該誤碼率在論文中把在802.11a協(xié)議中的前向糾錯(cuò)考慮了進(jìn)去,并描述了一個(gè)包是否被成功接收所實(shí)現(xiàn)的算法。請(qǐng)參閱“Yet Another Network Simulator”的更多細(xì)節(jié)。

PHY層的狀態(tài)會(huì)是下面五種其中的一種:

  1. TX:the PHY is currently transmitting a signal on behalf of its associated MAC(phy層正在發(fā)送與之關(guān)聯(lián)的MAC的信號(hào))
  2. RX:the PHY is synchronized on a signal and is waiting until it has received its last bit to forward it to the MAC.(phy已經(jīng)同步了信號(hào),正在等待止到接收到最后一個(gè)比特位,然后轉(zhuǎn)發(fā)到MAC層)
  3. IDLE:the PHY is not in the TX, RX, or CCA BUSY states.(PHY層空閑)
  4. CCA Busy:the PHY is not in TX or RX state but the measured energy is higher than the energy detection threshold.(PHY不在TX,RX狀態(tài),但是測(cè)得的能量高于能量探測(cè)閾值)
  5. SLEEP:the PHY is in a power save mode and cannot send nor receive frames.(PHY處于節(jié)能狀態(tài),不發(fā)送也不接收)

當(dāng)PHY不是IDLE狀態(tài)時(shí)(也就是說,另外的更早的包已經(jīng)在接收器中同步了,或者他自己在發(fā)送數(shù)據(jù)),一個(gè)新的包的第一個(gè)比特位被接收,此時(shí),接收的包將被丟棄。否則,如果PHY處于IDLE或者CCA Busy狀態(tài),我們計(jì)算這個(gè)新的信號(hào)的第一位比特的接收能量,并于能量探測(cè)閾值進(jìn)行比較(as defined by the Clear Channel Assessment function mode 1)。如果包的能量高,PHY則轉(zhuǎn)移狀態(tài)到RX,并且當(dāng)包的最后一個(gè)比特位被接收時(shí)發(fā)起一個(gè)事件。否則,PHY停留在IDLE或者CCA Busy狀態(tài),并丟棄這個(gè)包。

The energy of the received signal is assumed to be zero outside of the reception interval of packet k and is calculated from the transmission power with a path-loss propagation model in the reception interval. where the path loss expo-nent, n, is chosen equal to 3, the reference distance, d 0 is choosen equal to 1.0m and the reference energy is based on a Friis propagation model.
When the last bit of the packet upon which the PHY is synchronized is received, we need to calculate the probability that the packet is received with any error to decide whether or not the packet on which we were synchronized could be successfully received or not: a random number is drawn from a uniform distribution and is compared against the probability of error.
To evaluate the probability of error, we start from the piecewise linear functions shown in Figure SNIR function over time. and calculate the SNIR function.

從SNIR funtion,我們可以派生出計(jì)算用于傳輸?shù)恼{(diào)制和解調(diào)的誤碼率BER和誤包率PER。請(qǐng)參考[pei80211ofdm], [pei80211b], [lacage2006yans],[Haccoun] and [Frenger] 以了解更多的可用的BER/PER模型的細(xì)節(jié).

WifiChannel configuration

WifiChannel的實(shí)現(xiàn)使用了傳播損耗模型和傳播延時(shí)模型,這兩個(gè)模型在ns3的Propagation模塊中有提供。

33.1.3 The MAC model

802.11分布式協(xié)調(diào)功能(DCF)是用來計(jì)算當(dāng)授予訪問傳輸介質(zhì)的時(shí)候。如果我們使用一個(gè)經(jīng)過每一個(gè)時(shí)隙的周期性的定時(shí)器,那么實(shí)現(xiàn)DCF將會(huì)特別的容易,我們選擇使用在【ji2004sslswn】所描述的方法,回退時(shí)間無論是否需要,都是延時(shí)計(jì)算的,盡管聲稱這比簡(jiǎn)單的周期定時(shí)器方法具備更好地性能。

DCF程序的回退在【ieee80211】的9.2.5.2節(jié)中描述的。

  1. 無論由物理層或者虛擬CS機(jī)制所指示的發(fā)現(xiàn)媒質(zhì)忙,回退程序應(yīng)為STA調(diào)用來傳送一個(gè)幀。
  2. 即使沒有另外傳輸任務(wù)在當(dāng)前隊(duì)列中,A backoff procedure shall be performed immediately after the end of every transmission with the More Frag-ments bit set to 0 of an MPDU of type Data, Management, or Control with subtype PS-Poll

總之,如果隊(duì)列空,一個(gè)新到的包應(yīng)該在信道感知空閑DIFS后,馬上被傳輸。如果隊(duì)列不空,并且在一個(gè)成功的MPDU之后沒有更多的分組,節(jié)點(diǎn)應(yīng)該開始回退定時(shí)器。

一些用戶觀察到,802.11MAC與空隊(duì)列的空閑信道將會(huì)馬上發(fā)送達(dá)到該模型的第一幀,而無須等待DIFS或者回退,并想知道這是否合規(guī)。根據(jù)協(xié)議標(biāo)準(zhǔn),“The backoff procedure shall be invoked for a STA to transfer a frame when finding the medium busy as indicated by either the physical or virtual CS mechanism.”因此在這種情況下,媒介并不能發(fā)現(xiàn)在當(dāng)前忙,站點(diǎn)將會(huì)馬上傳輸。

更高層的MAC功能的實(shí)現(xiàn)是在一系列C++類中,功能:

? packet fragmentation and defragmentation,
? use of the RTS/CTS protocol,
? rate control algorithm,
? connection and disconnection to and from an Access Point,
? the MAC transmission queue,
? beacon generation,
? MSDU aggregation,
? etc.

33.1.4 Rate control algorithms

多種速率控制算法在ns3中是可用的。一些速率控制算法是用在真實(shí)設(shè)備中的實(shí)際算法;其他一些算法是在文獻(xiàn)中找到的。下面的速率控制算法是在MAC low layer中使用的:

真實(shí)設(shè)備中的算法有:

ArfWifiManager(WifiHelper的默認(rèn)算法)【Automatic Rate Fallback(ARF) algorithm 自動(dòng)速率回退算法 1997年】
OnoeWifiManager
ConstantRateWifiManager
MinstrelWifiManager
文獻(xiàn)中的算法:
IdealWifiManager
AarfWifiManager【2004年】
AmrrWifiManager
CaraWifiManager
RraaWifiManager【2006年】
AarfcdWifiManager
ParfWifiManager
AparfWifiManager

ConstantRateWifiManager

該算法對(duì)每一個(gè)包使用相同的傳輸模式。用戶可以設(shè)置對(duì)于所有“unicast”包的期望的“DataMode”和所有“request”控制包的“ControlMode”(例如RTS).

控制響應(yīng)幀(比如CTS,ACK)的傳輸參數(shù)的選擇規(guī)則在802.11標(biāo)準(zhǔn)中是相當(dāng)清晰的。ns3遵從了這樣的標(biāo)準(zhǔn)和從一系列正常速率或者強(qiáng)制性速率選擇作為控制響應(yīng)幀的速率的選擇性。這就意味著,即使ConstantRateWifiManager被使用,控制響應(yīng)幀也可能使用不同的速率進(jìn)行發(fā)送。

ConstantRateWifiManager的ControlMode屬性僅僅別用與RTS幀。CTS和ACK幀的速率是根據(jù)802.11標(biāo)準(zhǔn)進(jìn)行選擇的。然而,用戶仍然可以手動(dòng)添加WifiMode到基本的速率中,這將允許控制響應(yīng)幀以其他的速率進(jìn)行發(fā)送。請(qǐng)參考project wiki進(jìn)一步了解這是如何實(shí)現(xiàn)的。

可用的屬性有:

DataMode:(默認(rèn)WifiMode::OfdmRate6Mbps)specify a mode for all non-unicast packets
ControlMode:(默認(rèn)WifiMode::OfdmRate6Mbps)specify a mode for all ‘request’ control packets

IdealWifiManager

這個(gè)速率控制算法根據(jù)前一個(gè)包的發(fā)送的信噪比SNR來選擇最好的模式??紤]節(jié)點(diǎn)A發(fā)送單播包到節(jié)點(diǎn)B。當(dāng)B成功接收到從A發(fā)送的包時(shí),B記錄所接受的包的SNR到ns3::SnrTag,然后,添加標(biāo)簽到ACK并返回給A。通過這樣做,A能夠了解發(fā)送到B的包的信噪比SNR,并使用一種帶寬之外的機(jī)制(因此算法名字就是“ideal”)。然后A使用SNR從一個(gè)一系列SNR閾值中選擇一個(gè)傳輸模式,而這個(gè)閾值是從目標(biāo)BER和特定模式的SNR/BER曲線構(gòu)建的。
可以的屬性有:
BerThreshold(默認(rèn)10e-6):The maximum Bit Error Rate that is used to calculate the SNR threshold for each mode.最大誤碼率,用于計(jì)算每種模式的SNR閾值。

MinstrelWifiManager

該算法是源于madwifi 工程的速率控制算法。它是當(dāng)前LInux內(nèi)核默認(rèn)的速率控制算法。
Minstrel跟蹤每個(gè)成功發(fā)送可用速率幀的概率。然后通過乘以速率的概率計(jì)算期望的吞吐量。這種方法被選擇用于確保不會(huì)選擇最低速率而趨向于最高速率(盡管最低速率具有更高的概率)。
在monstrel中,大致10%的傳輸是在所謂的lookaround rate發(fā)送的。lookaround rate的目標(biāo)就是迫使minstrel嘗試使用比當(dāng)前速率更高的速率。
更多關(guān)于minstrel的細(xì)節(jié),請(qǐng)看【linuxminstrel】。


IEEE 802.11 標(biāo)準(zhǔn)在物理層支持利用多種速率進(jìn)行傳輸,但是并未規(guī)定速率選擇策略。速率自適應(yīng)的速率選擇算法核心是及時(shí)獲取能夠?qū)崟r(shí)反映信道狀態(tài)的信息。
目前獲取信道信息的方法主要有兩大類:

1. 信道物理信息直接獲取。 比如獲取信噪比SNR,接受信號(hào)強(qiáng)度,誤碼率BER
2. 基于統(tǒng)計(jì)的方法.

目前的速率自適應(yīng)可分為以下4類:

  1. 利用傳送幀連續(xù)的成功和失敗次數(shù)來估計(jì)信道質(zhì)量。比如ARF算法,如果連續(xù)沒有收到兩個(gè)ACK,則降低一檔速率,發(fā)送下面的數(shù)據(jù)并啟動(dòng)一個(gè)定時(shí)器;如果連續(xù)收到10個(gè)幀或者定時(shí)器時(shí)間到,則提高發(fā)送速率。缺點(diǎn):連續(xù)成功或失敗的次數(shù)很難及時(shí)適應(yīng)信道的快速變化。

  2. 利用物理層指標(biāo)(如SNIR,RSS)估計(jì)信道質(zhì)量。缺點(diǎn):已有文獻(xiàn)證明SNIR,RSS等指標(biāo)和丟幀率并沒有很強(qiáng)的對(duì)應(yīng)關(guān)系,而且基于跨層的設(shè)計(jì)思想在實(shí)際應(yīng)用中存在困難。

  3. 每隔一段時(shí)間以不同速率發(fā)送一個(gè)或者一些試探幀,用來估計(jì)不同數(shù)量在信道中的表現(xiàn)。這種方法提高了對(duì)其他速率的實(shí)時(shí)估計(jì)能力,但是因?yàn)椴荒馨l(fā)送過多的試探幀,導(dǎo)致個(gè)別試探幀的成敗決定了速率選擇,容易造成誤判。如SampleRate。

  4. 利用近一段時(shí)間的數(shù)據(jù)幀的統(tǒng)計(jì)特征來決定發(fā)送速率。比如RRAA。RRAA在一段時(shí)間(窗口)內(nèi)統(tǒng)計(jì)丟幀率等信息,并將其與相應(yīng)的門限進(jìn)行比較。這種方法屏蔽了因?yàn)殡S機(jī)丟幀而導(dǎo)致的誤判,如果窗口選擇合適,能夠?qū)π诺雷兓鞒黾皶r(shí)反應(yīng)。

內(nèi)容來源:http://blog.csdn.net/forsiny/article/details/4805783


33.1.5 Modifying wifi model

在性能研究的時(shí)候,更改默認(rèn)的wifi模式是普通的任務(wù)之一。在這一節(jié),我們提供了如何更改默認(rèn)的wifi模式的概述。依賴于你的目的,通常的任務(wù)是(排序不分先后):
1.通過更改wifi-mac-header..完成創(chuàng)建或者更改默認(rèn)的WIFI幀/頭
2.MAC low更改。例如,處理新的/更改的 控制幀(考慮RTS/CTS/ACK/Block ACK),更改成兩路/四路交互。用戶通常更改mac-low.
來完成這個(gè)任務(wù)??刂茙奶幚硇Ч窃贛acLow:ReceiveOk.
3.WIFI隊(duì)列管理。文件dca-txop.和edca-txop-n.是對(duì)這個(gè)任務(wù)有幫助的。
4.信道接入管理。用戶應(yīng)該更改文件dcf-manager.*,該文件授權(quán)訪問DcaTxop和EdcaTxopN.
5.被WIFI遠(yuǎn)程站點(diǎn)管理器所處理的分組和RTS閾值。注意:wifi remote station manager簡(jiǎn)單的指示fragmentation和RTS是否需要。當(dāng)RTS/CTS被MacLow處理時(shí),F(xiàn)ragmentation被DcaTxop或者EdcaTxopN所處理
6.更改或者添加新的速率控制算法,可以通過創(chuàng)建一個(gè)新的WIFI remote station manager類或者更改一個(gè)存在的類完成。

33.1.6 Note on the current implementation

? 802.11g does not support 9 microseconds slot
? PHY_RXSTART is not supported
? 802.11e TXOP is not supported
? 802.11n MIMO is not supported
? 802.11n/ac MIMO is not supported
? 802.11n/ac beamforming is not supported
? PLCP preamble reception is not modeled
? BSSBasicRateSet for 802.11b has been assumed to be 1-2 Mbit/s
? BSSBasicRateSet for 802.11a/g has been assumed to be 6-12-24 Mbit/s
? cases where RTS/CTS and ACK are transmitted using HT formats are not supported
? Only ConstantRateWifiManager is supported by 802.11n or 802.11ac

33.2 User Documentation
33.2.1 Using the WifiNetDevice

實(shí)現(xiàn)提供了模塊化,使得WifiNetDevice具備強(qiáng)大的低級(jí)別的配置,但復(fù)雜?;谶@個(gè)原因,我們提供了一些幫助類以一種簡(jiǎn)單的方式完成一些普通的操作,同時(shí)提供了ns3的屬性系統(tǒng)來控制底層模型的參數(shù)。
使用底層ns3 API和期望添加一個(gè)WifiNetDevice到節(jié)點(diǎn)上,必須創(chuàng)建一個(gè)WifiNetDevice實(shí)例,和許多構(gòu)成的對(duì)象,以一種合適的方式綁定在一起(WifiNetDevice為未來的可擴(kuò)展性,在某種程度上已經(jīng)非常模塊化)。在底層api,這需要大約20行代碼(請(qǐng)看ns3::WifiHelper::Install,ns3::YansWifiPhyHelper::Create).在某些點(diǎn),一個(gè)信道WifiChannel必須被創(chuàng)建,也包含了一些構(gòu)成的對(duì)象(請(qǐng)看ns3::YansWifiChannelHelper::Create)。

然而,一些可用的幫助類可以使用,如果愿意使用默認(rèn)值的話,添加設(shè)備和信道只用幾行代碼就能完成。當(dāng)然也可以使用額外的api允許通過屬性系統(tǒng)來改變默認(rèn)值。經(jīng)常使用的屬性值在Attributes節(jié)中已經(jīng)列出來了。腳本examples/wireless可以瀏覽看看這是怎么做的。接下來,我們描述創(chuàng)建一個(gè)WifiNetDevice從底層(WifiChannel)到設(shè)備層(WifiNetDevice)的通常的步驟。

為了創(chuàng)建一個(gè)WifiNetDevice,用戶主要需要配置五步:

  1. 配置WifiChannel:WifiChannel關(guān)系到信號(hào)在相同的信道上從一個(gè)設(shè)備到另一個(gè)設(shè)備。WifiChannel主要的配置是傳播損耗模型和傳播延時(shí)模型。
  2. 配置WifiPhy:WifiPhy關(guān)系到從WifiChannel發(fā)送和接收無線信號(hào)。這里,WifiPhy依賴于接收的信號(hào)的強(qiáng)度和噪聲決定每一幀是否被成功解碼。所以,WifiPhy的主要配置是誤碼率模型,該模型就是最后計(jì)算基于信號(hào)的成功解碼幀的概率。
  3. 配置WifiMac:這一步更多的是與the architecture and device level有關(guān)。用戶配置wifi architecture(例如adhoc or ap-sta)和是否支持Qos(802.11e),HT(802.11n),VHT(802.11ac)特性。
  4. 創(chuàng)建WifiDevice:在這一步,用戶配置期望的wifi標(biāo)準(zhǔn)(例如802.11b,802.11g,802.11a,802.11n or 802.11ac)和速率控制算法。
  5. 配置mobility:最后,mobility模型通常需要在WifiNetDevice可用之前配置。

YansWifiChannelHelper

YansWifiChannelHelper具有一個(gè)不同尋常的名字。讀者可能會(huì)疑惑為什么使用這樣的名字。該模型是從yans simulator提取出來的,名字也是引用自它。該幫助類可以創(chuàng)建一個(gè)帶有默認(rèn)傳播損耗模型(PropagationLoss)和傳播延時(shí)模型(PropagationDelay)的WifiChannel。

用戶所使用的經(jīng)典代碼如下:

    YansWifiChannelHelper wifiChannelHelper = YansWifiChannelHelper::Default ();
    Ptr<WifiChannel> wifiChannel = wifiChannelHelper.Create ();

特別的是,默認(rèn)的信道模型使用的是3的指數(shù)的信道模型,所用的傳播時(shí)延等于一個(gè)常數(shù)值,就是光速(ns3::ConstantSpeedPropagationDelayModel),所用的傳播損耗是基于一個(gè)默認(rèn)的log distance model(ns3::LogDistancePropagationLossModel)。請(qǐng)注意,默認(rèn)的log distance model is configured with a reference loss of 46.6777 dB at reference distance of 1m。The reference loss of 46.6777 dB was calculated using Friis propagation loss model at 5.15 GHz.The reference loss 模型如果使用802.11b,802.11g,802.11n(由于它們工作在2.4GHZ)必須被改變。

注意上面在創(chuàng)建一個(gè)幫助對(duì)象和一個(gè)實(shí)際的仿真對(duì)象的區(qū)別。在ns3中,幫助對(duì)象(僅僅用于幫助APP)是在棧(它們可以使用new操作符創(chuàng)建和使用deleted銷毀)中創(chuàng)建的。然而,實(shí)際的ns3對(duì)象繼承自ns3::Object類,并且分配一個(gè)智能指針。如果你不熟悉智能指針,請(qǐng)參看ns3-manual中關(guān)于ns3 object model一章的內(nèi)容。

下面的兩個(gè)方法在配置YansWifiChannelHelper是有用的:

? YansWifiChannelHelper::AddPropagationLoss adds a PropagationLossModel to a chain of PropagationLossModel
? YansWifiChannelHelper::SetPropagationDelay sets a PropagationDelayModel

YansWifiPhyHelper

物理層設(shè)備(基類ns3::WifiPhy)在ns3中是與ns3::WifiChannel相連接的。我們需要為YansWifiChannel創(chuàng)建合適的WifiPhy對(duì)象。這里YansWifiPhyHelper就可以勝任這個(gè)工作。

YansWifiPhyHelper類配置了一個(gè)對(duì)象工廠來創(chuàng)建一個(gè)YansWifiPhy實(shí)例,并添加一些其他的對(duì)象到該實(shí)例中,包括可能補(bǔ)充的ErrorRateModel誤碼率模型和指向MobilityModel移動(dòng)模型的指針。典型的用戶代碼如下:

    YansWifiPhyHelper wifiPhyHelper = YansWifiPhyHelper::Default ();
    wifiPhyHelper.SetChannel (wifiChannel);

YansWifiPhyHelper默認(rèn)配置NistErrorRateModel(ns3::NistErrorRateModel)誤碼率模型。你可以使用YansWifiPhyHelper::SetErrorRateModel方法更改誤碼率模型。

可選的是,如果pcap跟蹤記錄是需要的話,用戶可以使用下面的代碼使得pcap跟蹤可用:

YansWifiPhyHelper::SetPcapDataLinkType (enum SupportedPcapDataLinkTypes dlt)
    ns3支持802.11的RadioTap和Prism軌跡擴(kuò)展。

注意,我們還沒有實(shí)際創(chuàng)建一個(gè)WifiPhy對(duì)象;我們只是準(zhǔn)備了告訴YansWifiPhyHelper與之連接的信道。Phy對(duì)象會(huì)在下一步創(chuàng)建。

802.11n/ac PHY層可以使用長(zhǎng)800ns或者短400ns的OFDM guard intervals。為了配置這個(gè)參數(shù),可以使用下面的一行的代碼(這個(gè)例子中,使用的是short guard interval的支持):

wifiPhyHelper.Set ("ShortGuardEnabled", BooleanValue(true));

更多的是,802.11提供了一種可選的模式(GreenField mode)來減少preamble durations(前沿持續(xù)時(shí)間),并且這也是唯一一種與802.11n設(shè)備兼容的模式。可以使用下面的代碼啟用這種模式:

wifiPhyHelper.Set ("GreenfieldEnabled",BooleanValue(true));

802.11nPHY層可以支持20(默認(rèn))或者40MHZ信道帶寬,802.11ac PHY層可以使用20,40,80(默認(rèn)),160MHZ信道帶寬。由于信道帶寬值被WifiHelper::SetStandard重寫,可以使用下面Config::Set代碼在安裝后進(jìn)行配置:

    WifiHelper wifi = WifiHelper::Default ();
    wifi.SetStandard (WIFI_PHY_STANDARD_80211ac);
    wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", 
                                  StringValue("VHtMcs9"), "ControlMode",StringValue("VHtMcs9"));
    VhtWifiMacHelper mac = VhtWifiMacHelper::Default ();
    //Install PHY and MAC
    Ssid ssid = Ssid ("ns3-wifi");
    mac.SetType ("ns3::StaWifiMac",
        "Ssid", SsidValue (ssid),
        "ActiveProbing", BooleanValue (false));
    NetDeviceContainer staDevice;
    staDevice = wifi.Install (phy, mac, wifiStaNode);
    mac.SetType ("ns3::ApWifiMac",
        "Ssid", SsidValue (ssid));
    NetDeviceContainer apDevice;
    apDevice = wifi.Install (phy, mac, wifiApNode);
    //Once install is done, we overwrite the channel width value
    //(一旦安裝之后,我們可以重寫信道帶寬)
    Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/ChannelWidth", UintegerValue (160));

WifiMacHelper

下一步是配置MAC模型。我們使用WifiMacHelper來完成。WifiMacHelper可以完成MAC low 模型和MAC high模型。用戶必須決定采用哪種模型:802.11/WMM-style Qos , 802.11n-style Hight throughput(HT),802.11ac-style Very High throughput(VHT)

NqosWifiMacHelper and QosWifiMacHelper

ns3::NqosWifiMacHelper和ns3::QosWifiMacHelper均可以配置一個(gè)對(duì)象工廠來創(chuàng)建一個(gè)ns3::WifiMac實(shí)例。它們用來配置像MAC類型的參數(shù)。
前者ns3::NqosWifiMacHelper不支持以下類型的MAC實(shí)例的創(chuàng)建:802.11e/WMM-style QoS,802.11n-style High throughput (HT),802.11ac-style Very High throughput (VHT)。
例如下面的用戶代碼配置了一個(gè)不支持QOs和HT的MAC類型實(shí)例,并且沒有AP,僅有STA的一個(gè)基礎(chǔ)設(shè)施網(wǎng)絡(luò),SSID設(shè)置為ns-3-ssid:

    NqosWifiMacHelper wifiMacHelper = NqosWifiMacHelper::Default ();
    Ssid ssid = Ssid ("ns-3-ssid");
    wifiMacHelper.SetType ("ns3::StaWifiMac",
            "Ssid", SsidValue (ssid),
            "ActiveProbing", BooleanValue (false));
可以使用ns3::QosWifiMacHelper來代替ns3::NqosWifiMacHelper來創(chuàng)建一個(gè)支持Qos的MAC實(shí)例。
下面的代碼使用ns3::QosWifiMacHelper創(chuàng)建了一個(gè)支持Qos的AP:
QosWifiMacHelper wifiMacHelper = QosWifiMacHelper::Default ();
    wifiMacHelper.SetType ("ns3::ApWifiMac",
            "Ssid", SsidValue (ssid),
            "BeaconGeneration", BooleanValue (true),
            "BeaconInterval", TimeValue (Seconds (2.5)));

支持Qos的MAC模型可以工作在流量屬于四種不同訪問策略下:AC_VO 語(yǔ)音流,AC_VI 視頻流,AC_BE 盡最大努力流,AC_BK后臺(tái)流。為了使MAC為MSDU決定一個(gè)合適的AC,轉(zhuǎn)發(fā)到這些MAC層的包應(yīng)該被使用一個(gè)TID(traffic id)的ns3::QosTag標(biāo)記,否則該包將被屬于AC_BE策略。

為了創(chuàng)建一個(gè)ad-hoc MAC實(shí)例,簡(jiǎn)單的使用ns3::AdhocWifiMac代替ns3::StaWifiMac和ns3::ApWifiMac即可。

HtWifiMacHelper

ns3::HtWifiMacHelper配置一個(gè)對(duì)象工廠來創(chuàng)建一個(gè)ns3::WifiMac實(shí)例。它用于支持創(chuàng)建802.11n-style High throughput (HT) 和支持QoS類型的MAC實(shí)例。特別的,該對(duì)象也可以用來設(shè)置:

1. 為了使用802.11n MSDU聚合特性,為特定的訪問策略AC設(shè)置MSDU聚合
2. 可以設(shè)置像threshold(閾值)(塊ACK機(jī)制應(yīng)該被使用的包的數(shù)量)的塊ACK參數(shù)和閑置超時(shí)。

例如,下面的代碼配置了一個(gè)HT MAC,不支持AP,支持STA,QOS保證,聚合AC_VO,和AC_BE的塊ACK,這樣的基礎(chǔ)設(shè)施網(wǎng)絡(luò),它的AP的SSID為ns-3-ssid:

    HtWifiMacHelper wifiMacHelper = HtWifiMacHelper::Default ();
    Ssid ssid = Ssid ("ns-3-ssid");
    wifiMacHelper.SetType ("ns3::StaWifiMac",
                "Ssid", SsidValue (ssid),
                "ActiveProbing", BooleanValue (false));
    wifiMacHelper.SetMsduAggregatorForAc (AC_VO, "ns3::MsduStandardAggregator",
                    "MaxAmsduSize", UintegerValue (3839));
    wifiMacHelper.SetBlockAckThresholdForAc (AC_BE, 10);
    wifiMacHelper.SetBlockAckInactivityTimeoutForAc (AC_BE, 5);

這個(gè)對(duì)象也可以使用ns3::QosWifiMacHelper以相同的方式進(jìn)行設(shè)置。

VhtWifiMacHelper

ns3::VhtWifiMacHelper配置一個(gè)對(duì)象工廠來創(chuàng)建一個(gè)ns3::WifiMac實(shí)例。用于支持創(chuàng)建以下類型的MAC實(shí)例:802.11ac-style Very High throughput (VHT) 和支持 QoS保證。這個(gè)對(duì)象與HtWifiMacHelper很相似。

WifiHelper

我們現(xiàn)在準(zhǔn)備創(chuàng)建WifiNetDevices.首先,讓我們創(chuàng)建一個(gè)默認(rèn)設(shè)置的WifiHelper:

WifiHelper wifiHelper = WifiHelper::Default ();

這一步都做了什么呢?它默認(rèn)設(shè)置802.11aWIFI標(biāo)準(zhǔn),和設(shè)置ns3::ArfWifiManager作為RemoteStationManager。你可以通過調(diào)用WifiHelper::SetRemoteStationManager方法改變RemoteStationManager。為了改變采用的wifi標(biāo)準(zhǔn),可以調(diào)用WifiHelper::SetStandard方法來設(shè)置想要的標(biāo)準(zhǔn)。

現(xiàn)在,讓我們使用上面所描述的對(duì)象wifiPhyHelper和wifiMacHelper,安裝到在一系列節(jié)點(diǎn)“c”上的WifiNetDevices:

NetDeviceContainer wifiContainer = WifiHelper::Install (wifiPhyHelper, wifiMacHelper, c);

這樣就創(chuàng)建了一個(gè)WifiNetDevice,它包含WifiRemoteStationManager,WifiMac,WifiPhy(連接到匹配的WifiChannel上的)。
WifiHelper::SetStandard方法設(shè)置了定義在已選的標(biāo)準(zhǔn)版本中的可變的默認(rèn)的定時(shí)參數(shù),可重寫已經(jīng)存在的或者已經(jīng)配置過的值。為了改變已經(jīng)給WifiHelper::SetStandard重寫的參數(shù),應(yīng)該在安裝后使用Config::Set來配置:

    WifiHelper wifi = WifiHelper::Default ();
    wifi.SetStandard (WIFI_PHY_STANDARD_80211n_2_4GHZ);
    wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager", "DataMode", 
                                  StringValue("HtMcs7"), "ControlMode",StringValue("HtMcs7"));
    HtWifiMacHelper mac = HtWifiMacHelper::Default ();
    //Install PHY and MAC
    Ssid ssid = Ssid ("ns3-wifi");
    mac.SetType ("ns3::StaWifiMac",
            "Ssid", SsidValue (ssid),
            "ActiveProbing", BooleanValue (false));
    NetDeviceContainer staDevice;
    staDevice = wifi.Install (phy, mac, wifiStaNode);
    mac.SetType ("ns3::ApWifiMac",
            "Ssid", SsidValue (ssid));
    NetDeviceContainer apDevice;
    apDevice = wifi.Install (phy, mac, wifiApNode);
    //Once install is done, we overwrite the standard timing values
    Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/Slot", TimeValue (MicroSeconds (slot))
    Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/Sifs", TimeValue (MicroSeconds (sifs))
    Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/AckTimeout", TimeValue (MicroSeconds (
    Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/CtsTimeout", TimeValue (MicroSeconds (
    Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/Rifs", TimeValue (MicroSeconds (rifs))
    Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/BasicBlockAckTimeout", TimeValue (Micr
    Config::Set ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Mac/CompressedBlockAckTimeout", TimeValue

有許多ns3屬性可以被上面的helpers對(duì)象使用來改變默認(rèn)的行為,例子腳本程序展示了如何改變默認(rèn)行為。

Mobility configuration

最后,一個(gè)移動(dòng)模型必須在wifi device上進(jìn)行配置。移動(dòng)模型被用于計(jì)算傳播損耗和傳播時(shí)延。在下一節(jié)中提供了兩個(gè)例子。用戶可以引用Mobility模塊一章獲取更多細(xì)節(jié)。

Example configuration

我們提供了兩個(gè)典型的配置wifi網(wǎng)絡(luò)的例子程序-一個(gè)例子程序使用adhoc網(wǎng)絡(luò),一個(gè)例子程序使用基礎(chǔ)設(shè)施網(wǎng)絡(luò)。兩個(gè)例子程序在examples/wireless目錄(wifi-simple-adhoc.cc 和 wifi-simple-infra.cc)。鼓勵(lì)用戶學(xué)習(xí)examples/wireless目錄下的例子。

AdHoc WifiNetDevice configuration

在這個(gè)例子中,我們創(chuàng)建了兩個(gè)adhoc節(jié)點(diǎn),配置了802.11a wifi設(shè)備。我們使用ns3::ConstantSpeedPropagationDelayModel作為傳播延時(shí)模型,使用帶有3的指數(shù)的ns3::LogDistancePropagationLossModel作為傳播損耗模型。兩個(gè)設(shè)備都配置12Mbps固定速率的ConstantRateWifiManager。最后,我們使用ns3::ListPositionAllocator手動(dòng)放置節(jié)點(diǎn)位置:

std::string phyMode ("OfdmRate12Mbps");
    NodeContainer c;
    c.Create (2);
    WifiHelper wifi;
    wifi.SetStandard (WIFI_PHY_STANDARD_80211a);
    YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
    // ns-3 supports RadioTap and Prism tracing extensions for 802.11
    wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO);
    YansWifiChannelHelper wifiChannel;
    wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
    wifiChannel.AddPropagationLoss ("ns3::LogDistancePropagationLossModel",
                "Exponent", DoubleValue (3.0));
    wifiPhy.SetChannel (wifiChannel.Create ());
    // Add a non-QoS upper mac, and disable rate control (i.e. ConstantRateWifiManager)
    NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
    wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
                    "DataMode",StringValue (phyMode),
                    "ControlMode",StringValue (phyMode));
    // Set it to adhoc mode
    wifiMac.SetType ("ns3::AdhocWifiMac");
    NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c);
    // Configure mobility
    MobilityHelper mobility;
    Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
    positionAlloc->Add (Vector (0.0, 0.0, 0.0));
    positionAlloc->Add (Vector (5.0, 0.0, 0.0));
    mobility.SetPositionAllocator (positionAlloc);
    mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
    mobility.Install (c);
    // other set up (e.g. InternetStack, Application)Infrastructure (access point and clients) 
    //  WifiNetDevice configuration

這是一個(gè)典型的代碼,展示了用戶如何配置一個(gè)接入點(diǎn)AP和一系列客戶端。在這個(gè)例子中,我們創(chuàng)建一個(gè)接入點(diǎn)和兩個(gè)客戶端。每一個(gè)節(jié)點(diǎn)配置802.11bwifi設(shè)備:

    std::string phyMode ("DsssRate1Mbps");
    NodeContainer ap;
    ap.Create (1);
    NodeContainer sta;
    sta.Create (2);
    WifiHelper wifi;
    wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
    YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
    // ns-3 supports RadioTap and Prism tracing extensions for 802.11
    wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO);
    YansWifiChannelHelper wifiChannel;
    // reference loss must be changed since 802.11b is operating at 2.4GHz
    wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
    wifiChannel.AddPropagationLoss ("ns3::LogDistancePropagationLossModel",
                    "Exponent", DoubleValue (3.0),
                    "ReferenceLoss", DoubleValue (40.0459));
    wifiPhy.SetChannel (wifiChannel.Create ());
    // Add a non-QoS upper mac, and disable rate control
    NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
    wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
                    "DataMode",StringValue (phyMode),
                    "ControlMode",StringValue (phyMode));
    // Setup the rest of the upper mac
    Ssid ssid = Ssid ("wifi-default");
    // setup ap.
    wifiMac.SetType ("ns3::ApWifiMac",
            "Ssid", SsidValue (ssid));
    NetDeviceContainer apDevice = wifi.Install (wifiPhy, wifiMac, ap);
    NetDeviceContainer devices = apDevice;
    // setup sta.
    wifiMac.SetType ("ns3::StaWifiMac",
            "Ssid", SsidValue (ssid),
            "ActiveProbing", BooleanValue (false));
    NetDeviceContainer staDevice = wifi.Install (wifiPhy, wifiMac, sta);
    devices.Add (staDevice);
    // Configure mobility
    MobilityHelper mobility;
    Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
    positionAlloc->Add (Vector (0.0, 0.0, 0.0));
    positionAlloc->Add (Vector (5.0, 0.0, 0.0));
    positionAlloc->Add (Vector (0.0, 5.0, 0.0));
    mobility.SetPositionAllocator (positionAlloc);
    mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
    mobility.Install (ap);
    mobility.Install (sta);
    // other set up (e.g. InternetStack, Application)

33.2.2 Note on the current implementation

? 802.11g supports a default of long slot time (20 microseconds)
? PHY_RXSTART is not supported
? 802.11e TXOP is not supported
? 802.11n/ac MIMO is not supported
? 802.11n/ac beamforming is not supported
? PLCP preamble reception is not modeled
? BSSBasicRateSet for 802.11b has been assumed to be 1-2 Mbit/s
? BSSBasicRateSet for 802.11a/g has been assumed to be 6-12-24 Mbit/s
? cases where RTS/CTS and ACK are transmitted using HT formats are not supported
? Only ConstantRateWifiManager is supported by 802.11n or 802.11ac

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 230,247評(píng)論 6 543
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 99,520評(píng)論 3 429
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事?!?“怎么了?”我有些...
    開封第一講書人閱讀 178,362評(píng)論 0 383
  • 文/不壞的土叔 我叫張陵,是天一觀的道長(zhǎng)。 經(jīng)常有香客問我,道長(zhǎng),這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 63,805評(píng)論 1 317
  • 正文 為了忘掉前任,我火速辦了婚禮,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 72,541評(píng)論 6 412
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 55,896評(píng)論 1 328
  • 那天,我揣著相機(jī)與錄音,去河邊找鬼。 笑死,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,887評(píng)論 3 447
  • 文/蒼蘭香墨 我猛地睜開眼,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 43,062評(píng)論 0 290
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 49,608評(píng)論 1 336
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 41,356評(píng)論 3 358
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 43,555評(píng)論 1 374
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 39,077評(píng)論 5 364
  • 正文 年R本政府宣布,位于F島的核電站,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 44,769評(píng)論 3 349
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 35,175評(píng)論 0 28
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 36,489評(píng)論 1 295
  • 我被黑心中介騙來泰國(guó)打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 52,289評(píng)論 3 400
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 48,516評(píng)論 2 379

推薦閱讀更多精彩內(nèi)容