Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnng - wrong display with various options #257

Open
teomcpy opened this issue Mar 25, 2016 · 4 comments
Open

gnng - wrong display with various options #257

teomcpy opened this issue Mar 25, 2016 · 4 comments
Labels

Comments

@teomcpy
Copy link

teomcpy commented Mar 25, 2016

1. Issue#1 - wrong display with multiple router output:

ubuntu@ubuntu-VirtualBox:~/MyFiles/Bonuses/Bonus#07$ gnng --all
DEVICE: 172.16.1.100
DEVICE: 172.16.1.101
DEVICE: 172.16.1.2
Interface       | Addresses    | Subnets       | ACLs IN | ACLs OUT | Description
---------------------------------------------------------------------------------
FastEthernet0/0 | 172.16.1.101 | 172.16.1.0/24 |         |          |            

Interface       | Addresses    | Subnets       | ACLs IN | ACLs OUT | Description
---------------------------------------------------------------------------------
FastEthernet0/0 | 172.16.1.100 | 172.16.1.0/24 |         |          |            

Interface       | Addresses  | Subnets       | ACLs IN | ACLs OUT | Description
-------------------------------------------------------------------------------
FastEthernet0/0 | 172.16.1.2 | 172.16.1.0/24 |         |          |    

2. Issue#2 - no output is displayed when doing this:

gnng --filter-on-type='ROUTER'
Usage: gnng [options] [routers]

GetNets-NG  Fetches interface information from routing and firewall devices.
This includes network and IP information along with the inbound and outbound
filters that may be applied to the interface. Skips un-numbered and disabled
interfaces by default. Works on Cisco, Foundry, Juniper, and NetScreen

This should not need an IP address or name to execute. It should execute gnng on all routers in netdevices.

3. Issue#3 - no output is displayed when doing this:

gnng -N
Usage: gnng [options] [routers]

GetNets-NG  Fetches interface information from routing and firewall devices.
This includes network and IP information along with the inbound and outbound
filters that may be applied to the interface. Skips un-numbered and disabled
interfaces by default. Works on Cisco, Foundry, Juniper, and NetScreen

This should not need an IP address or name to execute. It should execute gnng on all routers in netdevices.

4. Issue#4 - option -d does not display administratively down interfaces (Cisco router)

ubuntu@ubuntu-VirtualBox:~/MyFiles/Bonuses/Bonus#07$ gnng -d 172.16.1.2
DEVICE: 172.16.1.2
Interface       | Addresses  | Subnets       | ACLs IN | ACLs OUT | Description
-------------------------------------------------------------------------------
FastEthernet0/0 | 172.16.1.2 | 172.16.1.0/24 |         |          |        

5. Issue#5 - interface description is not shown:

Router config:

interface FastEthernet0/0
 description TO_UBUNTU_VM
 ip address 172.16.1.100 255.255.255.0
gnng 172.16.1.100
DEVICE: 172.16.1.100
Interface       | Addresses    | Subnets       | ACLs IN | ACLs OUT | Description
---------------------------------------------------------------------------------
FastEthernet0/0 | 172.16.1.100 | 172.16.1.0/24 |         |          | 
@jathanism jathanism added the bug label Mar 25, 2016
@jathanism
Copy link
Member

Thanks for the report! I'll have to take a good look at some of these. Here's my initial thoughts on some of them.

Issue 1:

I agree that this display is un-intuitive. The DEVICE: {foo} is displayed when the devices are processed, and then the results are returned in real time and can potentially be out of order from how they were input.This is confusing and should be fixed.

Issue 2:

This is just confusing. Definitely a bug and a regression at that.

Issue 3:

-N/--nonprod is just a modifier to an existing query. You're still expected to provide a device name. This is meant to allow you to connect/scan a device that is marked as NON-PRODUCTION, which Trigger by default will skip. This one isn't actually a bug, but the help-text could be improved!

Issue 4:

This is also confusing, because-d/--include-disabled and -u/--include-unnumbered seems to be conflated internally. I'm not sure how this got to be this way, but I'll blame the lack of unit testing on this utility. Definitely a bug.

Issue 5:

I can't reproduce this one on my Arista vEOS VM. Perhaps there's a minor difference between that and IOS that is affecting parsing. I'll have to revisit this after I fix my CSR100v VM. Check it out anyhow:

Config:

arista-vm#show run int eth1
interface Ethernet1
   description TO_UBUNTU_VM
   no switchport
   ip address 172.16.118.136/24

Output:

$ gnng arista-sw1
DEVICE: arista-sw1
Interface   | Addresses      | Subnets         | ACLs IN | ACLs OUT | Description
------------------------------------------------------------------------------------
Ethernet1   | 172.16.118.136 | 172.16.118.0/24 |         |          |  TO_UBUNTU_VM
Management1 | 192.168.56.203 | 192.168.56.0/24 |         |          |

@supertylerc
Copy link
Contributor

The first display issue appears to be a duplicate of #167 and is fixed by #274.

@supertylerc
Copy link
Contributor

The third issue is addressed in #276. I'd be up for feedback on better phrasing.

@supertylerc
Copy link
Contributor

I can't reproduce issue 5 running IOS.

$ gnng 10.254.254.2
DEVICE: 10.254.254.2
Interface       | Addresses    | Subnets         | ACLs IN | ACLs OUT | Description
-----------------------------------------------------------------------------------
    Ethernet0/0 | 10.254.254.2 | 10.254.254.0/24 |         |          |  harbl

IOS version:

R1#sh ver | i Version
Cisco IOS Software, 7200 Software (C7200-ADVIPSERVICESK9-M), Version 15.2(4)S5, RELEASE SOFTWARE (fc1)
BOOTLDR: 7200 Software (C7200-ADVIPSERVICESK9-M), Version 15.2(4)S5, RELEASE SOFTWARE (fc1)
6 slot VXR midplane, Version 2.1
R1#

However, it's important to note that for IOS, gnng doesn't look at the running configuration. Therefore, if you added the interface description but did NOT copy run start or wr mem, you won't see the interface description.

@jathanism, I feel like gnng should look at the running config on IOS. gnng looks at the running config for ASA, Nexus, and EOS. Thoughts?

jathanism pushed a commit that referenced this issue Apr 18, 2016
Add conditionals to allow `gnng` to execute properly when passing the
`--filter-on-type` option.

Fixes issue #2 in #257.
jathanism pushed a commit that referenced this issue Apr 18, 2016
Update help string for `-N`/`--noprod` flag for `gnng` to mention that a
legitimate query is required in addition to the `-N`/`--noprod` flag.

Fixes third issue of #257.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants