4

I created a new switch and connected to two hosts in GNS3.Like this: Host1--->LS<---Host2, i think the mac-table in the switch should be empty before i sent data between two hosts. But when i just set ip address to the two hosts, and i found there are the two hosts mac address in switch! Is this the expected result? I even didn't ping between the two hosts, how the switch learned the mac address?

Switch:

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    cc01.1064.0000    DYNAMIC     Et0/0
   1    cc02.0a98.0000    DYNAMIC     Et0/1

Host1:

R1#show interfaces 
FastEthernet0/0 is up, line protocol is up 
  Hardware is AmdFE, address is cc01.1064.0000 (bia cc01.1064.0000)
  Internet address is 12.1.1.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, 
R1#show running-config           
Building configuration...

Current configuration : 1056 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip subnet-zero
no ip routing
no ip icmp rate-limit unreachable
ip tcp synwait-time 5
!
!
no ip cef
no ip domain lookup

Host2:

R2#sh interfaces 
FastEthernet0/0 is up, line protocol is up 
  Hardware is AmdFE, address is cc02.0a98.0000 (bia cc02.0a98.0000)
  Internet address is 12.1.1.2/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100
  • 1
    There was probably traffic between hosts, such as discovery protocols, dhcp request aso. – Golgot Jul 4 '18 at 15:43
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Dec 25 '18 at 9:02
6

But when i just set ip address to the two hosts, and i found there are the two hosts mac address in switch! Is this the expected result? I even didn't ping between the two hosts, how the switch learned the mac address?

Hosts can send traffic all on their own for a number of reasons, without a user or application having to do anything. Some common examples:

  • Gateway reachability checks
  • Internet reachability checks
  • Duplicate address detection

If I had to guess based on the limited information you have provided, I would suspect the last example above. Many hosts have RFC 5227 compliant duplicate address detection built into the core of their OS/network stack.

However, the best way to confirm what is going on is to actually capture the traffic to make the determination yourself.

  • Thanks Ylearn. I thought the traffic can be generated only by user doing something on the host like sending ping. But i ignored they can generate traffic by themselves. – sky Jul 4 '18 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.