SD-WAN

  • 1.  checking all interfaces in router

    Posted 08-20-2019 18:14
    Hi 

    i've been looking for a tool which can help me look at all the configured interfaces in the router from the linux mode,
    it can be physical or logical ports. I've tried ifconfig, ip a, ip netns list, netstat -g and few other combinations but none provide me with the list of all the interfaces present in the router and they are hidden.
    the mac address i see from the admin mode don't match the one from linux mode unless they are present in netns.
     
    i have to follow standard scripts from my team to verify the interface status like this for e.g."cat /etc/sysconfig/network-scripts/ifcfg-enp0s20f3" which provides the same mac address in most of the routers so can't really be sure if this is a real port or just a blasted config in router.


    Regards,

    ------------------------------
    Khaja Ahmed
    Network Security Architect & Engineer
    Plainsboro NJ
    1-315-527-7242
    ------------------------------


  • 2.  RE: checking all interfaces in router

    Posted 08-20-2019 18:24
    Hey @Khaja Ahmed,

    Does this command have what you're looking for?

    lshw -c network -businfo​
    ​​

    ------------------------------
    --
    Jessie Bryan | jbryan@impulse.net
    VP Engineering |
    ------------------------------



  • 3.  RE: checking all interfaces in router

    Posted 08-20-2019 18:44

    Hi Jessie,

    thanks for the command but it doesn't work either, to give perspective to my issue i logged into one of the routers from both linux and pcli mode and attached the interfaces summary.

    i am only able to map 2 interfaces because of the namespace, for others i am not sure.

    PCLI::
    admin@AAPCDCVACON5A.AAPCONPOD5# show device-interface router AAPKY7696P5 node AAPKY7696P5A summary
    Tue 2019-08-20 18:29:05 EDT
    ==================================== ============== ==================== =================== ===================
     Name                                 Admin Status   Operational Status   Redundancy Status   MAC Address
    ==================================== ============== ==================== =================== ===================
     AAPKY7696P5A.AAPKY7696P5:2           up             up                   non-redundant       00:90:0b:5e:d5:4b
     AAPKY7696P5A.AAPKY7696P5:3           up             up                   active              00:90:0b:5e:d5:4c
     AAPKY7696P5A.AAPKY7696P5:4           up             up                   active              00:90:0b:5e:d5:4d
     AAPKY7696P5A.AAPKY7696P5:20          up             up                   non-redundant       36:e2:39:22:fa:07
     AAPKY7696P5A.AAPKY7696P5:lte         up             up                   non-redundant       be:7e:e0:b0:a0:bd
     AAPKY7696P5A.AAPKY7696P5:t1-backup   up             unknown              non-redundant       de:b5:78:1e:5b:a1
    admin@AAPCDCVACON5A.AAPCONPOD5# show network-interface router AAPKY7696P5 node AAPKY7696P5A
    Tue 2019-08-20 18:30:36 EDT
    ============= ============== =========== ================= ====== ============= ========== ==================== ================= ========== ============== =============
     Router        Node              Device   Name              VLAN   Device Type   DHCP       Address              Gateway           Hostname   Admin Status   Oper Status
    ============= ============== =========== ================= ====== ============= ========== ==================== ================= ========== ============== =============
     AAPKY7696P5   AAPKY7696P5A           2   ha-fabric            0   ethernet      disabled   169.254.255.0/31     --                --         up             up
     AAPKY7696P5   AAPKY7696P5A           3   pos                  0   ethernet      disabled   10.176.196.1/25      --                --         up             up
     AAPKY7696P5   AAPKY7696P5A           3   utility              2   ethernet      disabled   10.176.196.161/27    --                --         up             up
     AAPKY7696P5   AAPKY7696P5A           3   voice                3   ethernet      disabled   10.176.196.193/27    --                --         up             up
     AAPKY7696P5   AAPKY7696P5A           4   DIA                  0   ethernet      v4         69.57.111.84/21      69.57.104.1       --         up             up
     AAPKY7696P5   AAPKY7696P5A          20   localManagement      0   host          disabled   169.254.1.1/30       169.254.1.2       --         up             up
     AAPKY7696P5   AAPKY7696P5A         lte   lte                  0   host          disabled   169.254.176.196/31   169.254.176.197   --         up             up
     AAPKY7696P5   AAPKY7696P5A   t1-backup   mpls-t1-backup       0   t1            disabled   10.61.51.117/30      --                --         up             unknown
    LINUX::
    [root@aapky7696p5a ~]# lshw -c network -businfo
    Bus info          Device      Class          Description
    ========================================================
    pci@0000:01:00.0  enp1s0      network        I210 Gigabit Network Connection
    pci@0000:02:00.0  enp2s0      network        I210 Gigabit Network Connection
    pci@0000:04:04.0              network        A200/Remora FXO/FXS Analog AFT card
    pci@0000:00:14.0  enp0s20f0   network        Ethernet Connection I354
    pci@0000:00:14.1              network        Ethernet Connection I354
    pci@0000:00:14.2              network        Ethernet Connection I354
    pci@0000:00:14.3              network        Ethernet Connection I354
                      habr        network        Ethernet interface
                      kni20       network        Wireless interface
                      kni254      network        Wireless interface
    [root@aapky7696p5a ~]# ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: enp0s20f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master habr state UP group default qlen 1000
        link/ether 00:90:0b:5e:d5:4a brd ff:ff:ff:ff:ff:ff
    6: enp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether 00:90:0b:5e:d5:4e brd ff:ff:ff:ff:ff:ff
    7: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether 00:90:0b:5e:d5:4f brd ff:ff:ff:ff:ff:ff
    9: habr: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
        link/ether 00:90:0b:5e:d5:4a brd ff:ff:ff:ff:ff:ff
        inet 30.254.255.1/30 brd 30.254.255.3 scope global noprefixroute habr
           valid_lft forever preferred_lft forever
        inet6 fe80::290:bff:fe5e:d54a/64 scope link
           valid_lft forever preferred_lft forever
    12: kni20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
        link/ether 76:19:50:69:35:c5 brd ff:ff:ff:ff:ff:ff
        inet 169.254.1.2/30 brd 169.254.1.3 scope global kni20
           valid_lft forever preferred_lft forever
        inet6 fe80::7419:50ff:fe69:35c5/64 scope link
           valid_lft forever preferred_lft forever
    13: kni254: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
        link/ether c2:ad:88:cb:bc:72 brd ff:ff:ff:ff:ff:ff
        inet 169.254.127.127/31 brd 255.255.255.255 scope global kni254
           valid_lft forever preferred_lft forever
        inet6 fe80::c0ad:88ff:fecb:bc72/64 scope link
           valid_lft forever preferred_lft forever
    [root@aapky7696p5a ~]# ip netns list
    t1-ns-6 (id: 1073741829)
    lte (id: 1073741828)
    routingEngine
    [root@aapky7696p5a ~]# ip netns exec lte ip a show
    1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    8: enp0s22u1u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
        link/ether a2:c0:c2:45:fa:68 brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.128/24 brd 192.168.1.255 scope global enp0s22u1u2
           valid_lft forever preferred_lft forever
        inet6 2600:380:8a31:bad2:a0c0:c2ff:fe45:fa68/64 scope global mngtmpaddr dynamic
           valid_lft 85940sec preferred_lft 13940sec
        inet6 fe80::a0c0:c2ff:fe45:fa68/64 scope link
           valid_lft forever preferred_lft forever
    14: lte: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
        link/ether f2:3a:de:aa:1c:87 brd ff:ff:ff:ff:ff:ff
        inet 169.254.176.197/31 brd 255.255.255.255 scope global lte
           valid_lft forever preferred_lft forever
        inet6 fe80::f03a:deff:feaa:1c87/64 scope link
           valid_lft forever preferred_lft forever
    [root@aapky7696p5a ~]# ip netns exec t1-ns-6 ip a show
    1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    15: t1-backup: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
        link/ether 06:2c:1c:22:94:08 brd ff:ff:ff:ff:ff:ff
        inet 169.254.128.129/31 brd 255.255.255.255 scope global t1-backup
           valid_lft forever preferred_lft forever
        inet6 fe80::42c:1cff:fe22:9408/64 scope link
           valid_lft forever preferred_lft forever
    16: w1g1: <NO-CARRIER,POINTOPOINT,NOARP,UP> mtu 1564 qdisc noqueue state DOWN group default qlen 100
        link/ppp
    17: w1g1ppp: <NO-CARRIER,POINTOPOINT,NOARP,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 100
        link/ppp
        inet 10.61.51.117 peer 10.61.51.118/32 scope global w1g1ppp
           valid_lft forever preferred_lft forever


    ------------------------------
    Khaja Ahmed
    Network Security Architect & Engineer
    Plainsboro NJ
    1-315-527-7242
    ------------------------------



  • 4.  RE: checking all interfaces in router

    Posted 08-20-2019 19:00
    I think your source of confusion is with the MAC address.  In the specific deployment you're looking at, the DIA and LAN interface use a virtual MAC address.  The output of "show device-interface summary" and "ip a" in Linux will both show you the physical MAC address of the interface, not the shared virtual MAC address. 

    In this specific deployment and specifically for the DIA interface, we are writing the shared MAC address into the ifcfg file for the DIA interface so that the interface in Linux uses the virtual MAC when 128T is stopped.  This is because there are a variety of Broadband modem types and some of them will not hand out more than one address to different devices, so using two different MAC addresses will blackhole traffic and require a modem reboot when software transitions between stopped and running.  This is also the reason why we require this particular deployment to not plug in both DIA interfaces at the same time to modems with multiple ports.

    I still don't understand your original problem though.  What information are you trying to query and why are you limited to only getting this from Linux and not one of the API calls?

    ------------------------------
    Lane Shields
    Sales Engineer
    GA
    ------------------------------



  • 5.  RE: checking all interfaces in router

    Posted 08-20-2019 19:58
    Hmmm

    I also use:
    lshw -class network​


    Are you you trying to map the 128T interfaces (DPDK) from Linux?



    ------------------------------
    --
    Jessie Bryan | jbryan@impulse.net
    VP Engineering |
    ------------------------------