Computer Network Chapter 4 Network Layer Final Exam (Key Points)

Table of contents

1. ARP protocol

Two, IP address composition, IP address classification, private address

1. IP address group

2. IP address classification

3. Private address

3. Calculation of subnetting, subnet mask, network address and broadcast address

  1 Subnetting

  2 subnet mask

  3 Network address calculation

 4. Broadcast address calculation

Fourth, given the IP address range, CIDR address blocks can be assigned to each department

        1 unclassified address CIDR

        2. Form a supernet

Five, IP Fragmentation

1. IP datagram format

 2. IP datagram fragmentation

1. Maximum transmission unit MTU

Six, the classification of routing protocols (IGP and EGP)

Seven, the main points of RIP protocol and OSPF protocol, the basic principle of BGP

1. RIP protocol

1. Basic information

 2. Distance:

 3. Features

 4. Distance vector algorithm

 2. OSPF protocol

1. Basic concepts

2. Link state routing algorithm

 3. BGP protocol

 4. Comparison of three protocols

 Eight, key examples after class


1. ARP protocol

Address Resolution Protocol ARP (Address Resolution Protocol)

Solve the problem: Already know the IP address of a machine (host or router), you need to find out its corresponding MAC address.

Solution: Store a mapping table from IP address to MAC address in the ARP cache of the host, and this mapping table is often updated dynamically.

ARP cache (ARP cache): stores the mapping table from the IP address to the MAC address of each host and router in the local area network.

step:

1: When host A sends an IP datagram to a certain host B under the local area network, it first checks whether there is an IP address of host B in its ARP notification cache. If so, find out its corresponding MAC address in the ARP cache, then write the MAC address into the MAC frame, and then send the MAC frame to the MAC address through the LAN.

2: If not, use frame encapsulation with destination MAC address FF-FF-FF-FF-FF-FF and ARP broadcast to send ARP request packet

3: All hosts running ARP process receive ARP request packet

4: Host B finds that the query is consistent, and sends an ARP response packet to A (unicast)

5: After receiving it, A writes the mapping from the IP to the MAC

 eg1: The host sends an IP datagram to host B, which passes through 5 routers. How many times does the ARP protocol be used in this process?

 6 times

Two, IP address composition, IP address classification, private address

1. IP address composition

 

 2. IP address classification

 

 3 private address

Addresses are divided into private addresses and public addresses according to their usage. The so-called private address is the IP address reserved among the three types of IP addresses A, B, and C to allocate addresses for the internal network of the enterprise.

Class A: The first segment is 10 are all private addresses 10.0.0.1 --- 10.255.255.254 10.0.0.0 means the entire network segment, 10.255.255.255 is the broadcast address

Class B: private addresses starting with 172.16 172.31 --- 172.16.0.1 --- 172.31.255.254 172.16.0.0 means the entire network segment, 172.31.255.255 is the broadcast address

Class C: All addresses starting with 192.168 are private addresses 192.168.0.1 --- 192.168.255.254 192.168.0.0 means the entire network segment, and 192.168.255.255 is the broadcast address

3. Calculation of subnetting, subnet mask, network address and broadcast address

  1 Subnetting

IP address: network number subnet number host number

Notice:

Dividing the subnet is just to divide the host number of the IP address again, without changing the original network number of the IP address.

Addresses whose host numbers are all 0s or all 1s in the subnet cannot be assigned. All 0s are the network number of the subnet, and all 1s are the broadcast address of the subnet

  2 subnet mask

 The network number and subnet number are 1, and 0 corresponds to the host number

Each entry in the routing table not only gives the destination network address and next hop address, but also gives the subnet mask of the destination network at the same time.

  3 Network address calculation

eg1

141.14.64.0 (Soyo)

4. Broadcast address calculation

eg2

 255.255.252.0

252:11111100 16-digit network number, 6-digit host number, and 10-digit host number

180.80.77.55:

77:010011 01 becomes 01001111 (broadcast address host number all 1)

180.80.79.255

choose D

4. Given the IP address range, CIDR address block
1 non-classified address CIDR can be allocated to each department

CIDR (Classless Inter-Domain Routing): Classless inter-domain routing.

1. Eliminate the traditional concept of Class A, Class B, Class C addresses and subnetting

2. Integrate subnet address and subnet mask to facilitate subnet division

eg:192.199.170.82/27

192.199.170 has 24 bits

82: 010 10010 The first three digits of the network prefix

192.199.170.64

192.199.170.95

2. Form a supernet

Aggregating multiple subnets into a larger subnet is called supernetting, or route aggregation.

Method: shorten the network prefix

Choose the longest network prefix route

The longer the prefix, the smaller the address block and the more specific the route

 (192.16.5.)0

248:11111000 5 subnet numbers, 3 host numbers

The maximum number of subnets is 2^5, and 2 is not subtracted because CIDR can be all 0 and all 1

2^3-2=6

