Basic LAB regarding to how to setup logic router and ospf in JUNOS can be referred to previous posts:
OSPF between two JunOS routing instances
Configurations:
test> show configuration
## Last commit: 2012-01-29 07:03:41 UTC by test
version 10.4R3.4;
system {
backup-router 10.50.2.1;
root-authentication {
encrypted-password "$1$MsDQp3dk$uxdtlK7LKSqp4mHjg/zxZ1"; ## SECRET-DATA
}
login {
user test {
uid 2000;
class super-user;
authentication {
encrypted-password "$1$XKhC35Ei$9ED4o245Ts.jyQ2BqeeQR/"; ## SECRET-DATA
}
}
}
services {
ftp;
telnet;
web-management {
http {
port 80;
}
}
}
syslog {
user * {
any emergency;
}
file messages {
any notice;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
}
logical-systems {
r1 {
interfaces {
em1 {
unit 13 {
vlan-id 13;
family inet {
address 10.1.13.1/24;
}
}
unit 15 {
vlan-id 15;
family inet {
address 10.1.15.1/24;
}
}
}
lo0 {
unit 1 {
family inet {
address 10.1.1.1/32;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface lo0.1;
interface em1.13;
interface em1.15;
}
}
}
routing-options {
router-id 10.10.1.1;
}
}
r2 {
interfaces {
em2 {
unit 24 {
vlan-id 24;
family inet {
address 10.1.24.2/24;
}
}
unit 25 {
vlan-id 25;
family inet {
address 10.1.25.2/24;
}
}
}
lo0 {
unit 2 {
family inet {
address 10.1.1.2/32;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface em2.24;
interface em2.25;
interface lo0.2;
}
}
}
routing-options {
router-id 10.1.1.2;
}
}
r3 {
interfaces {
em3 {
unit 13 {
vlan-id 13;
family inet {
address 10.1.13.3/24;
}
}
unit 36 {
vlan-id 36;
family inet {
address 10.1.36.3/24;
}
}
}
lo0 {
unit 3 {
family inet {
address 10.1.1.3/32;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface em3.13;
interface em3.36;
interface lo0.3;
}
}
}
routing-options {
router-id 10.1.1.3;
}
}
r4 {
interfaces {
em4 {
unit 24 {
vlan-id 24;
family inet {
address 10.1.24.4/24;
}
}
unit 26 {
vlan-id 26;
family inet {
address 10.1.26.4/24;
}
}
}
lo0 {
unit 4 {
family inet {
address 10.1.1.4/32;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface em4.24;
interface em4.46;
interface lo0.4;
}
}
}
routing-options {
router-id 10.1.1.4;
}
}
r5 {
interfaces {
em5 {
unit 15 {
vlan-id 15;
family inet {
address 10.1.15.5/24;
}
}
unit 25 {
vlan-id 25;
family inet {
address 10.1.25.5/24;
}
}
}
lo0 {
unit 5 {
family inet {
address 10.1.1.5/32;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface em5.15;
interface em5.25;
}
}
}
routing-options {
router-id 10.1.1.5;
}
}
r6 {
interfaces {
em6 {
unit 36 {
vlan-id 36;
family inet {
address 10.1.36.6/24;
}
}
unit 46 {
vlan-id 46;
family inet {
address 10.1.46.6/24;
}
}
}
lo0 {
unit 6 {
family inet {
address 10.1.1.6/32;
}
}
}
}
protocols {
ospf {
area 0.0.0.0 {
interface em6.36;
interface em6.46;
}
}
}
routing-options {
router-id 10.1.1.6;
}
}
}
interfaces {
em0 {
unit 0 {
family inet {
address 10.50.2.230/24;
}
}
}
em1 {
vlan-tagging;
}
em2 {
vlan-tagging;
}
em3 {
vlan-tagging;
}
em4 {
vlan-tagging;
}
em5 {
vlan-tagging;
}
em6 {
vlan-tagging;
}
}
routing-options {
static {
route 0.0.0.0/0 {
next-hop 10.50.2.1;
retain;
no-readvertise;
}
}
}
--------------------------------------------------------------------
verifications:
test> show ospf neighbor logical-system r1
Address Interface State ID Pri Dead
10.1.13.3 em1.13 Full 10.1.1.3 128 37
10.1.15.5 em1.15 Full 10.1.1.5 128 36
test> show ospf neighbor logical-system r2
Address Interface State ID Pri Dead
10.1.24.4 em2.24 Full 10.1.1.4 128 35
10.1.25.5 em2.25 Full 10.1.1.5 128 36
test> show ospf neighbor logical-system r3
Address Interface State ID Pri Dead
10.1.13.1 em3.13 Full 10.10.1.1 128 34
10.1.36.6 em3.36 Full 10.1.1.6 128 33
test> show route protocol ospf logical-system r3
inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.1.1/32 *[OSPF/10] 00:00:48, metric 1
> to 10.1.13.1 via em3.13
10.1.1.2/32 *[OSPF/10] 00:00:38, metric 3
> to 10.1.13.1 via em3.13
10.1.1.4/32 *[OSPF/10] 00:00:38, metric 4
> to 10.1.13.1 via em3.13
10.1.15.0/24 *[OSPF/10] 00:00:48, metric 2
> to 10.1.13.1 via em3.13
10.1.24.0/24 *[OSPF/10] 00:00:38, metric 4
> to 10.1.13.1 via em3.13
10.1.25.0/24 *[OSPF/10] 00:00:43, metric 3
> to 10.1.13.1 via em3.13
10.1.46.0/24 *[OSPF/10] 00:00:48, metric 2
> to 10.1.36.6 via em3.36
224.0.0.5/32 *[OSPF/10] 00:04:52, metric 1
MultiRecv
test> ping 10.1.1.3 logical-system r5
PING 10.1.1.3 (10.1.1.3): 56 data bytes
64 bytes from 10.1.1.3: icmp_seq=0 ttl=63 time=2.235 ms
64 bytes from 10.1.1.3: icmp_seq=1 ttl=63 time=1.759 ms
64 bytes from 10.1.1.3: icmp_seq=2 ttl=63 time=2.118 ms
No comments:
Post a Comment