Jump to content

Because that's just how networks work. You don't need to know what the MAC address is therefore you don't know it by default. The router handles mapping IP address to MAC addresses, so your computer just needs to worry about the IP address and the router handles mapping it to the MAC address. 

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8760867
Share on other sites

Link to post
Share on other sites

30 minutes ago, djdwosk97 said:

Because that's just how networks work. You don't need to know what the MAC address is therefore you don't know it by default. The router handles mapping IP address to MAC addresses, so your computer just needs to worry about the IP address and the router handles mapping it to the MAC address. 

no when i say subnet i don't mean like my pc is in a network and the targeted pc is in another but i mean both pc's are on the same network so we don't need a router in this case how can a pc knows all ip address's of all pcs around him but no the mac address that's what i want to know exactelly what happens when you plug your pc for the first time in the network ? how will it get the ip address's of the other pc's ? and why only ip and not mac ? 

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761025
Share on other sites

Link to post
Share on other sites

8 minutes ago, ilyas001 said:

no when i say subnet i don't mean like my pc is in a network and the targeted pc is in another but i mean both pc's are on the same network so we don't need a router in this case how can a pc knows all ip address's of all pcs around him but no the mac address that's what i want to know exactelly what happens when you plug your pc for the first time in the network ? how will it get the ip address's of the other pc's ? and why only ip and not mac ? 

You still communicate through your router -- unless your computer is directly wired (ethernet cable directly from your computer to their computer). 

 

When you first plug in your computer it contacts the router and has access to all IP addresses connected to the router. 

 

