Published 6月 04, 2018 by with 0 comment

JNCIS-SP Lab: Configuring a Multiarea OSPF Network



Requirements
This lab shows how to configure a multiarea OSPF network and router ID.

Configuration
1. Basic & interface address configuration.
set system host-name JNCIE
set system root-authentication encrypted-password "$1$Luohd5lf$6ikSsNi1iEX/147eHbqm7."

set logical-systems R1 interfaces em1 unit 12 vlan-id 12
set logical-systems R1 interfaces em1 unit 12 family inet address 8.8.12.1/24
set logical-systems R1 interfaces lo0 unit 1 family inet address 1.1.1.1/32

set logical-systems R2 interfaces em2 unit 12 vlan-id 12
set logical-systems R2 interfaces em2 unit 12 family inet address 8.8.12.2/24
set logical-systems R2 interfaces em2 unit 23 vlan-id 23
set logical-systems R2 interfaces em2 unit 23 family inet address 8.8.23.2/24
set logical-systems R2 interfaces lo0 unit 2 family inet address 2.2.2.2/32

set logical-systems R3 interfaces em3 unit 23 vlan-id 23
set logical-systems R3 interfaces em3 unit 23 family inet address 8.8.23.3/24
set logical-systems R3 interfaces lo0 unit 3 family inet address 3.3.3.3/32

set interfaces em1 vlan-tagging        
set interfaces em2 vlan-tagging
set interfaces em3 vlan-tagging


2. In logical-systems R1, I configure an OSPF router identifier and setup interface em1.12 & lo0.1(Passive) for OSPF area 0.
set logical-systems R1 routing-options router-id 1.1.1.1

set logical-systems R1 protocols ospf area 0.0.0.0 interface em1.12
set logical-systems R1 protocols ospf area 0.0.0.0 interface lo0.1 passive


3. In logical-systems R2, I configure an OSPF router identifier and setup interface em2.12 & lo0.2(Passive) for OSPF area 0.
Interface em2.23 for OSPF area 23
set logical-systems R2 routing-options router-id 2.2.2.2

set logical-systems R2 protocols ospf area 0.0.0.0 interface em2.12
set logical-systems R2 protocols ospf area 0.0.0.0 interface lo0.2 passive


4. In logical-systems R3, I configure an OSPF router identifier and setup interface em3.23 & lo0.3(Passive) for OSPF area 23.
set logical-systems R3 routing-options router-id 3.3.3.3

set logical-systems R3 protocols ospf area 0.0.0.23 interface em3.23
set logical-systems R3 protocols ospf area 0.0.0.23 interface lo0.3 passive


5. Commit the configuration.
commit


Verification
Routing Table:
root@JNCIE> show route logical-system 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] 00:34:05
                    > via lo0.1
2.2.2.2/32         *[OSPF/10] 00:13:00, metric 1
                    > to 8.8.12.2 via em1.12
3.3.3.3/32         *[OSPF/10] 00:12:25, metric 2
                    > to 8.8.12.2 via em1.12
8.8.12.0/24        *[Direct/0] 00:13:06
                    > via em1.12
8.8.12.1/32        *[Local/0] 00:13:06
                      Local via em1.12
8.8.23.0/24        *[OSPF/10] 00:13:00, metric 2
                    > to 8.8.12.2 via em1.12
224.0.0.5/32       *[OSPF/10] 00:21:57, metric 1
                      MultiRecv

root@JNCIE>

root@JNCIE> show route logical-system 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:13:03, metric 1
                    > to 8.8.12.1 via em2.12
2.2.2.2/32         *[Direct/0] 00:34:09
                    > via lo0.2
3.3.3.3/32         *[OSPF/10] 00:12:29, metric 1
                    > to 8.8.23.3 via em2.23
8.8.12.0/24        *[Direct/0] 00:13:09
                    > via em2.12
8.8.12.2/32        *[Local/0] 00:13:09
                      Local via em2.12
8.8.23.0/24        *[Direct/0] 00:13:09
                    > via em2.23
8.8.23.2/32        *[Local/0] 00:13:09
                      Local via em2.23
224.0.0.5/32       *[OSPF/10] 00:22:00, metric 1
                      MultiRecv

root@JNCIE>

root@JNCIE> show route logical-system 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:12:31, metric 2
                    > to 8.8.23.2 via em3.23
2.2.2.2/32         *[OSPF/10] 00:12:31, metric 1
                    > to 8.8.23.2 via em3.23
3.3.3.3/32         *[Direct/0] 00:34:10
                    > via lo0.3
8.8.12.0/24        *[OSPF/10] 00:12:31, metric 2
                    > to 8.8.23.2 via em3.23
8.8.23.0/24        *[Direct/0] 00:13:11
                    > via em3.23
8.8.23.3/32        *[Local/0] 00:13:11
                      Local via em3.23
224.0.0.5/32       *[OSPF/10] 00:22:02, metric 1
                      MultiRecv

root@JNCIE>


Ping:
root@JNCIE> ping 2.2.2.2 logical-system R1 rapid
PING 2.2.2.2 (2.2.2.2): 56 data bytes
!!!!!
--- 2.2.2.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.139/0.340/0.773/0.229 ms

root@JNCIE>

root@JNCIE> ping 3.3.3.3 logical-system R1 rapid   
PING 3.3.3.3 (3.3.3.3): 56 data bytes
!!!!!
--- 3.3.3.3 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.274/0.360/0.585/0.116 ms

root@JNCIE>

root@JNCIE> ping 1.1.1.1 logical-system R2 rapid   
PING 1.1.1.1 (1.1.1.1): 56 data bytes
!!!!!
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.154/0.195/0.314/0.060 ms

root@JNCIE>

root@JNCIE> ping 3.3.3.3 logical-system R2 rapid   
PING 3.3.3.3 (3.3.3.3): 56 data bytes
!!!!!
--- 3.3.3.3 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.147/0.215/0.290/0.054 ms

root@JNCIE>

root@JNCIE> ping 1.1.1.1 logical-system R3 rapid   
PING 1.1.1.1 (1.1.1.1): 56 data bytes
!!!!!
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.274/0.321/0.390/0.052 ms

root@JNCIE>

root@JNCIE> ping 2.2.2.2 logical-system R3 rapid   
PING 2.2.2.2 (2.2.2.2): 56 data bytes
!!!!!
--- 2.2.2.2 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.134/0.193/0.320/0.067 ms

root@JNCIE>


Check OSPF interface:
root@JNCIE> show ospf interface logical-system R1
Interface           State   Area            DR ID           BDR ID          Nbrs
em1.12              BDR     0.0.0.0         2.2.2.2         1.1.1.1            1
lo0.1               DRother 0.0.0.0         0.0.0.0         0.0.0.0            0

root@JNCIE>

root@JNCIE> show ospf interface logical-system R2   
Interface           State   Area            DR ID           BDR ID          Nbrs
em2.12              DR      0.0.0.0         2.2.2.2         1.1.1.1            1
lo0.2               DRother 0.0.0.0         0.0.0.0         0.0.0.0            0
em2.23              BDR     0.0.0.23        3.3.3.3         2.2.2.2            1

root@JNCIE>

root@JNCIE> show ospf interface logical-system R3   
Interface           State   Area            DR ID           BDR ID          Nbrs
em3.23              DR      0.0.0.23        3.3.3.3         2.2.2.2            1
lo0.3               DRother 0.0.0.23        0.0.0.0         0.0.0.0            0

root@JNCIE>


Check OSPF neighbor:
root@JNCIE> show ospf neighbor logical-system R1    
Address          Interface              State     ID               Pri  Dead
8.8.12.2         em1.12                 Full      2.2.2.2          128    30

root@JNCIE>

root@JNCIE> show ospf neighbor logical-system R2   
Address          Interface              State     ID               Pri  Dead
8.8.12.1         em2.12                 Full      1.1.1.1          128    38
8.8.23.3         em2.23                 Full      3.3.3.3          128    38

root@JNCIE>

root@JNCIE> show ospf neighbor logical-system R3   
Address          Interface              State     ID               Pri  Dead
8.8.23.2         em3.23                 Full      2.2.2.2          128    36

root@JNCIE>


Check OSPF database:
root@JNCIE> show ospf database logical-system R1   

    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Router  *1.1.1.1          1.1.1.1          0x8000000c  1240  0x22 0xa729  48
Router   2.2.2.2          2.2.2.2          0x8000000c   434  0x22 0xbe04  48
Network  8.8.12.2         2.2.2.2          0x80000007    62  0x22 0x6c95  32
Summary  3.3.3.3          2.2.2.2          0x80000001  1206  0x22 0xcc5b  28
Summary  8.8.23.0         2.2.2.2          0x80000008  1206  0x22 0x8283  28

root@JNCIE>

root@JNCIE> show ospf database logical-system R2   

    OSPF database, Area 0.0.0.0
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Router   1.1.1.1          1.1.1.1          0x8000000c  1244  0x22 0xa729  48
Router  *2.2.2.2          2.2.2.2          0x8000000c   436  0x22 0xbe04  48
Network *8.8.12.2         2.2.2.2          0x80000007    64  0x22 0x6c95  32
Summary *3.3.3.3          2.2.2.2          0x80000001  1208  0x22 0xcc5b  28
Summary *8.8.23.0         2.2.2.2          0x80000008  1208  0x22 0x8283  28

    OSPF database, Area 0.0.0.23
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Router  *2.2.2.2          2.2.2.2          0x8000000b  1208  0x22 0xa91b  36
Router   3.3.3.3          3.3.3.3          0x8000000b  1209  0x22 0xced1  48
Network  8.8.23.3         3.3.3.3          0x80000006  1209  0x22 0x21c9  32
Summary *1.1.1.1          2.2.2.2          0x80000002  1242  0x22 0x2708  28
Summary *2.2.2.2          2.2.2.2          0x80000002   807  0x22 0xee3d  28
Summary *8.8.12.0         2.2.2.2          0x80000007  1248  0x22 0xfd14  28

root@JNCIE>

root@JNCIE> show ospf database logical-system R3   

    OSPF database, Area 0.0.0.23
 Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
Router   2.2.2.2          2.2.2.2          0x8000000b  1211  0x22 0xa91b  36
Router  *3.3.3.3          3.3.3.3          0x8000000b  1210  0x22 0xced1  48
Network *8.8.23.3         3.3.3.3          0x80000006  1210  0x22 0x21c9  32
Summary  1.1.1.1          2.2.2.2          0x80000002  1245  0x22 0x2708  28
Summary  2.2.2.2          2.2.2.2          0x80000002   810  0x22 0xee3d  28
Summary  8.8.12.0         2.2.2.2          0x80000007  1251  0x22 0xfd14  28

root@JNCIE>


Final configuration
root@JNCIE> show configuration | display set   
set version 12.1R1.9
set system host-name JNCIE
set system root-authentication encrypted-password "$1$Luohd5lf$6ikSsNi1iEX/147eHbqm7."
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set logical-systems R1 interfaces em1 unit 12 vlan-id 12
set logical-systems R1 interfaces em1 unit 12 family inet address 8.8.12.1/24
set logical-systems R1 interfaces lo0 unit 1 family inet address 1.1.1.1/32
set logical-systems R1 protocols ospf area 0.0.0.0 interface em1.12
set logical-systems R1 protocols ospf area 0.0.0.0 interface lo0.1 passive
set logical-systems R1 routing-options router-id 1.1.1.1
set logical-systems R2 interfaces em2 unit 12 vlan-id 12
set logical-systems R2 interfaces em2 unit 12 family inet address 8.8.12.2/24
set logical-systems R2 interfaces em2 unit 23 vlan-id 23
set logical-systems R2 interfaces em2 unit 23 family inet address 8.8.23.2/24
set logical-systems R2 interfaces lo0 unit 2 family inet address 2.2.2.2/32
set logical-systems R2 protocols ospf area 0.0.0.0 interface em2.12
set logical-systems R2 protocols ospf area 0.0.0.0 interface lo0.2 passive
set logical-systems R2 protocols ospf area 0.0.0.23 interface em2.23
set logical-systems R2 routing-options router-id 2.2.2.2
set logical-systems R3 interfaces em3 unit 23 vlan-id 23
set logical-systems R3 interfaces em3 unit 23 family inet address 8.8.23.3/24
set logical-systems R3 interfaces lo0 unit 3 family inet address 3.3.3.3/32
set logical-systems R3 protocols ospf area 0.0.0.23 interface em3.23
set logical-systems R3 protocols ospf area 0.0.0.23 interface lo0.3 passive
set logical-systems R3 routing-options router-id 3.3.3.3
set interfaces em1 vlan-tagging
set interfaces em2 vlan-tagging
set interfaces em3 vlan-tagging

root@JNCIE>


Reference:
OSPF Configuration Guide (JunOS 12.1)
http://www.juniper.net/techpubs/en_US/junos12.1/information-products/pathway-pages/config-guide-routing/config-guide-ospf.html#configuration

最初發表 / 最後更新: 2014.02.16 / 2018.06.04

0 comments:

張貼留言