• Kiếm tiền với Hostinger

    Kiếm Tiền Cùng Hostinger

    Bạn đang tìm kiếm cách kiếm thêm thu nhập online? Hãy tham gia ngay chương trình Affiliate của Hostinger! Với mỗi khách hàng đăng ký thông qua liên kết của bạn, bạn sẽ nhận được khoản hoa hồng hấp dẫn.

    Hostinger cung cấp các dịch vụ lưu trữ web (hosting) chất lượng cao với mức giá cạnh tranh, giúp bạn dễ dàng giới thiệu và thu hút người dùng.

    Đừng bỏ lỡ cơ hội tuyệt vời này để tăng thêm thu nhập thụ động.

    Tham Gia Ngay

ROSv7 – OSPF Basic Configuration – RFC

TigerDao

Administrator
Thành viên BQT


Introduction​


In ROSv7 there are both significant improvements and significant changes in the syntax to get OSPF working. For example, OSPF IPv4 and IPv6 are now both configured in the same place (this tutorial will focus on IPv4). This tutorial is using a small WISP as the example, but it’s applicable to any basic OSPF setup. To shorten this article, we will assume that the most basic settings (internet connection, System ID, ect.) have already been configured. If you need help setting those things up, please refer to one of the other tutorials.



Order of Operations​


Here are the Order of Operations as I see them:

1) Add all link IP address to their respective interfaces

2) Create a loopback interface

3) Add the loopback interface IP address as well

4) Set the Rotuer ID

5) Create the OSPF Instance

6) Create the OSPF Area

7) Create an Interface Template for each interface that is participating

8) Check the Neighbors and make sure that all neighbors are connected and in a full state

9) Check the Main Routing Table and make sure the correct routes are there



Network Diagrams​




ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg


1691649487_258_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg


1691649488_105_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg


Step by Step Procedures:​




1) Add all link IP address to their respective interfaces​


For Example: the Gateway Router has 4 link IPs. The CLI systax for this is as follows:

/ip address
add address=10.10.10.1/30 interface=ether3 network=10.10.10.0
add address=10.10.10.9/30 interface=ether2 network=10.10.10.8
add address=10.10.10.17/30 interface=ether5 network=10.10.10.16
add address=10.10.10.25/30 interface=ether4 network=10.10.10.24


In Winbox, navigate to IP -> Addresses and then add a new address:



1691649488_389_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg




2) Create a loopback interface​


Technically, this step is optional, but it is definitely best practice to use a loopback and for the address of the loopback to be the same as the RouterID. In this useage of the term, a loopback interface is a “free floating” interface that never goes down. Let’s say we had a tunnel on our network and OSPF had redundent paths, then the tunnel would immediately reform after the primary path OSPF had chosen failed and that whole process becomes an automatic behaivor of OSPF. Notice also that I specified this loopback as being an OSPF loopback. This is also optional, but when you are setting up more complicated networks, this becomes very useful.

The CLI systax for this is as follows:

/interface bridge
add name=Loopback


In Winbox, navigate to Bridge and then add a new bridge by simply giving it a name:



1691649488_749_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg




3) Add the loopback interface IP address as well​


The CLI systax for this is as follows:

/ip address
add address=172.16.0.1 interface=Loopback network=172.16.0.1


In Winbox, navigate to IP -> Addresses and then add a new address:



1691649488_389_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg




4) Set the Rotuer ID​


In order for OSPF to work, you have to specify the Router ID. I chose to do this under Routing -> Router ID, but you can also set this value manually in the OSPF Instance configuaration. I really like the new way ROS is handling the Router ID. One ID can be used for multiple protocols and you can also change the behavior of how ROS creates and utilizes that value.

The CLI systax for this is as follows:

/routing id
add disabled=no id=172.16.0.1 name=OSPF_ID select-dynamic-id=””


In Winbox, navigate to Routing -> Router ID and then add a new Router ID:



1691649489_827_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg




5) Create the OSPF Instance​


The OSPF Instance looks very different from before. Notice that this is where you choose between IPv4 or IPv6. Notice the VRF dropdown. ROS7 uses VRFs even for the main routing table. That entire concept is a much more elegant way of doing things and allows us to use one router the same we would use multiple routers or Metarouters. In the Router ID field, I’ve selected the Router ID created in the previous step, but you can type the IP address into that field as well. Notice that the Redistribute options have changed. Also the routing filters have changed. The routing filters will be its own tutorial since their funtionality has improved so dramatically. The two MPLS features that were there before changed a little and the Domain ID and Domain Tag were added for MPLS. For this tutorial, there are only a few settings we need to change from default.

The CLI systax for this is as follows:

/routing ospf instance
add name=ospf-instance-1 originate-default=always router-id=OSPF_ID


In Winbox, navigate to Routing -> OSPF -> Instances and then add a new Instance:



1691649489_337_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg




6) Create the OSPF Area​