As for why you have access to IP addresses and not MAC addresses, that's just how networks were designed. Networks are designed in layers so that you don't have to worry about details that are largely irrelevant to what you want to do (and so you only need to worry about what is critical for what you're trying to do). Because of that layering, you don't actually care what MAC address a device is using. 

 

OSI.jpg

https://en.wikipedia.org/wiki/OSI_model

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761043
Share on other sites

Link to post
Share on other sites

well i still don't understand , cause in my head nor the router or you would know the ip address if he (the pc that you need the ip) doesn't sent you something to tell you i have x ip and it should be a trame , a trame will use layer 2 so how can he send his ip without sending the mac address also ? hope you understand my point here 

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761080
Share on other sites

Link to post
Share on other sites

Maybe I'll make myself look like a fool and still a noob with basic stuff LOL. I don't fully understand but I'll try to expand...

 

 

My understanding is you can still communicate using IP on a layer 2 switched network but obviously there is a limit. The basic ARP request is normally sent using the broadcast of FF:FF:FF.(etc...). The arp request contains the actual mac address and IP of the computer performing the request.

 

Since it is a broadcast on FF:FF(etc..) you will receive replies from the other computers containing more information which will be their MAC and IP. This is then stored locally on the computer hence why we will be able to then use IP addresses and such. Before ANYTHING happens, we plug in a new computer and say someone tries to connect to it? ARP request sends out as a broadcast FF....., that target computer receives it and not too sure if it quickly saves the Source IP/MAC before replying with its own IP/MAC.. of course we get an ARP reply from that computer which will contain their MAC/IP and we will save it and maybe validate it (if using windows, cmd then arp -a)

I'm going to put a link to my PC specs which actually aren't my PC specs and I cry myself to sleep everyday so I can have these PC specs but I can't afford these PC specs so PC specs PC specs PC specs PC specs PC specs PC specs.

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761252
Share on other sites

Link to post
Share on other sites

5 minutes ago, BSpendlove said:

Maybe I'll make myself look like a fool and still a noob with basic stuff LOL. I don't fully understand but I'll try to expand...

 

 

My understanding is you can still communicate using IP on a layer 2 switched network but obviously there is a limit. The basic ARP request is normally sent using the broadcast of FF:FF:FF.(etc...). The arp request contains the actual mac address and IP of the computer performing the request.

 

Since it is a broadcast on FF:FF(etc..) you will receive replies from the other computers containing more information which will be their MAC and IP. This is then stored locally on the computer hence why we will be able to then use IP addresses and such. Before ANYTHING happens, we plug in a new computer and say someone tries to connect to it? ARP request sends out as a broadcast FF....., that target computer receives it and not too sure if it quickly saves the Source IP/MAC before replying with its own IP/MAC.. of course we get an ARP reply from that computer which will contain their MAC/IP and we will save it and maybe validate it (if using windows, cmd then arp -a)

well welcome to the discussion but here we know what's an arp request what i wanted to understand is that an arp request needs a mac address what i don't understand is from where we get the ip address we are using in the first place 

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761281
Share on other sites

Link to post
Share on other sites

46 minutes ago, djdwosk97 said:

You still communicate through your router -- unless your computer is directly wired (ethernet cable directly from your computer to their computer). 

 

When you first plug in your computer it contacts the router and has access to all IP addresses connected to the router. 

 

As for why you have access to IP addresses and not MAC addresses, that's just how networks were designed. Networks are designed in layers so that you don't have to worry about details that are largely irrelevant to what you want to do (and so you only need to worry about what is critical for what you're trying to do). Because of that layering, you don't actually care what MAC address a device is using. 

 

OSI.jpg

https://en.wikipedia.org/wiki/OSI_model

wait a minute i still think yo uare still thinking that i'm talking about the router sending data over the web what i mean is that you have two pcs and a switch that's all no router required ok . now how do i get the ip address of the pc in front of me pls excuse my lack of explanation if this what you think 

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761300
Share on other sites

Link to post
Share on other sites

3 minutes ago, ilyas001 said:

wait a minute i still think yo uare still thinking that i'm talking about the router sending data over the web what i mean is that you have two pcs and a switch that's all no router required ok . now how do i get the ip address of the pc in front of me pls excuse my lack of explanation if this what you think 

I understand that you're talking about a local network. Even on a local network the router handles the IP-MAC address mappings. 

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761311
Share on other sites

Link to post
Share on other sites

2 minutes ago, djdwosk97 said:

I understand that you're talking about a local network. Even on a local network the router handles the IP-MAC address mappings. 

soooo if i take of the router and let the switch only between the two pc's i can't talk or communicate anymore with another pc within my own local network ? that's what you are saying ?  

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761338
Share on other sites

Link to post
Share on other sites

1 minute ago, ilyas001 said:

soooo if i take of the router and let the switch only between the two pc's i can't talk or communicate anymore with another pc within my own local network ? that's what you are saying ?  

I think you're confusing the modem and the router. The router handles the internal network while a modem handles data in/out of the local network.

Modem-vs-Router.png

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761342
Share on other sites

Link to post
Share on other sites

23 minutes ago, ilyas001 said:

well welcome to the discussion but here we know what's an arp request what i wanted to understand is that an arp request needs a mac address what i don't understand is from where we get the ip address we are using in the first place 

Well obviously if we don't have a DHCP service we configure a static IP address which is attached to the arp request. of course you know that if we don't configure the ip address we get an apipa address (169.254.x.x).... I guess other operating systems implement this

 

A few people get confused and think ARP request only contains MAC information, but it does contain IP sender/ (destination if applicable)

I'm going to put a link to my PC specs which actually aren't my PC specs and I cry myself to sleep everyday so I can have these PC specs but I can't afford these PC specs so PC specs PC specs PC specs PC specs PC specs PC specs.

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761380
Share on other sites

Link to post
Share on other sites

No - your PC will have an arp table (run CMD > arp -a) and will store a list of MAC addresses for clients it's aware of. That frame (NOT PACKET) will be sent to a layer 2 switch. The switch will look at the SENDING MAC address and hold that MAC address in its MAC address table along with the port it was recieved on. It will then look up the DESTINATION MAC against its table and transmit the packet to the corresponding physical interface. If it does not have an interface bound for the MAC, it will broadcast it to all ports except where it was recieved.

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761388
Share on other sites

Link to post
Share on other sites

15 minutes ago, djdwosk97 said:

I think you're confusing the modem and the router. The router handles the internal network while a modem handles data in/out of the local network.

Modem-vs-Router.png

No - a router only handles routing traffic between two different networks as well as in some circumstances providing DHCP for clients and creating VLAN's.

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761428
Share on other sites

Link to post
Share on other sites

33 minutes ago, Windspeed36 said:

No - your PC will have an arp table (run CMD > arp -a) and will store a list of MAC addresses for clients it's aware of. That frame (NOT PACKET) will be sent to a layer 2 switch. The switch will look at the SENDING MAC address and hold that MAC address in its MAC address table along with the port it was recieved on. It will then look up the DESTINATION MAC against its table and transmit the packet to the corresponding physical interface. If it does not have an interface bound for the MAC, it will broadcast it to all ports except where it was recieved.

thanks but i know that , what i need is from where  my pc knows the ip address of the pc  i want to sent an arp to in the first place that's what i need pls for example i say sent an arp request to the pc1 (with ip192.168.1.2 ) but from where did i know this ip address in the first place before even asking for the mac  ,(to make it easy for you in my mind i think that a pc knows all ip address's of all pc's and routers connected to him if i'm wrong correct me )

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761608
Share on other sites

Link to post
Share on other sites

14 minutes ago, ilyas001 said:

thanks but i know that , what i need is from where  my pc knows the ip address of the pc  i want to sent an arp to in the first place that's what i need pls for example i say sent an arp request to the pc1 (with ip192.168.1.2 ) but from where did i know this ip address in the first place before even asking for the mac  ,(to make it easy for you in my mind i think that a pc knows all ip address's of all pc's and routers connected to him if i'm wrong correct me )

