Re: PPTP und Routing
Sven Hartge wrote:
Rüdiger Noack <ernohl@yahoo.de> wrote:
root@w2lap161:~# ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:172.16.15.1 P-t-P:62.x.y.z Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:334 Metric:1
RX packets:21 errors:0 dropped:0 overruns:0 frame:0
TX packets:48365 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:425 (425.0 b) TX bytes:8556234 (8.1 MiB)
root@w2lap161:~# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
62.x.y.z 192.168.a.b 255.255.255.255 UGH 0 0 0 eth0
62.x.y.z 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
172.16.0.0 62.x.y.z 255.255.0.0 UG 0 0 0 ppp0
0.0.0.0 192.168.a.b 0.0.0.0 UG 0 0 0 eth0
62.x.y.z ist die vom Provider bereit gestellte IP für den VPN-Tunnel,
192.168.a.b mein Router.
Du brauchst einen Sniffer, wie z.B. tethereal. Damit hängst du dich an
ppp0 und pingst dann deine IPs auf 172.16.0.0/16.
Was siehst du dabei?
root@w2lap161:~# tethereal -i ppp0
Capturing on ppp0
0.000000 172.16.15.1 -> 172.16.10.10 ICMP Echo (ping) request
0.999573 172.16.15.1 -> 172.16.10.10 ICMP Echo (ping) request
1.999450 172.16.15.1 -> 172.16.10.10 ICMP Echo (ping) request
2.999274 172.16.15.1 -> 172.16.10.10 ICMP Echo (ping) request
3.999116 172.16.15.1 -> 172.16.10.10 ICMP Echo (ping) request
4.998982 172.16.15.1 -> 172.16.10.10 ICMP Echo (ping) request
5.998810 172.16.15.1 -> 172.16.10.10 ICMP Echo (ping) request
root@w2lap161:~# tethereal -V -i ppp0
Capturing on ppp0
Frame 1 (100 bytes on wire, 100 bytes captured)
Arrival Time: Mar 1, 2006 22:56:50.122873000
Time delta from previous packet: 0.000000000 seconds
Time since reference or first frame: 0.000000000 seconds
Frame Number: 1
Packet Length: 100 bytes
Capture Length: 100 bytes
Protocols in frame: sll:ip:icmp:data
Linux cooked capture
Packet type: Sent by us (4)
Link-layer address type: 512
Link-layer address length: 0
Source: <MISSING>
Protocol: IP (0x0800)
Internet Protocol, Src: 172.16.15.1 (172.16.15.1), Dst: 172.16.10.10
(172.16.10.10)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
0000 00.. = Differentiated Services Codepoint: Default (0x00)
.... ..0. = ECN-Capable Transport (ECT): 0
.... ...0 = ECN-CE: 0
Total Length: 84
Identification: 0x019e (414)
Flags: 0x04 (Don't Fragment)
0... = Reserved bit: Not set
.1.. = Don't fragment: Set
..0. = More fragments: Not set
Fragment offset: 0
Time to live: 64
Protocol: ICMP (0x01)
Header checksum: 0xc7df [correct]
Source: 172.16.15.1 (172.16.15.1)
Destination: 172.16.10.10 (172.16.10.10)
Internet Control Message Protocol
Type: 8 (Echo (ping) request)
Code: 0
Checksum: 0x32eb [correct]
Identifier: 0x5636
Sequence number: 0x019f
Data (56 bytes)
0000 a2 18 06 44 d8 df 01 00 08 09 0a 0b 0c 0d 0e 0f ...D............
0010 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ................
0020 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f !"#$%&'()*+,-./
0030 30 31 32 33 34 35 36 37 01234567
Ich habe keine Erfahrung mit ethereal und kann deshalb die Ausgabe nicht
wirklich deuten.
Dritte Frage: Ist das 62.x.y.z in der zweiten Zeile die gleiche IP wie
die in der ersten Zeile? Wenn ja, dann solltest du die zweite Route
entfernen.
Wenn ich das tue, überschlägt sich die CPU und ich werde z.B. bei
tcpdump mit Ausgaben überflutet. Endlosschleife?
Noch mal für mein Verständnis:
Die remote IP des Tunnels ist die vom Provider bereit gestellte
öffentliche IP (62.x.y.z). Als lokale IP bekomme ich eine private aus
dem Bereich des Zielnetzes (z.B. 172.16.15.1). Beide Adressen erkennt
man bei ifconfig ppp0 (s.o). Allerdings scheint diese Konstellation
nicht so ganz gewöhnlich zu sein, jedenfalls habe ich bisher nichts
genau passendes ergoogeln können. Die Beispiele unter
http://pptpclient.sourceforge.net/routing.phtml bringen mich leider auch
nicht weiter.
Den Aha-Effekt bei
http://lists.debian.org/debian-user-german/2004/06/msg00005.html kann
ich auch nicht nachvollziehen, weil ich nicht weiß, welche Rolle
luftbruecke dort spielt.
Rüdiger
--
Reply to: