Cisco | Find the ip address behind a port

文章推薦指數: 80 %
投票人數:10人

So let's see how to retrieve mac addresses connected to this two physical ports. Get Gi1/0/1 mac address : switch01# show mac address-table | ... Computing Home HowTo Music TheBand Tracks Misc Links Fr Computing Home HowTo Music TheBand Tracks Misc Links Fr GetMozillaFirefox Français NetworkArchitecture Mapaddressesiptophysicalports Setipaddresstoswitch Getmacaddresses Getipaddresses Howtoknowtheipaddressofthedeviceconnectedtoaphysicalinterface Lastupdated:Dec4,2021 Wewillseeherehowtomakethecorrespondencebetweentheipaddressofadeviceandthephysicalinterfaceofaciscoswitch. Thehandlingwillbedoneintwosteps: Firstwewillmakethecorrespondencebetweenthemacaddressandthephysicalportthankstothemactable Wewillusethearptabletomakethecorrespondenceofthemacaddresswiththeipaddress. Prerequisites:Theswitchmusthaveipaddressassignedtothesamevlanasthedeviceswewanttoknowabout.Iwillalsodetailthisstepintheexamplebelow. NetworkArchitecture Let'ssaywehavethisverysimplearchitectureandthatwewanttoretrievetheipaddressesconnectedtoGi1/0/1andGi1/0/2interfaces. Mapaddressesiptophysicalports Setipaddresstoswitch Addressesneedstobeinthesamevlanasthedeviceswewanttomap. Configurevlan1interface: switch01(config)#interfacevlan1 switch01(config-if)#ipaddress192.168.1.1255.255.255.0 switch01(config-if)#noshutdown Getmacaddresses Asexplainedbefore(switchesareLayer2devices),thereisnowaytoretrievedirectlythisinformation,wefirstneedtogetthemacaddresses. Solet'sseehowtoretrievemacaddressesconnectedtothistwophysicalports. GetGi1/0/1macaddress: switch01#showmacaddress-table|includeGi1/0/1 124b6.fd14.0853DYNAMICGi1/0/1 GetGi1/0/2macaddress: switch01#showmacaddress-table|includeGi1/0/2 1f8db.8845.ef15DYNAMICGi1/0/2 Notetheinformationsretrieved: Interface macaddress ipaddress Gi1/0/1 24b6.fd14.0853 - Gi1/0/2 f8db.8845.ef15 - Getipaddresses Pingipaddressesyouwanttoretrieveinordertopopulatearptable: switch01#ping192.168.1.200 Typeescapesequencetoabort. Sending5,100-byteICMPEchosto192.168.1.200,timeoutis2seconds: !!!!! Successrateis100percent(5/5),round-tripmin/avg/max=36/51/74ms switch01#ping192.168.1.210 Typeescapesequencetoabort. Sending5,100-byteICMPEchosto192.168.1.210,timeoutis2seconds: !!!!! Successrateis100percent(5/5),round-tripmin/avg/max=33/48/71ms Showarptabletomatchipaddresswithmacaddress: switch01#showarp|include24b6.fd14.0853 Internet192.168.1.210024b6.fd14.0853ARPAVlan1 switch01#showarp|includef8db.8845.ef15 Internet192.168.1.2000f8db.8845.ef15ARPAVlan1 Wecannowdeducefromthisinformationthat192.168.1.210deviceisconnectedtoGi1/0/1and192.168.1.200deviceisconnectedtoGi1/0/2. Interface macaddress ipaddress Gi1/0/1 24b6.fd14.0853 192.168.1.210 Gi1/0/2 f8db.8845.ef15 192.168.1.200 ThisworkislicensedunderaCreativeCommonsAttribution-NonCommercial-ShareAlike4.0InternationalLicense. ThisworkislicensedunderaCreativeCommonsAttribution-NonCommercial-ShareAlike4.0InternationalLicense. Contact:



請為這篇文章評分?