Which format and when?

BlackBeretBlackBeret Member Posts: 684 ■■■■■□□□□□
So the company offered to pay for training to get some Cisco certifications. I'm not new to networking or IT, but I've avoided doing infrastructure work for the most part so the Cisco specific protocols and IOS are new information to me. What I'm having trouble remembering is which format Cisco wants the network portion. Ex. Sometimes they want the /24, sometimes they want the 255.255.255.0 written out, sometimes they want the wildcard of 0.0.0.255.

I have no problem with subnetting and figuring it out, but I keep getting questions wrong with stuff like "When configuring DHCP which command do you use?

A. network 10.1.50.1 255.255.255.0
B. network 10.1.50.1/24
C. host 10.1.50.1/24
D. host 10.1.50.1 255.255.255.0

Now obviously I know it's "network 10.1.50.1" but how do you remember when to use /24 or the full 255.255.255.0? I believe the only place I've seen the wildcard used is ACL's (so far). Is there a reason for structure that wasn't explained and might help me remember when to use which format? Should I just be noting it down and memorizing it? DHCP = /24; VLAN = _; etc..?

Comments

  • PocketLumberjackPocketLumberjack Member Posts: 162 ■■■□□□□□□□
    I haven't seen any IOS commands that accept /24 (yet). The wildcard is only used in ACLs and you HAVE to type the command netmask before it or it will give you an invalid command. I thought /24 is just used for documentation and not in the command line but I could be wrong.
    Learn some thing new every day, but don’t forget to review things you know.
  • BlackBeretBlackBeret Member Posts: 684 ■■■■■□□□□□
    It's used when assigning DHCP address pools. I know I've seen it other places too.
  • rob42rob42 Member Posts: 423
    With the dchp pool sub-command, you could use network 10.1.50.1 255.255.255.0 or network 10.1.50.1 /24. (note: a space between the '1' and the '/') {this maybe IOS dependent, I'm unsure, but it works with ver 15.0(1)M5}

    This is (so far) the only place that I've come across where you can use either a D.D.N or CIDR, but I'll be surprised if it's the 'only' place.

    You'll also come across W.C.M, not only with ACLs, but also when configuring some routing protocols. E.g: OSPF.
    No longer an active member
  • wseyllerwseyller Member Posts: 44 ■■■□□□□□□□
    As far as remembering, I think it is just repetition in your lab work. You can't just read a book of commands and expect to remember. Set this stuff up multiple times and eventually it becomes second nature. If you run into problems that is great. The stuff I am most familiar with is when I go through hell trying to figure out what I did wrong and you dont' easily forget those experiences. Don't be afraid to use the ? during labs to notice all the other options around the commands.
  • OctalDumpOctalDump Member Posts: 1,722
    For things like this, I use "?" to show the options for completing the command.
    2017 Goals - Something Cisco, Something Linux, Agile PM
  • BlackBeretBlackBeret Member Posts: 684 ■■■■■□□□□□
    Yeah, I can tell from the feedback in the lab whether it's correct or I need to reformat it. The issue is with the multiple choice questions like the one above. That was a modified question from Cisco's ondemand CCENT course. If both dotted notation and /24 would have worked in lab I didn't test it out, but they were both options on the multiple choice and I got the question wrong by going with the dotted notation format.

    Has anyone taken the test recently and comment on the level of detail or possible multiple correct options in cases like this?
  • ccie14023ccie14023 Member Posts: 183
    Ah, you are asking for logic in CLI, something which is unfortunately often missing. The short answer is, Cisco uses slash notation or full notation in the CLI whenever they (we?) darn well please. The longer answer is that IOS has been around for a long time, and originally everyone used the full mask notation. As the slash notation came in, some commands adopted it. But they never retrofitted the old commands. The fact of the matter is, when engineering has a plate full with bug fixes and new features, such minor tasks stay pretty low on the priority list. You'll find some Cisco OS's (NX-OS I think, for example) will accept either notation. But IOS, and its derivatives like IOS-XE still require only a full mask notation for commands like "ip address" under an interface, while accepting slash notation other places (like LISP database/RLOC mapping statements, for example.) As for a way to remember which requires which... That would require some underlying logic which, alas, isn't there. Question mark is the best way to know for sure. As for exam questions, I haven't looked at CCENT/CCNA-level questions in ages, but I really hope we aren't providing questions where the correct answer depends on knowing whether it is slash or full notation. Cisco's guidelines specifically state that questions should not depend on minor CLI details like that.
  • rob42rob42 Member Posts: 423
    Just an observation: If the Question has been reproduced here, as is...
    When configuring DHCP which command do you use?

    A. network 10.1.50.1 255.255.255.0
    B. network 10.1.50.1/24
    C. host 10.1.50.1/24
    D. host 10.1.50.1 255.255.255.0

    ... then technically, the correct Answer is 'A', because for 'B' to be correct, it would have to read: 'network 10.1.50.1 /24'. The command fails without the space between the '1' and the '/'
    As I say, just an observation.
    No longer an active member
  • BlackBeretBlackBeret Member Posts: 684 ■■■■■□□□□□
    rob42 wrote: »
    Just an observation: If the Question has been reproduced here, as is...



    ... then technically, the correct Answer is 'A', because for 'B' to be correct, it would have to read: 'network 10.1.50.1 /24'. The command fails without the space between the '1' and the '/'
    As I say, just an observation.

    That's my fault at retyping, there was a space. I chose A, which was incorrect. B. was the correct answer.
  • bornwithbornwith Member Posts: 21 ■■□□□□□□□□
    I know in the newest version of packet tracer it won't packet cidr for dhcp. I tried it a few days ago and it didn't work but ddn did. Thought it was odd but this explains it.
Sign In or Register to comment.