IP TCP
TCP/IP 1) TCP 2) TCPIP 3) IPLAN 4) IP パケット TCP パケット Ethernet パケット 発信元 送信先 ヘッダ 列番号 ポート番号 TCP パケットのデータ IP パケットのデータ 本当に送りたいデータ データ
IP ヘッダデータ部ヘッダデータ部ヘッダデータ部 Ethernet パケット Ethernet パケット Ethernet パケット
IP(1) 0 8 16 24 31 () Version IHL () Time To Live () Identification () Type of Service ) Flags Protocol () Source Address IP) Destination Address IP) Option ) Total of Length () Fragment Offset () Header Checksum () 1octet = 8bit
IP [][] A,B,C D,E 0 1 0 1 1 0 7 24 ネットワークホスト 14 16 ネットワークホスト 21 8 ネットワークホスト
IP IPv4 32 2 32 = 4294967296( 43) 8bit[.]10 www.asahi.com 125.56.200.185 IPv6 128 2 128 3.40 10 38 16bit [:] 16 google.com 2404:6800:4004:804:0000:0000:0000:1003 2404:6800:4004:804::1003 0000 ::
IPv4 LAN LAN
IPv4 2 address8107 2 7 2 = 126 2 24 2 = 16, 777, 214 address1621014 2 14 2 = 16, 382 2 16 2 = 65, 534 address24311021 2 21 2=2, 097, 150 2 8 2 = 254 1.x.x.x 126.x.x.x (x0255) 128.1.x.x 191.254.x.x (x0255) 192.0.1.x 223.255.254.x (x0255)
IPv4 IP privateglobal addraddress CIDR (x_x); IPv6(128bit)
(--;)
Internet SocietyWolrd IPv6 Launch http://www.worldipv6launch.org/ 201266
IP IPDNS DHCP DHCP(Dynamic Host Configuration) DNS IP Windowsipconfig UNIX ifconfig
Loacal loopback address ()IP 127.0.0.1 localhost
Windows ipconfig (1) C:\> ipconfig Windows IP Configuration Ethernet adapter : Connection-specific DNS Suffix. : localdomain IP Address............ : 192.168.254.128 Subnet Mask........... : 255.255.255.0 Default Gateway......... : 192.168.254.2 IP Address AND Subnet Mask = Host Address IP IP address
Windows ipconfig (2) C:> ipconfig /all option /all Windows IP Configuration Host Name............ : umeko Primary Dns Suffix....... : Node Type............ : Unknown IP Routing Enabled........ : No WINS Proxy Enabled........ : No DNS Suffix Search List...... : localdomain Ethernet adapter : Connection-specific DNS Suffix. : localdomain Description........... : AMD PCNet Adapter Physical Address......... : 00-0C-29-32-32-F3 Dhcp Enabled........... : Yes Autoconfiguration Enabled.... : Yes IP Address............ : 192.168.254.128 Subnet Mask........... : 255.255.255.0 Default Gateway......... : 192.168.254.2 DHCP Server........... : 192.168.254.254 DNS Servers........... : 192.168.254.2 Lease Obtained.......... : 2008430 5:21:26 Lease Expires.......... : 2008430 5:51:26 Host Address = IP Address AND Subnet Mask DHCPIP address DHCPDNSIP address
MacOSifconfig ifconfig
IP DNS Windows/MacOS % nslookup www.nhk.or.jp Server: 8.8.8.8 Address: 8.8.8.8#53 DNS Non-authoritative answer: Name: www.nhk.or.jp Address: 202.214.202.101 MacOS % host www.nhk.or.jp www.nhk.or.jp has address 202.214.202.101 www.nhk.or.jp mail is handled by 10 iron.nhk.or.jp.
router LAN LAN(IP )
1IP
(Routing Control) IP IP IP
16bitAS(065535) AS
AS
新規接続ルータルータ ルータ ルータ ルータ ルータ ルータ ルータ ルータ ルータ ルータ ルータ ルータ ルータ ルータ ルータ アクセス ポイント ルータ ルータ ルータ ルータ ルータ ルータ 電話回線
(minimum spanning tree) ICMP IP IP(TCP
IP(2) 0 8 16 24 31 () Version IHL () Time To Live () Identification () Type of Service ) Flags Protocol () Source Address IP) Destination Address IP) Option ) Total of Length () Fragment Offset () Header Checksum () TTL: Protocol:
MacOS --help man Windows -help
More about IP TTL1 (ARP) IP TTL-1 TTL-1 TTL-1
IP ICMP IP ICMP(Internet Control Message Protocol)
IP() IP addr TTL0 ICMP TTL=0 TTL-1 ICMP time exceed
ICMP IP
ping MacOS/Windows ICMP(Internet Control Message Protocol)
IP traceroute MacOS tracert Windows IPTTL(Time To Live)(255) 1TTL=0 IPICMPTTL ICMP Time Exceeded traceroute/tracert 1) 13 2) TTL=22 n) TTL=nn
ICMP traceroute(1) UDP 1. TTL1 2. TTL=0ICMP time exceed 3. 1
traceroute(2) TTL12 1. TTL1 2. 2TTL=0ICMP time exceed2
traceroute(3) 1. ICMP Port Unreachable 2.
traceroute Time Exceeded Time Exceeded Time Exceeded Time Exceeded Port Unreachable
End-to-End
RIP:Routing Information Protocol OSPF:Open Shortest Path First BGP:Border Gateway Protocol
IP(routing) default addr hop (InterFace) addr hop (InterFace) addr hop (InterFace) addr hop (InterFace)
RouterIP Router
netstat MacOS/Windows MacOS/Windows route netstat -r ()
TCP IP
TCP
TCP 11()
IP IPTCP slow
IPTCP IP + 11 TCP
TCP/IP IP11 TCP IP TCP
IETF(Internet Engineering Task Force) RFC(Request for Comments)