lundi 2 novembre 2015

Here is the task given for me. [on hold]

I'm new to networking and python. help me to answer these questions and a way to learn REGEX clearly.

   set ouput {RP/0/RSP1/CPU0:XMEN9(admin)#show plat
    Node            Type                      State            Config State
    -----------------------------------------------------------------------------
    0/RSP0/CPU0     A9K-RSP440-TR(Standby)    IOS XR RUN       PWR,NSHUT,MON
    0/RSP1/CPU0     A9K-RSP440-TR(Active)     IOS XR RUN       PWR,NSHUT,MON
    0/0/CPU0        A9K-SIP-700               ADMIN DOWN       PWR,NSHUT,MON
    0/2/CPU0        A9K-24x10GE-SE            IOS XR RUN       PWR,NSHUT,MON
    0/3/CPU0        A9K-40GE-B                SHUTDOWN         PWR,NSHUT,MON
    0/PM0/SP        A9K-3KW-AC                READY            PWR,NSHUT,MON
    0/PM1/SP        A9K-3KW-AC                READY            PWR,NSHUT,MON
    RP/0/RSP1/CPU0:XMEN9(admin)# }



1. Display the nodes in IOS XR RUN -- Nodes in IOS XR RUN state :- 0/rsp0/cpu0 0/rsp1/cpu0 0/2/cpu0
2. Diplay the nodes in READY
3. Display the nodes in SHUTDOWN
4. DIsplay the nodes in ADMIN DOWN

---------------------------------------------------------------------------------------------------------------------------

RP/0/RSP1/CPU0:XMEN9#show ipv4 vrf all interface br

Interface                      IP-Address      Status          Protocol Vrf-Name
Loopback0                      200.200.200.200 Up              Up       default
MgmtEth0/RSP1/CPU0/0           unassigned      Shutdown        Down     default
MgmtEth0/RSP1/CPU0/1           unassigned      Shutdown        Down     default
MgmtEth0/RSP0/CPU0/0           172.18.54.25    Up              Up       default
MgmtEth0/RSP0/CPU0/1           unassigned      Shutdown        Down     default
TenGigE0/2/0/0                 201.1.1.1       Up              Up       default
TenGigE0/2/0/1                 unassigned      Shutdown        Down     default
TenGigE0/2/0/2                 unassigned      Shutdown        Down     default
TenGigE0/2/0/3                 201.1.2.1       Up              Up       default
TenGigE0/2/0/4                 unassigned      Shutdown        Down     default
TenGigE0/2/0/5                 unassigned      Shutdown        Down     default
TenGigE0/2/0/6                 144.229.2.1     Up              Up       default
TenGigE0/2/0/7                 unassigned      Shutdown        Down     default
TenGigE0/2/0/8                 unassigned      Shutdown        Down     default
TenGigE0/2/0/9                 unassigned      Shutdown        Down     default
TenGigE0/2/0/10                unassigned      Shutdown        Down     default
TenGigE0/2/0/11                unassigned      Shutdown        Down     default
TenGigE0/2/0/12                unassigned      Shutdown        Down     default
TenGigE0/2/0/13                unassigned      Shutdown        Down     default
TenGigE0/2/0/14                unassigned      Shutdown        Down     default
TenGigE0/2/0/15                unassigned      Shutdown        Down     default
TenGigE0/2/0/16                unassigned      Shutdown        Down     default
TenGigE0/2/0/17                unassigned      Shutdown        Down     default
TenGigE0/2/0/18                unassigned      Shutdown        Down     default
TenGigE0/2/0/19                unassigned      Shutdown        Down     default
TenGigE0/2/0/20                unassigned      Shutdown        Down     default
TenGigE0/2/0/21                unassigned      Shutdown        Down     default
TenGigE0/2/0/22                unassigned      Shutdown        Down     default
TenGigE0/2/0/23                unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/0         unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/1         unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/2         unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/3         unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/4         unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/5         144.228.2.1     Up              Up       VPN_1
GigabitEthernet0/3/0/6         unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/7         unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/8         unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/9         unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/10        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/11        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/12        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/13        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/14        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/15        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/16        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/17        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/18        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/19        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/20        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/21        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/22        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/23        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/24        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/25        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/26        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/27        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/28        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/29        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/30        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/31        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/32        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/33        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/34        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/35        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/36        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/37        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/38        unassigned      Shutdown        Down     default
GigabitEthernet0/3/0/39        unassigned      Shutdown        Down     default
RP/0/RSP1/CPU0:XMEN9#


1. Total Number of interfaces 
2. Total number of interfaces in Up | Up
3. Total number of interfaces in Down | Down State.
3. How many interfaces in Default Vrf
4. How many interfaces in VPN_1 (vrf) and it is name

---------------------------------------------------------------------------------------------------------------------------

RP/0/RSP1/CPU0:XMEN9#show int TenGigE0/2/0/6
TenGigE0/2/0/6 is up, line protocol is Down
  Interface state transitions: 5
  Hardware is TenGigE, address is 0022.bddf.66fc (bia 0022.bddf.66fc)
  Layer 1 Transport Mode is LAN
  Internet address is 144.229.2.1/24
  MTU 1514 bytes, BW 10000000 Kbit (Max: 10000000 Kbit)
     reliability 255/255, txload 0/255, rxload 0/255
  Encapsulation ARPA,
  Full-duplex, 10000Mb/s, link type is force-up
  output flow control is off, input flow control is off
  loopback not set,
  ARP type ARPA, ARP timeout 04:00:00
  Last input 00:00:00, output 00:00:00
  Last clearing of "show interface" counters 00:54:50
  5 minute input rate 0 bits/sec, 1 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     61801 packets input, 3963620 bytes, 60002 total input drops
     0 drops for unrecognized upper-level protocol
     Received 0 broadcast packets, 1035 multicast packets
              0 runts, 0 giants, 0 throttles, 0 parity
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     1542 packets output, 118946 bytes, 0 total output drops
     Output 0 broadcast packets, 844 multicast packets
     0 output errors, 0 underruns, 0 applique, 0 resets
     0 output buffer failures, 0 output buffers swapped out
     0 carrier transitions


1. Interface status and the line protocol status
2. IP address assigned to the interface
3. Number of input packtes
4. Number of output packets

---------------------------------------------------------------------------------------------------------------------------

RP/0/RSP1/CPU0:XMEN9#show int TenGigE0/2/0/6 acc
TenGigE0/2/0/6
  Protocol              Pkts In         Chars In     Pkts Out        Chars Out
  IPV4_UNICAST              766            40194          699            34553
  IPV4_MULTICAST           1039            58420          847            61040


RP/0/RSP1/CPU0:XMEN9#


1. IPV4_UNICAST ----> Pkts_in (766) -- Pkts Out (699)

I'm new to networking and python. help me to answer these questions and a way to learn REGEX clearly.

Aucun commentaire:

Enregistrer un commentaire