• The router does not forward any datagrams whose destination address is a private IP address
  • A NAT router sets a global IP address to translate data between a WAN and a LAN. The port number plays a key role

Weaknesses of classified IP addresses

  • The Ip address space usage is low
  • The IP address is not flexible

  • At least the last two digits of the host id must be reserved
  • For CIDR use, the subnet number can be all 0 or all 1

  • The network segment of the router is 145.13.0.0. Packets belonging to this network segment can be accessed. The network is further divided into three subnet segments: 145.13.3.0, 145.13.21.0, and 145.13.7.0

  • All 1s are used for network ids and all 0s are used for host ids

  • Combine the IP address with the subnet mask
  • 72&192 = 64 so the network address is 141.141.64.0 8+6=14 host number
  • 72&224 = 64 so the network address is 141.141.64.0 8+5=13 host number
  • Different subnet masks and IP addresses are used to obtain different network addresses, but the effect is different

Broadcast group: the last bits are all 1s, that is, all 255

  • 252 -> 111111/00 Therefore, the first 22 digits are the network number, and the last 10 digits are the host number. Because 180 is a class B address, 22 is further subdivided. The first 16 bits are the network number and the first 6 bits are the subnet number.
  • Therefore, take the first six digits of 77 and represent it as 010011/01. Therefore, the subnet id of the host is 180.80.76.0. Since it is a broadcast address, the destination address is all 1, so 11,11111111 is 79,255

  • Next address: Which router and interface I will jump to next
  • Direct delivery: directly to the subnet connected to the router. If the destination IP address (for example, 145.13.3.10) is matched with the subnet mask one by one (if the subnet mask is 145.13.21.0, 145.13.3.0, and 145.13.7.0, the subnet mask is 255.255.255.0), the subnet network is matched. Here phase & gets 145.13.3.0, indicating that in this network segment, it can be delivered directly
  • Specific host route: This route cannot be delivered directly. If a specific host route with the same destination address exists, this route is used
  • Check whether there is a path in the routing table: Matches the destination address with the subnet mask of each row in the routing table. If a match occurs, the route is forwarded to the next address of the row
  • Default route 0.0.0.0: to another router, repeat the process
  • Discard. A forwarding packet error is reported