If a host using arp uses the ip address to learn the mac address....

StonedHitmanStonedHitman Member Posts: 120
how did it learn that ip address in the first place? I feel silly asking this question because i feel i should know it by now but i'm gonna have to suck up my pride and ask anyway lol. I ask this question because i'm reading odom's book and at page 500 something, he talks about troubleshooting and brought up arp again. I remember what arp is but the confusing part i think is knowing how arp knows the ip address of the device your trying to learn the mac address. The first thing that came to my mind was DNS, but i had second thoughts because DNS resolves names to ip address, like a website. I never heard of DNS learning the ip address of your devices on your network....or am i wrong?
Currently reading Network Warrior

Comments

  • Jon_CiscoJon_Cisco Member Posts: 1,772 ■■■■■■■■□□
    Don't over think it. Your machine presumably has an ip address, default gateway and DNS info.

    So if you look for an address that matches your subnet it will use arp to braodcast a request for the machine with that address to respond.
    If it does not match you subnet then it will arp for the default gateways mac address and send the frame that way.

    So not think of you DNS question. You take a freshly rebooted machine with a clean arp cache. open a web browser and look for google. Thats going to need a dns request but it needs the mac of the default gateway. So you arp for the default gateway. Then use that mac address to forward the frame.

    I wrote this quick so I hope it's right and it helps.
  • binaryhatbinaryhat Member Posts: 129
    Like learning to walk...left foot, rigjt foot. Left = learn mac address of gateway (bc I don't know how to forward/walk/get out to the net) Right = forward frame.
    Currently working on:
    ICND1 - TBD
    Book: CCENT/CCNA ICND1 100-101 Official Cert Guide
    Equipment: Packet Tracer, GNS3
    Supplement Material: Youtube, Google, Boson ExamSim-Max, CBTNuggets
  • davenulldavenull Member Posts: 173 ■■■□□□□□□□
    You are right about the scenario where you type a website address and DNS basically gives you that server's ip address.

    My understanding is you are confused about what happens on the local network. Well, the one who gives your host an ip address of a remote computer is ... you. That's what happens when you ping, right? You do have to give an address to ping, same with telnet and tftp. The ip of a default gateway is given by DHCP, or again, you.

    Basically, an ip address of a remote host is passed down from higher levels of OSI.
  • GngoghGngogh Member Posts: 165 ■■■□□□□□□□
    the switch will flood the arp request to everyone on the same vlan..
    the packet will have the destination ip address that the switch is looking for, and the destination mac address of FFFF.FFFF.FFFF,
    the ip address that the switch is looking for, will reply, and the switch will add the source mac address of that reply to its mac-address table along with the port.
    So the switch uses the ip address you want to communicate with, to find its mac address. this is what an arp request is.
Sign In or Register to comment.