3-9 Aruba交换机实用配置-OSPF 2020

实例拓扑如下

在这里插入图片描述
在这里插入图片描述

Configure OSPF on Access-1

  1. Access a terminal session with Access-1. Move to global configuration mode.
    2.Set the router ID to 10.0.0.3. In this case, the router ID simply identifies the Access-1 to other OSPF routers. It is not an IP address. Other HPE training gives guidelines for configuring the router ID on a loopback interface so that you can ping it.
    Access-1(config)# ip router-id 10.0.0.3
  2. Move to the OSPF configuration mode.
    Access-1(config)# router ospf
  3. Create area 0.
    Access-1(ospf)# area 0
  4. Enable OSPF.
    Access-1(ospf)# enable
  5. Access each of the switch’s active VLANs. Enable OSPF and place the VLAN in area 0.
    Access-1(ospf)# vlan 11
    Access-1(vlan-11)# ip ospf area 0
    Access-1(vlan-11)# exit
    Access-1(config)# vlan 101
    Access-1(vlan-101)# ip ospf area 0
    Access-1(vlan-101)# exit
    Access-1(config)# vlan 104
    Access-1(vlan-104)# ip ospf area 0
    Access-1(vlan-104)# exit
  6. If you want, you can make VLAN 11 a passive interface, which prevents the switch making
    neighbors on the interface.
    Access-1(config)# vlan 11 ip ospf passive
  7. Verify that OSPF is enabled on the VLAN interfaces. Note that area 0 is also called the backbone
    area.
    Access-1(config)# show ip ospf interface
    OSPF Interface Status
    IP Address Status Area ID State Auth-type Cost Pri Passive

10.1.11.1 enabled backbone WAIT none 1 1 yes
10.1.101.3 enabled backbone WAIT none 1 1 no
10.1.104.3 enabled backbone WAIT none 1 1 no

Configure OSPF on Core-1

Core-1(config)# ip router-id 10.0.0.1
Core-1(config)# router ospf
Core-1(ospf)# area 0
Core-1(ospf)# enable
Core-1(ospf)# vlan 100
Core-1(vlan-100)# ip ospf area 0
Core-1(vlan-100)# vlan 101
Core-1(vlan-101)# ip ospf area 0
Core-1(vlan-101)# vlan 103
Core-1(vlan-103)# ip ospf area 0
Core-1(vlan-103)# exit

  1. Verify that OSPF is enabled on the correct interfaces.
    Core-1(config)# show ip ospf interface
    OSPF Interface Status
    IP Address Status Area ID State Auth-type Cost Pri Passive

10.1.100.1 enabled backbone WAIT none 1 1 no
10.1.101.1 enabled backbone BDR none 1 1 no
10.1.103.1 enabled backbone WAIT none 1 1 no

  1. Verify that Core-1 and Access-1 are neighbors. Check for the FULL state, which indicates the routing switches have exchanged all link state information and achieved adjacency.
    Core-1(config)# show ip ospf neighbor
    OSPF Neighbor Information
    Router ID Pri IP Address NbIfState State QLen Events Status

10.0.0.3 1 10.1.101.3 DR FULL 0 7 None

Configure OSPF on Core-2

Core-2(config)# ip router-id 10.0.0.2
Core-2(config)# router ospf
Core-2(ospf)# area 0
Core-2(ospf)# enable
Core-2(ospf)# vlan 100
Core-2(vlan-100)# ip ospf area 0
Core-2(vlan-100)# vlan 102
Core-2(vlan-102)# ip ospf area 0
Core-2(vlan-102)# vlan 104
Core-2(vlan-104)# ip ospf area 0
Core-2(vlan-104)# exit

  1. When you are finished verify that OSPF is enabled on the correct interfaces.
    Core-2(config)# show ip ospf interface
    OSPF Interface Status
    IP Address Status Area ID State Auth-type Cost Pri Passive

10.1.100.2 enabled backbone BDR none 1 1 no
10.1.102.2 enabled backbone WAIT none 1 1 no
10.1.104.2 enabled backbone WAIT none 1 1 no

  1. Core-2 should now be OSPF neighbors with Core-1 and Access-1, which are already running
    OSPF on the same networks. Verify and check for the Full state.
    If you do not see both peers, wait about 30 seconds or a minute and try again.
    Core-2(config)# show ip ospf neighbor
    OSPF Neighbor Information
    Router ID Pri IP Address NbIfState State QLen Events Status

10.0.0.1 1 10.1.100.1 DR FULL 0 6 None
10.0.0.3 1 10.1.104.3 DR FULL 0 6 None

Configure OSPF on Access-2

Access-2(config)# ip router-id 10.0.0.4
Access-2(config)# router ospf
Access-2(ospf)# area 0
Access-2(ospf)# enable
Access-2(ospf)# vlan 102
Access-2(vlan-102)# ip ospf area 0
Access-2(vlan-102)# vlan 103
Access-2(vlan-103)# ip ospf area 0
Access-2(vlan-103)# vlan 12
Access-2(vlan-12)# ip ospf area 0
Access-2(vlan-12)# ip ospf passive
Access-2(vlan-12)# exit

  1. When you are finished verify that OSPF is enabled on the correct interfaces.
    Access-2(config)# show ip ospf interface
    OSPF Interface Status
    IP Address Status Area ID State Auth-type Cost Pri Passive

