in reply to Re: Generation of sequential IP addresses for Class B network
in thread Generation of sequential IP addresses for Class B network

Because the programming logic needs to implement the following for ip address numbers greater than 254 say 500:

When the first 254 ip addresses are generated, the third octet should be incremented by 1 once and fourth octet should be reset to 1 and increment by 1 till it reaches 254.Ans this pattern should continue.

Looking for a script to do the same.

  • Comment on Re^2: Generation of sequential IP addresses for Class B network

Replies are listed 'Best First'.
Re^3: Generation of sequential IP addresses for Class B network
by Corion (Patriarch) on Jun 24, 2009 at 09:25 UTC

    This site is not a script writing service. You are supposed to do some programming and problem solving yourself.

    What have you tried to increase the third octet by 1 whenever the fourth octet reaches 254 and there are still IP addresses to be generated? It sounds to me as if nested loops would help you here, or simply treating an IP address as one number of four "digits" that go from 0 to 255 instead of treating it as four separate numbers.