1. Install RADVD
sudo apt-get install radvd (used to send RA)
2. Creat the radvd configuration file and edit it
sudo touch /etc/radvd.conf
sudo vim /etc/radvd.conf
3. radvd configuration file
/*Stateless Autoconfiguration*/
interface eth0                #The interface used to send ADV
{  
    AdvSendAdvert on;        #Enable Advertisements
    #AdvManagedFlag on;      #Enable Managed bit
    #AdvOtherConfigFlag on;  #Enable Other Configure bit
    MinRtrAdvInterval 3;     #Set min. interval to send adv.
    MaxRtrAdvInterval 10;    #Set max. interval to send adv.
    prefix 2001:b021:002d:1001::/64    #Prefix
    {
        AdvOnLink on;        #Adv. Using Link Layer
        AdvAutonomous on;    #Autonomous Flag
#AdvRouterAddr on;
    };
};
4. Setup IPv6 routing will auto enable when OS boot
sudo vim /etc/sysctl.conf
(Remove the "#" and save and quit)
net.ipv6.conf.all.forwarding=1
5. Enable IPv6 routing now
sudo sysctl -p
(show: net.ipv6.conf.all.forwarding = 1)
6. Enable radvd now
sudo /etc/init.d/radvd start
stop, restart
7. Editing the /etc/rc.local, to make to service will run during OS booting.
sudo vim /etc/rc.local
#Enable RADVD
service radvd restart

infiniTude 發表在 痞客邦 留言(0) 人氣()

IPv6的Addressing可根據Router所發送的RA (Router Advertisement) message 中的(M bit, O bit)可分為三種狀態
(0,0) Stateless autoconfiguration -> 從Router得到prefix
(0,1) Stateless autoconfiguration -> 從Router得到prefix, 但像DHCP server要求DNS Server等其他資訊
(1,1) Stateful autoconfiguration -> 從DHCP server得到prefix以及DNS Server等其他資訊

infiniTude 發表在 痞客邦 留言(1) 人氣()

最近拿到一份source code
我的上司自己編完後 他說 有error! 他花了一個小時把它修正了
希望我們也編編看 順便 可以了解我們的程度在哪裡...
固的 很好

infiniTude 發表在 痞客邦 留言(0) 人氣()

編譯時,卻出現找不到stdio.h檔案,這明明就是一個很基本的檔案,居然找不到...
此時只要:
sudo apt-get install build-essential
就可以拉XD

infiniTude 發表在 痞客邦 留言(0) 人氣()

setenv1
在windows裡修改環境變數...
[我的電腦] -> (右鍵) [內容] -> (標籤) [進階] -> (按鈕) [環境變數]
 

infiniTude 發表在 痞客邦 留言(0) 人氣()

在有線的環境, 傳輸的信號強度不容易衰減, 而且都有hub/switch可將衰減的信號補回來. 況且當封包碰撞後, 信號強度會是碰撞前的兩倍. 所以有線環境上的所以電腦都可輕易偵測到碰撞產生. 這就可以使用collision detection.
但在無線環境下卻不是如此完美. 無線的信號很容易衰減. 而且發生碰撞後, 信號強度只增加20%. 所以無法確保所有的電腦都可偵測到碰撞產生. 因此在無線環境用的collision detection並不適用. 而另外使用一套collision avoidance的方式來避免collision的發生.

infiniTude 發表在 痞客邦 留言(0) 人氣()

https://dns-learning.twnic.net.tw/dns/03opDNS.html
DNS運作原理


DNS分為Client和Server,Client扮演發問的角色,也就是問Server 一個Domain Name,而Server必須要回答此Domain Name的真正IP地址。而當地的DNS先會查自己的資料庫。如果自己的資料庫沒有,則會往該DNS上所設的的DNS尋問,依此得到答案之後,將收到的答案存起來,並回達客戶。真正DNS的運作:有兩種詢問方法,Recursive和Iterative兩種。前面是由DNS代理去問,問的方法是用Iterative方式,後者是由本機直接做Iterative式的詢問。

Recursive(遞迴式)

Iterative(交談式)




DNS Server間的查詢模式,由Client端或是DNS Server上所發出去問,這種方式送封包出去問,所回應回來的資料不一定是最後正確的名稱位置,但也不是如上所說的回應回來是錯誤訊息,也許是另外一台DNS的位址(當該台DNS沒有答案時,會傳回一台 "權威授權者"DNS的位址)。再由Client或DNS自己向" 權威授權者"DNS詢問。 一般說來,name resolver對local DNS server都是recursive query,而DNS server之間的 query多是iterative。大部份的DNS server都可以接受recursive和iterative兩種query方式,但是考量負載問題,root name server只接受iterative query。




DNS用戶端向DNS Server的查詢模式,這種方式是將要查詢的封包送出去問,就等待正確名稱的正確回應,這種方式只處理回應回來的封包是否是正確回應或是說是找不到該名稱的錯誤訊息。問的方式是用Iterative的方式。


infiniTude 發表在 痞客邦 留言(1) 人氣()

 在Dev C++ 編譯 WinSock 產生以下的error:
  [Linker error] undefined reference to `WSAStartup@8'
  [Linker error] undefined reference to `socket@12'
  [Linker error] undefined reference to `WSACleanup@0'

infiniTude 發表在 痞客邦 留言(3) 人氣()

1
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。