"Kim Hansen" <k-spam2003@oek.dk> wrote in message
news:87ekuh9mv6.fsf@matrix.oek.dk...
> "Chr. L." <chrisl@ASKFORDOMAIN.dk> writes:
>
> > Jeg tror det er en bedre ide at trace hvem der har en DHCP server
> > kørende....
>
> Hvilke gode programmer kan det?
>
jeg ville først bruge ethereal (
www.ethereal.com) og:
1.starte med at sniffe,
2.derpå vil jeg bede om et par renew af IP adressen (samme PC eller i samme
netværk for at få alt DHCP trafik)
3.stoppe ethereal og analysere på DHCP pakker!.
Flowet for en DHCP er nogenlunde:
1.først sender PC'en der vil have en IP en 'DHCP discover til alle'
2. En eller flere DHCP servere sender en 'DHCP Offer' tilbage med info om
sig selv, man her kan se server IP'en!!!. (Option 54: Server Identifier =
62.61.129.250), her er det du skal se om der er nogle der IKKE skal være
der!!!.
3. PC'en der vil have IP, sender til alle en 'DHCP Request' (ip 255.255.255)
pakke hvor i den fortæller hvilken server den vil bruge!, og samtidigt da
det er sendt til alle ved de andre DHCP serve at de IKKE blev valgt!.
4. Serveren sender en 'DHCP ACK' tilbage til PC'en der fik en IP adr. det
hele er OK!
Nedenfor kan du se et mere detaljeret uddrag af en DHCP sekvens pakke for
pakke!.
1.først sender PC'en der vil have en IP en 'DHCP discover til alle' se lidt
protokol udklip her:
---------
Option 53: DHCP Message Type = DHCP Discover
Unknown Option Code: 251 (1 bytes)
Option 61: Client identifier
Hardware type: Ethernet
Client hardware address: 00:20:XX:XX:XX:XX
Option 50: Requested IP Address = 10.0.14.246
Option 12: Host Name = "mypc"
Option 60: Vendor class identifier = "MSFT 98"
Option 55: Parameter Request List
1 = Subnet Mask
15 = Domain Name
3 = Router
6 = Domain Name Server
44 = NetBIOS over TCP/IP Name Server
46 = NetBIOS over TCP/IP Node Type
47 = NetBIOS over TCP/IP Scope
31 = Perform Router Discover
33 = Static Route
43 = Vendor-Specific Information
77 = User Class Information
End Option
Padding
------------
2. En eller flere DHCP servere sender en 'DHCP Offer tilbage' med info om
sig selv, lidt mere protokol udklip!. se at man her kan se server IP'en!!!.
(Option 54: Server Identifier = 62.61.129.250)
------------
Bootstrap Protocol
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0xf94f1d6c
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
0... .... .... .... = Broadcast flag: Unicast
.000 0000 0000 0000 = Reserved flags: 0x0000
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 10.0.16.215 (10.0.16.215)
Next server IP address: 62.61.129.250 (62.61.129.250)
Relay agent IP address: 10.0.255.254 (10.0.255.254)
Client hardware address: 00:20:XX:XX:XX:XX
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option 53: DHCP Message Type = DHCP Offer
Option 54: Server Identifier = 62.61.129.250
Option 51: IP Address Lease Time = 1 hour
Option 1: Subnet Mask = 255.255.0.0
Option 3: Router = 10.0.255.254
Option 6: Domain Name Server
IP Address: 62.61.130.1
IP Address: 62.61.131.1
End Option
Padding
------------
3. PC'en der vil have IP sender til alle (ip 255.255.255) en pakke hvor i
den fortæller hvilken server den vil bruge!(Option 54: Server Identifier =
62.61.129.250), og samtidigt da det er sendt til alle ved de andre DHCP
serve at de IKKE blev valgt!.
------------
Bootstrap Protocol
Message type: Boot Request (1)
Hardware type: Ethernet
Hardware address length: 6
Hops: 0
Transaction ID: 0xf94f1d6c
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
0... .... .... .... = Broadcast flag: Unicast
.000 0000 0000 0000 = Reserved flags: 0x0000
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 0.0.0.0 (0.0.0.0)
Next server IP address: 0.0.0.0 (0.0.0.0)
Relay agent IP address: 0.0.0.0 (0.0.0.0)
Client hardware address: 00:20:XX:XX:XX:XX
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option 53: DHCP Message Type = DHCP Request
Option 61: Client identifier
Hardware type: Ethernet
Client hardware address: 00:20:XX:XX:XX:XX
Option 50: Requested IP Address = 10.0.16.215
Option 54: Server Identifier = 62.61.129.250
Option 12: Host Name = "mypc"
Option 60: Vendor class identifier = "MSFT 98"
Option 55: Parameter Request List
1 = Subnet Mask
15 = Domain Name
3 = Router
6 = Domain Name Server
44 = NetBIOS over TCP/IP Name Server
46 = NetBIOS over TCP/IP Node Type
47 = NetBIOS over TCP/IP Scope
31 = Perform Router Discover
33 = Static Route
43 = Vendor-Specific Information
77 = User Class Information
End Option
Padding
------------
4. Serveren sender en 'DHCP ACK' tilbage til PC'en der fik en IP adr. det
hele er OK!
------------
Bootstrap Protocol
Message type: Boot Reply (2)
Hardware type: Ethernet
Hardware address length: 6
Hops: 1
Transaction ID: 0xf94f1d6c
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
0... .... .... .... = Broadcast flag: Unicast
.000 0000 0000 0000 = Reserved flags: 0x0000
Client IP address: 0.0.0.0 (0.0.0.0)
Your (client) IP address: 10.0.16.215 (10.0.16.215)
Next server IP address: 62.61.129.250 (62.61.129.250)
Relay agent IP address: 10.0.255.254 (10.0.255.254)
Client hardware address: 00:20:XX:XX:XX:XX
Server host name not given
Boot file name not given
Magic cookie: (OK)
Option 53: DHCP Message Type = DHCP ACK
Option 54: Server Identifier = 62.61.129.250
Option 51: IP Address Lease Time = 1 hour
Option 1: Subnet Mask = 255.255.0.0
Option 3: Router = 10.0.255.254
Option 6: Domain Name Server
IP Address: 62.61.130.1
IP Address: 62.61.131.1
End Option
Padding
Chr.