Link to home
Start Free TrialLog in
Avatar of mikey250
mikey250

asked on

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!!

ASKER CERTIFIED SOLUTION
Avatar of Don Johnston
Don Johnston
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mikey250
mikey250

ASKER

Ive made a few wording ammendments but reading your comments now!!!
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!!
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
>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.
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!!!!!!!!!!!!!
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.
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
This will be much easier if you would post the configs of the two switches and router.
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


>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.
Im copying configs now!
Hi Ive attached screenshots!!
SWITCHA-part-1a.zip
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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..
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
>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

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?
I do understand that the Management device for SwitchA is the IP Address set by the way! Its just how you ask your question!!!
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!!!!
According to your posted config, the management IP address of the switch IS 192.168.1.2
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!!!
Without knowing the CURRENT config,  there's no way to determine the problem.
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!!!!!
You don't have to erase anything. Simply post the current config.
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
What IP address are you trying to ping and where are you trying to ping from???

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Ive tried to do from Router: ping SWITCHA but this does not work either!!
From the router you have named "CORP", what happens when you type "ping 192.168.1.3?

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!!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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?
"ping 192.168.1.3"
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
>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.
I did not realise you had sent me a message a couple of days!!

                >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.
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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!!

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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#
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!
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".
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok thanks for that!!