IP TCP
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 [][] IPv4A,B,C 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 ::
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)
(--;)
IP (local host) ipconfig ifconfig (remote host) nslookup host Windows Unix Linux, MacOS, FreeBSD, Solaris DNS
IP IPDNS DHCP DHCP(Dynamic Host Configuration) DNS IP Windowsipconfig UNIXifconfig
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............ : meitaro 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 Host Address = IP Address AND Subnet Mask Default Gateway......... : 192.168.254.2 DHCP Server........... : 192.168.254.254 DHCPIP address DNS Servers........... : 192.168.254.2 DHCPDNSIP address Lease Obtained.......... : 20151030 5:21:26 Lease Expires.......... : 20151030 5:51:26
MacOSifconfig ifconfig
Loacal loopback address ()IP 127.0.0.1 localhost
IP % nslookup www.nhk.or.jp Server: 8.8.8.8 Address: 8.8.8.8#53 Non-authoritative answer: Name: www.nhk.or.jp Address: 202.214.202.101 DNS % 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:
More about IP TTL-1 (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 ICMP(Internet Control Message Protocol)
IP traceroute/tracert IPTTL(Time To Live) (255)1 TTL=0IP ICMPTTLICMP Time Exceeded traceroutettl=1ip1 3TTL=2 2 TTL=nn
ICMP~traceroute(1) UDP TTL1 TTL=0
traceroute(2) TTL1 TTL1 TTL=0ICMP time exceed
traceroute(3) ICMP Port Unreachable
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)
Routing Table RouterIP Router
()
TCP
TCP(
TCP 11
IP 2 slow
IPTCP 11
TCP/IP 11 IP IP TCP
IETF(Internet Engineering Task Force) RFC(Request for Comments)