In ROS7, the backbone area isn’t there by default, so you will have to create it. Since this example network is small, we’ll just add everything to the backbone area.

The CLI systax for this is as follows:

/routing ospf area
add instance=ospf-instance-1 name=Backbone


In Winbox, navigate to Routing -> OSPF -> Areas and then add a new Area:



1691649490_252_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg




7) Create an Interface Template for each interface that is participating​


In ROS6, the Interface and Networks tabs were seperate. In this example, I used one Template per interface, but “wildcards” are still permitted. Notice that you would put all of your subnets that are participating in OSPF and on that interface in this one window. This is also where you go to create Virtual Links now. Notice also that the Cost and Priority values have changed. In this example, you will create an Interface temple for each interface including the loopback interface. The loopback will be a Passive interface. The OSPF authentication should really be used 100% of the time, so I included it in this example.

The CLI systax for this is as follows:

/routing ospf interface-template
add area=Backbone auth=md5 auth-key=12345678 interfaces=ether3 networks=10.10.10.0/30 type=ptp
add area=Backbone auth=md5 auth-key=12345678 interfaces=ether2 networks=10.10.10.8/30 type=ptp
add area=Backbone auth=md5 auth-key=12345678 interfaces=ether5 networks=10.10.10.17/30 type=ptp
add area=Backbone auth=md5 auth-key=12345678 interfaces=ether4 networks=10.10.10.25/30 type=ptp
add area=Backbone auth=md5 auth-key=12345678 interfaces=Loopback networks=172.16.0.1/32 passive


In Winbox, navigate to Routing -> OSPF -> Interface Templates and then add the new Templates:



1691649490_752_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg




8) Check the Neighbors and make sure that all neighbors are connected and in a full state​


At this point, everything should be working correctly. To verify this, check the Neighbors and make sure you have the correct number of connections and that they are in a full state. Your window will not look like this at first. To see the extra fields, right-click somewhere in the empty space and choose Show Columns.

The CLI systax for this is as follows:

[admin@Gateway Router] > routing ospf neighbor print
Flags: V – virtual; D – dynamic
0 D instance=ospf-instance-1 area=Backbone address=10.10.10.2 router-id=172.16.1.1 state=”Full” state-changes=5 adjacency=3h28m15s timeout=30s

1 D instance=ospf-instance-1 area=Backbone address=10.10.10.10 router-id=172.16.1.2 state=”Full” state-changes=12 adjacency=2h50m2s timeout=32s

2 D instance=ospf-instance-1 area=Backbone address=10.10.10.18 router-id=172.16.1.3 state=”Full” state-changes=6 adjacency=2h32m52s timeout=30s

3 D instance=ospf-instance-1 area=Backbone address=10.10.10.26 router-id=172.16.1.4 state=”Full” state-changes=6 adjacency=2h40m41s timeout=30s


In Winbox, navigate to Routing -> OSPF -> Neighbors:



1691649490_315_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg




9) Check the Main Routing Table and make sure the correct routes are there​


The CLI systax for this is as follows:

[admin@Gateway Router] > ip route print
Flags: D – DYNAMIC; A – ACTIVE; c, s, o, y – COPY
Columns: DST-ADDRESS, GATEWAY, DISTANCE
# DST-ADDRESS GATEWAY DISTANCE
0 As 0.0.0.0/0 50.123.123.1 1
1 As 4.2.2.2/32 1
DAc 10.10.10.0/30 ether3 0
DAo 10.10.10.4/30 10.10.10.2%ether3 110
DAc 10.10.10.8/30 ether2 0
DAo 10.10.10.12/30 10.10.10.10%ether2 110
DAc 10.10.10.16/30 ether5 0
DAo 10.10.10.20/30 10.10.10.18%ether5 110
DAc 10.10.10.24/30 ether4 0
DAo 10.10.10.28/30 10.10.10.26%ether4 110
DAc 50.123.123.0/24 ether1 0
DAc 172.16.0.1/32 Loopback 0
DAo 172.16.1.1/32 10.10.10.2%ether3 110
DAo 172.16.1.2/32 10.10.10.10%ether2 110
DAo 172.16.1.3/32 10.10.10.18%ether5 110
DAo 172.16.1.4/32 10.10.10.26%ether4 110
DAo 172.16.1.5/32 10.10.10.26%ether4 110
DAo 172.16.1.6/32 10.10.10.2%ether3 110
DAo 172.16.1.7/32 10.10.10.10%ether2 110
DAo 172.16.1.8/32 10.10.10.18%ether5 110


In Winbox, navigate to IP -> Routes:



1691649491_82_ROSv7-–-OSPF-Basic-Configuration-–-RFC.jpg




Enjoy
😉

Like this:​


Like Loading…


Related


Xem tiếp...
 

Thành viên mới

Thành viên trực tuyến

Không có thành viên trực tuyến.
Top