Zitat
94.76.229.154 gwgt1.joymax.com
94.76.229.154 gwgt2.joymax.com
94.76.229.154 gwgt3.joymax.com
94.76.229.154 gwgt4.joymax.com
Zitat
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\defcon>nslookup gwgt1.joymax.com
Server: dnsp08.hansenet.de
Address: 62.109.123.6:53
Nicht-autorisierende Antwort:
Name: gwgt1.joymax.com
Addresses: 121.128.133.29, 121.128.133.28
C:\Users\defcon>
Zitat
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\defcon>ping 127.0.0.1
Ping wird ausgeführt für 127.0.0.1 mit 32 Bytes Daten:
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Ping-Statistik für 127.0.0.1:
Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0 (0% Verlust),
Ca. Zeitangaben in Millisek.:
Minimum = 0ms, Maximum = 0ms, Mittelwert = 0ms
C:\Users\defcon>
Zitat
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\defcon>ping localhost
Ping wird ausgeführt für defcon-PC [127.0.0.1] mit 32 Bytes Daten:
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Ping-Statistik für 127.0.0.1:
Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0 (0% Verlust),
Ca. Zeitangaben in Millisek.:
Minimum = 0ms, Maximum = 0ms, Mittelwert = 0ms
C:\Users\defcon>
Zitat
localhost 127.0.0.1
Zitat
heyguy 127.0.0.1
Hi everyone,
Explanation: Why changing the Hosts-File for every Private-Server?
First we must understand the process of name resolving (DNS=Domain Name System).
We know the destination-URL (commonly), maybe google.com or something else. But there is no server named google.com. There is only a server with an IP address (logical address). Now joins DNS the game. The DNS resolves the google.com into a logical ip address, that we can use to fill the destination-address-field of an IP-packet (Internet: forwarding by layer-3 IP). The DNS-Servers are build hierarchical, that means top-level-DNS-Server for *.com, *.de, *.tr and so on. If our URL (google.com) matches with one Top-Level-DNS (in this case *.com) the DNS forwards the request to the Second-Level-DNS with the hope he knows the IP for google.com.
So long so fine, but whats with the Hosts-File?
Thats Windows-specific. Before Windows contacts an Top-Level-DNS, it will do 2 local steps. At first it will search in the local DNS-Cache (its a small memory-space who saves all successful translations for 1 hour or so). If there is no entry it will ask the Hosts-File. Thats the point. Now lets view to the Hosts-configuration for C# Silkroad:
Zitat
94.76.229.154 gwgt1.joymax.com
94.76.229.154 gwgt2.joymax.com
94.76.229.154 gwgt3.joymax.com
94.76.229.154 gwgt4.joymax.com
There are 4 entrys: 4 URL are linked to 1 static IP address.
So why we ask the Hosts-File for the translation and not the DNS? The answer is very simple: because the DNS-Server knows the original IP (from the JoyMax-Server) for the URL. A little test can verfify it:
Zitat
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\defcon>nslookup gwgt1.joymax.com
Server: dnsp08.hansenet.de
Address: 62.109.123.6:53
Nicht-autorisierende Antwort:
Name: gwgt1.joymax.com
Addresses: 121.128.133.29, 121.128.133.28
C:\Users\defcon>
BÄM. What we did was asking the DNS-Server for the (or one) valid IP address for gwgt1.joymax.com. The bad thing is Lyzerks C# Server (94.76.229.154) doesn´t have the IP address from the public JoyMax-Server (121.128.133.29). So we cant use the public DNS-Servers for translation.
A good example is the function of localhost, too. Localhost is a old invention and implemented in the TCP/IP-Protocol-stack by a unique IP address (127.0.0.1). Its used to ping the own NIC (Network Interface Card) and verify her function in the lower OSI-Layers. You can open the shell and type:
Zitat
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\defcon>ping 127.0.0.1
Ping wird ausgeführt für 127.0.0.1 mit 32 Bytes Daten:
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Ping-Statistik für 127.0.0.1:
Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0 (0% Verlust),
Ca. Zeitangaben in Millisek.:
Minimum = 0ms, Maximum = 0ms, Mittelwert = 0ms
C:\Users\defcon>
Or you can type:
Zitat
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\defcon>ping localhost
Ping wird ausgeführt für defcon-PC [127.0.0.1] mit 32 Bytes Daten:
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Ping-Statistik für 127.0.0.1:
Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0 (0% Verlust),
Ca. Zeitangaben in Millisek.:
Minimum = 0ms, Maximum = 0ms, Mittelwert = 0ms
C:\Users\defcon>
In both cases answers the 127.0.0.1. Windows translates localhost automatically to 127.0.0.1 because there is an entry in the local Hosts-File. If we change this entry from
Zitat
localhost 127.0.0.1
to
Zitat
heyguy 127.0.0.1
We can ping our NIC using the shellcommand <ping heyguy>.
I hope my little explanation helps a bit to understand the process of name resolving and the use of the Hosts-File.
Regards
Saigon
PS: Please write if I wrote something 2difficult or i forgot something.
Zitat
94.76.229.154 gwgt1.joymax.com
94.76.229.154 gwgt2.joymax.com
94.76.229.154 gwgt3.joymax.com
94.76.229.154 gwgt4.joymax.com
Zitat
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\defcon>nslookup gwgt1.joymax.com
Server: dnsp08.hansenet.de
Address: 62.109.123.6:53
Nicht-autorisierende Antwort:
Name: gwgt1.joymax.com
Addresses: 121.128.133.29, 121.128.133.28
C:\Users\defcon>
Zitat
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\defcon>ping 127.0.0.1
Ping wird ausgeführt für 127.0.0.1 mit 32 Bytes Daten:
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Ping-Statistik für 127.0.0.1:
Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0 (0% Verlust),
Ca. Zeitangaben in Millisek.:
Minimum = 0ms, Maximum = 0ms, Mittelwert = 0ms
C:\Users\defcon>
Zitat
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\defcon>ping localhost
Ping wird ausgeführt für defcon-PC [127.0.0.1] mit 32 Bytes Daten:
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Antwort von 127.0.0.1: Bytes=32 Zeit<1ms TTL=128
Ping-Statistik für 127.0.0.1:
Pakete: Gesendet = 4, Empfangen = 4, Verloren = 0 (0% Verlust),
Ca. Zeitangaben in Millisek.:
Minimum = 0ms, Maximum = 0ms, Mittelwert = 0ms
C:\Users\defcon>
Zitat
localhost 127.0.0.1
Zitat
heyguy 127.0.0.1
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Deyrin« (23.07.2009, 17:25)