首页 > 其他分享 >9、直连路由

9、直连路由

时间:2023-06-16 15:57:53浏览次数:36  
标签:直连 AR1 AR2 AR3 ip GigabitEthernet0 interface 路由

不同网段之间数据访问需要路由信息(路由表),路由就是通往目标的路径。路由表中有三种路由:直连路由、静态路由、动态路由。

直连路由一半只要在路由器接口配上ip地址,物理与协议都是up状态就可建立,不需要网络人员维护,但是直连路由无法获取与其不直接相邻的路由信息。直连路由是所有路由协议中优先级最高的

一、直连路由实际效果拓扑图

二、路由器接口ip地址基础配置

①、AR1路由器接口ip配置

<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysname AR1
[AR1]interface GigabitEthernet 0/0 #进入接口视图
[AR1-GigabitEthernet0/0]ip address 192.168.10.1 24 #配置ip地址
[AR1-GigabitEthernet0/0]quit
[AR1]quit
<AR1>sys
System View: return to User View with Ctrl+Z.
[AR1]interface Loo
[AR1]interface LoopBack 0 #进入环回接口视图
[AR1-LoopBack0]ip address 10.10.10.1 32 #环回接口配置ip地址
[AR1-LoopBack0]quit
[AR1]quit
<AR1>save
The current configuration will be written to the device. Are you sure? [Y/N]:Y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Configuration is saved to device successfully.

查看AR1接口配置信息:display ip interface brief

 注意点:环回接口是无法手动关闭的,物理接口可以关闭。

[AR1]interface GigabitEthernet 0/0 #进入接口
[AR1-GigabitEthernet0/0]shutdown #shutdown命令关闭接口
[AR1-GigabitEthernet0/0]%Jun 16 15:07:20:347 2023 AR1 IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet0/0 changed to down.
%Jun 16 15:07:20:347 2023 AR1 IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet0/0 changed to down.

[AR1-GigabitEthernet0/0]display this
#display this 查看接口装状态显示shutdown
interface GigabitEthernet0/0
 port link-mode route
 combo enable copper
 shutdown
 ip address 192.168.10.1 255.255.255.0
#
return
[AR1-GigabitEthernet0/0]undo shutdown #重新打开接口 
[AR1-GigabitEthernet0/0]%Jun 16 15:07:56:433 2023 AR1 IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet0/0 changed to up.
%Jun 16 15:07:56:433 2023 AR1 IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet0/0 changed to up.

[AR1-GigabitEthernet0/0]display this
#
interface GigabitEthernet0/0
 port link-mode route
 combo enable copper
 ip address 192.168.10.1 255.255.255.0
#
return
[AR1-GigabitEthernet0/0]

②、 AR2路由器接口ip配置

[H3C]sysname AR2
[AR2]interface GigabitEthernet 0/0
[AR2-GigabitEthernet0/0]ip address 192.168.10.2 24
[AR2-GigabitEthernet0/0]quit
[AR2]interface GigabitEthernet 0/1
[AR2-GigabitEthernet0/1]ip address 192.168.20.2 24
[AR2-GigabitEthernet0/1]quit
[AR2]interface LoopBack 0
[AR2-LoopBack0]ip address 20.20.20.2 32
[AR2-LoopBack0]quit
[AR2]quit
<AR2>save

查看AR2接口配置信息

 ③、AR3路由器接口ip配置

[H3C]sysname AR3
[AR3]interface GigabitEthernet 0/0
[AR3-GigabitEthernet0/0]ip address 192.168.20.3 24
[AR3-GigabitEthernet0/0]quit
[AR3]interface GigabitEthernet 0/1
[AR3-GigabitEthernet0/1]ip address 192.168.40.1 24
[AR3-GigabitEthernet0/1]quit
[AR3]interface LoopBack 0
[AR3-LoopBack0]ip address 30.30.30.3 32
[AR3-LoopBack0]quit
[AR3]quit
<AR3>save
The current configuration will be written to the device. Are you sure? [Y/N]:Y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Configuration is saved to device successfully.
<AR3>

查看AR3接口配置信息

 ④、PC1、PC2配置

 

标签:直连,AR1,AR2,AR3,ip,GigabitEthernet0,interface,路由
From: https://www.cnblogs.com/lvjing/p/17485737.html

相关文章

  • 关于vue2路由跳转问题记录
    1.vue路由间跳转和新开窗口的方式(query,params)路由间跳转配置:query方式:参数会在url中显示this.$router.push({path:'路由地址',query:{msg:'helloworld'}})params方式:传参数据不会在导航栏中显示,需要配合路由的name属性使用。this.$......
  • 如何分辨CN2、CTG、优化直连和国际线路?
    如何分辨CN2、CTG、优化直连和国际线路?1、国际线路国际线路顾名思义就是国外线路,国际线路对于国内用户访问不太友好,国际线路需要经过(绕道)很多个网络线路节点才能被国内用户访问,一般国际线路对于国内用户而言,有着速度慢、延迟高、丢包率高、稳定性较差等众多缺点,如国内用户......
  • 华为路由器、交换机、AC忘记密码,保留配置处理方法 密码恢复
    在不能通过telnet登录的情况下通过console线更改:通过BootROM清除Console口登录密码交换机的BootROM提供了清除Console口登录密码的功能,用户可以在交换机启动后修改Console口登录密码,然后保存配置。请按照如下步骤进行配置。第一步1.通过Console口连接交换机,......
  • Kong入门学习实践(4)负载均衡与正则路由
    最近在学习Kong网关,因此根据老习惯,我会将我的学习过程记录下来,一来体系化整理,二来作为笔记供将来翻看。由于我司会直接使用Kong企业版,学习过程中我会使用Kong开源版。本篇,我们学习快速配置一个最常见的基本功能:负载均衡与正则路由。关于负载均衡所谓负载均衡,就是通过负载均衡算......
  • Neo4j中的网络路由
    人们使用Neo4j来管理企业架构。如果你还没有看到该演讲由托马斯·劳伦斯来自Amadeus的,那么你应该为自己观看。但是低层网络呢?我们可以使用Neo4j来建模物理网络中的路由吗?当然我们可以,今天我会告诉你如何。我们将保持简单,只需要路由器,交换机,接口和服务器。路由器之间将具有“ROUTE_T......
  • v3路由配置
    importtype{RouteRecordRaw}from'vue-router';importtype{App}from'vue';import{createRouter,createWebHistory}from'vue-router';import{basicRoutes}from'./routes';import{REDIRECT_NAME}from&#......
  • Kong入门学习实践(3)路由转发
    最近在学习Kong网关,因此根据老习惯,我会将我的学习过程记录下来,一来体系化整理,二来作为笔记供将来翻看。由于我司会直接使用Kong企业版,学习过程中我会使用Kong开源版。本篇,我们学习快速配置一个最常见的基本功能:路由转发。关于路由转发路由转发是Nginx等代理软件最常见的使用场......
  • 路由守卫
    一、分类(1)全局守卫router.beforeEach全局前置守卫进入路由之前router.beforeResolve全局解析守卫(2.5.0+)在beforeRouteEnter调用之后调用router.afterEach全局后置钩子进入路由之后(2)路由独享守卫beforeEnter(3)路由组件内的守卫beforeRouteEnter进入......
  • vue路由
    1、在dos窗口下安装npminstallvue-router@3--save-dev--registry=http://registry.npmmirror.com2、配置路由①在src目录下面,新建router文件夹②然后再其中创建index.js路由文件、index.js代码importVuefrom'vue'//导入路由插件importVueRouterfrom'......
  • 路由协议EIGRP知识小结
    EIGRP(EnhancedInteriorGatewayRoutingProtocol)增强内部网关路由协议,EIGRP结合了链路状态和距离矢量型路由选择协议的Cisco专用协议,采用弥散修正算法(DUAL)来实现快速收敛,可以不发送定期的路由更新信息以减少带宽的占用,支持Appletalk、IP、IPX、Novell和NetWare等多种网络层协......