LAYER 2 SWITCH - MAC-ADDRESS-TABLE QUERY

The only reason I ask this question is because I did a test exam for 'CCNA and not the ICND parts 1 & 2' and if I remember correctly I had a question that asked me to 'ping something', and then find out the 'Source & Destination mac address'.

I think the scenario would not let me ping from the actual host pc otherwise I could have logged onto the specific host destination pc for example, do an 'ipconfig /all' and find out the 'mac-address', but I dont think this is the 'Destination mac-address' that the question is asking as if I remember correctly it will be the mac-address of the destination of the 'last exit interface'!!!!!!! Im thinking that the scenario has already presumed that 'manual address mac addresses' were already added to the switches for every device attached!!!!!!!!!!

If I have a single router with a basic config in place and in this case with 'NO SERIAL' connections but using 2 x fa0/0 & fa0/1 ports but also on different subnets ie:

My switches A & B and router interfaces are all 'ping successful' first of all!!

Router

Int fa0/0 - 192.168.0.1 / 24
Description Connected to SwitchA port 1
no shut

Int fa0/1 - 10.0.0.1 /24
Description Connected to SwitchB port 1
no shut

I have not yet set any 'mac addresses' yet for 'host pcs' connected to specific ports on both 'Switches A & B' yet!!

If someone said to me I wish to find out the 'mac-address' of the 'Source & Destination' Im not sure how to go about this?

Ive just logged onto 'SwitchA':

sh mac-address-table
clear mac-address-table
sh arp
clear arp-cache
ping 192.168.1.10 but received 'NO reply' from SwitchA to a host pc attached to 'Same SwitchA on port 23 - I was able to do:
sh arp
 - This showed the host pc address I tried to ping ie 192.168.1.10 which also shows a mac address in 'Same mac table', so I presume that this is the 'Actual Destination mac address' of Int fa0/23 which is where host pc 192.168.1.10 is plugged -  ?
ping 192.168.1.1 - This was successful
sh arp
- This showed '192.168.1.1' and a mac address but I think this is the 'mac address' of the same switch Im logged onto 'SwitchA - fa0/1
ping 10.0.0.1 - Unsuccessful
sh arp
- This still showed the 'exact same mac' ie - 192.168.1.1

Im going to 'add manually the mac-addresses' for each host pc attached to both 'Switch A & B' and try again

Any help would be good!!

mikey250Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Don JohnstonInstructorCommented:
From the router, "show arp".

That will tell you the MAC address of 192.168.1.10 and what interface it's connected through.

Then go to the switch that is connected to that interface and issue a "show mac-address-table". That will tell you what port it's connected to.

You will only be able to ping the workstation from the switch if the management IP of the switch is in the same VLAN as the workstation or if there is a router that is routing the traffic between the two.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mikey250Author Commented:
Ive made a few wording ammendments but reading your comments now!!!
0
mikey250Author Commented:
Hi donjohnston, after pinging from SwitchA the host pc attached to same switch ie 192.168.1.10 - As it turns out after doing:

sh arp on SwitchA - also matches the 'sh arp' on the router - so thats good!!
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

mikey250Author Commented:
Qns1. For some unknown reason I 'cannot' ping the management addresses when logged onto SwitchA or B?

ip host SWITCHA 10.0.0.2 - Unsuccessful ping

int vlan 1
ip address 10.0.0.3 255.255.255.0 - Successful ping
no shut

ip default-gateway 10.0.0.1 - Successful ping

ip host SWITCHB 192.168.0.2 - Unsuccessful ping

int vlan 1
ip address 192.168.1.3 255.255.255.0 - Successful ping
no shut

ip default-gateway 192.168.1.1 - Successful ping

Ive also done copy run start & reload switches
0
Don JohnstonInstructorCommented:
>I 'cannot' ping the management addresses when logged onto SwitchA or B?

Where are you pinging from? What IP address?

Is the default gateway for all the switches and workstations correctly set?

It would help to see the configs.
0
mikey250Author Commented:
As per last thread I cannot ping from 'Switch A to the management address on SwitchA'

ip host SWITCHA 10.0.0.2 - Unsuccessful ping

int vlan 1
ip address 10.0.0.3 255.255.255.0 - Successful ping
no shut

ip default-gateway 10.0.0.1 - Successful ping

ip host SWITCHB 192.168.0.2 - Unsuccessful ping

int vlan 1
ip address 192.168.1.3 255.255.255.0 - Successful ping
no shut

ip default-gateway 192.168.1.1 - Successful ping

Ive also done copy run start & reload switches

I have noticed something else also!!!!!!!!!!!!!
0
Don JohnstonInstructorCommented:
I read your post and I'm sure it makes sense to you... but not to me.

For example:
----------------------
ip host SWITCHA 10.0.0.2 - Unsuccessful ping

