Skip to content

OSPF Protocol (Multi Area)

13 February 2010
OSPF Protocol (Multi Area)
Topology

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!                       Area 0             !             Area 1                    !
!                                          !                                       !
!                     vlan-id 10           !            vlan-id 20                 !
!     ------                             ------                       ------       !
!    !      ! .1    192.168.10.0/30   .2!      !.5 192.168.10.4/30 .6!      !      !
!    !  R1  !---------------------------!  R2  !---------------------!  R3  !      !
!    !      ! fxp1.1             fxp2.1 !      ! fxp3.2       fxp4.1 !      !      !
!     ------                             ------                       ------       !
!lo0.1 1.1.1.1/32                  lo0.2 2.2.2.2/32               lo.3 3.3.3.3/32  !
!                                          !                                       !
!                                          !                                       !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
(using logical router)

Configure R1
[edit logical-routers R1]
root@iwing#set protocols ospf area 0 interface lo0.1
[edit logical-routers R1]
root@iwing#set protocols ospf area 0 interface fxp1.1

Configure R2
[edit logical-routers R2]
root@iwing#set protocols ospf area 0 interface lo0.2
[edit logical-routers R2]
root@iwing#set protocols ospf area 0 interface fxp2.1
[edit logical-routers R2]
root@iwing#set protocols ospf area 1 interface fxp3.2

Configure R3
[edit logical-routers R3]
root@iwing#set protocols ospf area 1 interface lo0.3
[edit logical-routers R3]
root@iwing#set protocols ospf area 1 interface fxp4.1

How to check
[edit]
root@iwing# run show ospf interface logical-router R1
Interface           State   Area            DR ID           BDR ID          Nbrs
fxp1.1              BDR     0.0.0.0         2.2.2.2         1.1.1.1            1
lo0.1               DR      0.0.0.0         1.1.1.1         0.0.0.0            0

[edit]
root@iwing# run show ospf interface logical-router R2
Interface           State   Area            DR ID           BDR ID          Nbrs
fxp2.1              DR      0.0.0.0         2.2.2.2         1.1.1.1            1
lo0.2               DR      0.0.0.0         2.2.2.2         0.0.0.0            0
fxp3.2              BDR     0.0.0.1         3.3.3.3         2.2.2.2            1

[edit]
root@iwing# run show ospf interface logical-router R3
Interface           State   Area            DR ID           BDR ID          Nbrs
fxp4.1              DR      0.0.0.1         3.3.3.3         2.2.2.2            1
lo0.3               DR      0.0.0.1         3.3.3.3         0.0.0.0            0

[edit]
root@iwing# run show ospf neighbor logical-router R1
Address          Interface              State     ID               Pri  Dead
192.168.10.2     fxp1.1                 Full      2.2.2.2          128    37

[edit]
root@iwing# run show ospf neighbor logical-router R2
Address          Interface              State     ID               Pri  Dead
192.168.10.1     fxp2.1                 Full      1.1.1.1          128    36
192.168.10.6     fxp3.2                 Full      3.3.3.3          128    33

[edit]
root@iwing# run show ospf neighbor logical-router R3
Address          Interface              State     ID               Pri  Dead
192.168.10.5     fxp4.1                 Full      2.2.2.2          128    39

[edit]
root@iwing# run show route logical-router R1
inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32         *[Direct/0] 06:20:28
                   > via lo0.1
2.2.2.2/32         *[OSPF/10] 00:06:53, metric 1
                   > to 192.168.10.2 via fxp1.1
3.3.3.3/32         *[OSPF/10] 00:06:53, metric 2
                   > to 192.168.10.2 via fxp1.1
192.168.10.0/30    *[Direct/0] 06:20:29
                   > via fxp1.1
192.168.10.1/32    *[Local/0] 06:20:29
                   Local via fxp1.1
192.168.10.4/30    *[OSPF/10] 00:06:53, metric 2
                   > to 192.168.10.2 via fxp1.1
224.0.0.5/32       *[OSPF/10] 00:07:47, metric 1
                   MultiRecv

[edit]
root@iwing# run show route logical-router R2
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32         *[OSPF/10] 00:06:57, metric 1
                   > to 192.168.10.1 via fxp2.1
2.2.2.2/32         *[Direct/0] 06:20:33
                   > via lo0.2
3.3.3.3/32         *[OSPF/10] 00:07:02, metric 1
                   > to 192.168.10.6 via fxp3.2
192.168.10.0/30    *[Direct/0] 06:20:33
                   > via fxp2.1
192.168.10.2/32    *[Local/0] 06:20:33
                   Local via fxp2.1
192.168.10.4/30    *[Direct/0] 06:20:33
                   > via fxp3.2
192.168.10.5/32    *[Local/0] 06:20:33
                   Local via fxp3.2
