I have a Cisco router and I need to know which interface is used for LAN. This is the show interface description output:
R1#sho int desc
Interface Status Protocol Description
Em0/0 admin down down
Gi0/0 up up LAN
Gi0/1 up up WAN
Gi0/2 up up Crosslink
Gi0/2.100 up up Crosslink
I managed to login with pexpect and get the above output into a variable, but I'm not sure how to filter it:
execute.send('term len 0\n')
execute.expect(device['name'] + '#')
execute.send('sho int desc\n')
execute.expect(device['name'] + '#')
output = execute.before
I would like to have "Gi0/0" as a result.
Could you give me some ideas? Thanks!