设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 4878|回复: 130
收起左侧

[原创] 思科交换机MAC地址的问题

[复制链接]
发表于 2017-8-8 09:04:58 | 显示全部楼层 |阅读模式
最近在研究思科交换机端口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 of  at 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 unset  up                    up      
GigabitEthernet1/0/2   unassigned      YES unset  up                    up      
GigabitEthernet1/0/3   unassigned      YES unset  down                  down   
GigabitEthernet1/0/4   unassigned      YES unset  up                    up      
GigabitEthernet1/0/5   unassigned      YES unset  up                    up      
GigabitEthernet1/0/6   unassigned      YES unset  up                    up      
GigabitEthernet1/0/7   unassigned      YES unset  down                  down   
GigabitEthernet1/0/8   unassigned      YES unset  down                  down   
GigabitEthernet1/0/9   unassigned      YES unset  down                  down   
GigabitEthernet1/0/10  unassigned      YES unset  down                  down   
GigabitEthernet1/0/11  unassigned      YES unset  down                  down   
GigabitEthernet1/0/12  unassigned      YES unset  down                  down   
GigabitEthernet1/0/13  unassigned      YES unset  down                  down   
GigabitEthernet1/0/14  unassigned      YES unset  down                  down   
GigabitEthernet1/0/15  unassigned      YES unset  down                  down   
GigabitEthernet1/0/16  unassigned      YES unset  down                  down   
GigabitEthernet1/0/17  unassigned      YES unset  down                  down   
GigabitEthernet1/0/18  unassigned      YES unset  down                  down   
GigabitEthernet1/0/19  unassigned      YES unset  down                  down   
GigabitEthernet1/0/20  unassigned      YES unset  down                  down   
GigabitEthernet1/0/21  unassigned      YES unset  down                  down   
GigabitEthernet1/0/22  unassigned      YES unset  down                  down   
GigabitEthernet1/0/23  unassigned      YES unset  down                  down   
GigabitEthernet1/0/24  unassigned      YES unset  down                  down   
GigabitEthernet1/0/25  unassigned      YES unset  up                    up      
GigabitEthernet1/0/26  unassigned      YES unset  up                    up      
GigabitEthernet1/0/27  unassigned      YES unset  up                    up      
GigabitEthernet1/0/28  unassigned      YES unset  up                    up      
GigabitEthernet1/0/29  unassigned      YES unset  up                    up      
GigabitEthernet1/0/30  unassigned      YES unset  up                    up      
GigabitEthernet1/0/31  unassigned      YES unset  down                  down   
GigabitEthernet1/0/32  unassigned      YES unset  down                  down   
GigabitEthernet1/0/33  unassigned      YES unset  up                    up      
GigabitEthernet1/0/34  unassigned      YES unset  down                  down   
GigabitEthernet1/0/35  unassigned      YES unset  down                  down   
GigabitEthernet1/0/36  unassigned      YES unset  down                  down   
GigabitEthernet1/0/37  unassigned      YES unset  up                    up      
GigabitEthernet1/0/38  unassigned      YES unset  up                    up      
GigabitEthernet1/0/39  unassigned      YES unset  up                    up      
GigabitEthernet1/0/40  unassigned      YES unset  up                    up      
GigabitEthernet1/0/41  unassigned      YES unset  down                  down   
GigabitEthernet1/0/42  unassigned      YES unset  down                  down   
GigabitEthernet1/0/43  unassigned      YES unset  down                  down   
GigabitEthernet1/0/44  unassigned      YES unset  down                  down   
GigabitEthernet1/0/45  unassigned      YES unset  up                    up      
GigabitEthernet1/0/46  unassigned      YES unset  down                  down   
GigabitEthernet1/0/47  unassigned      YES unset  down                  down   
GigabitEthernet1/0/48  unassigned      YES unset  up                    up      
GigabitEthernet1/1/1   unassigned      YES unset  up                    up      
GigabitEthernet1/1/2   unassigned      YES unset  down                  down   
GigabitEthernet1/1/3   unassigned      YES unset  down                  down   
GigabitEthernet1/1/4   unassigned      YES unset  down                  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 开始,
倒数第二位大家也可以看看,也是遵循这个的,大家也一起看看是不是这样



 楼主| 发表于 2017-8-8 09:09:09 | 显示全部楼层
分享一下,或许这个大家已经都知道了,我以前没注意这些,偶尔间发现华为交换机论坛有份帖子,和思科的不一样,就发下自己的所看到的
沙发 2017-8-8 09:09:09 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2024-4-25 23:28 , Processed in 0.070123 second(s), 7 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

快速回复 返回顶部 返回列表