1

I have a juniper ex2200c with a trunked uplink and an access port on a vlan. I plug a device into the access port and port mirror the access port and the uplink (at different times, as you can only have one analyzer at a time). I see dhcp requests come in the access port, but only CDP packets go out the uplink on the vlan (tshark for the device mac address). STP is not enabled on the 2200. I'm not sure what would allow some packets to be forwarded and not others. It's a simple config, the only firewall is on lo0 for controlling access to the 2200 itself.

Lightly redacted config:

## Last commit: 2022-11-17 08:40:26 PST by alan
version 15.1R7-S12;
interfaces {
    ge-0/0/0 {
        unit 0 {
            family ethernet-switching {
                port-mode access;
                vlan {
                    members vlan3999;
                }
            }
        }
    }
    ...
    ge-0/0/10 {
        description "Mirror tap";
        unit 0 {
            family ethernet-switching;
        }
    }
    ge-0/0/11 {
        description "Phone connection";
        unit 0 {
            family ethernet-switching {
                port-mode access;
                vlan {
                    members vlan24;
                }
            }
        }
    }
    ge-0/1/0 {
        description "Uplink";
        unit 0 {
            family ethernet-switching {
                port-mode trunk;
                vlan {
                    /* Phone VLAN */
                    members vlan24;
                }
                /* Local Engineering VLAN */
                native-vlan-id 3999;
            }
        }
    }
    ge-0/1/1 {
        unit 0 {
            family ethernet-switching;
        }
    }
    lo0 {
        unit 0 {
            family inet {
                filter {
                    input acl99;
                }
            }
        }
    }
    vlan {
        unit 24 {
            description "Phone LAN";
            family inet {
                address 10.64.24.21/24;
            }
        }
        unit 3999 {
            description "Engineering LAN";
            family inet {
                address 10.64.18.21/24;
            }
        }
    }
}
routing-options {
    static {
        route 0.0.0.0/0 next-hop 10.64.18.1;
    }
}
protocols {
    lldp {
        interface all;
    }
    lldp-med {
        interface all;
    }
}
policy-options {
    prefix-list all {
        0.0.0.0/0;
    }
    prefix-list acl99 {
        10.64.18.0/24;
    }
    prefix-list acl98 {
        10.64.18.0/24;
    }
}
firewall {
    family inet {
        filter acl99 {
            term ssh_telnet_allow {
                from {
                    source-prefix-list {
                        acl99;
                    }
                    destination-port [ ssh telnet http ];
                }
                then accept;
            }
            term ssh_telnet_deny {
                from {
                    source-prefix-list {
                        all;
                    }
                    destination-port [ ssh telnet http ];
                }
                then {
                    discard;
                }
            }
            term snmp_allow {
                from {
                    source-prefix-list {
                        acl98;
                    }
                    destination-port 161;
                }
                then accept;
            }
            term snmp_deny {
                from {
                    source-prefix-list {
                        all;
                    }
                    destination-port 161;
                }
                then {
                    discard;
                }
            }
            term ntp_allow {
                from {
                    source-prefix-list {
                        acl98;
                    }
                    destination-port 123;
                }
                then accept;
            }
            term ntp_deny {
                from {
                    source-prefix-list {
                        all;
                    }
                    destination-port 123;
                }
                then {
                    discard;
                }
            }
            term everything_else {
                then accept;
            }
        }
    }
}
ethernet-switching-options {
    analyzer phone {
        ratio 1;
        loss-priority low;
        input {
            ingress {
                interface ge-0/0/11.0;
            }
            egress {
                interface ge-0/0/11.0;
            }
        }
        output {
            interface {
                ge-0/0/10.0;
            }
        }
    }
    inactive: analyzer uplink {
        ratio 1;
        loss-priority low;
        input {
            ingress {
                interface ge-0/1/0.0;
            }
            egress {
                interface ge-0/1/0.0;
            }
        }
        output {
            interface {
                ge-0/0/10.0;
            }
        }
    }
    storm-control {
        interface all;
    }
}
vlans {
    vlan24 {
        description "Phone VLAN";
        vlan-id 24;
        l3-interface vlan.24;
    }
    vlan3999 {
        description "Engineering LAN";
        vlan-id 3999;
        l3-interface vlan.3999;
    }
}
1
  • 1
    Post your config(s). Is there any type of DHCP inspection configured?
    – Ricky
    Nov 17, 2022 at 3:53

1 Answer 1

2

If you mirrored the uplink port and that is an 802.1q trunk, you'll have to find out if (or make sure that) ...

  • the port mirror configuration replicates both tagged and untagged frames over to the mirror destination port
  • the mirror destination port does not strip the vlan tags as they had been at the source port
  • the NIC of your capturing device does not drop tagged frames (not all NICs can do this, and some need special configuration in the NIC driver or registry flags in Windows)

Also, look at possible configuration bits of DHCP Snooping on that switch. DHCP Snooping can intercept and drop illicit DHCP packets on ports where they are undesired, a feature to keep rogue DCHP servers at bay. There may be such a setup in place - or leftovers from an earlier configuration.

4
  • The issue is not basic functions of the port mirror - the device is failing to get an ip address and I'm trying to figure out why, as the problem appears to be that the dhcp requests are not getting forwarded. The port mirror isn't infallible, but I don't think it's the issue here - and yes, the tags are shown...
    – abatie
    Nov 17, 2022 at 0:44
  • "as the problem appears to be that the dhcp requests are not getting forwarded" . Just DHCP requests, other traffic is OK? Then I'd start looking for DHCP snooping/inspection config bits or leftovers thereof, just as Ricky suggested, too. Nov 17, 2022 at 13:10
  • Yup, checked that, it's a really simple config. I tried statically configuring the device and see that arps (for the gateway address) are not getting forwarded either. It seems the only thing getting forwarded are the CDP multicasts, which is really strange as arps are broadcasts and one would expect them to get flooded as well. I tried disabling storm control "just in case" also, but that had no effect either.
    – abatie
    Nov 17, 2022 at 16:36
  • Also, I configured an address on the vlan on the juniper itself and verified the uplink connectivity and port mirroring are working fine.
    – abatie
    Nov 17, 2022 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.