Saturday, September 24, 2011

GNS3 Duplex Mismatch Messages

When Cisco devices are connected to one another and CDP is enabled (which it is by default), if one port is configured as full duplex but the other is configured as half duplex, the two devices will log "duplex mismatch" messages. This can be very helpful in the real world.  However, when using GNS3 these messages can appear for no reason at all, and they will constantly reappear, over and over again. Things get worse when you've got one router connected to two others, as was the case in the example below: 

01:43:20.579: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/0 (not half duplex), with R1 FastEthernet0/0 (half duplex).
01:43:20.911: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/1 (not half duplex), with R2 FastEthernet0/0 (half duplex).
01:44:20.839: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/1 (not half duplex), with R2 FastEthernet0/0 (half duplex).
01:45:20.567: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/0 (not half duplex), with R1 FastEthernet0/0 (half duplex).
01:45:20.971: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/1 (not half duplex), with R2 FastEthernet0/0 (half duplex).
01:46:20.607: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/0 (not half duplex), with R1 FastEthernet0/0 (half duplex).
01:46:20.935: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/1 (not half duplex), with R2 FastEthernet0/0 (half duplex).
01:47:20.579: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/0 (not half duplex), with R1 FastEthernet0/0 (half duplex).
01:47:20.983: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/1 (not half duplex), with R2 FastEthernet0/0 (half duplex).

As the duplex mismatch is found through CDP, you could always disable CDP on all of your GNS3 routers to stop these messages appear. However, this is not may not be an ideal solution for you, especially if you've got a large lab network. The other alternative is to issue the following command: 

R3(config)#no cdp log mismatch duplex

This command stops the log messages appearing, while still leaving CDP enabled.

As always, if you have any questions or have a topic that you would like me to discuss, please feel free to post a comment at the bottom of this blog entry, or you can send me an e-mail at myciscolabsblog@gmail.com


Note: This website is my personal blog. The opinions expressed in this blog are my own and not those of my employer.

12 comments:

  1. this is just a temporary work around, wherein we are disabling the "Duplex Mismatch" event in CDP logging....
    need to identify the cause of this and also implement a permanent fix for this....
    any idea ?

    ReplyDelete
  2. The only reason I can think of is that it is a bug in GNS3/dynamips. Even if you set the ports to "duplex full" or "duplex half", it does not resolve the problem.

    ReplyDelete
  3. guys shutdown interface, type speed 100 and full-duplex sub int command on related fast int then no shut. After that it is stable

    ReplyDelete
    Replies
    1. what does Engin mean by "sub int"?

      Delete
    2. Sub interface. For example:

      interface s0/0.1
      duplex full
      speed 100
      interface s0/0.2
      duplex full
      speed 10

      Delete
    3. got you thanks. I'll just apply in places that it's applicable. My understanding is that setting the speed and duplex on the interface will automatically set the subinterfaces to the same speed and duplex.

      I could be wrong but thanks!

      Delete
  4. followed engin altug and it worked for me

    ReplyDelete
    Replies
    1. Do you apply this command on the GNS3 routers or Real Switches?

      Delete
    2. In GNS3 networks only. You shouldn't ignore speed or duplex mismatches in real networks as they are genuine issues which need to be resolved. If they're not resolved they will result in bigger issues such as packet loss, slow throughput and even routing protocol flapping.

      Delete
  5. it is good but not good
    see the permanent solution
    http://www.ciscoz.com/2014/06/%cdp-4-duplex_mismatch/

    ReplyDelete
  6. use cmd no duplex if ya feel annoying

    ReplyDelete
  7. set both duplex and speed under the interface.
    eg:
    int fa 0/0
    duplex half
    speed 10
    or
    int fa 0/0
    duplex full
    speed 100
    Make sure the settings matches on the other end as well. This will fix the problem and it worked for me.

    ReplyDelete