int vlan 1
ip address 10.0.0.3 255.255.255.0 - Successful ping
no shut

ip default-gateway 10.0.0.1 - Successful ping
----------------------

I'm guessing that "ip host SWITCHA 10.0.0.2 - Unsuccessful ping" means that Switch A's management IP address is 10.0.0.2.  And that you can't ping that address from the switch itself?

And that the next three lines are from the config of Switch A? If that's the case, then Switch A's address is 10.0.0.3 and not 10.0.0.2.

But I can't be sure.
0
mikey250Author Commented:
I have no vlans setup just defaults and no routing protocols as just config specific to this thread!!

SwitchB - I have 'pinged successfully or Unsuccessfully' the following but the 'arp' below still shows:
sh arp:

- 10.0.0.3 - Successful
- 10.0.0.1 - Successful
- 192.168.1.10 - Unsuccessful
- 192.168.1.1 - Unsuccessful
- 192.168.1.2 - Unsuccessful
- 192.168.1.3 - Successful
- 192.168.1.11 - This was obviously unsuccessful as no host device is configured with this specific address

On SwitchA
sh arp:

- 192.168.1.1 - Successful
- 192.168.1.3 - Successful
- 192.168.1.2 - Unsuccessful - Does not show in arp
- 10.0.0.1 - Successful - but shows 192.168.1.1 & dont know why as SwitchB does not do this!!
- 10.0.0.2 - Unsuccessful - Does not show in arp
- 10.0.0.3 - Unsuccessful - Does not show in arp
0
Don JohnstonInstructorCommented:
This will be much easier if you would post the configs of the two switches and router.
0
mikey250Author Commented:
Yes I agree !!  Just to confirm 'SwitchA belongs to: 192.168.1.x & SwitchB belongs to: 10.0.0.x'

I have though changed the config to the following:

SwitchA - When logged onto this switch I cannot ping 192.168.1.3 ?
ip host switcha 192.168.1.3

int vlan 1
ip address 192.168.1.2 255.255.255.0
no shut

ip default-gateway 192.168.1.1

SwitchB - When logged onto this switch I cannot ping 10.0.0.3

ip host switchb 10.0.0.3

int vlan 1
ip address 10.0.0.2 255.255.255.0
no shut

ip default-gateway 10.0.0.1

0
Don JohnstonInstructorCommented:

>SwitchA - When logged onto this switch I cannot ping 192.168.1.3

>int vlan 1
>ip address 192.168.1.2 255.255.255.0
>no shut

So from Switch A with the IP address 192.168.1.2, you can't ping 192.168.1.3, right? Where is this 192.168.1.3 device???

You will have to post the configs of the devices.
0
mikey250Author Commented:
Im copying configs now!
0
mikey250Author Commented:
Hi Ive attached screenshots!!
SWITCHA-part-1a.zip
0
Don JohnstonInstructorCommented:
In the future, you can copy all the output to notepad and post all the output as a single .txt file. Or, in Putty, go to Session>Logging and direct all session output to a text file.

As for the problem:

Where is the device 192.168.1.3 located??????

If it's connected to a switch, which one and what port?  
0
mikey250Author Commented:
There is 'NO'device for 192.168.1.3 as this is the Management switch IP Address.

As for device attached to this switchA - There is only 1 host pc attached with static ip address 192.168.1.10/24..
0
mikey250Author Commented:
1 x management address
1 x int vlan address
1 x default-gateway address

nothing else except for 2 host pc attached to ports 4 & 5 on SwitchB & 1 host pc attached to SwitchA port 23
0
Don JohnstonInstructorCommented:
>There is 'NO'device for 192.168.1.3 as this is the Management switch IP Address.

No. The management address of the switch is 192.168.1.2

0
mikey250Author Commented:
I have changed both addresses vice versa:

Management ip address 192.168.1.2 or 192.168.1.3 but this did not make a difference and surely if on same subnet then it should still work either way?

what are you asking me to do change management ip address from 192.168.1.3 to 192.168.1.2?
0
mikey250Author Commented:
I do understand that the Management device for SwitchA is the IP Address set by the way! Its just how you ask your question!!!
0
mikey250Author Commented:
This should be straignt forward as no other configs are neccessary and as all ip addresses are in same subent on switchA there should not be a problem! Im thinking there is a residual config on router or switch but that does not make sense as I have not even created any extra vlans as all are on default settings using vlan 1.  Also there is no 'VTP' set on either switch!!!!
0
Don JohnstonInstructorCommented:
According to your posted config, the management IP address of the switch IS 192.168.1.2
0
mikey250Author Commented:
Ive been changing the management ip address from 192.168.1.2 to 192.168.1.3 and vice versa, even though on same subnet and obviously changing the Int vlan 1 also as a result but still cannot ping management address!! Unless Ive not waited long enough!!!
0
Don JohnstonInstructorCommented:
Without knowing the CURRENT config,  there's no way to determine the problem.
0
mikey250Author Commented:
I will completely erase-startup tomorrow and start again with again just the bare basics just to be able to ping a L2 switch.  Its probably something like a residual config maybe although the only thing I practised with was 'ACL's only on one of my router interfaces to only allow 1 host ip address on 192.168.1.10 to use: http://192.168.0.10 and nothing else.

