space_escalator @ ウィキ
http://w.atwiki.jp/space_escalator/
space_escalator @ ウィキja2012-01-30T14:54:35+09:001327902875そして終焉へ。。
https://w.atwiki.jp/space_escalator/pages/85.html
*マルチユーザが動いた
**なぜできたのか?
-複素拡散にした
まず、複素拡散・逆拡散にして、その前後に位相差分変調を挿入。
-位相差分変調にした理由
通信路で結構フェージングがあるせか、相関器が出力する値が虚部に結構いっていた。
**シングルユーザだとほぼBER=20%
だけどマルチユーザだと25%%くらい
**BERを下げる
-historyが設定されてなかった!
On Tue, Dec 22, 2009 at 12:22:29PM +0800, zhi yan wrote:
Hi All,
I am confused of the Set_history() which is a function of gr_block, what
is
the function of this function? thanks~~
It exists so that you can implement an "inline delay line", or similar
functionality. The primary user of set_history are the FIR filters,
but there is other code that uses it. The default value of history is
1, which is admittedly confusing, but is how it was historically
defined.
To give a concrete example, if you subclass gr_sync_block (which is
1:1 from input to output) and don't call set_history in the
constructor, when your work function is called with a value of
noutput_items = N, there are guarenteed to be N valid samples in the
input vector, indexed from 0 to N-1.
If in the constructor you call set_history(2), when work is called
with a value of noputout_items = N, there are guarenteed to be N + 1
valid samples in the input vector, indexed from 0 to N.
If in the constructor you call set_history(H), when work is called
with a value of noputout_items = N, there are guarenteed to be
N + H - 1 valid samples in the input vector, indexed from 0 to N + H - 2.
The other subclasses of gr_block work similarly. Take a look at their
forecast routines for the details.
On the first call to work, the first H - 1 samples will be zero.
Eric
----
2012-01-30T14:54:35+09:001327902875GNU Radio
https://w.atwiki.jp/space_escalator/pages/35.html
**開発環境
[[開発環境>http://www35.atwiki.jp/space_escalator/pages/31.html]]
**GNURadio
***[[基礎>http://www35.atwiki.jp/space_escalator/pages/36.html]]
***Pythonサンプルコード
-[[benchmark_tx.py>http://www35.atwiki.jp/space_escalator/pages/38.html]]
-[[benchmark_rx.py>http://www35.atwiki.jp/space_escalator/pages/42.html]]
-[[gr_scrambler_bb>http://www35.atwiki.jp/space_escalator/pages/44.html]]
-[[test_cdma_tx.py>http://www35.atwiki.jp/space_escalator/pages/39.html]]
-[[test_cdma_rx.py>http://www35.atwiki.jp/space_escalator/pages/67.html]]
***C++サンプルコード
-[[howto_interp_scrambler_cc>http://www35.atwiki.jp/space_escalator/pages/47.html]]
-[[howto_interp_gscrambler_cc>http://www35.atwiki.jp/space_escalator/pages/52.html]]
-[[gr_pn_correlator_ccの調査>http://www35.atwiki.jp/space_escalator/pages/51.html]]
-[[howto_decim_gdescrambler_cc>http://www35.atwiki.jp/space_escalator/pages/55.html]]
-[[howto_correlation_sink_c>http://www35.atwiki.jp/space_escalator/pages/59.html]]
-[[howto_signal_adder_cc>http://www35.atwiki.jp/space_escalator/pages/62.html]]
***課題と検討
-[[拡散について>http://www35.atwiki.jp/space_escalator/pages/63.html]]
-[[USRP2の設定>http://www35.atwiki.jp/space_escalator/pages/69.html]]
-[[RRCフィルタについて>http://www35.atwiki.jp/space_escalator/pages/70.html]]
-[[チップ同期について>http://www35.atwiki.jp/space_escalator/pages/71.html]]
-[[符号>http://www35.atwiki.jp/space_escalator/pages/73.html]]
-[[実はCDMAできてなかった!?急いでデバッグ!>http://www35.atwiki.jp/space_escalator/pages/74.html]]
-[[gmskについて>http://www35.atwiki.jp/space_escalator/pages/77.html]]
-[[bpskの実現に向けて>http://www35.atwiki.jp/space_escalator/pages/78.html]]
-[[USRP2送信波形の歪み>http://www35.atwiki.jp/space_escalator/pages/79.html]]
-[[USRP210>http://www35.atwiki.jp/space_escalator/pages/80.html]]
-[[オシロスコープ>http://www35.atwiki.jp/space_escalator/pages/81.html]]
-[[ついに1対1のCDMAが動いた。。>http://www35.atwiki.jp/space_escalator/pages/82.html]]
-[[そして終焉へ。。>http://www35.atwiki.jp/space_escalator/pages/85.html]]
***参考
-[[通信システムのディジタル変調 入門>http://cp.literature.agilent.com/litweb/pdf/5965-7160J.pdf]]
----
2012-01-27T14:36:49+09:001327642609benchmark_rx.py
https://w.atwiki.jp/space_escalator/pages/42.html
*フロー
Source → LPF → dbpsk demodulator → descrambler → access code correlator → Sink
*usrpソースの作成
self.u = usrp_options.create_usrp_source(options)
-self.u.set_decim(self._decim)
options.bitrate, self._demod_class.bits_per_symbol(),
options.samples_per_symbol, options.decim, adc_rate,
から最適なdecimationを決定した後、この関数でそれをセットする。
*LPFの作成
self.channel_filter = gr.fft_filter_ccc(sw_decim, chan_coeffs)
必要な帯域を取得する
*搬送波をセンシングする
self.probe = gr.probe_avg_mag_sqrd_c(thresh,alpha)
-thresh :in dB, will have to adjust
こいつはlpfの次に入っていて、フローグラフからははぶられている。
*Demodulator
-multiply_const_cc
#Automatic gain control
scale = (1.0/16384.0)
self.pre_scaler = gr.multiply_const_cc(scale) # scale the signal from full-range to +-1
受信信号を+1から-1の範囲で正規化
-gr.feedforward_agc_cc
#self.agc = gr.agc2_cc(0.6e-1, 1e-3, 1, 1, 100)
self.agc = gr.feedforward_agc_cc(16, 2.0)
-gr.interp_fir_filter_ccf
# RRC data filter
ntaps = 11 * samples_per_symbol
self.rrc_taps = gr.firdes.root_raised_cosine(
1.0, # gain
self._samples_per_symbol, # sampling rate
1.0, # symbol rate
self._excess_bw, # excess bandwidth (roll-off factor)
ntaps)
self.rrc_filter=gr.interp_fir_filter_ccf(1, self.rrc_taps)
波形整フィルタ
-gr.mpsk_receiver_cc
# symbol clock recovery
if not self._mm_gain_mu:
self._mm_gain_mu = 0.1
self._mm_omega = self._samples_per_symbol
self._mm_gain_omega = .25 * self._mm_gain_mu * self._mm_gain_mu
self._costas_beta = 0.25 * self._costas_alpha * self._costas_alpha
fmin = -0.1
fmax = 0.1
self.receiver=gr.mpsk_receiver_cc(arity, 0,
self._costas_alpha, self._costas_beta,
fmin, fmax,
self._mm_mu, self._mm_gain_mu,
self._mm_omega, self._mm_gain_omega,
self._mm_omega_relative_limit)
-[[gr.diff_phasor_cc>http://www35.atwiki.jp/space_escalator/pages/76.html]]
# Do differential decoding based on phase change of symbols
self.diffdec = gr.diff_phasor_cc()
差分位相偏移変調
-[[gr.constellation_decoder_cb>http://www35.atwiki.jp/space_escalator/pages/84.html]]
# find closest constellation point
rot = 1
rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
self.slicer = gr.constellation_decoder_cb(rotated_const, range(arity))
スライサー:ある入力信号において、ユークリッド距離が一番近いコンステレーションポイントが選ばれる。
bpskの場合は1or-1に近い方からそれぞれ1,0が選ばれる。
-gr.map_bb
if self._gray_code:
self.symbol_mapper = gr.map_bb(psk.gray_to_binary[arity])
else:
self.symbol_mapper = gr.map_bb(psk.ungray_to_binary[arity])
-gr.unpack_k_bits_bb
# unpack the k bit vector into a stream of bits
self.unpack = gr.unpack_k_bits_bb(self.bits_per_symbol())
送信されたビット列をバイト列にまとめる。
*相関器
self.correlator = gr.correlate_access_code_bb(access_code, threshold)
@param access_code: AKA sync vector
@type access_code: string of 1's and 0's
@param threshold: detect access_code with up to threshold bits wrong (-1 -> use default) #間違っていいビット数
@type threshold: int
gr.correlate_access_code_bb.h
*!
* \brief Examine input for specified access code, one bit at a time.
* \ingroup sync_blk
*
* input: stream of bits, 1 bit per input byte (data in LSB)
* output: stream of bits, 2 bits per output byte (data in LSB, flag in next higher bit)
*
* Each output byte contains two valid bits, the data bit, and the
* flag bit. The LSB (bit 0) is the data bit, and is the original
* input data, delayed 64 bits. Bit 1 is the
* flag bit and is 1 if the corresponding data bit is the first data
* bit following the access code. Otherwise the flag bit is 0.
*/
*シンクの作成
self.framer_sink = gr.framer_sink_1(self._rcvd_pktq)
----
2011-12-15T02:59:45+09:001323885585gr_constellation_decoder_bc
https://w.atwiki.jp/space_escalator/pages/84.html
int
gr_constellation_decoder_cb::work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
gr_complex const *in = (const gr_complex *) input_items[0];
unsigned char *out = (unsigned char *) output_items[0];
unsigned int table_size = d_sym_value_out.size();
unsigned int min_index = 0;
float min_euclid_dist = 0;
float euclid_dist = 0;
double total_error = 0;
for(int i = 0; i < noutput_items; i++){
min_euclid_dist = norm(in[i] - d_sym_position[0]);
min_index = 0;
for (unsigned int j = 1; j < table_size; j++){
euclid_dist = norm(in[i] - d_sym_position[j]);
if (euclid_dist < min_euclid_dist){
min_euclid_dist = euclid_dist;
min_index = j;
}
}
out[i] = d_sym_value_out[min_index];
if (compute_EVM)
total_error += sqrtf(min_euclid_dist);
}
if (compute_EVM){
double mean = total_error / noutput_items;
double rms = sqrt(mean * mean);
fprintf(stderr, "EVM = %8.4f\n", rms);
}
return noutput_items;
}
----
2011-12-15T02:57:49+09:001323885469iPhoneアプリ開発
https://w.atwiki.jp/space_escalator/pages/83.html
[[初心者のための情報リンク集>http://d.hatena.ne.jp/moto_maka/20110425/1303673150]]
[[知識ゼロから始めるiPhoneアプリ開発>http://d.hatena.ne.jp/glass-_-onion/20100802/1280758789]]
----
2011-12-08T22:29:06+09:001323350946トップページ
https://w.atwiki.jp/space_escalator/pages/1.html
**宇宙エスカレータ@wikiへようこそ
-しがない学生のメモ書きです。がんばっていきましょー。
-[[非線形ダイナミクス>http://www35.atwiki.jp/space_escalator/pages/14.html]]
-[[コンテキストアウェアアプリケーション>http://www35.atwiki.jp/space_escalator/pages/18.html]]
-[[LATEXの使い方>http://www35.atwiki.jp/space_escalator/pages/20.html]]
-[[SVM>http://www35.atwiki.jp/space_escalator/pages/24.html]]
-[[VNC>http://www35.atwiki.jp/space_escalator/pages/25.html]]
-[[PostgreSQL>http://www35.atwiki.jp/space_escalator/pages/27.html]]
-[[GNURadio開発>http://www35.atwiki.jp/space_escalator/pages/35.html]]
-[[講義メモ>http://www35.atwiki.jp/space_escalator/pages/37.html]]
-[[iphoneアプリ開発>http://www35.atwiki.jp/space_escalator/pages/83.html]]
----
2011-12-08T21:09:01+09:001323346141ついに1対1のCDMAが動いた。。
https://w.atwiki.jp/space_escalator/pages/82.html
*動いた。。
-なぜ動いたか
GNURadio4.Xでアップデートされたクロックリカバリー回路を用いたらBERがほぼ0に(全ビットが反転してしまう場合を除く)。
-マルチユーザはだめ?
やった!これで論文書ける!と意気込み
さて次はマルチユーザだ!とすぐさまやったが、うまく動かない。
信号が衝突してしまうせいか、全然同期がとれない。→無線で試したがやはりだめ。。
*マルチユーザへの挑戦
-なぜ動かないのか?
以下はoscilloscopeでキャプチャした画像だが、キャリア周波数がベースバンドよりもなぜか小さく(?)、
マルチユーザにしたときに減衰部分がかき消されてしまう。→検討違い。
#image(cdma_t2_195khz.png,width=400,height=315,title=ベースバンド信号の減水,left)
このキャプチャによると、キャリアらしきものは1kHzくらい。
CDMAチップレートは97.5kchip/sec(=195sample/sec÷2sample/symbol)くらい。(つまり帯域幅は100kHzくらい)
つまり、サンプル数/sec(97.5kが限界?)を小さく、1シンボルあたりのサンプル数を大きくすればいい!?
→samples/symbolが8以上だと上手く複合できない。
もっとよく調べてみたら、USRPによって受信した信号の波形が異なることが分かった。
↓1つ目のUSRPから受信した信号。
#image(ch1power_usrp1.png,width=400,height=315,title=USRPその1からの受信波形,left)
↓2つ目のUSRPから受信した信号。
#image(ch1power_usrp2.png,width=400,height=315,title=USRPその2からの受信波形,left)
↓両方のUSRPから受信した信号。
#image(ch1power_usrp1+2.png,width=400,height=315,title=USRPその1と2からの受信波形,left)
上2枚は同じスケールだが、波形が異なっていて、3枚目の図においては一方のUSRPの波形しか見えない。
シングルユーザの場合はいずれもBERはほぼないかが、上図のようなマルチユーザの場合はなぜか2番目のUSRP
からの信号しか複合できない。しかもこの場合は1チップの誤りもない。
USRPやdaughterboardを入れ替えて色々と試した結果、USRPのマザボが上図に示したような波形の違いに影響を与えていることがわかった。
-USRPの構造
こんなことを言っている人がいる。
[[I read that the RF frontend down-scales to the ADC.>http://osdir.com/ml/discuss-gnuradio-gnu/2011-05/msg00519.html]]
USRPの構造をわかりやすく説明した[[文献>http://www.snowymtn.ca/gnuradio/gnuradiodoc-4.pdf]]があった。以下要約。
・daughterboard→amp→ADC→MUX→DDC(×NCO→CIC(Decimator))→Giga Ether→Host
・NCO([[参考>http://www.google.co.jp/url?sa=t&rct=j&q=nco%2B%25E7%2584%25A1%25E7%25B7%259A&source=web&cd=1&ved=0CCQQFjAA&url=http%3A%2F%2Fwww.cqpub.co.jp%2Fdwm%2Fcontents%2F0116%2Fdwm011600710.pdf&ei=scizTpyWEsLImAXitfX2Aw&usg=AFQjCNF_eboYsNfYyg2Op9jcN2Mu2ZfH7w]])はIFからベースバンドに変換するのに用いられる。
・最終的にホストに送られるのはIチャンネルとQチャンネルのベースバンド信号(16-bit×2×25Msample/sec = 800Mbit/sec < 1Gbit/sec)。
・つまり、伝送路ではちゃんと2.45GHzの信号でmixされている。
やっぱり、USRPのマザーが受け取るのはIF帯。100MspsでADCが動いているからね。[[GNURadioより>http://www.gnu.org/software/gnuradio/doc/exploring-gnuradio.html]]
そしてそのADCを通った後はソフトウェアの世界。やっぱりDDCでIFからBasebandにしているから、そこをいじれるかが勝負!!
そしてさっき挙げた文献にこんなことが↓
We can set the IF frequency of the DDC using usrp.set_rx_freq() method
and set the decimation factor using usrp.set_decim_rate() method in Python. The decimation rate must be in [1, 256].
(でもuhd_usrp_source.hにはそんな関数はなかたよ。。)
これらの情報は全部DDC(受信側)の話だけどおそらく問題なのはDUC(送信側)だと思う。(USRPによって送信波形が異なるから)
そこを固定できるかが今後の課題だっぺ。
だがしかし。。
Two digital upconverters (DUCs) interpolate baseband signals to 100
MS/s before translating them to the selected output frequency. (EttusのUSRPN200シリーズのデータシートより)
DUCは100Ms/sに固定っぽいことが書いてあるよ。。でもそれと同時にDigital upconverters with programmable
interpolation ratesって右のFeatureに書いてある。ということは、そういうこと?
[[DUCに関するWiki>http://gnuradio.org/redmine/projects/gnuradio/wiki/UsrpFAQDUC]]
-DDCのgainを上げたら上の問題は解決
USRPのgainを99にしたら、どちらかが打ち消されるという問題は解決した。(今まではなんとgain=0になっていた。)
python uhd_cdma_rx2.py -f 2.45G -c 1 -g 99 (-g でgainをいじれる)
#image(osci_gain99.png,width=400,height=315,title=USRPその1と2からの受信波形,left)
#image(osci_gain50.png,width=400,height=315,title=USRPその1と2からの受信波形,center)
上がgain=99の場合で下がgain=50の場合、上の方が歪んでいる幅が小さいのが分かる。
-daughter board問題
以下、2端末からの混合信号を受信した際のオシロスコープの画面。
#image(osci_usrp_1+2.png,width=400,height=315,title=USRPその1と2からの受信波形,center)
値が1or-1でおかしい。daughter boardではどんな変調を行っているのか?
GNURadioのFAQで、受信側にはオフセット周波数が発生してしまうこと、実際の受信電圧を測ることはできないことがわかった。
・Why is there always a frequency offset when transmitting from one USRP to another?
It's the law of physics. There is no way to eliminate this. Digital receivers must be able to cope with this kind of error.
・How do I know the exact voltage/power of my received input signal?
This is extremely difficult. Remember that the USRP (or whatever device you're using) has several analog stages (AGC, amplifiers etc.) which all affect the power before it is passed to the A/D converter. Once you're in the digital domain, all you have is numbers .
The only way to get the exact received power is by calibrating your signal manually.
こんなのも見つけた![[GNURadioのbasebandについて>http://www.ruby-forum.com/topic/177739]]
----
2011-11-26T08:41:42+09:001322264502オシロスコープ
https://w.atwiki.jp/space_escalator/pages/81.html
[[参考>http://cp.literature.agilent.com/litweb/pdf/5989-7337JAJP.pdf]]
2011-10-21T16:42:56+09:001319182976USRP210
https://w.atwiki.jp/space_escalator/pages/80.html
**USRP210の導入
***経緯
USRP2はなぜか動作が不安定なため、USRP210を購入。
早速実験を開始しようとしたが、ななんと今までの環境(GNURadio3.2.2-1、Ubuntu9.04)では動かない。
USRP210はUHDドライバを採用していて、それに対応したAPIはGNURadio3.4以降。ソースは[[これ>http://www.raullen.net/2011/02/20/hello-usrp-n210-how-to-make-usrp-n210-running/]]。
しかもLatestバージョン(3.4は2011.09くらいにリリース)はバイナリパッケージはないから面倒。。
build-gnuradioを使ってもエラーで進まなかった。。
***今後
もはやUbuntu9.04にこだわる必要はなくなった。(面倒だった/etc/apt/sources.listの設定もしなくて済む。)
とりま、UHD及びGNURadio3.4.1を最新LinuxディストリビューションにインストールしてUSRP210を使ったサンプルプログラムを動作させねば!!
***最新版GNURadioインストール
最新版をインストールする方法は以下の二つ。
ソースは[[こちら>http://gnuradio.org/redmine/projects/gnuradio/wiki/InstallingGR]]
-built-gnuradio
バッチファイルで自動でインストールしてくれる。
UHDも自動で入れてくれる。ただし、うまくいかない場合が多い。
→built-gnuradioを以下のように編集したらできた。
#for dir in /lib /usr/lib /usr/lib64 /lib64 #86行目
for dir in /usr/lib
→このやり方が一番簡単。しかし、uhd_find_devicesやuhd_fft.pyは動作したが、benchmark_tx.py系が動かない(eth0でなくeth1を使っているのが原因か?→関係なかった)。。
[[これ>http://gnuradio.org/redmine/projects/gnuradio/wiki/FAQ#I-upgraded-to-UHD-and-now-usrp2_find_devices-usrp2_probe-doesnt-work]]が理由だって、ウケる。
同じページにこんなことも書いてあった。
The USRP N210 is incompatible with the old gr-usrp2 driver. You must install UHD and convert your applications to gr-uhd sources/sinks to use the N210.
ってことはやっぱり全部UHD用のプログラムに書き換えないとだめってことだね!
→uhd_fft.pyのコードを参考にすれば簡単に出来た。
-ソースからビルド
インストールマニュアルは[[ここ>http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall]]。
UHDをソースビルドする前にインストールする必要がある。
UHDは以下のコマンドでインストール可。
git clone git://code.ettus.com/ettus/uhd.git
cd <uhd-path>/host
mkdir build
cd build
cmake ../
make
make test
sudo make install
uhd_find_devices
デフォルトのUSRP210のファームウェアが適合していない場合は[[ここ>http://code.ettus.com/redmine/ettus/projects/uhd/wiki]]からファームウェア及びFPGAイメージをダウンロード
----
2011-10-19T17:35:31+09:001319013331追加したIntelのNICが動かない件
https://w.atwiki.jp/space_escalator/pages/32.html
**追加したIntelのNICが動かない件
***driver名:e1000e:Network Adapter Driver for PCI-E Gigabit Network Connections under Linux*
***[[dl元>http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=3025&DwnldID=15817&ProductFamily=%E3%83%8D%E3%83%83%E3%83%88%E3%83%AF%E3%83%BC%E3%82%AF%E3%83%BB%E3%82%B3%E3%83%8D%E3%82%AF%E3%83%86%E3%82%A3%E3%83%93%E3%83%86%E3%82%A3%E3%83%BC&ProductLine=%E3%82%A4%E3%83%B3%E3%83%86%E3%83%AB%C2%AE+%E3%83%87%E3%82%B9%E3%82%AF%E3%83%88%E3%83%83%E3%83%97%E3%83%BB%E3%82%A2%E3%83%80%E3%83%97%E3%82%BF&ProductProduct=Intel%C2%AE+Gigabit+CT+Desktop+Adapterjpn]]
***[[Intelドライバに関するサポート>http://www.intel.com/support/network/sb/cs-008441.htm]]
***以下の通りにやったらできた([[source>http://support.ap.dell.com/support/edocs/network/intelpro/r195641/ja/e1000.htm]])
-ドライバ CD の 'Linux/Source/base_driver/e1000e-<x.x.x>tar.gz' からベース ドライバの tar ファイルを選択したディレクトリにコピーします。<x.x.x> は、ドライバの tar ファイルのバージョン番号です。 たとえば、 '/home/username/e1000e' または '/usr/local/src/e1000e' などが使用できます。
-アーカイブを解凍します。(<x.x.x> は、ドライバ tar のバージョン番号です。)
tar zxf e1000e-<x.x.x>.tar.gz
-ドライバの src ディレクトリに変更します。(<x.x.x> は、ドライバ tar のバージョン番号です。)
cd e1000e-<x.x.x>/src/
-ドライバ モジュールをコンパイルします。
make install
バイナリが以下のとおりインストールされます。
/lib/modules/<カーネル バージョン>/kernel/drivers/net/e1000e/e1000e.ko
上記のインストールの場所はデフォルトの場所です。 使用している Linux によっては、上のインストール場所が適切でない場合もあります。 詳細については、ドライバの tar ファイルに含まれている ldistrib.txt ファイルを参照してください。
-insmod または modprobe コマンドを使用してモジュールをインストールします。
modprobe e1000e
insmod e1000e
注: 2.6 カーネルでは、ドライバ モジュールのフルパスが指定された場合に insmod を使用できます。 例:
insmod /lib/modules/<カーネル バージョン>/kernel/drivers/net/e1000e/e1000e.ko
-2.6 ベースのカーネルでは、新しいモジュールを読み込む前に古い e1000e ドライバがカーネルから削除されていることを確認してください。
rmmod e1000e; modprobe e1000e
-以下のように入力してイーサネット インターフェイスに IP アドレスを割り当ててアクティブにします。(<x> はインターフェイス番号です。)
ifconfig eth<x> <IP アドレス>
-インターフェイスが機能することを確認します。 以下のように入力します。(<IP アドレス> はテストするインターフェイスと同一のサブネット上にある別のコンピュータの IP アドレスです。)
ping <IP アドレス>
**IPマスカレードがうまくいかない件1
/etc/sysconf/iptableに以下の設定を追加
-A POSTROUTING -o eth0 -j MASQUERADE
-A POSTROUTING -s 192.168.0.1/24 -j MASQUERADE
※eth0:Global側、192.168.0.1:ローカル側
これだけだとIPマスカできなかった。。調査によると
echo 1 >/proc/sys/net/ipv4/ip_forward
を実行し、ip_forwardを有効にするとできるらしい。できた!
あとはDNSだけ。。
**IPマスカレードがうまくいかない件2
icmpのエラーがデフォルトゲートから返ってきてしまう。
iptableの設定でFORWARDが全てReject with icmp 的な感じになっていた。
これをとったらちゃんとパケット通ったが、セキュリティが危ない。。
**IPマスカレードがうまくいかない件3
Gnuradio端末のパケットがゲートを通れない。(ネットが見れない。。)
FORWARDの設定がだめ?pingのアクセスもlan内からだとできない。
なぜか「IPマスカレードがうまくいかない件1」においてまた0に書きかえられたいた。。
**IPマスカレード
#image(ipmasq-html1x.gif)
**Broadcom製のドライバ
[[リンク>http://www.broadcom.com/support/ethernet_nic/downloaddrivers.php]]
**ethtool
ネットワークインターフェースの状況が分かる便利なコマンド
こいつでethtool -i eth2とかやるとそのNICのドライバの情報が分かる。
----
2011-10-13T14:54:16+09:001318485256