当前位置:网站首页>Static and floating routes
Static and floating routes
2022-07-28 07:07:00 【Peanut flavored peanuts】
Catalog
Two . The formation of routing table
6、 ... and . Router forwarding packet encapsulation process
7、 ... and . Static routing configuration
Preface
Router works in OSI The network layer of the reference model , Its important role is to choose the best path for the transmission of data packets , Has reached its destination .
One . How routers work

Forward data according to routing table
1.PC1 I want to send data to PC2, Because it is not the same network segment , therefore pc1 It can only be sent to the router of this network segment a gateway
2. The router receives a packet , View the source and destination of the packet IP, Looking at the routing table , The data from b The interface of the route is sent , Until arrival pc2 On the contrary, take the data from a The interface sends out , Until arrival pc1.
Two . The formation of routing table
Direct connection network segment
To configure ip Address , port UP state , Form a direct route
Non direct network segment
Through static and dynamic routing protocols
3、 ... and . Static routing
Manually configured by the administrator , Is one-way
Lack of flexibility
Four . Default route
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
5、 ... and . Floating route
Two or more links form a floating route
Same destination address , Different next hop addresses , The priority of the next hop is low
6、 ... and . Router forwarding packet encapsulation process

1、 Source IP192.168.10.10 Purpose IP192.168.20.10
Source MAC 11-11 Purpose MAC 22-22
First ARP Broadcast precipitation g/0/0/0 Of MAC Address , For the first time
2、 Unpack first , The purpose of viewing packets IP, Query routing table , Determine the forwarding path , Give the router 2
3、 First ARP Broadcast resolution router 2 g0/0/0 Of MAC Address , Carry out the second packaging
Source IP 192.168.10.10 Purpose IP 192.168.20.10
Source MAC 33-33 Purpose MAC 44-44
4、 Unpack first , The purpose of viewing packets IP Connect the network segment directly for yourself , adopt E0/0/1 Forward to PC2
5、 First ARP The broadcast parses PC2 Of MAC Address , Carry out the third packaging
Source IP 192.168.1.2 Purpose IP 192.168.2.2
Source MAC 55-55 Purpose MAC 66-66
7、 ... and . Static routing configuration

R1 To configure
undo t m
system-view
user-interface console 0
idle-timeout 0
q
int g0/0/0
ip add 192.168.10.1 24
int g0/0/2
ip add 192.168.50.2 24
int g0/0/1
ip add 192.168.30.3 24
q
ip route-static 192.168.60.0 24 192.168.50.1
ip route-static 192.168.20.0 24 192.168.60.2
ip route-static 192.168.40.0 24 192.168.30.1 preference 70
ip route-static 192.168.60.0 24 192.168.40.2 preference 70
ip route-static 192.168.20.0 24 192.168.60.2 preference 70
R2 To configure
system-view
user-interface console 0
idle-timeout 0
q
int g0/0/0
ip add 192.168.30.1 24
int g0/0/1
ip add 192.168.40.1 24
q
ip route-static 192.168.10.0 24 192.168.30.3 preference 70
ip route-static 192.168.60.0 24 192.168.40.2 preference 70
ip route-static 192.168.20.0 24 192.168.60.2 preference 70
R3 To configure
undo t m
system-view
user-interface console 0
idle-timeout 0
q
int g0/0/0
ip add 192.168.40.2 24
int g0/0/2
ip add 192.168.50.1 24
int g0/0/1
ip add 192.168.60.1 24
q
ip route-static 192.168.30.0 24 192.168.40.1 preference 70
ip route-static 192.168.10.0 24 192.168.50.2
ip route-static 192.168.10.0 24 192.168.30.3 preference 70
ip route-static 192.168.20.0 24 192.168.60.2
R4 To configure
system-view
user-interface console 0
idle-timeout 0
q
int g0/0/0
ip add 192.168.60.2 24
int g0/0/1
ip add 192.168.20.1 24
q
ip route-static 192.168.50.0 24 192.168.60.1
ip route-static 192.168.10.0 24 192.168.50.2
ip route-static 192.168.40.0 24 192.168.60.1 preference 70
ip route-static 192.168.30.0 24 192.168.40.1 preference 70
ip route-static 192.168.10.0 24 192.168.30.3 preference 70
test result


summary
Static configuration should be bidirectional
Floating priority setting
Packets are routed ,MAC Address reseal
边栏推荐
- Three cache technologies -- localstorage, sessionstorage, cookies
- metasploit渗透ms7_010练习
- 视频格式基础知识:让你了解MKV、MP4、H.265、码率、色深等等
- Operation document tree
- Starting point Chinese website font anti crawling technology web page can display numbers and letters, and the web page code is garbled or blank
- Archery database audit platform deployment
- Wechat applet custom compilation mode
- shell脚本——“三剑客”之awk命令
- 开虚拟机KALI2022.2下安装GVM
- Erudite Valley Learning Records] Super summary, attentive sharing | common APIs
猜你喜欢

VNC Timed out waiting for a response from the computer

Archery database audit platform deployment

Joern的代码使用-devign

Firewall - iptables firewall (four tables and five links, firewall configuration method, detailed explanation of matching rules)

Svg understanding and drawing application

Shell script -- program conditional statements (conditional tests, if statements, case branch statements, echo usage, for loops, while loops)

bond模式配置

MySQL查询父节点下面的所有子孙节点,查询用户列表时多级(公司)部门处理,根据反射,递归树形结构工具类

三层交换和VRRP

DOM operation cases
随机推荐
shell---循环语句练习
Software testing (concept)
codesensor:将代码转化为ast后再转化为文本向量
Canvas drawing 1
shell---条件语句练习
How to describe a bug and the definition and life cycle of bug level
DOM -- event chain, event bubble and capture, event proxy
As a result, fill in the birthday candles
Neo4j running error occurred during initialization of VM incompatible minimum and maximum heap sizes spec
Shell script - sort, uniq, TR, array sort, cut, Eval command configuration
Differences and relationships among NPM, Yran and NPX
Results fill in the blanks for beer and drinks
Understanding of C language EOF
MySQL build database Series (I) -- download MySQL
My deployment notes
Esxi arm edition version 1.10 update
Applet custom components - data, methods, and properties
Custom component -- data listener
Shell--第一天作业
读取xml文件里switch节点的IP和设备信息,ping设备,异常显示在列表里