TCP/IP 详解 卷1 ch3 IP

1. IP RFC 791, unreliable and connectionless

 

2. big endian: 网络字节序

 

3. TTL : time to live, 设置了数据报可以经过的最多路由器数

 

4. 子网寻址: IP = 网络号 + 子网号 + 主机号, 缩减路由表规模

 

子网掩码 = 网络号 + 子网号 全1

 

5. 特殊的IP

 

网络号为127,主机号为任意值,均可表示loopback地址

 

6. ifconfig 命令

 

/home/a/j/nomad2:ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.1.10 netmask ffffff00 broadcast 192.168.1.255 lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 inet6 ::1/128 e1000g0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2 inet6 fe80::214:4fff:fe45:f196/10

 

7. netstat 命令

 

/home/a/j/nomad2:netstat -in Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue lo0 8232 127.0.0.0 127.0.0.1 462088 0 462088 0 0 0 e1000g0 1500 192.168.1.0 192.168.1.10 154328357 0 139467292 0 0 0 Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis lo0 8252 ::1 ::1 462088 0 462088 0 0 e1000g0 1500 fe80::214:4fff:fe45:f196/10 fe80::214:4fff:fe45:f196 154328357 0 139467293 0 0

你可能感兴趣的:(TCP/IP 详解 卷1 ch3 IP)