Committed by
Jonathan Hart
Cisco Ios PortDiscovery
Change-Id: Ic51466d027f45de8ee91c9904e92b450bf9d0bb7
Showing
5 changed files
with
524 additions
and
0 deletions
| 1 | +/* | ||
| 2 | + * Copyright 2016-present Open Networking Laboratory | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + */ | ||
| 16 | + | ||
| 17 | +package org.onosproject.drivers.cisco; | ||
| 18 | + | ||
| 19 | +import com.google.common.collect.ImmutableList; | ||
| 20 | +import org.onosproject.net.behaviour.PortDiscovery; | ||
| 21 | +import org.onosproject.net.device.PortDescription; | ||
| 22 | +import org.onosproject.net.driver.AbstractHandlerBehaviour; | ||
| 23 | +import org.onosproject.netconf.NetconfController; | ||
| 24 | +import org.onosproject.netconf.NetconfSession; | ||
| 25 | +import org.slf4j.Logger; | ||
| 26 | + | ||
| 27 | +import java.io.IOException; | ||
| 28 | +import java.util.List; | ||
| 29 | + | ||
| 30 | +import static com.google.common.base.Preconditions.checkNotNull; | ||
| 31 | +import static org.slf4j.LoggerFactory.getLogger; | ||
| 32 | + | ||
| 33 | +/** | ||
| 34 | + * Retrieves the ports from Cisco IOS devices via netconf. | ||
| 35 | + */ | ||
| 36 | +public class PortGetterCiscoIosImpl extends AbstractHandlerBehaviour | ||
| 37 | + implements PortDiscovery { | ||
| 38 | + | ||
| 39 | + private final Logger log = getLogger(getClass()); | ||
| 40 | + private String interfaces; | ||
| 41 | + | ||
| 42 | + @Override | ||
| 43 | + public List<PortDescription> getPorts() { | ||
| 44 | + NetconfController controller = checkNotNull(handler().get(NetconfController.class)); | ||
| 45 | + NetconfSession session = controller.getDevicesMap().get(handler().data().deviceId()).getSession(); | ||
| 46 | + try { | ||
| 47 | + interfaces = session.get(showInterfacesRequestBuilder()); | ||
| 48 | + } catch (IOException e) { | ||
| 49 | + log.error("Failed to retrieve Interfaces"); | ||
| 50 | + return ImmutableList.of(); | ||
| 51 | + } | ||
| 52 | + return ImmutableList.copyOf(TextBlockParserCisco.parseCiscoIosPorts(interfaces)); | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * Builds a request crafted to get the configuration required to create port | ||
| 57 | + * descriptions for the device. | ||
| 58 | + * | ||
| 59 | + * @return The request string. | ||
| 60 | + */ | ||
| 61 | + private String showInterfacesRequestBuilder() { | ||
| 62 | + //Message ID is injected later. | ||
| 63 | + StringBuilder rpc = new StringBuilder("<rpc xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">"); | ||
| 64 | + rpc.append("<get>"); | ||
| 65 | + rpc.append("<filter>"); | ||
| 66 | + rpc.append("<config-format-text-block>"); | ||
| 67 | + rpc.append("<text-filter-spec> | include exp_to_match_run_conf </text-filter-spec>"); | ||
| 68 | + rpc.append("</config-format-text-block>"); | ||
| 69 | + rpc.append("<oper-data-format-text-block>"); | ||
| 70 | + rpc.append("<show>interfaces</show>"); | ||
| 71 | + rpc.append("</oper-data-format-text-block>"); | ||
| 72 | + rpc.append("</filter>"); | ||
| 73 | + rpc.append("</get>"); | ||
| 74 | + rpc.append("</rpc>]]>]]>"); | ||
| 75 | + return rpc.toString(); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | +/* | ||
| 2 | + * Copyright 2016-present Open Networking Laboratory | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + */ | ||
| 16 | + | ||
| 17 | +package org.onosproject.drivers.cisco; | ||
| 18 | + | ||
| 19 | +import com.google.common.collect.Lists; | ||
| 20 | +import org.onosproject.net.AnnotationKeys; | ||
| 21 | +import org.onosproject.net.DefaultAnnotations; | ||
| 22 | +import org.onosproject.net.PortNumber; | ||
| 23 | +import org.onosproject.net.device.DefaultPortDescription; | ||
| 24 | +import org.onosproject.net.device.PortDescription; | ||
| 25 | + | ||
| 26 | +import java.util.Arrays; | ||
| 27 | +import java.util.List; | ||
| 28 | + | ||
| 29 | +import static org.onosproject.net.Port.Type; | ||
| 30 | + | ||
| 31 | +/** | ||
| 32 | + *Parser for Netconf configurations and replys as plain text. | ||
| 33 | + */ | ||
| 34 | +public final class TextBlockParserCisco { | ||
| 35 | + | ||
| 36 | + private static final String BANDWIDTH = "BW "; | ||
| 37 | + private static final String SPEED = " Kbit/sec"; | ||
| 38 | + private static final String ETHERNET = "Eth"; | ||
| 39 | + private static final String FASTETHERNET = "Fas"; | ||
| 40 | + private static final String GIGABITETHERNET = "Gig"; | ||
| 41 | + private static final String FDDI = "Fdd"; | ||
| 42 | + private static final String POS = "POS"; | ||
| 43 | + private static final String SERIAL = "Ser"; | ||
| 44 | + private static final List INTERFACES = Arrays.asList(ETHERNET, FASTETHERNET, GIGABITETHERNET, SERIAL, FDDI, POS); | ||
| 45 | + private static final List FIBERINTERFACES = Arrays.asList(FDDI, POS); | ||
| 46 | + | ||
| 47 | + private static final String NEWLINE_SPLITTER = "\n"; | ||
| 48 | + private static final String PORT_DELIMITER = "/"; | ||
| 49 | + private static final String SPACE = " "; | ||
| 50 | + private static final String IS_UP = "is up, line protocol is up"; | ||
| 51 | + | ||
| 52 | + | ||
| 53 | + private TextBlockParserCisco() { | ||
| 54 | + //not called, preventing any allocation | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * Calls methods to create information about Ports. | ||
| 59 | + * @param interfacesReply the interfaces as plain text | ||
| 60 | + * @return the Port description list | ||
| 61 | + */ | ||
| 62 | + public static List<PortDescription> parseCiscoIosPorts(String interfacesReply) { | ||
| 63 | + String parentInterface; | ||
| 64 | + String[] parentArray; | ||
| 65 | + String tempString; | ||
| 66 | + List<PortDescription> portDesc = Lists.newArrayList(); | ||
| 67 | + int interfacesCounter = interfacesCounterMethod(interfacesReply); | ||
| 68 | + for (int i = 0; i < interfacesCounter; i++) { | ||
| 69 | + parentInterface = parentInterfaceMethod(interfacesReply); | ||
| 70 | + portDesc.add(findPortInfo(parentInterface)); | ||
| 71 | + parentArray = parentInterface.split(SPACE); | ||
| 72 | + tempString = parentArray[0] + SPACE; | ||
| 73 | + interfacesReply = interfacesReply.replace(tempString, SPACE + tempString); | ||
| 74 | + } | ||
| 75 | + return portDesc; | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + /** | ||
| 79 | + * Creates the port information object. | ||
| 80 | + * @param interfaceTree the interfaces as plain text | ||
| 81 | + * @return the Port description object | ||
| 82 | + */ | ||
| 83 | + private static DefaultPortDescription findPortInfo(String interfaceTree) { | ||
| 84 | + String[] textStr = interfaceTree.split(NEWLINE_SPLITTER); | ||
| 85 | + String[] firstLine = textStr[0].split(SPACE); | ||
| 86 | + String firstWord = firstLine[0]; | ||
| 87 | + Type type = getPortType(textStr); | ||
| 88 | + boolean isEnabled = getIsEnabled(textStr); | ||
| 89 | + String port = getPort(textStr); | ||
| 90 | + long portSpeed = getPortSpeed(textStr); | ||
| 91 | + DefaultAnnotations.Builder annotations = DefaultAnnotations.builder() | ||
| 92 | + .set(AnnotationKeys.PORT_NAME, firstWord); | ||
| 93 | + return port == "-1" ? null : new DefaultPortDescription(PortNumber.portNumber(port), | ||
| 94 | + isEnabled, type, portSpeed, annotations.build()); | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + /** | ||
| 98 | + * Counts the number of existing interfaces. | ||
| 99 | + * @param interfacesReply the interfaces as plain text | ||
| 100 | + * @return interfaces counter | ||
| 101 | + */ | ||
| 102 | + private static int interfacesCounterMethod(String interfacesReply) { | ||
| 103 | + int counter; | ||
| 104 | + String first3Characters; | ||
| 105 | + String[] textStr = interfacesReply.split(NEWLINE_SPLITTER); | ||
| 106 | + int lastLine = textStr.length - 1; | ||
| 107 | + counter = 0; | ||
| 108 | + for (int i = 1; i < lastLine; i++) { | ||
| 109 | + first3Characters = textStr[i].substring(0, 3); | ||
| 110 | + if (INTERFACES.contains(first3Characters)) { | ||
| 111 | + counter++; | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + return counter; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + /** | ||
| 118 | + * Parses the text and seperates to Parent Interfaces. | ||
| 119 | + * @param interfacesReply the interfaces as plain text | ||
| 120 | + * @return Parent interface | ||
| 121 | + */ | ||
| 122 | + private static String parentInterfaceMethod(String interfacesReply) { | ||
| 123 | + String firstCharacter; | ||
| 124 | + String first3Characters; | ||
| 125 | + boolean isChild = false; | ||
| 126 | + StringBuilder anInterface = new StringBuilder(""); | ||
| 127 | + String[] textStr = interfacesReply.split("\\n"); | ||
| 128 | + int lastLine = textStr.length - 1; | ||
| 129 | + for (int i = 1; i < lastLine; i++) { | ||
| 130 | + firstCharacter = textStr[i].substring(0, 1); | ||
| 131 | + first3Characters = textStr[i].substring(0, 3); | ||
| 132 | + if (!(firstCharacter.equals(SPACE)) && isChild) { | ||
| 133 | + break; | ||
| 134 | + } else if (firstCharacter.equals(SPACE) && isChild) { | ||
| 135 | + anInterface.append(textStr[i] + NEWLINE_SPLITTER); | ||
| 136 | + } else if (INTERFACES.contains(first3Characters)) { | ||
| 137 | + isChild = true; | ||
| 138 | + anInterface.append(textStr[i] + NEWLINE_SPLITTER); | ||
| 139 | + } | ||
| 140 | + } | ||
| 141 | + return anInterface.toString(); | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + /** | ||
| 145 | + * Get the port type for an interface. | ||
| 146 | + * @param textStr interface splitted as an array | ||
| 147 | + * @return Port type | ||
| 148 | + */ | ||
| 149 | + private static Type getPortType(String[] textStr) { | ||
| 150 | + String first3Characters; | ||
| 151 | + first3Characters = textStr[0].substring(0, 3); | ||
| 152 | + return FIBERINTERFACES.contains(first3Characters) ? Type.FIBER : Type.COPPER; | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + /** | ||
| 156 | + * Get the state for an interface. | ||
| 157 | + * @param textStr interface splitted as an array | ||
| 158 | + * @return isEnabled state | ||
| 159 | + */ | ||
| 160 | + private static boolean getIsEnabled(String[] textStr) { | ||
| 161 | + return textStr[0].contains(IS_UP); | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + /** | ||
| 165 | + * Get the port number for an interface. | ||
| 166 | + * @param textStr interface splitted as an array | ||
| 167 | + * @return port number | ||
| 168 | + */ | ||
| 169 | + private static String getPort(String[] textStr) { | ||
| 170 | + String port; | ||
| 171 | + try { | ||
| 172 | + if (textStr[0].indexOf(PORT_DELIMITER) > 0) { | ||
| 173 | + port = textStr[0].substring(textStr[0].lastIndexOf(PORT_DELIMITER) + 1, | ||
| 174 | + textStr[0].indexOf(SPACE)); | ||
| 175 | + } else { | ||
| 176 | + port = "-1"; | ||
| 177 | + } | ||
| 178 | + } catch (RuntimeException e) { | ||
| 179 | + port = "-1"; | ||
| 180 | + } | ||
| 181 | + return port; | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + /** | ||
| 185 | + * Get the port speed for an interface. | ||
| 186 | + * @param textStr interface splitted as an array | ||
| 187 | + * @return port speed | ||
| 188 | + */ | ||
| 189 | + private static long getPortSpeed(String[] textStr) { | ||
| 190 | + long portSpeed = 0; | ||
| 191 | + String result; | ||
| 192 | + int lastLine = textStr.length - 1; | ||
| 193 | + for (int i = 0; i < lastLine; i++) { | ||
| 194 | + if ((textStr[i].indexOf(BANDWIDTH) > 0) && (textStr[i].indexOf(SPEED) > 0)) { | ||
| 195 | + result = textStr[i].substring(textStr[i].indexOf(BANDWIDTH) + 3, textStr[i].indexOf(SPEED)); | ||
| 196 | + portSpeed = Long.valueOf(result); | ||
| 197 | + break; | ||
| 198 | + } | ||
| 199 | + } | ||
| 200 | + return portSpeed; | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | +} |
| ... | @@ -19,5 +19,7 @@ | ... | @@ -19,5 +19,7 @@ |
| 19 | hwVersion="" swVersion="IOS"> | 19 | hwVersion="" swVersion="IOS"> |
| 20 | <behaviour api="org.onosproject.net.behaviour.InterfaceConfig" | 20 | <behaviour api="org.onosproject.net.behaviour.InterfaceConfig" |
| 21 | impl="org.onosproject.drivers.cisco.InterfaceConfigCiscoIosImpl"/> | 21 | impl="org.onosproject.drivers.cisco.InterfaceConfigCiscoIosImpl"/> |
| 22 | + <behaviour api="org.onosproject.net.behaviour.PortDiscovery" | ||
| 23 | + impl="org.onosproject.drivers.cisco.PortGetterCiscoIosImpl"/> | ||
| 22 | </driver> | 24 | </driver> |
| 23 | </drivers> | 25 | </drivers> | ... | ... |
| 1 | +/* | ||
| 2 | + * Copyright 2016-present Open Networking Laboratory | ||
| 3 | + * | ||
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 5 | + * you may not use this file except in compliance with the License. | ||
| 6 | + * You may obtain a copy of the License at | ||
| 7 | + * | ||
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 9 | + * | ||
| 10 | + * Unless required by applicable law or agreed to in writing, software | ||
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 13 | + * See the License for the specific language governing permissions and | ||
| 14 | + * limitations under the License. | ||
| 15 | + */ | ||
| 16 | + | ||
| 17 | +package org.onosproject.drivers.cisco; | ||
| 18 | + | ||
| 19 | + | ||
| 20 | +import org.junit.Test; | ||
| 21 | +import org.onosproject.net.AnnotationKeys; | ||
| 22 | +import org.onosproject.net.DefaultAnnotations; | ||
| 23 | +import org.onosproject.net.Port; | ||
| 24 | +import org.onosproject.net.PortNumber; | ||
| 25 | +import org.onosproject.net.device.DefaultPortDescription; | ||
| 26 | +import org.onosproject.net.device.PortDescription; | ||
| 27 | + | ||
| 28 | +import java.io.InputStream; | ||
| 29 | +import java.util.Scanner; | ||
| 30 | +import java.util.ArrayList; | ||
| 31 | +import java.util.List; | ||
| 32 | + | ||
| 33 | + | ||
| 34 | + | ||
| 35 | +import static org.junit.Assert.assertEquals; | ||
| 36 | + | ||
| 37 | +/** | ||
| 38 | + * Tests the parser for Netconf TextBlock configurations and replies from Cisco devices. | ||
| 39 | + */ | ||
| 40 | +public class TextBlockParserCiscoTest { | ||
| 41 | + | ||
| 42 | + private static final PortNumber INTF1_PORT = PortNumber.portNumber(0); | ||
| 43 | + private static final String INTF1_NAME = "FastEthernet0/0"; | ||
| 44 | + private static final PortNumber INTF2_PORT = PortNumber.portNumber(0); | ||
| 45 | + private static final String INTF2_NAME = "Ethernet1/0"; | ||
| 46 | + private static final PortNumber INTF3_PORT = PortNumber.portNumber(0); | ||
| 47 | + private static final String INTF3_NAME = "GigabitEthernet2/0"; | ||
| 48 | + private static final PortNumber INTF4_PORT = PortNumber.portNumber(0); | ||
| 49 | + private static final String INTF4_NAME = "Serial3/0"; | ||
| 50 | + private static final PortNumber INTF5_PORT = PortNumber.portNumber(0); | ||
| 51 | + private static final String INTF5_NAME = "POS4/0"; | ||
| 52 | + private static final PortNumber INTF6_PORT = PortNumber.portNumber(0); | ||
| 53 | + private static final String INTF6_NAME = "Fddi5/0"; | ||
| 54 | + private static final Port.Type COPPER = Port.Type.COPPER; | ||
| 55 | + private static final Port.Type FIBER = Port.Type.FIBER; | ||
| 56 | + private static final long CONNECTION_SPEED_ETHERNET = 100000; | ||
| 57 | + private static final long CONNECTION_SPEED_SERIAL = 1544; | ||
| 58 | + private static final long CONNECTION_SPEED_POS = 9952000; | ||
| 59 | + private static final long CONNECTION_SPEED_FDDI = 100000; | ||
| 60 | + private static final boolean IS_ENABLED = true; | ||
| 61 | + private static final boolean IS_NOT_ENABLED = false; | ||
| 62 | + private static final String TEXT_FILE = "/CiscoIosInterfaces.xml"; | ||
| 63 | + | ||
| 64 | + @Test | ||
| 65 | + public void controllersConfig() { | ||
| 66 | + InputStream streamOrig = getClass().getResourceAsStream(TEXT_FILE); | ||
| 67 | + String rpcReply = new Scanner(streamOrig, "UTF-8").useDelimiter("\\Z").next(); | ||
| 68 | + List<PortDescription> actualIntfs = TextBlockParserCisco.parseCiscoIosPorts(rpcReply); | ||
| 69 | + assertEquals("Interfaces were not retrieved from configuration", | ||
| 70 | + getExpectedIntfs(), actualIntfs); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + private List<PortDescription> getExpectedIntfs() { | ||
| 74 | + DefaultAnnotations.Builder int1Annotations = DefaultAnnotations.builder() | ||
| 75 | + .set(AnnotationKeys.PORT_NAME, INTF1_NAME); | ||
| 76 | + DefaultAnnotations.Builder int2Annotations = DefaultAnnotations.builder() | ||
| 77 | + .set(AnnotationKeys.PORT_NAME, INTF2_NAME); | ||
| 78 | + DefaultAnnotations.Builder int3Annotations = DefaultAnnotations.builder() | ||
| 79 | + .set(AnnotationKeys.PORT_NAME, INTF3_NAME); | ||
| 80 | + DefaultAnnotations.Builder int4Annotations = DefaultAnnotations.builder() | ||
| 81 | + .set(AnnotationKeys.PORT_NAME, INTF4_NAME); | ||
| 82 | + DefaultAnnotations.Builder int5Annotations = DefaultAnnotations.builder() | ||
| 83 | + .set(AnnotationKeys.PORT_NAME, INTF5_NAME); | ||
| 84 | + DefaultAnnotations.Builder int6Annotations = DefaultAnnotations.builder() | ||
| 85 | + .set(AnnotationKeys.PORT_NAME, INTF6_NAME); | ||
| 86 | + | ||
| 87 | + List<PortDescription> intfs = new ArrayList<>(); | ||
| 88 | + intfs.add(new DefaultPortDescription(INTF1_PORT, IS_ENABLED, COPPER, CONNECTION_SPEED_ETHERNET, | ||
| 89 | + int1Annotations.build())); | ||
| 90 | + intfs.add(new DefaultPortDescription(INTF2_PORT, IS_NOT_ENABLED, COPPER, CONNECTION_SPEED_ETHERNET, | ||
| 91 | + int2Annotations.build())); | ||
| 92 | + intfs.add(new DefaultPortDescription(INTF3_PORT, IS_NOT_ENABLED, COPPER, CONNECTION_SPEED_ETHERNET, | ||
| 93 | + int3Annotations.build())); | ||
| 94 | + intfs.add(new DefaultPortDescription(INTF4_PORT, IS_ENABLED, COPPER, CONNECTION_SPEED_SERIAL, | ||
| 95 | + int4Annotations.build())); | ||
| 96 | + intfs.add(new DefaultPortDescription(INTF5_PORT, IS_ENABLED, FIBER, CONNECTION_SPEED_POS, | ||
| 97 | + int5Annotations.build())); | ||
| 98 | + intfs.add(new DefaultPortDescription(INTF6_PORT, IS_ENABLED, FIBER, CONNECTION_SPEED_FDDI, | ||
| 99 | + int6Annotations.build())); | ||
| 100 | + return intfs; | ||
| 101 | + } | ||
| 102 | +} |
| 1 | +<?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="7" xmlns="urn:ietf:params:netconf:base:1.0"><data><cli-oper-data-block><item><show>interfaces</show><response> | ||
| 2 | +FastEthernet0/0 is up, line protocol is up | ||
| 3 | + Hardware is i82543 (Livengood), address is ca00.12b5.0008 (bia ca00.12b5.0008) | ||
| 4 | + Internet address is 192.168.1.20/24 | ||
| 5 | + MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec, | ||
| 6 | + reliability 255/255, txload 1/255, rxload 1/255 | ||
| 7 | + Encapsulation ARPA, loopback not set | ||
| 8 | + Keepalive set (10 sec) | ||
| 9 | + Full-duplex, 100Mb/s, 100BaseTX/FX | ||
| 10 | + ARP type: ARPA, ARP Timeout 04:00:00 | ||
| 11 | + Last input 00:00:00, output 00:00:00, output hang never | ||
| 12 | + Last clearing of "show interface" counters never | ||
| 13 | + Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 | ||
| 14 | + Queueing strategy: fifo | ||
| 15 | + Output queue: 0/40 (size/max) | ||
| 16 | + 5 minute input rate 2000 bits/sec, 1 packets/sec | ||
| 17 | + 5 minute output rate 0 bits/sec, 0 packets/sec | ||
| 18 | + 3589 packets input, 681498 bytes | ||
| 19 | + Received 2459 broadcasts, 0 runts, 0 giants, 0 throttles | ||
| 20 | + 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored | ||
| 21 | + 0 watchdog | ||
| 22 | + 0 input packets with dribble condition detected | ||
| 23 | + 2518 packets output, 242991 bytes, 0 underruns | ||
| 24 | + 0 output errors, 0 collisions, 2 interface resets | ||
| 25 | + 149 unknown protocol drops | ||
| 26 | + 0 babbles, 0 late collision, 0 deferred | ||
| 27 | + 0 lost carrier, 0 no carrier | ||
| 28 | + 0 output buffer failures, 0 output buffers swapped out | ||
| 29 | +Ethernet1/0 is administratively down, line protocol is down | ||
| 30 | + Hardware is i82543 (Livengood), address is ca00.12b5.0006 (bia ca00.12b5.0006) | ||
| 31 | + MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec, | ||
| 32 | + reliability 255/255, txload 1/255, rxload 1/255 | ||
| 33 | + Encapsulation ARPA, loopback not set | ||
| 34 | + Keepalive set (10 sec) | ||
| 35 | + Full-duplex, 100Mb/s, 100BaseTX/FX | ||
| 36 | + ARP type: ARPA, ARP Timeout 04:00:00 | ||
| 37 | + Last input never, output never, output hang never | ||
| 38 | + Last clearing of "show interface" counters never | ||
| 39 | + Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 | ||
| 40 | + Queueing strategy: fifo | ||
| 41 | + Output queue: 0/40 (size/max) | ||
| 42 | + 5 minute input rate 0 bits/sec, 0 packets/sec | ||
| 43 | + 5 minute output rate 0 bits/sec, 0 packets/sec | ||
| 44 | + 0 packets input, 0 bytes | ||
| 45 | + Received 0 broadcasts, 0 runts, 0 giants, 0 throttles | ||
| 46 | + 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored | ||
| 47 | + 0 watchdog | ||
| 48 | + 0 input packets with dribble condition detected | ||
| 49 | + 0 packets output, 0 bytes, 0 underruns | ||
| 50 | + 0 output errors, 0 collisions, 0 interface resets | ||
| 51 | + 0 unknown protocol drops | ||
| 52 | + 0 babbles, 0 late collision, 0 deferred | ||
| 53 | + 0 lost carrier, 0 no carrier | ||
| 54 | + 0 output buffer failures, 0 output buffers swapped out | ||
| 55 | +GigabitEthernet2/0 is administratively down, line protocol is down | ||
| 56 | + Hardware is i82543 (Livengood), address is ca00.12b5.0006 (bia ca00.12b5.0006) | ||
| 57 | + MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec, | ||
| 58 | + reliability 255/255, txload 1/255, rxload 1/255 | ||
| 59 | + Encapsulation ARPA, loopback not set | ||
| 60 | + Keepalive set (10 sec) | ||
| 61 | + Full-duplex, 100Mb/s, 100BaseTX/FX | ||
| 62 | + ARP type: ARPA, ARP Timeout 04:00:00 | ||
| 63 | + Last input never, output never, output hang never | ||
| 64 | + Last clearing of "show interface" counters never | ||
| 65 | + Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0 | ||
| 66 | + Queueing strategy: fifo | ||
| 67 | + Output queue: 0/40 (size/max) | ||
| 68 | + 5 minute input rate 0 bits/sec, 0 packets/sec | ||
| 69 | + 5 minute output rate 0 bits/sec, 0 packets/sec | ||
| 70 | + 0 packets input, 0 bytes | ||
| 71 | + Received 0 broadcasts, 0 runts, 0 giants, 0 throttles | ||
| 72 | + 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored | ||
| 73 | + 0 watchdog | ||
| 74 | + 0 input packets with dribble condition detected | ||
| 75 | + 0 packets output, 0 bytes, 0 underruns | ||
| 76 | + 0 output errors, 0 collisions, 0 interface resets | ||
| 77 | + 0 unknown protocol drops | ||
| 78 | + 0 babbles, 0 late collision, 0 deferred | ||
| 79 | + 0 lost carrier, 0 no carrier | ||
| 80 | + 0 output buffer failures, 0 output buffers swapped out | ||
| 81 | +Serial3/0 is up, line protocol is up | ||
| 82 | + Hardware is MCI Serial | ||
| 83 | + Internet address is 192.168.10.203, subnet mask is 255.255.255.0 | ||
| 84 | + MTU 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec, rely 255/255, load 1/255 | ||
| 85 | + Encapsulation HDLC, loopback not set, keepalive set (10 sec) | ||
| 86 | + Last input 0:00:07, output 0:00:00, output hang never | ||
| 87 | + Output queue 0/40, 0 drops; input queue 0/75, 0 drops | ||
| 88 | + 5 minute input rate 0 bits/sec, 0 packets/sec | ||
| 89 | + 5 minute output rate 0 bits/sec, 0 packets/sec | ||
| 90 | + 16263 packets input, 1347238 bytes, 0 no buffer | ||
| 91 | + Received 13983 broadcasts, 0 runts, 0 giants | ||
| 92 | + 2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort | ||
| 93 | + 1 carrier transitions | ||
| 94 | + 22146 packets output, 2383680 bytes, 0 underruns | ||
| 95 | + 0 output errors, 0 collisions, 2 interface resets, 0 restarts | ||
| 96 | +POS4/0 is up, line protocol is up | ||
| 97 | + Hardware is Packet over SONET | ||
| 98 | + Internet address is 10.41.41.2/24 | ||
| 99 | + MTU 4470 bytes, BW 9952000 Kbit/sec, DLY 100 usec, rely 255/255, load 1/255 | ||
| 100 | + Encapsulation HDLC, crc 32, loopback not set | ||
| 101 | + Keepalive not set | ||
| 102 | + Scramble enabled | ||
| 103 | + Last input 00:00:59, output 00:00:11, output hang never | ||
| 104 | + Last clearing of "show interface" counters 00:00:14 | ||
| 105 | + Queueing strategy: fifo | ||
| 106 | + Output queue 0/40, 0 drops; input queue 0/75, 0 drops | ||
| 107 | + Available Bandwidth 9582482 kilobits/sec | ||
| 108 | + 5 minute input rate 0 bits/sec, 0 packets/sec | ||
| 109 | + 5 minute output rate 0 bits/sec, 0 packets/sec | ||
| 110 | + 0 packets input, 0 bytes, 0 no buffer | ||
| 111 | + Received 0 broadcasts, 0 runts, 0 giants, 0 throttles | ||
| 112 | + 0 parity | ||
| 113 | + 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort | ||
| 114 | + 1 packets output, 314 bytes, 0 underruns | ||
| 115 | + 0 output errors, 0 applique, 0 interface resets | ||
| 116 | + 0 output buffer failures, 0 output buffers swapped out | ||
| 117 | + 0 carrier transitions | ||
| 118 | +Fddi5/0 is up, line protocol is up | ||
| 119 | + Hardware is cxBus Fddi, address is 0000.0c02.adf1 (bia 0000.0c02.adf1) | ||
| 120 | + Internet address is 10.108.33.14, subnet mask is 255.255.255.0 | ||
| 121 | + MTU 4470 bytes, BW 100000 Kbit/sec, DLY 100 usec, rely 255/255, load 1/255 | ||
| 122 | + Encapsulation SNAP, loopback not set, keepalive not set | ||
| 123 | + ARP type: SNAP, ARP Timeout 4:00:00 | ||
| 124 | + Phy-A state is active, neighbor is B, cmt signal bits 008/20C, status ILS | ||
| 125 | + Phy-B state is active, neighbor is A, cmt signal bits 20C/008, status ILS | ||
| 126 | + ECM is in, CFM is thru, RMT is ring_op | ||
| 127 | + Token rotation 5000 usec, ring operational 21:32:34 | ||
| 128 | + Upstream neighbor 0000.0c02.ba83, downstream neighbor 0000.0c02.ba83 | ||
| 129 | + Last input 0:00:05, output 0:00:00, output hang never | ||
| 130 | + Last clearing of “show interface” counters 0:59:10 | ||
| 131 | + Output queue 0/40, 0 drops; input queue 0/75, 0 drops | ||
| 132 | + 5 minute input rate 69000 bits/sec, 44 packets/sec | ||
| 133 | + 5 minute output rate 0 bits/sec, 1 packets/sec | ||
| 134 | + 113157 packets input, 21622582 bytes, 0 no buffer | ||
| 135 | + Received 276 broadcasts, 0 runts, 0 giants | ||
| 136 | + 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort | ||
| 137 | + 4740 packets output, 487346 bytes, 0 underruns | ||
| 138 | + 0 output errors, 0 collisions, 0 interface resets, 0 restarts | ||
| 139 | + 0 transitions, 2 traces, 3 claims, 2 beacons</response></item></cli-oper-data-block></data></rpc-reply>]]>]]> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment