Options

Advertising networks in OSPF

opers13opers13 Member Posts: 100
All, I configured OSPF between an MX960 and a Cisco router. On the Cisco side I would advertise networks into OSPF this way:

router ospf 100
log-adjacency-changes
auto-cost reference-bandwidth 10000
passive-interface default
network 10.156.0.20 0.0.0.3 area 4
network 10.152.128.0 0.0.0.255 area 5


How do I advertise networks in JUNOS? this is my junos OSPF config:

interfaces {
ge-0/0/0 {
unit 0 {
family inet {
address 10.156.0.21/30;
}
}
}
}
protocols {
ospf {
reference-bandwidth 10g;
area 0.0.0.4 {
interface ge-0/0/0.0 {
interface-type p2p;
}

I want to create a VLAN and advertise 10.152.128.0/23 to OSPF area 0.

Just having a hard time trying to figure this out....

thanks!

Comments

  • Options
    AldurAldur Member Posts: 1,460
    Hi opers13,

    To advertise an interface that has been sectioned off into vlans most of the work will be happening under the interfaces. Take my lab for example. Below is a configuration of a router which the fe-0/0/0 interface that is split into different vlans. The units are named after the vlans that they support, this isn't necessary but makes it much more readable. Those interfaces are then applied below under the ospf area stanza.

    The biggest thing to notice under the ospf areas is that the interface is specified with the corresponding logical unit.

    Have a look over this sample config and let me know if you have any questions.
    [edit]
    lab@r3# show interfaces fe-0/0/0  
    vlan-tagging;
    mtu 1514;
    unit 2 {
        vlan-id 2;
        family inet {
            address 10.0.4.13/30;
        }
    }
    unit 4 {
        vlan-id 4;
        family inet {
            address 10.0.4.1/30;
        }
    }
    unit 6 {
        vlan-id 6;
        family inet {
            address 10.0.2.5/30;
        }
    }
    unit 7 {
        vlan-id 7;
        family inet {
            address 10.0.2.14/30;
        }
    }
    unit 8 {
        vlan-id 8;
        family inet {
            address 10.0.2.2/30;
        }
    }
    
    [edit]
    lab@r3# show protocols ospf
        ospf {
            area 0.0.0.1 {
                stub default-metric 10;
                interface fe-0/0/0.2;
                interface fe-0/0/0.4;
            }
            area 0.0.0.0 {
                interface fe-0/0/0.6;
                interface fe-0/0/0.8;
            }
            area 0.0.0.2 {
                nssa {
                    default-lsa default-metric 10;
                }
                interface fe-0/0/0.7;
            }
        }
    [edit]
    lab@r3#
    
    "Bribe is such an ugly word. I prefer extortion. The X makes it sound cool."

    -Bender
Sign In or Register to comment.