美文网首页
eNSP二:OSPF

eNSP二:OSPF

作者: 沿哲 | 来源:发表于2020-09-13 08:43 被阅读0次

任务

  • 按标示配置IP地址
  • 配置OSPF路由协议,全网互通,
  • OSPF进程ID=1
配置图

AR2路由器配置

  1. 基础配置 GE 0/0/0和GE 0/0/1
[R2]int g0/0/0 \\int是interface简写,软件可以识别
[R2-GigabitEthernet0/0/0]ip add 10.1.12.2 24
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 10.1.23.0 24
  1. 环路接口配置
[R2]int loo0  \\int是interface简写,loo0是loop 0简写
[R2-LoopBack0]ip add 2.2.2.2 0.0.0.0
  1. OSPF
[R2]ospf 1  \\这里设定OSPF进程ID为1
[R2-ospf-1]area 1
[R2-ospf-1-area-0.0.0.1]network 10.1.24.0 0.0.0.255
[R2]ospf 1  \\这里设定OSPF进程ID为1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 10.1.12.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.1.23.0 0.0.0.255
  1. 配置好后(注:这里省去了其它路由器的配置,当其它路由器全部正确配置后路由表如下~
[R2]dis ip routing-table 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 18       Routes : 18       

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        1.1.1.1/32  OSPF    10   1           D   10.1.12.1       GigabitEthernet
0/0/0
        2.2.2.2/32  Direct  0    0           D   127.0.0.1       LoopBack0
        3.3.3.3/32  OSPF    10   2           D   10.1.12.1       GigabitEthernet
0/0/0
        4.4.4.4/32  OSPF    10   1           D   10.1.24.4       GigabitEthernet
0/0/2
      10.1.12.0/24  Direct  0    0           D   10.1.12.2       GigabitEthernet
0/0/0
      10.1.12.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
    10.1.12.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/0
      10.1.13.0/24  OSPF    10   2           D   10.1.12.1       GigabitEthernet
0/0/0
      10.1.23.0/24  Direct  0    0           D   10.1.23.2       GigabitEthernet
0/0/1
      10.1.23.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
    10.1.23.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/1
      10.1.24.0/24  Direct  0    0           D   10.1.24.2       GigabitEthernet
0/0/2
      10.1.24.2/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
    10.1.24.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
0/0/2
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0

相关文章

网友评论

      本文标题:eNSP二:OSPF

      本文链接:https://www.haomeiwen.com/subject/hfctektx.html