当前位置:网站首页>Static routing principle and configuration
Static routing principle and configuration
2022-07-23 13:03:00 【Y firm materialist】
Catalog
The encapsulation process of router forwarding packets
Routing Overview :
route
The forwarding process from the source host to the target host
( Be able to forward packets to the right destination , And choose the best path in the forwarding process – Router )
How routers work :
Forward data according to routing table

1. The router receives data , The destination address in the view packet is 4.1, Lookup routing table
2. Router B Packet received , View the destination address of the packet , And find the routing table
How routers work
The formation of routing table static route and default route
The encapsulation process of router forwarding packets
Configuration of static route and default route
The formation of routing table
● A collection of routing entries maintained in a router
● The router chooses the route according to the routing table
The formation of routing table
Direct connection network segment
To configure IP Address , port UP state , Form Zhilian route
Non direct network segment ( For non directly connected network segments , Static or dynamic routing is required , Add network segment to routing table )

Static routing
Manually configured by the administrator , Is one-way
inflexibility

What is static routing ?
Configured by the administrator , Is one-way , And lack of flexibility , Static routing requires the administrator to write one by one , And can't respond to changes in the network , So in general , The network scale for static routing is not large 、 In a network with a relatively fixed topology , If the network topology changes , The administrator will configure it manually again
Note that it is unidirectional , If you want to configure static routes to other network segments on the router , Bidirectional configuration is required
for example , In the example above , In the router A Static routing is configured on , Just tell the router A How to get there 192.168.1.0 Network segment . If router B You need to forward the packets to the router A On the Internet , Even in the router B Configure routing on
How routers work
Forward data according to routing table
Receive packets - Check the destination address - Match with the routing table to find the forwarding port - Forward to this port
Default route ( Only in export )
When the router cannot find the routing entry of the target network in the routing table , The router forwards the request to the default routing interface ( Last section network )
( The destination is a huge set of addresses , The packet can be forwarded to the router A Of S0 Interface )
Summary
The router queries the routing table , Realize packet forwarding
There are two ways to form a routing table: static addition and dynamic learning
Static routing is the routing information manually added by the administrator .( Peer network segment )
The default route is a special static route
The encapsulation process of router forwarding packets
Source and destination address changes ( Source and purpose IP unchanged ,MAC The address is changing )
1.( Source IP192.168.1.2 Purpose 192.168.2.2 Source MAC 11-11 Purpose MAC 22-22)
First ARP The broadcast parses E0 Of MAC Address . Perform the first package
2. Router A Packet received , View packets P Goal in header eP Address , Then find your own routing table . The target of the packet P The address is 4.1, Belong to 4.0 Network segment , Lu Shan Youqi a Find... In the routing table 4.0 The interface for network segment forwarding is s0 Interface . therefore , Router A Send packets from so Interface forwarding out .
3. Every router in the network forwards data in this way , Until we reach the router B, Use the same forwarding method , from EO I'll forward it ,4.1 The host receives this packet .
Comparison between switching and routing
The encapsulation process of router forwarding packets ( a key )
summary : The whole process ip The address is the same ,mac The address has been changing by learning the forwarding principle of the router , Let's sum up the difference with the switch
The principle said , Next, I will explain how to configure static routes and default routes. By configuring routes, I am also familiar with various configuration commands of Huawei routers
First configure the host ip、 Mask , gateway
Get a router and configure the interface first ip Address int g0/0/o
IP add 192.168.1.1 24
dis ip int b l/ View interface correspondence ip Address , Interface status
ip route-static Network number subnet mask next hop ip // Static routing configuration
ip route-static 0.0.0.0 0.0.0.0 Next jump ip // Default routing configuration
dis ip routing-table // View routing table ( Learn to read the routing table )
Floating route
Routing priority ( The smaller the value, the higher the priority ) If the priority is the same, compare the measures , The smaller the measure, the better , If all are the same, load sharing . Multiple links transmit data at the same time
Direct connection 0
static state 60 Default
rospf 10
IS-IS 15
rip 10o
ospf ASE 150
IBGP 255
EBGP 255
【R1】ip route-static 192.168.1.0 24 11.0.0.2 The default priority is 60, The smaller the better
【R1】 ip route-static 192.168.1.0 24 12.0.0.2 preference 70
Configure floating routes for backup , Also static routing , Alternate path
Cancel the operation undo
Finally, verify whether the host ping through
边栏推荐
- ACL configuration instance learning record
- HCIA----07 ACL-Net
- 课程设计-推箱子C#(win form)
- Write a test case where the executable depends on.So
- Hcia---03 ENSP usage, DHCP, router
- 0 backtracking / dynamic programming medium leetcode526. Beautiful arrangement
- 0 array leetcode605. Flower planting problem
- Plug ins used by Jenkins
- TI单芯片毫米波雷达xWR1642硬件架构研究
- C randomly generate a score to judge its grade (excellent, good, medium, poor, failed)
猜你喜欢

DHCP principle and configuration

Ronge answer script production (latest in 2020)

Unity3d: script execution sequence on scene loading gameobejct

HCIA----03 eNSP使用、DHCP、路由器

User and group management, file permissions

DHCP configuration instance learning record

静态扩展配置

ACL——net

默认路由配置实例学习记录

Solution rapide: xshell ne peut pas glisser dans un dossier ou un paquet
随机推荐
Unity3d:assetbundle simulation loading, synchronous loading, asynchronous loading, dependent package loading, automatic labeling, AB browser, incremental packaging
Query the cross compiled executable dependency Library
Copy, paste and drag files between VMware virtual machine and host
Write a test case where the executable depends on.So
STP configuration instance learning record
Frame relay network configuration example learning record
0 shortest path problem leetcode743. Network delay time
OSPF single area configuration instance learning record
OSPF实验
HCIA----07 ACL-Net
问题解决:Script file ‘Scripts\pip-script.py‘ is not present.
RHCSA--文件內容瀏覽、cut、uniq、sort、.tr命令使用
Eth trunk configuration instance learning record
雷达导论专栏总目录
2020-09-20
[untitled]
RK3588编译问题集
yum安装LNMP服务部署
Rhcsa -- file content browsing, cut, uniq, sort,.Tr command use
Telnet 配置实例学习记录