224.0.0.5/32       *[OSPF/10] 00:07:52, metric 1
                   MultiRecv

[edit]
root@iwing# run show route logical-router R3
inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

1.1.1.1/32         *[OSPF/10] 00:06:58, metric 2
                   > to 192.168.10.5 via fxp4.1
2.2.2.2/32         *[OSPF/10] 00:07:05, metric 1
                   > to 192.168.10.5 via fxp4.1
3.3.3.3/32         *[Direct/0] 06:20:36
                   > via lo0.3
192.168.10.0/30    *[OSPF/10] 00:07:05, metric 2
                   > to 192.168.10.5 via fxp4.1
192.168.10.4/30    *[Direct/0] 06:20:36
                   > via fxp4.1
192.168.10.6/32    *[Local/0] 06:20:36
                   Local via fxp4.1
224.0.0.5/32       *[OSPF/10] 00:07:55, metric 1
                   MultiRecv

[edit]
root@iwing# run ping 3.3.3.3 logical-router R1
PING 3.3.3.3 (3.3.3.3): 56 data bytes
64 bytes from 3.3.3.3: icmp_seq=0 ttl=63 time=3.593 ms
64 bytes from 3.3.3.3: icmp_seq=1 ttl=63 time=1.714 ms
64 bytes from 3.3.3.3: icmp_seq=2 ttl=63 time=0.792 ms
64 bytes from 3.3.3.3: icmp_seq=3 ttl=63 time=0.820 ms
64 bytes from 3.3.3.3: icmp_seq=4 ttl=63 time=0.783 ms
64 bytes from 3.3.3.3: icmp_seq=5 ttl=63 time=0.789 ms
64 bytes from 3.3.3.3: icmp_seq=6 ttl=63 time=0.789 ms
^C
--- 3.3.3.3 ping statistics ---
7 packets transmitted, 7 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.783/1.326/3.593/0.979 ms

[edit]
root@iwing# run traceroute 3.3.3.3 logical-router R1
traceroute to 3.3.3.3 (3.3.3.3), 30 hops max, 40 byte packets
 1  192.168.10.2 (192.168.10.2)  1.370 ms  1.467 ms  0.709 ms
 2  3.3.3.3 (3.3.3.3)  1.054 ms  0.754 ms  0.713 ms

Final Configuration
[edit]
root@iwing# show

## Last changed: 2010-02-11 17:43:07 UTC
version 8.3R2.8;
system {
    host-name iwing;
    root-authentication {
        encrypted-password "$1$bd4ySf8Q$EaiiIc24ycXAWCQHKOJCf0"; ## SECRET-DATA
    }
    services {
          ftp;
          telnet;
    }
    syslog {
        user * {
             any emergency;
        }
        file messages {
             any notice;
             authorization info;
        }
        file interactive-commands {
            interactive-commands any;
        }
     }
}
logical-routers {
    R1 {
       interfaces {
           fxp1 {
              unit 1 {
                 vlan-id 10;
                 family inet {
                      address 192.168.10.1/30;
                 }
              }
           }
           lo0 {
               unit 1 {
                  family inet {
                       address 1.1.1.1/32;
                  }
               }
          }
      }
      protocols {
         ospf {
            area 0.0.0.0 {
                 interface lo0.1;
                 interface fxp1.1;
            }
         }
      }
 }
 R2 {
    interfaces {
       fxp2 {
          unit 1 {
             vlan-id 10;
             family inet {
                  address 192.168.10.2/30;
             }
          }
      }
      fxp3 {
        unit 2 {
            vlan-id 20;
            family inet {
                  address 192.168.10.5/30;
            }
         }
      }
      lo0 {
        unit 2 {
           family inet {
               address 2.2.2.2/32;
           }
        }
     }
 }
 protocols {
     ospf {
        area 0.0.0.0 {
           interface lo0.2;
           interface fxp2.1;
        }
        area 0.0.0.1 {
           interface fxp3.2;
        }
     }
   }
 }
 R3 {
     interfaces {
         fxp4 {
            unit 1 {
                vlan-id 20;
                family inet {
                     address 192.168.10.6/30;
                }
            }
         }
         lo0 {
            unit 3 {
               family inet {
                    address 3.3.3.3/32;
               }
            }
         }
     }
     protocols {
        ospf {
            area 0.0.0.1 {
                 interface lo0.3;
                 interface fxp4.1;
            }
         }
     }
   }
}
interfaces {
   fxp1 {
       vlan-tagging;
   }
   fxp2 {
       vlan-tagging;
   }
   fxp3 {
      vlan-tagging;
   }
   fxp4 {
      vlan-tagging;
   }
}

[edit]
root@iwing#
One Comment leave one →
  1. 15 February 2010 7:45 AM

    You have a good blog there mate, thanks for sharing with us.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: