Questions tagged [ipv4]

IPv4 is the "old style" IP protocol currently used in most circumstances.

IPv4 is the protocol which has been in use since the early 1980s, described in IETF publication RFC791. It gets gradually replaced with nowadays as the IPv4 addresses become exhausted.

More information at http://en.wikipedia.org/wiki/Ipv4

1045 questions
7
votes
1 answer

getHostAddress() returns a reversed ip address

I'm trying to get my cell phone ip address by using WifiManager and WifiInfo classes. It returns correct ip address reversed. public String getWifiIpAddress() { WifiManager wm = (WifiManager) getSystemService(WIFI_SERVICE); WifiInfo wi =…
Bana
  • 162
  • 4
  • 16
7
votes
2 answers

How to find location based on IP address in Excel

I've got a spreadsheet of about 5000 user events associated with IPs, and I'm trying to use IP to determine location using just an Excel formula. The IPs in my log are structured as "dotted quads" (decimal notation). I figured VLOOKUP is the way to…
samthebrand
  • 3,020
  • 7
  • 41
  • 56
7
votes
1 answer

Assign static IP address for Wifi network on Android 3.x and 4.x

Im working on one project and there should be a functionality for setting static IP address (DNS, Netmask, Gateway) for Wifi if user want it. My initial and actual solution is an usage of android.provider.Settings.System class that allows this…
Simon Dorociak
  • 33,374
  • 10
  • 68
  • 106
7
votes
2 answers

Connecting IPv4 client to IPv6 server: connection refused

I am experimenting with IPv6 sockets, particularly the "dual stack" capability offered on Windows Vista and later, and apparently on Unix by default. I am finding that when I bind my server to a specific IP address, or to the hostname resolution of…
Wad
  • 1,454
  • 1
  • 16
  • 33
6
votes
3 answers

Why only IP V4 and V6 are adopted?

ok, i know, this time i'll be banned with ip banned :D my question is quite strange: why only the V4 and then jumped to V6 are adopted! why when hearing about internet history we dont find IP V3 or IP V2?! why they dident Just adopt the IP V5, this…
Abdelouahab
  • 7,331
  • 11
  • 52
  • 82
6
votes
1 answer

Determining size of IP header. Why is it different from others?

Look at this code segment: if(ip_header->protocol == IPPROTO_TCP) { tcp_header = (struct tcphdr*)(packet + sizeof(struct ethhdr) + ip_header->ihl*4); /* Print the Dest and Src ports */ printf("Source Port: %d\n",…
RajSanpui
  • 11,556
  • 32
  • 79
  • 146
6
votes
2 answers

Java getHostAddress() Returning VirtualBox IPv4 Address

I am using Java to build a simple method within a class that will grab the LAN IPv4 address of the user's machine. For the most part this works well, with one exception... the IP address I get back is the IPv4 address of my VirtualBox Ethernet…
Oliver Spryn
  • 16,871
  • 33
  • 101
  • 195
6
votes
2 answers

IPv6 address ranges

Following on from this post I am interested in searching IPv6 address ranges. Under IPv4 I would be able to determine the start and end IP addresses provided by an ISP and using those integer values as range bounds quickly search a DataBase to see…
Guy
  • 65,082
  • 97
  • 254
  • 325
6
votes
8 answers

How can I sort a list of IP-addresses in Perl?

I have a bunch of IP-addresses stored in an array, e.g.: my @ip = qw(10.11.1.1 10.100.1.1 ...); How can I sort the addresses in the ascending order? I've tried a simple sort but it failed, of course.
planetp
  • 14,248
  • 20
  • 86
  • 160
6
votes
1 answer

How to Ping for IPv4 only?

I know my router's IPv4 address. But when I Ping using TTL = 1 I don't get that IP. Rather, I get its IPv6 address. (I know of address.MapToIPv4() but that's only for IPv4s that were changed into IPv6s.) So how do I ping for IPv4 only (like…
ispiro
  • 26,556
  • 38
  • 136
  • 291
6
votes
7 answers

Ping - Request timed out on a local network

I'm trying to ping another computer that is connected to the same Wi-Fi network. Pinging to anything else (localhost, website, etc.) works fine. But when I try to ping to the local ip address of my second computer I get a Request timed out.…
AlexT
  • 589
  • 2
  • 9
  • 23
6
votes
1 answer

Docker container not accessible through localhost, but accessible through 127.0.0.1

Problem I have a Docker service container exposed to *:8080. I cannot access the container through localhost:8080. Chrome / curl hangs up indefinitely. But I can access the container if I use any other local IP, such as 127.0.0.1 This is tripping…
Jeric de Leon
  • 63
  • 3
  • 8
6
votes
3 answers

How can I get both IPv4 and IPv6 address using PHP code?

I have a script which sends a request to another server but problem is that IPv6 does not supported so if I send IPv6 then give error so i need this one of two: Get IPv4 address all time or Get both IPv4 and IPv6 addresses I use this code to get…
Shafiqul Islam
  • 5,570
  • 2
  • 34
  • 43
6
votes
3 answers

Win32 sockets - Forcing ip packets to leave physical interfaces when sending to other local interfaces

Summary: I'm trying to create sockets to pass data between two physical interfaces that exist on the same machine, and Win32 sockets always forwards the traffic directly in the kernel instead of pushing through the physical interfaces. Is there any…
antiduh
  • 11,853
  • 4
  • 43
  • 66
6
votes
0 answers

How does socket.gethostbyname work?

How does the python function socket.gethostbyname work? Specifically, how does python obtain the ipv4 address from the fully qualified domain name?
category
  • 2,113
  • 2
  • 22
  • 46