当前位置:网站首页>Network layer

Network layer

2022-06-24 21:07:00 AcTarjan

Introduce

  • effect : Make heterogeneous ( The physical layer or data link layer is different ) The network realizes interconnection
  • Design thinking : Up to provide simple and flexible 、 No connection 、 Datagram service delivered as best as possible . The advantage is : The cost of the network is greatly reduced , Flexible operation mode , Can adapt to a variety of applications
  • Functions to be implemented : Routing and forwarding 、 Congestion control

SDN(Software Define Network)

  • The network layer is abstracted as the data layer responsible for forwarding ( Forwarding level ) And the control layer responsible for routing
  • SDN use Centralized control level and Distributed data layer . The two levels are separated from each other , The remote controller performs routing , adopt Openflow agreement ( Or other ways ) Add flow table ( Immediately forward to publish ) Send it to the router , The router only needs to forward packets according to the flow table , No routing function is required
  • SDN The interface provided for the developers of upper layer applications is called northbound interface , Developers call API To design your own applications ;SDN The two-way session interface established between the controller and the forwarding device is called the southbound interface ;SDN The communication interface between controllers in the controller cluster is called the East-West interface , Used to enhance the reliability and scalability of the whole control level
  • advantage :① Global centralized control and distributed high-speed forwarding ② Flexible and programmable ③ cost reduction
  • problem :① Centralized management is vulnerable , A crash will affect the entire network ② As the network grows , The controller may become the bottleneck of network performance

Routing algorithm

  • Static routing algorithm ( Non adaptive routing algorithm ): The network administrator manually configures the routing information . When the network topology or link state changes , The network administrator needs to manually modify the relevant routing information . It costs less , Suitable for simple small networks
  • Dynamic routing algorithm ( Adaptive routing algorithm ): The routing information of each router is exchanged by the routers in the network , Then it is optimized according to a certain algorithm . Computing the routing information will increase the network burden , Sometimes, the response to change is too fast to cause oscillation , Or the response is too slow to affect the consistency of the network
  • Hierarchical routing : Divide the entire Internet into many smaller autonomous systems ( An autonomous system may contain many LANs ). Each autonomous system decides its own internal routing protocol , Between autonomous systems EGP To shield the differences within the autonomous system .
  • Internal gateway protocol (Interior Gateway Protocol,IGP): Also known as intra domain routing , Specific have RIP and OSPF etc.
  • External network protocol (Exterior Gateway Protocol,EGP): Also known as inter domain routing , It is used to exchange routing information between different autonomous systems , It is also responsible for selecting the optimal path between different autonomous systems for groups . The specific agreements are BGP

Routing information protocol

  • Routing Information Protocol,RIP It is a routing protocol based on distance vector , Belongs to the application layer protocol , Use UDP Transmit data ( port 520)
  • ① Each router maintains a distance from itself to every other destination network ( Hops ), And give priority to the path close to you .
  • ② Specify the distance from a router to a directly connected network as 1, Every time you go through a router , Distance increases 1. A path can contain at most 15 Router ( That is, the maximum distance is 15). When the distance is equal to 16 when , Indicates that the network is unreachable . Because distance vector routing may lead to looping , The maximum distance is specified to prevent datagrams from continuously circulating on the loop , Reduce the possibility of network congestion
  • ③ By default, it is between adjacent routers 30s Broadcast routing information once ( The entire routing table ), In order to automatically establish and maintain the routing table . If 180s The routing information of the adjacent router has not been received , Then record this adjacent router as unreachable router
  • ④RIP Subnet mask is not supported RIP radio broadcast , therefore RIP The subnet mask must be the same for each network in the . But in the new RIP2 Variable length subnet mask and CIDR
  • Routing table entries :< Destination network N, distance d, Next hop router address X>
  • advantage : Implement a simple 、 Low overhead , The convergence process is fast
  • shortcoming :① Limit the size of the network , The maximum distance it can use is 15 ② The complete routing table is exchanged between routers , So the larger the network , The more expensive it is ③ Bad news travels slowly . When the network fails , There will be slow convergence , That is, it takes a long time to transmit this information to all routers

Open shortest path first protocol

  • Open Shortest Path First,OSPF Is a link state based routing protocol , It belongs to network layer protocol , Use it directly IP Datagram transmission , The protocol field is 89
  • ① every other 10s, Adjacent routers should be switched once Greeting group , In order to know which stations can reach
  • ② Use Database description group Exchange link status summary information with neighboring routers , And use Link status request packet Request the other party to send the details of some link state items that are missing . After a series of packet switching , The link database of the whole network synchronization is established , And then according to Dijkstra The algorithm calculates the shortest path
  • ③ When the link state of the router changes , Use the flooding method to send to all routers of the autonomous system Link status update group . Other routers are updated , happen Link status confirmation group , Reuse Dijstra The algorithm calculates the shortest path
  • ④ To ensure the synchronization of the link state database , It is required to refresh the link status in the database every other period of time , Each link state carries a 32 Bit number , The larger the serial number , The newer the State
  • ⑤ Support variable length subnet partition and unclassified addressing CIDR
  • To make OSPF It can be used on large networks ,OSPF Divide an autonomous system into smaller areas , be called Area . The routers in each region only know the complete network topology of the region , The area in the upper layer is called The main area , Responsible for connecting other lower level regions and other autonomous systems
  • advantage :①OSPF According to the IP Different service types of packets set different costs for links , Therefore, different routes can be calculated for different types of services , Very flexible ② Load balancing between multiple paths . If there are several paths to a destination network at the same cost , Then traffic can be allocated to these paths ③ No, " Bad news spreads slowly " The problem of

Border gateway protocol

  • Border Gateway Protocol,BGP It is a routing protocol based on path vector , Of or based on TCP Application layer protocol
  • ① An autonomous system selects at least one router as the router of the autonomous system BGP Spokesman ,BGP Between speakers first TCP Connect to establish BGP conversation , recycling BGP Session exchange network accessibility information ( A series of autonomous systems to reach a network )
  • ② Every BGP The speaker must run BGP Outside , Also run the internal gateway protocol used by the autonomous system
  • ③BGP Support CIDR

IPv4 agreement

IPv6 agreement

IP Multicast

Move IP

  • Move IP It's network layer protocol , Refers to moving nodes to a fixed IP Address ( Main address ) Realize roaming across different network segments , And guarantee to be based on IP The network permission of does not change during roaming
  • ① When the mobile node is in the local network , According to the tradition TCP/IP Way to communicate
  • ② When a mobile node roams to a foreign network , You need to send a message to the local agent ( Local router ) Registered care of address ( At present IP, Also called secondary address ). First, send the registration request datagram to the external agent , The external agent checks and sends it to the local agent , The local agent sends the response to the external agent

Router

原网站

版权声明
本文为[AcTarjan]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202211319437703.html