当前位置:网站首页>Configuration of static routes to achieve network wide accessibility
Configuration of static routes to achieve network wide accessibility
2022-07-21 04:37:00 【aweike】
Configuration of static route
(1) Common commands for configuring static routes
Configure the routing interface IP And mask :ip address IP Address Subnet mask
Such as :ip address 192.168.1.1 255.255.255.0
Configure static routing :ip route Target network Target network subnet mask Next Router Interface ip Address / Delivery outlet
( notes : The target network here refers to an address segment , Is not a IP Address )
Such as :ip route 192.168.2.0 255.255.255.0 192.168.3.1(g0/0/0)
View routing table :display ip routing-table
(2) The static route configuration experiment is as follows :
Configure static routing , Make each PC Can communicate normally , Check the routing table for analysis , To configure , Finally, test again , The whole network can reach 、
The experimental topology is shown in the figure :
First step ;
Router AR1 Configuration of each interface IP,AR2 and AR3 Empathy
AR1 The code is as follows :
<AR1>system-view
[Huawei]sysname AR2
[AR1]interface g0/0/0
[AR1-GigabitEthernet0/0/0]ip address 192.168.1.1 24 [AR1-GigabitEthernet0/0/0]q
[AR1]interface g0/0/1
[AR1-GigabitEthernet0/0/1]ip address 192.168.2.1 24
[AR1-GigabitEthernet0/0/1]q
PC1 Configuration correspondence IP Address 、 Gateway and subnet mask ,PC2,PC3 Empathy
In the figure PC1 The gateway is PC1 Connect the router AR1 The interface of GE0/0/0 Of IP Address
The second step :
test PC1 And PC2、PC3 The connectivity of
The third step :
see AR1、AR2、AR3 The routing table for , And configure static routing
AR1 The code for is as follows :
[AR1]display ip routing-table
[AR1]ip route-static 192.168.3.0 24 192.168.2.2
[AR1]ip route-static 192.168.4.0 24 192.168.2.2
[AR1]ip route-static 192.168.5.0 24 192.168.2.2
There are two direct network segments 192.168.1.0/24、192.168.2.0/24;
Add a router to reach the target network 192.168.3.0/24、192.168.4.0/24、192.168.5.0/24 Static route entry for
Looking at the routing table again, we can see that the router has reached the target network 192.168.3.0/24、192.168.4.0/24、192.168.5.0/24 Static route entry for , Configuration is successful .
AR2 The code for is as follows :
[AR2]display ip routing-table
[AR2]ip route-static 192.168.1.0 24 192.168.2.1
[AR2]ip route-static 192.168.5.0 24 192.168.4.2
There are three direct network segments 192.168.2.0/24、192.168.3.0/24、192.168.4.0/24;
Add a router to reach the target network 192.168.1.0/24、192.168.5.0/24 Static route entry for
Looking at the routing table again, we can see that the router has reached the target network 192.168.1.0/24、192.168.5.0/24 Static route entry for , Configuration is successful .
AR3 The code for is as follows :
[AR3]display ip routing-table
[AR3]ip route-static 192.168.1.0 24 192.168.4.1
[AR3]ip route-static 192.168.2.0 24 192.168.4.1
[AR3]ip route-static 192.168.3.0 24 192.168.4.1
There are two direct network segments 192.168.4.0/24、192.168.5.0/24;
Add a router to reach the target network 192.168.1.0/24、192.168.2.0/24、192.168.3.0/24 Static route entry for
Looking at the routing table again, we can see that the router has reached the target network 192.168.1.0/24、192.168.2.0/24、192.168.3.0/24 Static route entry for , Configuration is successful .
Step four :
The test again PC1 And PC2、PC3 The connectivity of
You can find PC1、PC2、PC3 Between each other ping through , It can be seen that the whole network can reach .
边栏推荐
猜你喜欢
手动安装Apache
Introduction to microservices
Process and planned task management
Douban score 9.4! Study "neural network and deep learning" with Professor Qiu Xipeng, and the class starts on July 19
JS笔试题--实现数组的flat函数
Some analysis of Beijing double line machine room
目录和文件管理
DHCP principle and configuration
Top, pgrep, pstree, jobs, at, crontab commands in process and scheduled task management
北京双线机房的一些分析
随机推荐
Mysql 安装
System safety and Application
JS基础--Math
Shell conditional testing and if statement syntax
JS基础--正则表达式
Some analysis of Beijing double line machine room
Yum local warehouse
What is FTP
VRRP虚拟路由器冗余协议
Writing greedy snake with C language array
RAID磁盘阵列
DHCP principle and configuration
微服务简介
ENSP—NAT综合实验
Development history of Beijing BGP machine room
远程访问及控制
Reflect的十三个语法学习
服务器硬件及RAID配置
磁盘管理和文件系统
将列表中的字符以逗号分割的形式提取出来