• ospf


    point-to-point
    mpls1# show ip ospf nei
    
    Neighbor ID     Pri State           Dead Time Address         Interface                        RXmtL RqstL DBsmL
    192.168.122.35    1 Full/Backup       34.190s 192.168.122.35  enp1s0:192.168.122.199               0     0     0
    192.168.122.164   1 Full/DR           38.262s 192.168.122.164 enp1s0:192.168.122.199               0     0     0
    
    mpls1# show ip ospf nei
    
    Neighbor ID     Pri State           Dead Time Address         Interface                        RXmtL RqstL DBsmL
    192.168.122.35    1 Full/Backup       31.700s 192.168.122.35  enp1s0:192.168.122.199               0     0     0
    192.168.122.164   1 Full/DR           35.772s 192.168.122.164 enp1s0:192.168.122.199               0     0     0
    
    mpls1# conf t
    mpls1(config)# int  enp7s0
    mpls1(config-if)# ip ospf network point-to-point
    mpls1(config-if)# router ospf
    mpls1(config-router)# network 192.168.1.0/24 area 0
    mpls1(config-router)# end
    mpls1# wr
    Note: this version of vtysh never writes vtysh.conf
    Building Configuration...
    Integrated configuration saved to /etc/frr/frr.conf
    [OK]
    mpls1# show ip ospf nei
    
    Neighbor ID     Pri State           Dead Time Address         Interface                        RXmtL RqstL DBsmL
    192.168.122.35    1 Full/Backup       39.999s 192.168.122.35  enp1s0:192.168.122.199               0     0     0
    192.168.122.164   1 Full/DR           34.070s 192.168.122.164 enp1s0:192.168.122.199               0     0     0
    192.168.122.164   1 Full/DROther      30.909s 192.168.1.4     enp7s0:192.168.1.3                   0     0     0
    
    mpls1# 

     redistribute connected

     redistribute static

    mpls1# show ip route ospf
    Codes: K - kernel route, C - connected, S - static, R - RIP,
           O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
           T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
           F - PBR, f - OpenFabric,
           > - selected route, * - FIB route, q - queued route, r - rejected route
    
    O   192.168.122.0/24 [110/1] is directly connected, enp1s0, 00:19:31
    mpls1# router ospf
    % Unknown command: router ospf
    mpls1# conf t
    mpls1(config)# router ospf
    mpls1(config-router)# redistribute connected
    mpls1(config-router)# redistribute static
    mpls1(config-router)# end
    mpls1# wr
    Note: this version of vtysh never writes vtysh.conf
    Building Configuration...
    Integrated configuration saved to /etc/frr/frr.conf
    [OK]
    mpls1# show ip route ospf
    Codes: K - kernel route, C - connected, S - static, R - RIP,
           O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
           T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
           F - PBR, f - OpenFabric,
           > - selected route, * - FIB route, q - queued route, r - rejected route
    
    O>* 192.168.1.3/32 [110/20] via 192.168.122.164, enp1s0, 00:00:12
    O>* 192.168.2.4/32 [110/20] via 192.168.122.35, enp1s0, 00:00:37
    O>* 192.168.2.5/32 [110/20] via 192.168.122.164, enp1s0, 00:00:12
    O   192.168.122.0/24 [110/1] is directly connected, enp1s0, 00:22:26
    mpls1# show run
    Building configuration...
    
    Current configuration:
    !
    frr version 7.3.1
    frr defaults traditional
    hostname mpls1
    log syslog informational
    service integrated-vtysh-config
    !
    interface enp7s0
     ip ospf network point-to-point
    !
    router ospf
     ospf router-id 192.168.122.198
     redistribute connected
     redistribute static
     network 192.168.1.0/24 area 0
     network 192.168.122.0/24 area 0
    !
    mpls ldp
     router-id 192.168.122.198
     !
     address-family ipv4
      discovery transport-address 192.168.122.198
      !
      interface enp1s0
      !
     exit-address-family
     !
    !
    line vty
    !
    end
    mpls1# 
    mpls1# show run
    Building configuration...
    
    Current configuration:
    !
    frr version 7.3.1
    frr defaults traditional
    hostname mpls1
    log syslog informational
    service integrated-vtysh-config
    !
    interface enp7s0
     ip ospf network point-to-point
    !
    router ospf
     ospf router-id 192.168.122.198
     redistribute connected
     redistribute static
     network 192.168.1.0/24 area 0
     network 192.168.122.0/24 area 0
    !
    mpls ldp
     router-id 192.168.122.198
     !
     address-family ipv4
      discovery transport-address 192.168.122.198
      !
      interface enp1s0
      !
     exit-address-family
     !
    !
    line vty
    !
    end
    mpls1# show ip ospf database router
    
           OSPF Router with ID (192.168.122.198)
    
    
                    Router Link States (Area 0.0.0.0)
    
      LS age: 9
      Options: 0x2  : *|-|-|-|-|-|E|-
      LS Flags: 0x6  
      Flags: 0x2 : ASBR
      LS Type: router-LSA
      Link State ID: 192.168.122.35 
      Advertising Router: 192.168.122.35
      LS Seq Number: 800000c5
      Checksum: 0x43cb
      Length: 48
    
       Number of Links: 2
    
        Link connected to: another Router (point-to-point)
         (Link ID) Neighboring Router ID: 192.168.122.198
         (Link Data) Router Interface address: 0.0.0.3
          Number of TOS metrics: 0
           TOS 0 Metric: 1
    
        Link connected to: a Transit Network
         (Link ID) Designated Router address: 192.168.122.199
         (Link Data) Router Interface address: 192.168.122.35
          Number of TOS metrics: 0
           TOS 0 Metric: 1
    
    
      LS age: 4
      Options: 0x2  : *|-|-|-|-|-|E|-
      LS Flags: 0x6  
      Flags: 0x2 : ASBR
      LS Type: router-LSA
      Link State ID: 192.168.122.164 
      Advertising Router: 192.168.122.164
      LS Seq Number: 8000002b
      Checksum: 0xeaf6
      Length: 36
    
       Number of Links: 1
    
        Link connected to: a Transit Network
         (Link ID) Designated Router address: 192.168.122.199
         (Link Data) Router Interface address: 192.168.122.164
          Number of TOS metrics: 0
           TOS 0 Metric: 1
    
    
      LS age: 3
      Options: 0x2  : *|-|-|-|-|-|E|-
      LS Flags: 0x3  
      Flags: 0x2 : ASBR
      LS Type: router-LSA
      Link State ID: 192.168.122.198 
      Advertising Router: 192.168.122.198
      LS Seq Number: 800000bd
      Checksum: 0x7cd0
      Length: 48
    
       Number of Links: 2
    
        Link connected to: another Router (point-to-point)
         (Link ID) Neighboring Router ID: 192.168.122.164
         (Link Data) Router Interface address: 0.0.0.3
          Number of TOS metrics: 0
           TOS 0 Metric: 1
    
        Link connected to: a Transit Network
         (Link ID) Designated Router address: 192.168.122.199
         (Link Data) Router Interface address: 192.168.122.199
          Number of TOS metrics: 0
           TOS 0 Metric: 1
    
    
    mpls1#
    root@mpls1:/home/devuser# ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 52:54:00:e5:30:19 brd ff:ff:ff:ff:ff:ff
        inet 192.168.122.199/24 brd 192.168.122.255 scope global enp1s0
           valid_lft forever preferred_lft forever
    3: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        link/ether 52:54:00:d9:52:82 brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.3 peer 192.168.1.4/32 scope global enp7s0
           valid_lft forever preferred_lft forever
        inet6 fe80::5054:ff:fed9:5282/64 scope link 
           valid_lft forever preferred_lft forever

    ecmp

  • 相关阅读:
    Java 蓝桥杯 算法训练 貌似化学
    Java 蓝桥杯 算法训练 貌似化学
    Java 蓝桥杯 算法训练 字符串的展开 (JAVA语言实现)
    Java 蓝桥杯 算法训练 字符串的展开 (JAVA语言实现)
    Java 蓝桥杯 算法训练 字符串的展开 (JAVA语言实现)
    Java 蓝桥杯 算法训练 字符串的展开 (JAVA语言实现)
    Java 蓝桥杯 算法训练 字符串的展开 (JAVA语言实现)
    JAVA-蓝桥杯-算法训练-字符串变换
    Ceph:一个开源的 Linux PB 级分布式文件系统
    shell 脚本监控程序是否正在执行, 如果没有执行, 则自动启动该进程
  • 原文地址:https://www.cnblogs.com/dream397/p/13404056.html
Copyright © 2020-2023  润新知