This can probably explain it easier than I can. Basically a client will send out an ARP request.

 

https://supportforums.cisco.com/document/68421/overview-layer-2-switched-networks-and-communication

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761675
Share on other sites

Link to post
Share on other sites

1 minute ago, Windspeed36 said:

This can probably explain it easier than I can. Basically a client will send out an ARP request.

 

https://supportforums.cisco.com/document/68421/overview-layer-2-switched-networks-and-communication

 

15 minutes ago, ilyas001 said:

thanks but i know that , what i need is from where  my pc knows the ip address of the pc  i want to sent an arp to in the first place that's what i need pls for example i say sent an arp request to the pc1 (with ip192.168.1.2 ) but from where did i know this ip address in the first place before even asking for the mac  ,(to make it easy for you in my mind i think that a pc knows all ip address's of all pc's and routers connected to him if i'm wrong correct me )

Also keep in mind at this stage IP addresses are not involved - that's a layer 3 issue, not layer 2.

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761687
Share on other sites

Link to post
Share on other sites

56 minutes ago, ilyas001 said:

i say sent an arp request to the pc1 (with ip192.168.1.2 ) but from where did i know this ip address in the first place before even asking for the mac

I stated in my first post

 

but as windspeed36 mentioned, the ARP request isn't sent to the IP (but it might contain the IP destination in the ARP, but goes based on MAC, doesn't use IP but may contain information)...

 

If any reason, it may broadcast again to double check that the MAC address hasn't changed relating to the IP stored in the arp cache...

 

(I am not including a switch in the example, since it is easier to understand)

 

Computer 1 retains information of MAC: AA:BB:CC:DD(etc) with IP address 192.168.0.1

If for some reason the MAC address isn't known for IP 192.168.0.2, Computer 1 will broadcast FF:FF:FF(etc..)

 

Computer 1: Hi everyone, this is my MAC address and also my IP address. Who has IP address x.x.x.x?

Computer 2: Oh that is me! (Request from 192.168.0.1 with MAC AA:BB:CC:DD(etc))... ARP reply to AA:BB:CC:DD(etc) and here is my MAC address BB:CC:DD:EE(etc..)

 

Although Computer 2 will sent a reply, it will then store the request information (MAC and IP) in it's own arp cache which I guess you know

 

 

When you send the ARP request to x.x.x.x.... It will broadcast to ALL computers stating "WHO has IP x.x.x.x, I need your MAC please!", of course it is different when we have a switch. The ARP will be sent to the switch, if the switch contains the MAC adddress in the arp table, it will return to Computer1 with the information. Data is sent and then forwards to the port that MAC address resides on.

 

If the switch doesn't know the MAC address, it will perform the same broadcast on all ports except the port that the arp request was received on. Computer will reply (Here is my MAC and my IP)... Switch then adds that to the arp table which then if Computer3 broadcasts for AA:BB:CC:DD(etc)... The switch will go: "I have AA:BB:CC.... in my arp table, here is the information needed...". Computer3 sends frames which are then forwarded to port xx (since AA:BB:CC..... = port xx)

 

Your PC will NOT know IP address of x.x.x.x until the arp is sent out and then someone with that IP address will give you his MAC and IP address so that you can store: x.x.x.x = AA:BB:CC:DD(etc) in the arp cache

 

I'm going to put a link to my PC specs which actually aren't my PC specs and I cry myself to sleep everyday so I can have these PC specs but I can't afford these PC specs so PC specs PC specs PC specs PC specs PC specs PC specs.

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8761833
Share on other sites

Link to post
Share on other sites

I can still see the same question coming up, so I'll throw my two cents in as well:

 

1. Local network does not really work with IP addresses. Your computer does, but the network couldn't care less about IP addresses unless you're going outside of your subnet.

 

2. Arp request equals "Who has this IP". It asks the neighboring network devices to respond if they have the IP in question.

 

3. The network device getting the frame in the first place either knows this already via its arp table or it can send its own arp request to track the IP down.

 

I wrote a damn long example of the journey of an IP packet from one computer to another but I forgot where I put it. It's somewhere in the networking forum, find it if you like.


Edit:

Found it!

 

Link to comment
https://linustechtips.com/topic/681329-ip-and-mac/#findComment-8763667
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×