思科交换机MAC地址的问题
最近在研究思科交换机端口MAC的问题,对比华为交换机的确实不一样,下面说说思科交换机MAC地址吧首先,show version 看看交换机信息,里面包含了交换机的MAC地址信息,如下:
cisco WS-C3850-48T (MIPS) processor with 4194304K bytes of physical memory.
Processor board ID FOC2113X0HT
1 Virtual Ethernet interface
104 Gigabit Ethernet interfaces
8 Ten Gigabit Ethernet interfaces
2048K bytes of non-volatile configuration memory.
4194304K bytes of physical memory.
250456K bytes of Crash Files at crashinfo:.
250456K bytes of Crash Files at crashinfo-1:.
1609272K bytes of Flash at flash:.
1609272K bytes of Flash at flash-1:.
0K bytes of Dummy USB Flash at usbflash0:.
0K bytes of Dummy USB Flash at usbflash0-1:.
0K bytes ofat webui:.
Base Ethernet MAC Address : 00:f8:2c:6d:23:00 ---- 这个就是交换机的MAC地址
Motherboard Assembly Number : 73-16296-08
Motherboard Serial Number : FOC21116HLM
Model Revision Number : AA0
Motherboard Revision Number : A0
Model Number : WS-C3850-48T
System Serial Number : FOC2113X0HT
然后我们看看交换机的端口编排,show ip interface brief看到信息如下:
GigabitEthernet1/0/1 unassigned YES unsetup up
GigabitEthernet1/0/2 unassigned YES unsetup up
GigabitEthernet1/0/3 unassigned YES unsetdown down
GigabitEthernet1/0/4 unassigned YES unsetup up
GigabitEthernet1/0/5 unassigned YES unsetup up
GigabitEthernet1/0/6 unassigned YES unsetup up
GigabitEthernet1/0/7 unassigned YES unsetdown down
GigabitEthernet1/0/8 unassigned YES unsetdown down
GigabitEthernet1/0/9 unassigned YES unsetdown down
GigabitEthernet1/0/10unassigned YES unsetdown down
GigabitEthernet1/0/11unassigned YES unsetdown down
GigabitEthernet1/0/12unassigned YES unsetdown down
GigabitEthernet1/0/13unassigned YES unsetdown down
GigabitEthernet1/0/14unassigned YES unsetdown down
GigabitEthernet1/0/15unassigned YES unsetdown down
GigabitEthernet1/0/16unassigned YES unsetdown down
GigabitEthernet1/0/17unassigned YES unsetdown down
GigabitEthernet1/0/18unassigned YES unsetdown down
GigabitEthernet1/0/19unassigned YES unsetdown down
GigabitEthernet1/0/20unassigned YES unsetdown down
GigabitEthernet1/0/21unassigned YES unsetdown down
GigabitEthernet1/0/22unassigned YES unsetdown down
GigabitEthernet1/0/23unassigned YES unsetdown down
GigabitEthernet1/0/24unassigned YES unsetdown down
GigabitEthernet1/0/25unassigned YES unsetup up
GigabitEthernet1/0/26unassigned YES unsetup up
GigabitEthernet1/0/27unassigned YES unsetup up
GigabitEthernet1/0/28unassigned YES unsetup up
GigabitEthernet1/0/29unassigned YES unsetup up
GigabitEthernet1/0/30unassigned YES unsetup up
GigabitEthernet1/0/31unassigned YES unsetdown down
GigabitEthernet1/0/32unassigned YES unsetdown down
GigabitEthernet1/0/33unassigned YES unsetup up
GigabitEthernet1/0/34unassigned YES unsetdown down
GigabitEthernet1/0/35unassigned YES unsetdown down
GigabitEthernet1/0/36unassigned YES unsetdown down
GigabitEthernet1/0/37unassigned YES unsetup up
GigabitEthernet1/0/38unassigned YES unsetup up
GigabitEthernet1/0/39unassigned YES unsetup up
GigabitEthernet1/0/40unassigned YES unsetup up
GigabitEthernet1/0/41unassigned YES unsetdown down
GigabitEthernet1/0/42unassigned YES unsetdown down
GigabitEthernet1/0/43unassigned YES unsetdown down
GigabitEthernet1/0/44unassigned YES unsetdown down
GigabitEthernet1/0/45unassigned YES unsetup up
GigabitEthernet1/0/46unassigned YES unsetdown down
GigabitEthernet1/0/47unassigned YES unsetdown down
GigabitEthernet1/0/48unassigned YES unsetup up
GigabitEthernet1/1/1 unassigned YES unsetup up
GigabitEthernet1/1/2 unassigned YES unsetdown down
GigabitEthernet1/1/3 unassigned YES unsetdown down
GigabitEthernet1/1/4 unassigned YES unsetdown down
看到是一台48口的交换机,外带四个光口哈!
这个时候,我们来看看第一个端口的MAC信息,show interface g1/0/1 ,看到的信息如下:
GigabitEthernet1/0/1 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 00f8.2c68.b381 (bia 00f8.2c68.b381) ---- 这个就是端口1的MAC地址
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 140000 bits/sec, 104 packets/sec
1769295578 packets input, 383117383060 bytes, 0 no buffer
Received 8163 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
3060247715 packets output, 654969940566 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
同理,我们来看看第二个端口的MAC信息,show interface g1/0/2 ,看到的信息如下:
GigabitEthernet1/0/2 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 00f8.2c68.b382 (bia 00f8.2c68.b382) ---- 这个就是端口2的MAC地址
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 103000 bits/sec, 74 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
1307894603 packets output, 273177461659 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
下面,我们来看看第三个端口的MAC信息,show interface g1/0/3 ,看到的信息如下:
GigabitEthernet1/0/3 is down, line protocol is down (notconnect)
Hardware is Gigabit Ethernet, address is 00f8.2c68.b383 (bia 00f8.2c68.b383) ---- 这个就是端口3的MAC地址
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Auto-duplex, Auto-speed, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
.........
下面,我们来看看第 9 个端口的MAC信息,show interface g1/0/9 ,看到的信息如下:
GigabitEthernet1/0/9 is down, line protocol is down (notconnect)
Hardware is Gigabit Ethernet, address is 00f8.2c68.b389 (bia 00f8.2c68.b389) ---- 这个就是端口9的MAC地址
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Auto-duplex, Auto-speed, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
这时,我们来看看第 10 个端口的MAC信息,show interface g1/0/10 ,看到的信息如下:
GigabitEthernet1/0/10 is down, line protocol is down (notconnect)
Hardware is Gigabit Ethernet, address is 00f8.2c68.b38a (bia 00f8.2c68.b38a) ---- 这个就是端口 10 的MAC地址
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Auto-duplex, Auto-speed, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
接下来,我们来看看第 15 个端口的MAC信息,show interface g1/0/15 ,看到的信息如下:
GigabitEthernet1/0/15 is down, line protocol is down (notconnect)
Hardware is Gigabit Ethernet, address is 00f8.2c68.b38f (bia 00f8.2c68.b38f) ---- 这个就是端口 15 的MAC地址
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Auto-duplex, Auto-speed, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
接下来,我们来看看第 16 个端口的MAC信息,show interface g1/0/16 ,看到的信息如下:
GigabitEthernet1/0/16 is down, line protocol is down (notconnect)
Hardware is Gigabit Ethernet, address is 00f8.2c68.b390 (bia 00f8.2c68.b390) ---- 这个就是端口16的MAC地址
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Auto-duplex, Auto-speed, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
10 packets output, 3025 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
现在我想知道,我们来看看第 25 个端口的MAC信息,show interface g1/0/25 ,看到的信息如下:
GigabitEthernet1/0/25 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 00f8.2c68.b399 (bia 00f8.2c68.b399) ---- 这个就是端口 25 的MAC地址
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 7000 bits/sec, 11 packets/sec
78866 packets input, 43499674 bytes, 0 no buffer
Received 4786 broadcasts (23 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 23 multicast, 0 pause input
0 input packets with dribble condition detected
51357446 packets output, 11506126684 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
现在我好奇,我们来看看第 26 个端口的MAC信息,show interface g1/0/26 ,看到的信息如下:
GigabitEthernet1/0/26 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 00f8.2c68.b39a (bia 00f8.2c68.b39a) ---- 这个就是端口26 的MAC地址
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 31000 bits/sec, 1 packets/sec
5 minute output rate 9000 bits/sec, 12 packets/sec
448318983 packets input, 503477729064 bytes, 0 no buffer
Received 3234 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
752735604 packets output, 978623384571 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
现在到这里,不知道大家有没有发现啥东西没有,是不是直接到最后一个端口看卡,大家猜猜MAC地址是多少,应该可以
直接写出来了吧这时
GigabitEthernet1/0/48 is up, line protocol is up (connected)
Hardware is Gigabit Ethernet, address is 00f8.2c68.b3b0 (bia 00f8.2c68.b3b0)
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 1000Mb/s, media type is 10/100/1000BaseTX
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:05, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 299635
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 3659000 bits/sec, 564 packets/sec
5 minute output rate 1790000 bits/sec, 552 packets/sec
412417678 packets input, 92295596277 bytes, 0 no buffer
Received 6002710 broadcasts (3365225 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 3365225 multicast, 0 pause input
0 input packets with dribble condition detected
1862345117 packets output, 1045597208337 bytes, 0 underruns
299635 output errors, 0 collisions, 8 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
好了,就看这么多吧,现在我们来总结一下,思科交换机的MAC编排,大家也可以去看看其他思科交换机是不是也这样哈
标号从 0-9 a-f一共16 个编号一个循环,整机从0 开始,1号端口从 1 开始,
倒数第二位大家也可以看看,也是遵循这个的,大家也一起看看是不是这样
分享一下,或许这个大家已经都知道了,我以前没注意这些,偶尔间发现华为交换机论坛有份帖子,和思科的不一样,就发下自己的所看到的 {:6_264:} {:6_264:} {:6_264:} {:6_264:} {:6_264:} {:6_264:} {:6_264:} {:6_264:} {:6_264:} {:6_264:} {:6_264:} {:6_264:} {:6_264:}