Human0722's blog Human0722's blog
首页
  • Spring

    • Spring Framework
    • Spring Boot
    • Spring Cloud
  • CCNA
  • Vue

    • Vue2
日本语
导航
  • 分类
  • 标签
  • 归档
GitHub (opens new window)

Human0722

Gravity always win
首页
  • Spring

    • Spring Framework
    • Spring Boot
    • Spring Cloud
  • CCNA
  • Vue

    • Vue2
日本语
导航
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
  • CCNA

    • 相关文章集合
    • IOS 基础命令集
    • 静态路由实验
      • 默认路由和浮动路由实验
      • 路由协议RIPv1实验
    • CS.Content
    • CCNA
    Xueliang
    2022-05-18
    目录

    静态路由实验

    # 什么是路由器

    路由器的主要功能是路由寻址和转发数据,是一个三层设备,工作在网络层。路由技术研究的是 发送数据时寻找最佳的路径的过程.需要注意的是,路由不是基于 IP 地址来转发,而是基于网络地址转发的。

    # 静态路由配置命令

    # 路由配置命令
    Router(config) ip route 192.168.0.0 255.255.255.0 172.16.10.1
    Router(config) ip route 192.168.0.0 255.255.0.0 172.16.10.1
    
    # 端口 ip 配置命令
    Router(config) interface f0/0
    Router(config-if) ip add 192.168.31.2 255.255.255.0
    Router(config-if) no shutdown
    Router(config-if) exit
    
    1
    2
    3
    4
    5
    6
    7
    8
    9

    # 实验目标

    # 实现过程

    R1:

    Router>enable
    Router#configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    
    Router(config)#interface f0/0
    Router(config-if)#ip add 192.168.0.1 255.255.255.0
    Router(config-if)#no shutdown
    %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
    Router(config-if)#exit
    
    Router(config)#interface f0/1
    Router(config-if)#ip add 172.16.0.1 255.255.255.0
    Router(config-if)#no shutdown 
    %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
    Router(config-if)#exit
    
    Router(config)#ip route 172.16.1.0 255.255.255.0 172.16.0.2
    Router(config)#ip route 192.168.1.0 255.255.255.0 172.16.0.2
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19

    R2:

    Router>enable
    Router#configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    
    Router(config)#interface f0/0
    Router(config-if)#ip add 172.16.0.2 255.255.255.0
    Router(config-if)#no shutdown
    %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
    Router(config-if)#exit
    
    Router(config)#interface f0/1
    Router(config-if)#ip add 172.16.1.1 255.255.255.0
    Router(config-if)#no  shutdown 
    %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
    Router(config-if)#exit
    
    Router(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.2
    Router(config)#ip route 192.168.0.0 255.255.255.0 172.16.0.1
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19

    R3:

    Router>enable
    Router#configure terminal
    Enter configuration commands, one per line.  End with CNTL/Z.
    Router(config)#interface f0/0
    Router(config-if)#ip add 172.16.1.2 255.255.255.0
    Router(config-if)#no shutdown
    
    Router(config-if)#
    %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
    
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
    
    Router(config-if)#exit
    Router(config)#interface f0/1
    Router(config-if)#ip add 192.168.1.1 255.255.255.0
    Router(config-if)#no shutdown
    
    Router(config-if)#
    %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
    
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
    
    Router(config-if)#exit
    Router(config)#ip route 172.16.0.0 255.255.255.0 172.16.1.1
    Router(config)#ip route 192.168.0.0 255.255.255.0 172.16.1.1
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25

    PC1:

    PC2:

    # 查看配置的命令

    Router#show ip route  			//查看路由表
    Router#ip int brief			//查看接口IP地址
    Router#ip route static 		//查看静态路由
    Router(config)#no ip routing  //先关闭路由功能
    Router(config)#ip routing     //然后再打开路由表
    
    1
    2
    3
    4
    5
    上次更新: 2022/12/30, 16:48:05
    IOS 基础命令集
    默认路由和浮动路由实验

    ← IOS 基础命令集 默认路由和浮动路由实验→

    最近更新
    01
    DefineSprintBootStarter
    03-23
    02
    Spring MVC 启动流程分析
    03-23
    03
    Redis
    03-23
    更多文章>
    Theme by Vdoing | Copyright © 2019-2024 Human0722 | MIT License
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式