Juniper Junos – Understanding `unit 0` and `family inet`

juniperjuniper-junos

In my JunOS configure mode, I show the interfaces:

[edit]
root@Olive# show interfaces
em0 {
    unit 0 {
        family inet {
            address 192.168.47.2/24
        }
    }
}
em1 {
    vlan-tagging;
}
em2 {
    vlan-tagging;
}
em3 {
    vlan-tagging;
}

What's the meaning of unit 0 and family inet?

Best Answer

A physical interface can consists of multiple logical interfaces, each called a unit. Each unit has a number as a unique identifier. The 0 just refers to the first logical interface.

It's good practice (but not required) to keep the unit number in sync with the VLAN id. In that case unit 0 often refers to the untagged interface.

family inet refers to the IPv4 address family. An interface can have configuration for multiple address families, each with their own specific configuration and purpose.