DHCP server, DHCP relay - delsi

Josef Brzak brzak at linux.fjfi.cvut.cz
Mon Aug 21 01:30:56 CEST 2006


Ahoj,

  omlouvam se, ale trosku jsem to cele zmastil, jak jsem se
  snazil popisovat dve site, kde jsem to testoval. Radeji se
  budu drzet te druhe site, protoze tu mam primo doma.

  Popis (systemy a sitove karty):

          DHCP server	    L2 HUB + Klienti
          -----------  em1 |
    em0   |         |------|		DHCP relay
        --| FreeBSD |          eth0|-----------------|
  Internet|         |--------------| Linux Slackware |
          ----------- em2          |-----------------|
					   |eth1
					   |
					   |
				      -----------
				     |   Klient  |
				      -----------

  Podle doporuceni jsem pustil tcpdump, ale jen 3x :-). 2x DHCP
  relay a na DHCP serveru:

  Server:
  tcpdump -s1600 -i em2 port 67
  
  DHCP relay
  tcpdump -s1600 -i eth0 port 67
  tcpdump -s1600 -i eth1 port 67
  
  Kdyz z klienta poslu pozadavek:
  # dhclient em0
  DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 4
  DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 10
  DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 13
  DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 12
  DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 19
  DHCPDISCOVER on em0 to 255.255.255.255 port 67 interval 3
  No DHCPOFFERS received.
  No working leases in persistent database - sleeping.

  Tak na eth1 vidim v tcpdumpu tento pozadavek:
  00:46:35.647410 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
  Request from 00:0d:60:cc:15:b5 (oui Unknown), length: 300
  00:46:45.647665 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
  Request from 00:0d:60:cc:15:b5 (oui Unknown), length: 300
  00:46:58.647701 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
  Request from 00:0d:60:cc:15:b5 (oui Unknown), length: 300
  00:47:10.647778 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
  Request from 00:0d:60:cc:15:b5 (oui Unknown), length: 300
  00:47:29.647315 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
  Request from 00:0d:60:cc:15:b5 (oui Unknown), length: 300
  00:52:32.799261 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
  Request from 00:0d:60:cc:15:b5 (oui Unknown), length: 300
  00:52:39.799611 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, 
  Request from 00:0d:60:cc:15:b5 (oui Unknown), length: 300

  Zde je jeste vystup, kdyz zapnu u tcpdumpu parametr "-v":

  01:13:13.571476 IP (tos 0x10, ttl  16, id 0, offset 0, flags [none], 
  proto: UDP (17), length: 328) 0.0.0.0.bootpc > 255.255.255.255.bootps: 
  BOOTP/DHCP, Request from 00:0d:60:cd:14:b5 (oui Unknown), length: 300, 
  xid:0x13059fe3, secs:38, flags: [none]
          Client Ethernet Address: 00:0d:60:cc:15:b5 (oui Unknown)
          Vendor-rfc1048:
            DHCP:DISCOVER
            PR:SM+BR+TZ+DG+DN+NS+HN

  Na eth0 neni videt vubec nic a na em2 take vubec nic.

  Nastaveni na Linux:
  linux:~# iptables -L
  Chain INPUT (policy ACCEPT)
  target     prot opt source               destination         
  Chain FORWARD (policy ACCEPT)
  target     prot opt source               destination         
  Chain OUTPUT (policy ACCEPT)
  target     prot opt source               destination          

  /usr/sbin/dhcrelay -i eth1 192.168.100.1

  Nastaveni na FreeBSD, DHCP server:
  em1 - 192.168.100.1
  em2 - 192.168.102.1

  DHCP server posloucha na em1 i na em2. V dhcpd.conf jsou
  uvedeny vsechny site.

  Dane, moc vam dekuji za vase reakce a trpelivost, diky.

       		     Pepa Brzak



More information about the Users-l mailing list