10.1.12.1 enabled backbone WAIT none 1 1 yes
10.1.102.4 enabled backbone WAIT none 1 1 no
10.1.103.4 enabled backbone BDR none 1 1 no
3. Verify that Access-2 is OSPF neighbors with the two connected switches, Core-1 and Core-2. Also verify that the state is Full for each. If you do not see both peers, wait about 30 seconds or a minute and try again.
Access-2(config)# show ip ospf neighbor
OSPF Neighbor Information
Router ID Pri IP Address NbIfState State QLen Events Status


10.0.0.2 1 10.1.102.2 DR FULL 0 6 None
10.0.0.1 1 10.1.103.1 DR FULL 0 6 None

Verify the routes

  1. View routes on Access-1. You should see that the switch has learned a route to every subnet in
    your topology. You should also see that the switch has multiple routes to some destinations
    such as 10.1.12.0/24.
    Also notice the “ospf” route type and the administrative distance associated with OSPF routes.
    Access-1(config)# show ip route
    IP Route Entries
    Destination Gateway VLAN Type Sub-Type Metric Dist.

0.0.0.0/0 10.1.101.1 101 static 1 1
10.1.11.0/24 VLAN11 11 connected 1 0
10.1.12.0/24 10.1.101.1 101 ospf IntraArea 3 110
10.1.12.0/24 10.1.104.2 104 ospf IntraArea 3 110
10.1.100.0/24 10.1.101.1 101 ospf IntraArea 2 110
10.1.100.0/24 10.1.104.2 104 ospf IntraArea 2 110
10.1.101.0/24 VLAN101 101 connected 1 0
10.1.102.0/24 10.1.104.2 104 ospf IntraArea 2 110
10.1.103.0/24 10.1.101.1 101 ospf IntraArea 2 110
10.1.104.0/24 VLAN104 104 connected 1 0
127.0.0.0/8 reject static 0 0
127.0.0.1/32 lo0 connected 1 0

Access-2
3. View IP routes on Access-2 and see that it has learned routes to all subnets. You can filter the
display for just OSPF routes.
Access-2(config)# show ip route ospf
IP Route Entries
Destination Gateway VLAN Type Sub-Type Metric Dist.


10.1.11.0/24 10.1.102.2 102 ospf IntraArea 3 110
10.1.11.0/24 10.1.103.1 103 ospf IntraArea 3 110
10.1.100.0/24 10.1.102.2 102 ospf IntraArea 2 110
10.1.100.0/24 10.1.103.1 103 ospf IntraArea 2 110
10.1.101.0/24 10.1.103.1 103 ospf IntraArea 2 110
10.1.104.0/24 10.1.102.2 102 ospf IntraArea 2 110

Core-1
4. View the IP routes on Core-1.
Core-1(config)# show ip route
IP Route Entries
Destination Gateway VLAN Type Sub-Type Metric Dist.


10.1.11.0/24 10.1.101.3 101 static 1 1
10.1.12.0/24 10.1.103.4 103 static 1 1
10.1.100.0/24 VLAN100 100 connected 1 0
10.1.101.0/24 VLAN101 101 connected 1 0
10.1.102.0/24 10.1.100.2 100 ospf IntraArea 2 110
10.1.102.0/24 10.1.103.4 103 ospf IntraArea 2 110
10.1.103.0/24 VLAN103 103 connected 1 0
10.1.104.0/24 10.1.100.2 100 ospf IntraArea 2 110
10.1.104.0/24 10.1.101.3 101 ospf IntraArea 2 110
127.0.0.0/8 reject static 0 0
127.0.0.1/32 lo0 connected 1 0

  1. Remove the static routes.
    Core-1(config)# no ip route 10.1.11.0/24 10.1.101.3
    Core-1(config)# no ip route 10.1.11.0/24 10.1.100.2
    Core-1(config)# no ip route 10.1.12.0/24 10.1.103.4
  2. View the IP routing table and confirm that the OSPF routes to 10.1.11.0/24 and 10.1.12.0/24 now
    appear.
    Core-1(config)# show ip route
    IP Route Entries
    Destination Gateway VLAN Type Sub-Type Metric Dist.

10.1.11.0/24 10.1.101.3 101 ospf IntraArea 2 110
10.1.12.0/24 10.1.103.4 103 ospf IntraArea 2 110
10.1.100.0/24 VLAN100 100 connected 1 0
10.1.101.0/24 VLAN101 101 connected 1 0
10.1.102.0/24 10.1.100.2 100 ospf IntraArea 2 110
10.1.102.0/24 10.1.103.4 103 ospf IntraArea 2 110
10.1.103.0/24 VLAN103 103 connected 1 0
10.1.104.0/24 10.1.100.2 100 ospf IntraArea 2 110
10.1.104.0/24 10.1.101.3 101 ospf IntraArea 2 110
127.0.0.0/8 reject static 0 0
127.0.0.1/32 lo0 connected 1 0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值