documentation:examples:ospf_inter-area_loop_prevention
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Last revision | |||
— | documentation:examples:ospf_inter-area_loop_prevention [2017/12/11 16:50] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== OSPF inter-area loop prevention ====== | ||
+ | ===== Presentation ===== | ||
+ | |||
+ | This lab show a non optimum route selection because of inter-area loop prevention feature of OSPF. | ||
+ | |||
+ | ==== Network diagram ==== | ||
+ | |||
+ | Here is the OSPF and logical view: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ===== Preparing ===== | ||
+ | |||
+ | This chapter will describe how to start the lab. | ||
+ | |||
+ | ==== Downloading BSD Router Project images ==== | ||
+ | |||
+ | [[/ | ||
+ | |||
+ | ==== Download Qemu-KVM/ | ||
+ | |||
+ | More information on these BSDRP lab scripts available on [[documentation: | ||
+ | |||
+ | ==== Starting the lab ===== | ||
+ | |||
+ | If you would to use Virtualbox, start this lab with: | ||
+ | |||
+ | < | ||
+ | |||
+ | The output should be like that: | ||
+ | |||
+ | < | ||
+ | ~>/ | ||
+ | BSD Router Project: VirtualBox lab script | ||
+ | Creating lab with 4 router(s): | ||
+ | - 0 LAN between all routers | ||
+ | - Full mesh ethernet point-to-point link between each routers | ||
+ | - One NIC connected to the shared LAN with the host | ||
+ | |||
+ | Router1 have the following NIC: | ||
+ | em0 connected to Router2. | ||
+ | em1 connected to Router3. | ||
+ | em2 connected to Router4. | ||
+ | em3 connected to shared-with-host LAN. | ||
+ | Router2 have the following NIC: | ||
+ | em0 connected to Router1. | ||
+ | em1 connected to Router3. | ||
+ | em2 connected to Router4. | ||
+ | em3 connected to shared-with-host LAN. | ||
+ | Router3 have the following NIC: | ||
+ | em0 connected to Router1. | ||
+ | em1 connected to Router2. | ||
+ | em2 connected to Router4. | ||
+ | em3 connected to shared-with-host LAN. | ||
+ | Router4 have the following NIC: | ||
+ | em0 connected to Router1. | ||
+ | em1 connected to Router2. | ||
+ | em2 connected to Router3. | ||
+ | em3 connected to shared-with-host LAN. | ||
+ | Connect to the router 1 by vnc client on port 5901 | ||
+ | Connect to the router 2 by vnc client on port 5902 | ||
+ | Connect to the router 3 by vnc client on port 5903 | ||
+ | Connect to the router 4 by vnc client on port 5904 | ||
+ | You need to configure an IP address in these range for communicating with the host: | ||
+ | inet 192.168.56.1 netmask 0xffffff00 broadcast 192.168.56.255 | ||
+ | inet6 fe80:: | ||
+ | </ | ||
+ | |||
+ | ===== Routers configuration ===== | ||
+ | |||
+ | ==== Router 1 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=R1 | ||
+ | sysrc frr_enable=yes | ||
+ | hostname R1 | ||
+ | service frr start | ||
+ | vtysh | ||
+ | conf t | ||
+ | int em2 | ||
+ | ip address 192.168.1.1/ | ||
+ | ip ospf cost 1 | ||
+ | int em0 | ||
+ | ip address 10.0.0.1/30 | ||
+ | ip ospf cost 1 | ||
+ | int em1 | ||
+ | ip address 10.0.0.5/30 | ||
+ | ip ospf cost 100 | ||
+ | router ospf | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | exit | ||
+ | wr | ||
+ | exit | ||
+ | config save | ||
+ | </ | ||
+ | ==== Router 2 ==== | ||
+ | Configure hostname: | ||
+ | |||
+ | < | ||
+ | sysrc hostname=R2 | ||
+ | sysrc frr_enable=YES | ||
+ | hostname R2 | ||
+ | service frr start | ||
+ | vtysh | ||
+ | conf t | ||
+ | int em0 | ||
+ | ip address 10.0.0.2/30 | ||
+ | ip ospf cost 1 | ||
+ | int em1 | ||
+ | ip address 10.0.0.9/30 | ||
+ | ip ospf cost 1 | ||
+ | router ospf | ||
+ | | ||
+ | | ||
+ | | ||
+ | exit | ||
+ | exit | ||
+ | wr | ||
+ | exit | ||
+ | config save | ||
+ | </ | ||
+ | |||
+ | ==== Router 3 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=R3 | ||
+ | hostname R3 | ||
+ | sysrc frr_enable=YES | ||
+ | service frr start | ||
+ | vtysh | ||
+ | conf t | ||
+ | int em0 | ||
+ | ip address 10.0.0.6/30 | ||
+ | ip ospf cost 100 | ||
+ | int em1 | ||
+ | ip address 10.0.0.10/ | ||
+ | ip ospf cost 1 | ||
+ | int em2 | ||
+ | ip address 10.0.0.13/ | ||
+ | ip ospf cost 1 | ||
+ | router ospf | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | exit | ||
+ | exit | ||
+ | wr | ||
+ | exit | ||
+ | config save | ||
+ | </ | ||
+ | |||
+ | ==== Router 4 ==== | ||
+ | |||
+ | < | ||
+ | sysrc hostname=R4 | ||
+ | hostname R4 | ||
+ | sysrc frr_enable=YES | ||
+ | service frr start | ||
+ | vtysh | ||
+ | conf t | ||
+ | int em2 | ||
+ | ip address 10.0.0.14/ | ||
+ | ip ospf cost 1 | ||
+ | int em0 | ||
+ | ip address 192.168.2.1/ | ||
+ | ip ospf cost 1 | ||
+ | router ospf | ||
+ | | ||
+ | | ||
+ | | ||
+ | exit | ||
+ | exit | ||
+ | wr | ||
+ | exit | ||
+ | config save | ||
+ | </ | ||
+ | |||
+ | ===== The problem ===== | ||
+ | |||
+ | What route will R4 take for joining network 192.168.1.0/ | ||
+ | |||
+ | < | ||
+ | R4.bsdrp.net# | ||
+ | Routing entry for 192.168.1.0/ | ||
+ | Known via " | ||
+ | Last update 00:02:12 ago | ||
+ | * 10.0.0.13, via em2 | ||
+ | </ | ||
+ | |||
+ | Notice the OSPF metric for this route: 4, this mean the route should be: R4 -> R3 -> R2 -> R1. | ||
+ | |||
+ | Great, how about a traceroute: | ||
+ | |||
+ | < | ||
+ | R4.bsdrp.net# | ||
+ | traceroute to 192.168.1.1 (192.168.1.1), | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | **Where is R2 hop ??** | ||
+ | |||
+ | Verifying the 192.168.1.0/ | ||
+ | |||
+ | < | ||
+ | R3.bsdrp.net# | ||
+ | Routing entry for 192.168.1.0/ | ||
+ | Known via " | ||
+ | Last update 00:32:13 ago | ||
+ | * 10.0.0.5, via em0 | ||
+ | </ | ||
+ | |||
+ | **R3 didn't choose the " | ||
+ | How about its OSPF database state: | ||
+ | |||
+ | < | ||
+ | R3.bsdrp.net# | ||
+ | |||
+ | OSPF Router with ID (3.3.3.3) | ||
+ | |||
+ | |||
+ | Summary Link States (Area 0.0.0.0) | ||
+ | |||
+ | LS age: 1345 | ||
+ | Options: 0x2 : *|-|-|-|-|-|E|* | ||
+ | LS Flags: 0x6 | ||
+ | LS Type: summary-LSA | ||
+ | Link State ID: 192.168.1.0 (summary Network Number) | ||
+ | Advertising Router: 1.1.1.1 | ||
+ | LS Seq Number: 80000004 | ||
+ | Checksum: 0x9456 | ||
+ | Length: 28 | ||
+ | Network Mask: /24 | ||
+ | TOS: 0 Metric: 1 | ||
+ | |||
+ | |||
+ | Summary Link States (Area 0.0.0.2) | ||
+ | |||
+ | LS age: 2456 | ||
+ | Options: 0x2 : *|-|-|-|-|-|E|* | ||
+ | LS Flags: 0x6 | ||
+ | LS Type: summary-LSA | ||
+ | Link State ID: 192.168.1.0 (summary Network Number) | ||
+ | Advertising Router: 2.2.2.2 | ||
+ | LS Seq Number: 80000001 | ||
+ | Checksum: 0x8662 | ||
+ | Length: 28 | ||
+ | Network Mask: /24 | ||
+ | TOS: 0 Metric: 2 | ||
+ | |||
+ | LS age: 1087 | ||
+ | Options: 0x2 : *|-|-|-|-|-|E|* | ||
+ | LS Flags: 0x3 | ||
+ | LS Type: summary-LSA | ||
+ | Link State ID: 192.168.1.0 (summary Network Number) | ||
+ | Advertising Router: 3.3.3.3 | ||
+ | LS Seq Number: 80000002 | ||
+ | Checksum: 0x4838 | ||
+ | Length: 28 | ||
+ | Network Mask: /24 | ||
+ | TOS: 0 Metric: 101 | ||
+ | </ | ||
+ | |||
+ | <note important> |
documentation/examples/ospf_inter-area_loop_prevention.txt · Last modified: 2019/08/10 16:44 by olivier