Imagine a home network of several computers connected via router to an ISP.  Computer A wants to request a webpage from a remote website, 10.234.12.8. The address is not in its ARP cache, so it consults its routing table and finds a match in the form of the default gateway (the router). It sends the packet to the router with the router's MAC. I know that when the router receives the outgoing request, it must do some enveloping and address re-writing, but I don't know the details.  When the response comes back to the router from the 10.234.12.8, how does the router know that the inbound packet should be forwarded to Computer A? In other words, what does the router put in the request to 10.234.12.8 that 10.234.12.8 will include in its response so that the router can determine that the response should go to A? Is it A's MAC address? Or is it A's subnet IP? My guess is the later (A's subnet IP). Is A's LAN address enveloped in the inbound packet? My guess (hope) is that A's MAC address is never seen by anyone on the other side of the router.  I know the router is receiving in-bound web responses all the time and doling them out to the correct local nodes. Is it doing this with enveloped MACs or enveloped LAN IP's, or with some other technique?
13259
my question does not concern how it moves through the internet, but how it moves through the router to a certain device. All devices connected to a router in a home network have the same external IP. Say device A is loading a page and packets are sent from an external source to the router because the packets know the external IP of device A and they are able to get to the router. But now, how does it get to device A? How does the router know to send it to device A instead of device B?  I think this involves the NAT, but i'm just looking for a logical explanation of what NAT does to accomplish this.
66598
I want to map the IP address 192.168.1.222 to 127.0.0.1 so that if I use 192.168.1.222 in the web browser or ping command I get the response (and that from my 127.0.0.1).   Is this possible via routing tables or do I have to add some sort of virtual network adapter?   I try to deal with this problem on a Windows 7 machine and have no other options than a Windows XP maybe.  I'm stuck right there.
84810
I understand the reason public IP addresses are necessary to be that if we only had MAC to move data between one host and another, the entire Internet would be one massively flat network. But what is the need for private IP addresses? Why can't routers just connect to local clients using their MAC address?
10348
How does the ping command really work?  Specifically where does the ARP (Address Resolution Protocol) come into picture?   I was asked this question in an interview and I was not able to come up with a scenario when ARP could be used.
72338
I'm running a Samba server on my MacBook and I've also set up port forwarding to said server from my router.  My public IP is 106.51.x.x (according to google and a few other services) and my Mac's local IP is 192.168.x.x, but when I head to my router's configuration page, it says my external IP is 10.242.x.x.  This is what I don't understand, when connected to my home WiFi, using the 10.242.x.x address works just fine. But if I try to access the same over 4G, the connection times out.  As for the public address, neither WiFi nor 4G works.  Is there some setting on my Mac (I'm running MacOS Sierra) that I must alter to make it visible to the public?
98469
I am trying to remote the server of my company from my home.  I enter the router of the company and I get this info:  Internet, IPv4 POST LuxFibre LAN1 NG, IP address: 10.244.149.239   But I also Google my IP address, and google tells me that my IP address is 88.207.251.1  I am confused now.  For the LAN of my company, the IP of the router is something like 192.168.1.1. So I consider that the 10.244.149.239 is the IP address of the router in outer net. But Google tells me that the outer IP is 88.207.251.1. Why?  Besides, I cant ping 88.207.251.1 from outer but I can ping 10.244.149.239.  Why do I seem to have two outer IP addresses?  If I want to remote the server from my home or even from other countries, which IP should I use?
54905
I have a security system and the network setting only allows a three-digit IP address. I can't set it to 192.168.2.100, instead I have to use 192.168.002.100.  Are these two IP addresses different? Do I need to set my router's LAN to be all 192.168.xxx.xxx in order for this to work correctly? I can't find any solid information about this.
119051
Why is IP Address listed with this notation 172.18.0.150/24? I mean the ip is 172.18.0.150 only why it haves /24?, and then whatever what subnet that is on should be someone else's worries, no?  3: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether f8:b1:56:ba:ae:ee brd ff:ff:ff:ff:ff:ff inet 172.18.0.150/24 brd 172.18.0.255 scope global eth0   If I want to reach 172.18.0.150 on some interface (ethX) on another computer I could add in the routing table of that computer:  ip route add 172.18.0.150/25 dev ethX or ip route add 172.18.0.150/24 dev ethX or ip route add 172.18.0.150/23 dev ethX or ip route add 172.18.0.150/8 dev ethX    right? So what does /24 really have to do with my address on my NIC? It seems it only has to do with routing, no? So why list it in ip addr?  Is 172.18.0.150/24 on the same "net" as 172.18.0.150/8 or are these two completely different IP addresses?
22994
I have just had my broadband upgraded to  which means my router has had to change. Previously I was using a Thomson TG585v7 ADSL thingy provided by my ISP. One nice thing about that router was that it would act as a local DNS and allow me to find my other machines on the network by using &lt;hostname&gt;.lan instead of IP addresses.  I've now switched to a Linksys WRT320N ethernet router which connects to my fibre modem, and which I've updated to the latest firmware (1.0.04). I have 2 machines on the network which I regularly want to connect to each other; one is running Windows 7 and the other is running OS X Lion.  The problem I'm having is that I'm unable to connect to my Win7 machine from the OS X machine using the Win7 machine's name. However, I'm able to ping the OS X machine from my Win7 machine using the hostname.
92875
I'm learning about private/public IPs, port forwarding and NAT, and still fail to see the answer to a simple question:  Suppose two users on the same network are communicating with a single server outside their network (say, me &amp; my wife send http requests to yahoo.com).  The server sees both users as a single public ip, and often - as in this case - communicating on the same port.  How does the router route the packets according to the two different connections? Is there any routing info inside the packet beyond ip/port?  Is there some 'session table' maintained somewhere? By whom and what exactly does it include?
23602
Sometimes I run   hostname -I   on my machine and got only one local IP returned like 192.168.0.10, but lately, there is occasions where I type it and got in return both 192.168.0.10 192.168.122.1.   If I go to my router page and to traffic settings, I don't see this second IP connected to it. How can I go further to investigate what is exactly this other IP, if its related to some other program or even to a security problem?
88984
Is there a way to get wireshark to capture packets sent from/to localhost?    When I monitor traffic going from my computer to another, or from another computer to my computer, then it works.  But from localhost to localhost does not register anything.
16402
I have an ISP which assigns IP addresses dynamically. If I go out and turn my router off I am always assigned a new one once I turn it back on. Does that mean that...  1) my previous IP goes elsewhere when my router is turned off?  2) i dont actually have an IP address if my router is off for a day or more?
88673
eth0 has a static IP set in /etc/interfaces  wlan0 gets it IP dynamically  How can I change my routing table and where would I put the command to always make wlan0 the default route so internet access will work?  Right now I can ssh into the box using either eth0 or wlan0 but internet access gets routed through eth0 always which does not work.  Also, are auto and allow-hotplug contradictory options?  Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface default         192.168.20.1    0.0.0.0         UG    0      0        0 eth0 192.168.10.0    *               255.255.255.0   U     0      0        0 wlan0 192.168.20.0    *               255.255.255.0   U     0      0        0 eth0  source-directory /etc/network/interfaces.d auto lo iface lo inet loopback auto eth0 allow-hotplug eth0 iface eth0 inet static         address 192.168.20.2         netmask 255.255.255.0         gateway 192.168.20.1 allow-hotplug wlan0 iface wlan0 inet dhcp     wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf allow-hotplug wlan1 iface wlan1 inet dhcp     wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
113009
I host multiple domains on a single IP address:    cats.com  A @ --&gt; 10.20.30.40 A mail --&gt; 10.20.30.40 MX @ --&gt; mail  dogs.com A @ --&gt; 10.20.30.40 A mail --&gt; 10.20.30.40 MX @ --&gt; mail   I need to set up a PTR record for the IP address. This is so that forward-confirmed reverse DNS will succeed for other mail servers.  DNS query type PTR on 10.20.30.40 --&gt; returns PTR-record="cats.com" (1 result) DNS query type A on "cats.com" --&gt; returns A-record=10.20.30.40 (1 result)   If I can only have one PTR record for my IP, that points to cats.com, how will FCrDNS ever succeed for dogs.com?    Can I just use the domain name they both share (80.70.60.50.static.host.net) in the PTR ?  Thanks!
95438
Is there a command line based way to send pings to each computer in a subnet? Like  for(int i = 1; i &lt; 254; i++)     ping(192.168.1.i);   to enforce arp resolution?
44086
I've noticed an IP address today on my network (192.168.15.1) which when visited actually goes to a page that has a router webconfig page (Not my router)  The puzzling thing is that i tried traceroute 192.168.15.1 which said that the distance between me and that host is 9 hops, whereas the distance between me and any other computer on my home network is 2 hops away (My computer --> Router --> Host)   Can someone please explain what's going on here ?  tracert output:  Tracing route to 192.168.15.1 over a maximum of 30 hops    1    &lt;1 ms    &lt;1 ms    &lt;1 ms  192.168.1.1   2    47 ms    51 ms    49 ms  [163.121.171.123]   3     *        *        *     Request timed out.   4   128 ms     *        *     163.121.211.134.dnet.net [163.121.211.134 ]   5     *      134 ms   126 ms  10.37.242.18   6    94 ms    90 ms    95 ms  10.35.2.157   7   178 ms   254 ms   206 ms  10.32.8.107   8    85 ms    57 ms   318 ms  10.35.0.186   9   215 ms   241 ms   230 ms  192.168.15.1  Trace complete.