Five, IP Fragmentation

1. IP datagram format

The total length unit is 1B, the slice offset unit is 8B, and the header length unit is 4B.

 2. IP datagram fragmentation

1. Maximum transmission unit MTU

The upper limit of the data that can be encapsulated in the link layer data frame

The MTU of Ethernet is 1500 bytes

 Flag: Fragments of the same datagram use the same flag

Flag: only two significant X--

meditope DF

DF=1: Disable Fragmentation

DF=0: Fragmentation allowed

MF

MF=1: There are fragments behind

MF=0: represents the last piece

Slice Offset: Indicates the relative position of a certain slice in the original packet after fragmentation of a longer packet

Take 8B as the unit

eg:

Six, the classification of routing protocols (IGP and EGP)

Autonomous system AS:

IGP: (Interior Gateway Protocol) Interior Gateway Protocol

A routing protocol used within an autonomous system

Commonly used in: RIP, OSPF

EGP: (External Gateway Protocol) External Gateway Protocol

Protocol used when routing between different autonomous systems

Most used: BGP-4

Seven, the main points of RIP protocol and OSPF protocol, the basic principle of BGP

1. RIP protocol

1. Basic information

RIP (Routing Information Protocol) is a distributed routing protocol based on distance vector.

A standard protocol for the Internet.

Biggest advantage: simplicity.

Each router in the network is required to maintain a record of the distance from itself to every other destination network .

 2. Distance:

 

 3. Features

 4. Distance vector algorithm

 eg1:

 2. OSPF protocol

1. Basic concepts

Open Shortest Path First OSPF protocol

The main feature is the use of a distributed link state protocol

features

RIP protocol every 30s

2. Link state routing algorithm

 3. BGP protocol

 4. Comparison of three protocols

 Eight, key examples after class

 

 The IP address is to assign a unique 32-bit identifier worldwide to each host (or router) connected to the Internet. Therefore, the entire Internet is regarded as a single, abstract network. When transmitting data frames on the actual network link, the hardware address must be used in the end.

The MAC address is consistent with the hardware to a certain extent. Based on physics, it can mark the specific link communication object. The IP address is divided into logical domains and is not limited by the hardware.

 Answer: When allocating network prefixes, the prefixes with more addresses should be allocated first. LAN1 should have at least 3 hosts. This question depends on how many hosts there are on the LAN, and how many hosts need to be reserved for the hosts in your network to use. The answer is not unique, and I only wrote one of them.
LAN1: 30.138.119.192./29
LAN2: 30.138.119.0/25
LAN3: 30.138.118.0/24
LAN4
: 30.138.119.200/29 LAN5: 30.138.119.128/26
/29: LAN1, LAN4 each have 8 IP addresses
/26 :LAN5 has 64 addresses
/25:LAN2 has 128 addresses
/24:LAN3 has 256 addresses

 Answer: This question is almost the same as 25, so I don’t need to explain too much, just see if you have enough host seats for the number of hosts you need.
LAN1:192.77.33.0/26
LAN2:192.77.33.192/28
LAN3:192.77.33.64/27
LAN4:192.77.33.208/28
LAN5:192.77.33.224/29
LAN6:192.77.33.128/27
LAN7:1 92.77.33.192/27
LAN8 :192.77.33.224/27

 IGP: Routing protocol used internally in an autonomous system; strives for optimal routing

EGP: Convenient use of routing protocols in different autonomous systems; strive for better routing

EGP must consider other aspects of the policy requiring multiple routes. Accessibility may be more important in terms of cost

IGP: Interior Gateway Protocol, which only cares about how to transmit datagrams in this autonomous system, and has nothing to do with the protocols used by other autonomous systems in the Internet.

EGP: Exterior Gateway Protocol, a protocol that transmits routing information at different AS boundaries, regardless of which protocol is used inside the AS

RIP only exchanges information with neighboring stations, there is no reliable guarantee when using UDP, but the overhead is small, which can meet the requirements of RIP

OSPF uses a reliable flooding method and directly uses IP, which is flexible and has low overhead

BGP needs to exchange the entire routing table and update information, TCP provides reliable delivery to reduce bandwidth consumption

RIP uses UDP that does not guarantee reliable payment, so it must constantly exchange information with neighboring stations to update routing information in time, but BGP uses TCP that ensures reliable payment, so there is no need to do so.

 Solution: Here is how many addresses are needed, just leave 2 n 2^n2 
n
 addresses, where n represents the number of host bits. 2 n 2^n2 
n
 must be greater than the required number of addresses.
Address block of N1 (/25): first address: 14.24.74.0; last address: 14.24.74.127
address block of N2 (/26): first address: 14.24.74.128; last address: 14.24.74.191
address block of N3 (/ 28): first address: 14.24.72.192; last address: 14.24.74.207
 

Guess you like

Origin blog.csdn.net/toufachangdehen/article/details/128954142