Welcome to the Linux Foundation Forum!

Lab 6.7

After I have edit the zone file for me, koumy.com.zone with content below, the command " named-checkconf -z koumy.com.zone " dosn't work.

TTL 30
@ IN SOA localhost. admin.koumy.com. (
2012012301 ; serial YYYYMMDDRR format
3H ; refresh
1H ; retry
2H ; expire
1M) ; neg ttl

            IN NS localhost.;

www.koumy.com. IN A 192.168.111.45
www.koumy.com. IN AAAA fe80::22c9:d0ff:1ecd:c0ef
mamou.koumy.com. IN A 192.168.121.11
tambassa.koumy.com. IN CNAME www.koumy.com.

;generate one hundred entries host1 thru host100
$GENERATE 1-100 host$.koumy.com. IN A 10.20.45.$

Answers

  • fahadji
    fahadji Posts: 4

    Hi. I think the semi colon ";" is not necessary at the end of "localhost." Could you show the result of "named-checkconf -z koumy.com.zone "

  • barrythiernosita
    barrythiernosita Posts: 3
    edited April 2022

    it still doesn't work.

    Thank you in advance for your return !

    barry@barry:/etc/bind$ named-checkconf -z koumy.com.zone
    koumy.com.zone:1: unknown option '$TTL'
    koumy.com.zone:3: unknown option 'serial'
    koumy.com.zone:4: unknown option 'refresh'
    koumy.com.zone:5: unknown option 'retry'
    koumy.com.zone:6: unknown option 'expire'
    koumy.com.zone:7: unknown option 'neg'
    koumy.com.zone:14: unknown option 'generate'
    koumy.com.zone:16: unexpected token near end of file
    barry@barry:/etc/bind$

  • fahadji
    fahadji Posts: 4

    Hi.
    In the output I see that you are using "named-checkconf" but this command check a configuration file not a zone file.

    To test the zone file (koumy.com.zone) you create, use "named-checkzone"

    Syntaxe : named-checkzone "zone_name" "zone_file"

  • fahadji
    fahadji Posts: 4

    Hi,
    Please change "TTL 30" by "$TTL 30"

  • lee42x
    lee42x Posts: 380

    Hi, Sorry to heard you are having difficulty, perhaps I can help:

    The $ in $TTL indicates a command like the $GENERATE command.

    The trailing ; on the localhost line, indicates what follows is a comment. If there is no comment then the ; is unnecessary. The existence of the ; should not have any impact.

    A couple of quick questions, which distro and version are you using? Are you using one of the Linux Foundation VM's? Were you able to get the SOLUTIONS file ? The SOLUTIONS file contains a copy of the configuration files for the lab as examples.

    Please post any additional questions or concerns, thank you.

Categories

Upcoming Training