What happens if ARP does not find an associated IP [closed] - networking

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I understand the basics of how ARP works, one host sends out a MAC Broadcast with "Who has this IP?" and some host in the network answers with "I have that IP".
But what happens if a Router is connected to the same LAN, the routers function would be to connect the LAN to the WAN (hope I got that right). Does the host asking for the adress then automatically switch and send a message to the connected router with his data or what happens?

What happens is, that your IP stack first determines to where it needs to send the packet to. If it goes to an IP address that is in a directly connected network, it will send the packet directly, otherwise, it will send the packet to the gateway.
This may sound abstract to you. For a simple case, suppose you have the following network:
host_a host_b
+----------+ +----------+
|10.1.1.101| |10.1.1.102|
+-----+----+ +-----+----+
| | +--------+ <--------->
-----+--------------+-----------+10.1.1.1|--------< INTERNET >
+--------+ <--------->
Router
On your host_a, you will have
ip address 10.1.1.101
netmask 255.255.255.0
default gateway 10.1.1.1
On your host_b, you will have
ip address 10.1.1.102
netmask 255.255.255.0
default gateway 10.1.1.1
Suppose host_a wants to send a packet to 10.1.1.102. If you use the IP address and netmask, you see that it is in the same subnet. So, host_a will send an ARP-request onto the network asking "Hey, who has 10.1.1.102?" Host_b will respond with its MAC-ID.
Now suppose host_a wants to send to 8.8.8.8. That is not on the local network. So, host_a will now send it to its default gateway, 10.1.1.1. Host_a will send an ARP-request "Hey, who has 10.1.1.1?" and the router will respond with its MAC-ID.
The procedure above is a great simplification of what actually happens, but it may help you a step further in how your network works.
(the question may be more appropriate for another SE site, but then someone will probably migrate it)

Related

How NAT handles return traffic [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
There is a Static NAT rule that achieves the following.
(for the question, let's assume the WAN subnet has a subnet of 1.1.1.1/24)
Inbound traffic to the WAN interface on port X to 1.1.1.6 gets NAT'ted to LAN IP 192.168.0.1.
Now this isn't a 1-1 NAT rule, just a Static NAT for the inbound traffic. When return traffic is sent back to the client, does the firewall know to NAT traffic back to the client with the source IP of 1.1.1.6 ?
I'm assuming it has to? As TCP is a two-way protocol, if the client received traffic back on a different IP to the IP it sent the traffic to, it would drop it?
A static 1:1 NAT defines which inside address translates to which outside address, so there is nothing for the NAT router to figure out; it is already given to the router in the configuration. It merely has to translate the destination address on outside sourced packets, and the source address on inside sourced packets; a simple, static, table lookup.
It gets more complex when the NAT isn't static or 1:1. Then the NAT router then needs to build tables on the fly, and create timeouts for the table entries.
It depends on the type of NAT.
If it's many-to-one NAT, then that's correct. Outbound packets establish a record that is used to know what to do with inbound packets. This is the most common type of NAT and the type used in typical home networks.
It it's one-to-one NAT, then any inbound packet received that is addressed to 1.1.1.6 (in your example) would be NATted to 192.168.0.1.

Routing between 2 LAN [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have Mikrotik router with Wifi connected to:
WAN/internet on port ether1.
Other ports are for LAN 10.0.1.*.
Only port ether8 is connected to another simple POE switch. Four IP cameras with static IP are connected. This is LAN2 192.168.50.*. Port is not included in bridge or switch.
From main LAN I can access internet and other PC on same LAN, but can't access IP cameras on LAN2.
So, what is wrong/missing in my Mikrotik configuration:
/ip address
add address=10.0.1.1/24 comment="default configuration" interface= ether2-master-local network=10.0.1.0
add address=10.0.0.18/30 interface=ether1-gateway network=10.0.0.16
add address=192.168.50.253/24 interface=ether8-master-local-SUBNET network=
192.168.50.0
/ip route
add distance=2 gateway=10.0.0.17
No ping or trace route can reach LAN2 from main LAN.
If I connect to POE switch with my laptop and configure static IP in range 192.168.50.* than I can access all cameras OK.
If try ping IP camera directly from Mikrotik via ether8 than I get random mix of timeouts and success which is really strange.
Any help is appreciated.
did you set 192.168.50.253 as gateway in your IP cameras ? So they know how to reply to 10.0.1.0/24 when they receive a ping.
As for the random success ping problem, this is weird indeed, maybe an IP conflict (did you try with only 1 camera plugged?)

Forwarding port behind router & voip router [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
So I'm trying to host a server. I feel like this should be straight forward but maybe I'm missing something because it's not working. I'm hosting a server that runs on port 7777 and 27015. I've reserved an ip address of ex: 192.168.0.50 in my router settings along with ports forwarded with that address. So my pc is now 192.168.0.50 with both ports added (tcp/udp enabled).
My layout is : pc > router > voip router > modem. Since I have the router finished, I moved on to the voip router. In my voip router I forwarded both ports under my router's gateway 192.168.0.1. Is this correct or should it still be my computer's ip? My voip router does have a WAN ip assigned.
Am I missing something or did I use the wrong ip for my voip, since my ports still aren't accessible
first check if your modem is a router-modem by checking what is the WAN IP on your voip router (if the WAN IP of the router looks like 192.168.x.x then most likely your modem is acting as a router also and need some configuration done to have the port forward in place. When you have figured this out
make sure you forward the port from your VOIP router to the WAN address on your router. Try testing step by step to figure out where it's failing, First test by connecting a laptop straight into the VOIP router to test if the port forward to your new laptop IP is working good. Then temporarely remove the VOIP router from the equation for a few minute and test with only pc > router > modem to see if port forward works.

Can I reach a device if I know its local IP address and the ip address of the router its connected to? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
On my home network there is printer I want to print from. I know the the local IP of my printer at home, and I know the IP address of my home router.
From a different location, is there any way I can access the printer with these pieces of information?
From inside the network (while you're connected to your router at home) that would be enough information. However from outside the network, the firewall on the router would have to be set up. The place you would want to set up would be the Port Forwarding feature of your router.
While at home:
1) Login to your router
2) Look for something like "Port Forwarding/Port Triggering", "WAN", "Firewall" or something like that. It will be different on different routers.
3) Most of the time the default port for network printers is 9100 so you can set up traffic coming into the router on port 9100 to be forwarded to the printer's IP address. This is why it's called "Port Forwarding" because you're forwarding traffic on that port.
4) Once that's set up you'll have to set up a printer on your computer and use the public IP address of your home router. For example, it will be something other than "192.168.x.x".
There you have it!

how to get Global IP address? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
When my PC is connected to Network, I will be getting couple of IP address.
1.) Modem Private IP address (will be like 192.168.1.3)
2.) ISP address (by searching "My ip address" in google it gives me my global IP address)
My roommate who is connected to same modem is able to ping my global IP address but not other person who is connected to different network, why??
Is there anyway that in ISP they block ICMP Packets?? So that no one be able to ping other machine ?? or do they use different routing instances for different sectors??
If we want a global IP address for my PC so that anyone can login/ping what should I enable??
Your router/modem gets a dynamic IP from ISP whenever you connect it to Internet. This address as name says is changing. If you want a constant public IP from ISP, you must request ISP for the same. This comes at a very high cost and not recommended unless you are serving a high revenue generating data on that machine.

Resources