I then just removed from router:
int fa0/0
ip access-group 101 in

I did though leave the 2 ACL's on the router but I really doubt this was the issue.

Appreciated for your time anyway.  I will be on this tomorrow morning!!!!!
0
Don JohnstonInstructorCommented:
You don't have to erase anything. Simply post the current config.
0
mikey250Author Commented:
Hi donjohnston it was a basic config anyway just thought I would clear that part up.  Anyway Ive linked the 'Corp' router to the switchA and still same problem cannot ping management switch ip address!!!

I have not configured the 'SwitchB' config yet except but just adde the router fa1/1 interface ready!1
corp-router-config1.txt
switcha-config.txt
0
Don JohnstonInstructorCommented:
What IP address are you trying to ping and where are you trying to ping from???

0
mikey250Author Commented:
Hi donjohnston, I wish to be able to ping SWITCHA ie:

ping SWITCHA
ping 192.168.1.2 - Management IP Address

Im logged on to SwitchA
0
Don JohnstonInstructorCommented:
The management address of SWITCHA is 192.168.1.3

Look at your config for SWITCHA under "interface Vlan1". THAT is the management IP address of SWITCHA.

You are also creating an "ip host" entry for SWITCHA that points to 192.168.1.2. I'm not sure why you're doing this because it's wrong. The "ip host" entries are used to create static name resolution entries (like DNS) on an IOS device.

For example, you could add entries:

ip host RouterA 192.168.1.10
ip host SwitchX 192.168.1.20
ip host RouterB 10.1.1.1
ip host SwitchY 10.1.1.10

which would allow you to ping a device with the command "ping RouterA" instead of having to remember the ip address.

But these entries do not define (or configure) the IP address of a device. They are simply shortcuts to entering IP addresses when talking to a device.

