zoukankan      html  css  js  c++  java
  • 静态路由的简易配置

    拓扑图如下:

    我们先配置好各主机IP地址

    R1配置

      思科2811路由器默认没有千兆网接口,我们应手动添加

      en          进入特权模式

      conf  t       进入全局配置模式

      hostname R1        修改路由器名称为R1

      no ip domain-lookup  去除域名解析

      interface f0/0      进入接口f0/0

       ip addr 192.168.1.2 255.255.255.0   配置ip地址及子网掩码

      no shutdown      激活端口f0/0

      interface s1/1      进入接口s1/1

      ip addr 192.168.4.1 255.255.255.0   配置IP地址及子网掩码

      clock rate 64000          配置时钟同步频率

      no shutdown      激活端口s1/1

      interface s1/0      进入接口s1/0

      ip addr 192.168.0.1 255.255.255.0     配置IP地址及子网掩码  

      clock rate 64000          配置时钟同步频率

      no shutdown      激活端口s1/1

      exit          返回上一级(返回至全局配置模式)  

      ip route 192.168.2.0 255.255.255.0 192.168.4.2    配置到达192.168.2.0的静态路由

      ip route 192.168.3.0 255.255.255.0 192.168.0.2    配置到达192.168.3.0的静态路由

      end          返回特权模式

      copy running-config startup-config      保存配置

    R2配置

     

      en          进入特权模式

      conf  t       进入全局配置模式

      hostname R2        修改路由器名称为R2

      no ip domain-lookup  去除域名解析

      interface f0/0      进入端口f0/0

       ip addr 192.168.2.2 255.255.255.0   配置IP地址及子网掩码

      no shutdown      激活端口0/0

      interface f0/1      进入端口f0/1

      ip addr 192.168.5.1 255.255.255.0    配置IP地址及子网掩码

      no shutdown      激活端口f0/1

      interface s1/1

      ip addr 192.168.4.2 255.255.255.0    配置IP地址及子网掩码

      no shutdown

      exit           返回至特权模式

      ip route 192.168.1.0 255.255.255.0 192.168.4.1  设置到192.168.1.0的静态路由

      ip route 192.168.3.0 255.255.255.0 192.168.5.2  设置到192.168.3.0的静态路由

    R3配置

     

      en          进入特权模式

      conf  t       进入全局配置模式

      hostname R3        修改路由器名称为R3

      no ip domain-lookup  去除域名解析

      interface f0/0      进入端口f0/0

       ip addr 192.168.3.2 255.255.255.0   配置IP地址及子网掩码

      no shutdown      激活端口0/0

      interface f0/1      进入端口f0/1

      ip addr 192.168.5.2 255.255.255.0    配置IP地址及子网掩码

      no shutdown      激活端口f0/1

      interface s1/1

      ip addr 192.168.0.2 255.255.255.0    配置IP地址及子网掩码

      no shutdown

      exit           返回至特权模式

      ip route 192.168.1.0 255.255.255.0 192.168.0.1  设置到192.168.1.0的静态路由

      ip route 192.168.0.0 255.255.255.0 192.168.5.1  设置到192.168.2.0的静态路由

  • 相关阅读:
    牛客练习赛27 水图(思维+暴搜)
    差分
    矩阵化一维
    倍增法 求公共祖先
    vector 牛逼 +lower_bound+ upper_bound
    cmp和sort
    字符串的比较
    s 贪心
    太鼓达人 (有位运算的作用,但可能理解错了哈哈)
    kao shi di er ti(还没有订正)
  • 原文地址:https://www.cnblogs.com/LilacStrawberry/p/9214408.html
Copyright © 2011-2022 走看看