Video Address: https://ilearningx.huawei.com/courses/course-v1:HuaweiX+EBGTC00000336+Self-paced/courseware/abb0c18f777b4cb0902bb98820dd02c0/be1d7c0fbb4e491bb85ecaf86c4c0bd2/
3.IP addressing and packet Comments
3.1 Introduction
Located between the network layer and the transport layer, the data link layer. The network layer contains a number of agreements, of which the most important is the IP protocol. The network layer provides IP routing capabilities. Understanding the IP Routing IP protocol in addition to the familiar working mechanism must also be prepared to understand IP and how rational use IP addresses to network design.
3.2 goals
- Master IP packet structure
- Grasp the scope of the total IP addresses, IP addresses and private IP addresses special
- Master the technology VLSM
- Understand the role of the gateway
3.3 IP packet header
Version:ipv4、ipv6
DS Field :
Total Length: the entire length of the message
Some portions of the relevant fragments: Identification, Flags, Fragment Offset
TTL: Life Cycle
Protocol: protocol agreement, the decision to use the top of what
Header Checksum: header checksum
SIPA: source IP address
DIPA: Destination IP address
IP Options: Options
3.4 IP addressing
- IP addresses are divided into the network portion and the host portion
- IP address consists of 32 binary bits
Network Address: Host bits are all 0, when the network address
Broadcast address: Host bits are all 1
Do not use the host network address and broadcast address as its own IP address
3.5 binary and decimal conversion
3.6 IP address classification
Private address range
10.0.0.0~10.255.255.255
172.16.0.0~172.31.255.255
192.168.0.0~192.168.255.255
Special Address
127.0.0.0~127.255.255.255
0.0.0.0 means any network
255.255.255.255
3.7 Subnet Mask
ip address and subnet mask phase to give the ip address is a network address.
- Phase 1 and 0: 0
- Phase 1 and 1: 1
- Phase 0 and 0: 0
Default subnet mask:
- Class A: 255.0.0.0
- Class B: 255.255.0.0
- Class C: 255.255.255.0
Address planning 3.8
- n is the host bits
- 2 can be reduced because the number of hosts for the network and can not be used for the broadcast.
3.9 has compiled class IP flaw
There are classes using the IP address network design is wasteful address
3.10 Variable Length Subnet Masks
- From the host bits to make the subnet numbers borrow, borrow at least two.
- N bits available to borrow 2 ^ n subnets
3.11 Inter-Domain Routing CIDR
3.12 Gateway
From the gateway used to forward packets between different network segments
3.13 slice
When the packet is larger than the maximum transmission unit, it would be fragmented (divided packets).
- Identification: Indicates whether from the same package
- Flags:
- R: Reserved Unused
- DF: If this is 1, indicating that this packet without fragmentation
- MF: more fragment as 1, indicating that it is not the last one, 0 indicates that it is the last one
- Fragment Offset: Offset sheet, which used to mark the location of the current packet is a complete packet
3.14 the TTL
- TTL:Time To Live
- Layer device through a packet, TTL will subtract 1 each, when 0 is not the destination address, the packet is discarded
3.15 protocol number
Description upper layer protocol used: a common UDP, TCP, ICMP, IGMP, IGP, etc.