If you wanted to put one in for the switch itself (which would be kind of weird since you don't often talk to your self), you could add the line

ip host SWITCHA 192.168.1.3

Then if you want to ping yourself you could type "ping SWITCHA".

0
mikey250Author Commented:
Hi don,  I did this yesturday ie change the ip address to what you said!!!

I just wanted to see if I could ping myself being logged onto also the same switch but it does not work, whether I change the IP Address to 192.168.1.2 or 192.168.1.3 nor can I do: ping SWITCHA
0
mikey250Author Commented:
Ive tried to do from Router: ping SWITCHA but this does not work either!!
0
Don JohnstonInstructorCommented:
From the router you have named "CORP", what happens when you type "ping 192.168.1.3?

0
mikey250Author Commented:
Hi don,  I can always ping the 'gateway & the int vlan1' but never the 'management switch ip'!!  Ive currently removed the config to do something else but if you have any suggestions then please let me know!!
0
Don JohnstonInstructorCommented:
>I can always ping the 'gateway & the int vlan1' but never the 'management switch ip'!!

The VLAN 1 interface  IS THE MANAGEMENT IP!!!!!!
0
mikey250Author Commented:
Hi don,  ok my mis-interpretation.  If I add: ip host switcha 192.168.1.3 on switcha, how can I do I ping this?
0
Don JohnstonInstructorCommented:
"ping 192.168.1.3"
0
mikey250Author Commented:
Hi don,  Ive not got it setup at the moment, but going over my previous thread: 36909161

If you wanted to put one in for the switch itself (which would be kind of weird since you don't often talk to your self), you could add the line

ip host SWITCHA 192.168.1.3

Then if you want to ping yourself you could type "ping SWITCHA".

I tried to ping SwitchA from SwitchA but this did not work!
I tried also to ping SwitchA from router but this did not work!

I will set this up again tomorrow morning and thanks for getting back to me!!!!!!!!! appreciated
0
Don JohnstonInstructorCommented:
>I can always ping the 'gateway & the int vlan1

>I tried also to ping SwitchA from router but this did not work!

Which is it?

Post the configs of both devices and the session text when you try to ping.
0
mikey250Author Commented:
I did not realise you had sent me a message a couple of days!!
0
Don JohnstonInstructorCommented:

                >I can always ping the 'gateway & the int vlan1

>I tried also to ping SwitchA from router but this did not work!

Which is it?

Post the configs of both devices and the session text when you try to ping.
0
mikey250Author Commented:
Hi Don,  Apologies for taking so long to get back to you!!!!!!! Ive attached 2 configs as you requested!!  Im not sure whether I should ping from either 'SwitchA or Corp router'!!  My IP Addresses may not be as you would like them as Ive been changing them throughout but still not able to 'ping SWITCHA or the IP'.
Corp-router-config-1b.txt
SwitchA-config.txt
0
Don JohnstonInstructorCommented:
Your switch config still has an inconsistency.
---------------------------------
hostname SWITCHA
!
ip host SWITCHA 192.168.0.3
!
interface Vlan1
 ip address 192.168.0.2 255.255.255.0
---------------------------------

What do you want the ip address of SWITCHA to be???

Unless you have a third device with an ip address of 192.168.0.3 out there, your ping results are fine.

In summary:

The ip address of "SWITCHA" a is 192.168.0.2.  And you can ping that from the switch and the router.

The ip address of the LAN interface of router "CORP" is 192.168.0.1. And you can ping that from the router and the switch.

Which means, everything is working correctly.
0
mikey250Author Commented:
Hi Don,  Yes I understand Your 'In summary' comments!!!!

I always thought that by adding ip host (name) (ip address) on a device such as a router or switch, that it would allow me to PING the name or IP, but not so.  That is why Im stuck!!

You mention a 3rd party device but not sure what you mean?

Ive added - ip host SWITCHA 192.168.0.3 on the router - As thought this enable me to ping the 'name - SWITCHA & also the IP Address but this did not work!!

I then added ip host SWITCHA 192.168.0.3 on the SWITCHA and tried to ping the name - SwitchA, but this did not work!!

0
Don JohnstonInstructorCommented:
I didn't say third "party". I said third "device".

You are able to successfully ping the router and switch. So from a communications standpoint, everything is working correctly.

I still don't understand why you are putting in "IP host" entries for SWITCHA with the wrong IP address.  At this time,  THE IP ADDRESS OF SWITCH A IS 192.168.0.2!!!

If you want to ping by name, the statement in your config should be "ip host switcha 192.168.0.2"
0
mikey250Author Commented:
I just wont to know how to ping the 'name' if I wish!!

I have already done 'ping switcha' on both switcha and router but neither respond back so Im not sure!!
0
Don JohnstonInstructorCommented:
Read my last post.

If you want to ping by name, the statement in your config should be "ip host switcha 192.168.0.2"
0
mikey250Author Commented:
The configu does show:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2011.10.10 12:20:57 =~=~=~=~=~=~=~=~=~=~=~=

SWITCHA#
SWITCHA#sh run
Building configuration...

Current configuration : 1222 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname SWITCHA
!
!
ip subnet-zero
!
ip host SWITCHA 192.168.0.3
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
!
!
interface FastEthernet0/1
 description Connected to CORP
 switchport mode trunk
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
 switchport mode access
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface Vlan1
 ip address 192.168.0.2 255.255.255.0
 no ip route-cache
!
ip default-gateway 192.168.0.1
ip http server
!
line con 0
line vty 5 15
!
!
end

SWITCHA#
SWITCHA#ping 192.168.0.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
SWITCHA#ping 192.168.0.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
SWITCHA#ping 192.168.0.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
SWITCHA#ping SWITCHA

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.0.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
SWITCHA#
0
Don JohnstonInstructorCommented:
One more time...

There is NO device with an address of 192.168.0.3! You are wasting your time trying to ping it.

Your "IP host" statements reference IP address 192.168.0.3 which DOESN'T EXIST!
0
mikey250Author Commented:
Hi don, Ive just found one of your comments above:36909161

I did not properly understand the below message: You say it would be wierd, so why have it?

The management address of SWITCHA is 192.168.1.3

Look at your config for SWITCHA under "interface Vlan1". THAT is the management IP address of SWITCHA.

You are also creating an "ip host" entry for SWITCHA that points to 192.168.1.2. I'm not sure why you're doing this because it's wrong. The "ip host" entries are used to create static name resolution entries (like DNS) on an IOS device.

For example, you could add entries:

ip host RouterA 192.168.1.10
ip host SwitchX 192.168.1.20
ip host RouterB 10.1.1.1
ip host SwitchY 10.1.1.10

which would allow you to ping a device with the command "ping RouterA" instead of having to remember the ip address.

But these entries do not define (or configure) the IP address of a device. They are simply shortcuts to entering IP addresses when talking to a device.

If you wanted to put one in for the switch itself (which would be kind of weird since you don't often talk to your self), you could add the line

ip host SWITCHA 192.168.1.3

Then if you want to ping yourself you could type "ping SWITCHA".
0
Don JohnstonInstructorCommented:
Because pinging yourself is used to test the IP protocol stack.  And if you want to do that, you can ping 127.0.0.1.

To put an ip host statement in for your own address is something I've never seen before.

But if you want to, you can. You just have to put the correct ip address in the host statement.
0
mikey250Author Commented:
Ok thanks for that!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Switches / Hubs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.