Log in to ask questions, share your expertise, or stay connected to content you value. Don’t have a login? Learn how to become a member.
Source Code and GitHub Links The source code below is also available from the following GitHub locations: find-ip in Junoscriptorium on GitHub Example Output SLAX Script Contents XML Script Contents Example Output 01 admin@geri> show arp no-resolve 02 MAC Address Address Interface Flags 03 00:1c:c0:61:56:e1 10.128.10.2 vlan.0 none 04 06:0c:c3:50:3f:5e 10.128.10.5 vlan.0 none 05 06 admin@geri> show ethernet-switching table 07 Ethernet-switching table: 5 entries, 3 learned 08 VLAN MAC address Type Age Interfaces 09 default * Flood - All-members 10 default 00:0c:c3:50:3f:5e Learn 0 ge-0/0/1.0 11 default 00:1c:c0:61:56:e1 Learn 0 ge-0/0/0.0 12 default 00:26:88:06:85:c8 Static - Router 13 default 06:0c:c3:50:3f:5e Learn 0 ge-0/0/1.0 14 15 From these you can see that 10.128.10.5 (06:0c:c3:50:3f:5e) is in ge-0/0/1.0 and 10.128.10.2 (00:1c:c0:61:56:e1) is in ge-0/0/0.0 16 17 This find-ip op-script will enable you to quickly show the above mapping. SLAX Script Contents 001 /* 002 * 003 * NAME: find-ip.slax 004 * PURPOSE: Created for SouthCentral Team to combine the output of 005 * the "show ethernet-switching table" command, the "show 006 * arp" command, and the "show vlans" command. 007 * 008 * CREATED: 03/22/09 009 * BY: Jay Wilson (Solutions Architect - Western Area) 010 * LAST MOD: 03/23/09 011 * BY: Jay Wilson 012 * VERSION: 3.00 013 * 014 * MODIFICATION HISTORY: 015 * V1.00 = Initial release 016 * V2.00 = Added template WRITE-IT 017 * Added the "z" option used for tracing 018 * script flow. 019 * V2.50 = Added vlan information to the output 020 * Added age information to the output 021 * V3.00 = Created the template mash-vid that 022 * is used to put the VID (vlan-id) on 023 * the output. 024 * 025 */ 026 version 1.0; 027 ns junos = "http://xml.juniper.net/junos/*/junos"; 028 ns xnm = "http://xml.juniper.net/xnm/1.1/xnm"; 029 ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0"; 030 import "
See matching posts in thread - EX4100 + Junos 23.x
See matching posts in thread - JNCIS-SP Open Learning subscription showing only...