1 / 15

IPv6 實作

IPv6 實作. http://0rz.tw/XqQkz 張孟全老師. ADSL 升級 IPv6 Ready?. http://blog.richliu.com/2007/05/31/489/ 節錄: .... IPv6 有 128Bit 耶, 這樣我家每樣物品都給一個 IP 也用不完呀, 是不是太浪費了一點. 電視一個 IP, 電視搖控器一個, 冷氣二個, 冷氣搖控器 4 個. 棉被一個  …… 希望 Hinet 不要收回去才好. IPv6 位址表示法(native). IPv6使用128Bit的位址空間,也就是最高可有2^128的位址空

dagan
Download Presentation

IPv6 實作

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IPv6 實作 http://0rz.tw/XqQkz 張孟全老師

  2. ADSL 升級 IPv6 Ready? • http://blog.richliu.com/2007/05/31/489/ • 節錄: • .... • IPv6 有 128Bit 耶, 這樣我家每樣物品都給一個 IP 也用不完呀, 是不是太浪費了一點. 電視一個 IP, 電視搖控器一個, 冷氣二個, 冷氣搖控器 4 個. 棉被一個  ……希望 Hinet 不要收回去才好 • ....

  3. IPv6 位址表示法(native) IPv6使用128Bit的位址空間,也就是最高可有2^128的位址空 間,以16進位(2^4)表示,可寫成32組十六進位數字 • 如二進位0010在十六進位中即為2 • 0010 0000 0000 0011 即為2003 • 用以下位址為例 • 20030000000000B30000000000001234 (太長容易記錯) • >2003:0000:0000:00B3:0000:0000:0000:1234(分為八段,冒號分隔) • >2003:0:0:B3::1234(簡寫) 簡寫規則: • 每32Bit如開頭之4bit表示為0,即可省略 • 若32Bit全為0,則可簡寫為0 • 若連續完整之32Bit段落皆為0000,則可全省略,簡寫為::,但以一次為限

  4. IPv6位址表示法(IPv4 Embedded) ▲ IPv6 Address 可使用IPv4位址作為其位址的末32bit 例如: 1. 2003:0:0:B3::192.168.0.1=2003:0:0:B3::C0A8:1 2. 2003:0:0:B3:0:ffff:172.16.0.1 3. 2003:0:0:B3:0:5efe:10.10.0.1 注意,IPv4部份用句點分隔,IPv6部份用冒號分隔

  5. Basic Address Types ▲ Unicast (點對點傳輸) – Address of a single interface – Delivery to single interface – for one-to-one communication ▲ Multicast (群播傳輸) – Address of a set of interfaces – Delivery to all interfaces in the set – for one-to-many communication ▲ Anycast  (多點備援傳輸,運作機制尚在制定中) – Address of a set of interfaces – Delivery to a single interface in the set – for one-to-nearest communication – Nearest is defined as being closest in term of routing distance

  6. Unicast Address Scoping ▲ Link Local Scope: • 所有在同一個Layer2網路下的Host所使用 • 的位址空間,其位址稱為  • Link-Local Addresses ▲ Unique-Local Scope (*) • (類似IPv4的Private Address) : • 所有在一個網路管理機制下之私用網路位 • 址空間,其位址稱為 • Unique-Local Addresses ▲ Global Scope: • 可在Internet上互連之位址空間,其位址稱 • 為Global Unicast Addresses • 無IPv4 broadcast addresses

  7. 設定 IPv6 之 IP 與 routing • 手動設定 IPv6 與 routing 參考文件 • http://www.linux.org.tw/CLDP/OLD/Linux-IPv6-HOWTO-6.html • http://www.linux.org.tw/CLDP/OLD/Linux-IPv6-HOWTO-7.html • 例: • 顯示: • /sbin/ifconfig eth0 • /sbin/ip -6 route • 設定:(*1) • /sbin/ip -6 addr add 2001:288:8201:3::1a/64 dev eth0 • /sbin/ip -6 route add default via 2001:288:8201:3::1 dev eth0 • (註*1:IP部分請對照貴校IP)

  8. CentOS sysconfig ♦ Enabling gloabal IPv6 support: • /etc/sysconfig/network file: • NETWORKING_IPV6=YES ♦ Enabling IPv6 support on a particular interface • & Configure IPv6 interface address: • /etc/sysconfig/network-scripts/ifcfg-eth0 file: (*1) • IPV6INIT=yes • IPV6ADDR=2001:e30:DEAD:BEEF::103/64 •                     (2001:288:8201:3::你的桌號/64) ♦ Default Gateway: • /etc/sysconfig/network file: • IPV6_DEFAULTGW=IPv6 address[%interface] ♦ Default route configuration: • /etc/sysconfig/static-routes-ipv6 file: (*1)eth0 2001::/3 3ffe:ffff:1234:0002:0:0:0:1 (註*1:IP部分請對照貴校IP)

  9. Apache IPv6 configuration • httpd.conf (*1) • Listen [::]:80Listen [2001:db8:0::1]:80 • Access control • Order deny, allowDeny from allAllow from 2001:db8:0::/64 • (註*1:IP部分請對照貴校IP)

  10. BIND IPv6 configuration • 將支援 IPv6 的參數加上 • named.conf: • options { • listen-on {any; };listen-on-v6 {any; }; • };

  11. BIND IPv6 configuration • A sample /etc/named.conf file • options {        directory "/var/named";        listen-on-v6 { any; };};logging {        category lame-servers { null; };        category cname { null; };};zone "."                        {        type hint;        file "named.root" ;};zone "cc"      {        type master;        file "aa.cc";}; 設定檔下載:http://0rz.tw/Uyety

  12. BIND IPv6 configuration •  named.root ;; ANSWER SECTION: .                       518400  IN      NS      F.ROOT-SERVERS.NET. .                       518400  IN      NS      H.ROOT-SERVERS.NET. .                       518400  IN      NS      J.ROOT-SERVERS.NET. .                       518400  IN      NS      K.ROOT-SERVERS.NET. .                       518400  IN      NS      M.ROOT-SERVERS.NET. .                       518400  IN      NS      A.ROOT-SERVERS.NET. A.ROOT-SERVERS.NET.     3600000 IN      A       198.41.0.4 A.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:503:ba3e::2:30 F.ROOT-SERVERS.NET.     3600000 IN      A       192.5.5.241 F.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:500:2f::f H.ROOT-SERVERS.NET.     3600000 IN      A       128.63.2.53 H.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:500:1::803f:235 J.ROOT-SERVERS.NET.     3600000 IN      A       192.58.128.30 J.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:503:c27::2:30 K.ROOT-SERVERS.NET.     3600000 IN      A       193.0.14.129 K.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:7fd::1 M.ROOT-SERVERS.NET.     3600000 IN      A       202.12.27.33 M.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:dc3::35

  13. BIND IPv6 configuration •  aa.cc (*1) $TTL 3D$ORIGIN         cc.@       IN      SOA     cc.    aa.cc. (                                                2009121505                                                3H      ; refresh                                                15M     ; retry                                                1W      ; expiry                                                1D )    ; minimum         NS              aa.cc.        IN      MX      10      aa.cc.;                                    (*1)aa        IN      AAAA    2001:288:8201:3:5054:11ff:fe12:341awww     IN      AAAA    2001:288:8201:3:5054:11ff:fe12:341a6b        IN      AAAA    2001:288:8201:3:5054:11ff:fe12:341a (註*1:IP部分請對照貴校IP)

  14. vsftpd IPv6 configuration • /etc/vsftpd/vsftpd.conf • 註解下行: • # listen=YES • 將註解解除: • listen_ipv6=YES • 使用 lftp 測試 • lftp ::1

  15. Mail Server ? spam ?virus ?greylist ? http://www.rd.ipv6.org.tw/?p=737

More Related