现在的位置: 首页 > 综合 > 正文

OSPF Area 0.0.0.0?

2012年02月22日 综合 ⁄ 共 3056字 ⁄ 字号 评论 8 条

I quite often run OSPF on Juniper SSG’s – When configuring OSPF it requires you to put interfaces in areas in the format of x.x.x.x – for example 0.0.0.0

But what exactly does Area 0.0.0.0 compare to Area 0? And for that matter, where exactly does Area 10.1.1.1 fit in?

For this post, I’ll be using a simple topology. 2 Routers connected via OSPF, both redistributing their loopback addresses. If we see R2′s routes on R1 and vice-versa, we know OSPF is working. This is the topology:

OSPF actually sees areas in hex. This means that it considers Area 0 to be Area 0×00000000. OSPF will also convert dotted decimal to hex. This means that Area 0.0.0.0 is also equal to Area 0×00000000. Let’s test this to prove that it works.
R1:

router ospf 1
log-adjacency-changes
redistribute connected subnets
network 172.16.1.1 0.0.0.0 area 0
R2:

router ospf 1
log-adjacency-changes
redistribute connected subnets
network 172.16.1.2 0.0.0.0 area 0.0.0.0
Do they form an adjacency?
R1:

R1#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
10.1.1.1 1 FULL/BDR 00:00:35 172.16.1.2 FastEthernet0
R2:

R2#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
192.168.10.1 1 FULL/DR 00:00:38 172.16.1.1 FastEthernet0
Do we have routes?

R1#sh ip route ospf
O E2 10.1.1.0 [110/20] via 172.16.1.2, 00:02:27, FastEthernet0
R2#sh ip route ospf
O E2 192.168.10.0/24 [110/20] via 172.16.1.1, 00:02:45, FastEthernet0
They see each others routes just fine. What’s also interesting is that IOS will continue to show you information in the correct format depending on the OSPF configuration on that link. For example, R2 is in Area 0.0.0.0 – If we look on R2 to check it’s neighbours details more carefully, IOS will show us the area according to R2:

R2#sh ip ospf neighbor 192.168.10.1
Neighbor 192.168.10.1, interface address 172.16.1.1
In the area 0.0.0.0 via interface FastEthernet0Same with R1:

R1#sh ip ospf neighbor 10.1.1.1
Neighbor 10.1.1.1, interface address 172.16.1.2
In the area 0 via interface FastEthernet0
Going back to the beginning of the article, how does area 10.1.1.1 fit in? We need to convert 10.1.1.1 to decimal if we want them to match. As an easier example at first, consider Area 0.0.0.50 – That would match Area 50. What about Area 0.0.1.1 ? – That would match Area 257 (both of these match Area 0×00000101 according to OSPF)

Area 10.1.1.1 converts to Area 167837953. OSPF sees both of these areas as Area 0x0a010101 – but are we sure? Let’s test to find out!

router ospf 1
log-adjacency-changes
redistribute connected subnets
network 172.16.1.1 0.0.0.0 area 167837953router ospf 1
log-adjacency-changes
redistribute connected subnets
network 172.16.1.2 0.0.0.0 area 10.1.1.1
Does it work?

R1#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
10.1.1.1 1 FULL/BDR 00:00:35 172.16.1.2 FastEthernet0

R1#sh ip route ospf
O E2 10.1.1.0 [110/20] via 172.16.1.2, 00:01:10, FastEthernet0

R1#sh ip ospf neighbor 10.1.1.1
Neighbor 10.1.1.1, interface address 172.16.1.2
In the area 167837953 via interface FastEthernet0
R2#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
192.168.10.1 1 FULL/DR 00:00:33 172.16.1.1 FastEthernet0

R2#sh ip route ospf
O E2 192.168.10.0/24 [110/20] via 172.16.1.1, 00:02:04, FastEthernet0

R2#sh ip ospf neighbor 192.168.10.1
Neighbor 192.168.10.1, interface address 172.16.1.1
In the area 10.1.1.1 via interface FastEthernet0
It all works just fine! If you’ve got a well designed network, then using dotted decimal as areas has it’s advantages. 2 Areas that look different to you could very easily speak over OSPF if they match.

目前有 8 条留言    访客:7 条, 博主:0 条 ,引用: 1 条

  1. Colby Ropp 2012年02月22日 上午 7:12  @回复  Δ1楼 回复

    There is noticeably a bundle to know about this. I assume you made certain nice points in features also.

  2. horny 2012年02月22日 下午 7:42  @回复  Δ2楼 回复

    It continually amazes me exactly how Blog owners for example your self can find enough time plus the commitment to keep on Composing wonderful blog posts your blog http://www.it598.net/ospf-area/ is superb and one of my personal have to read weblogs, I was more than impressed with the blog post IT598技术-IT技术-IT认证-Cisco » Blog Archive » OSPF Area 0.0.0.0? I just want to thank you and congratulations Best wishes horny

  3. get laid 2012年02月23日 上午 12:57  @回复  Δ3楼 回复

    When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove me from that service? Thanks a lot!

  4. nme 2012年02月23日 上午 10:31  @回复  Δ4楼 回复

    obviously like your web site but you need to test the spelling on quite a few of your posts. Many of them are rife with spelling problems and I find it very bothersome to inform the reality on the other hand I will certainly come again again.

  5. timothy brons 2012年02月24日 上午 1:07  @回复  Δ5楼 回复

    i recently started a website and i desired you to know thst information helped me immensly , and i will attempt to make my brand new website as good as yours.

  6. Adriana 2012年02月24日 下午 3:51  @回复  Δ6楼 回复

    thanks for share!

  7. lilou 2012年02月28日 上午 12:12  @回复  Δ7楼 回复

    I really appreciate your piece of work, Great post.

外部的引用: 1 条

  • married dating

给我留言

留言无头像?