Manipulating ip address and subnet mask with plsql

Hi,
I'm looking for a plsql package in order to perform basic operations with ip adresses and subnet masks like:
- validating an ip address (dot format)
- converting masks (16 -->> 255.255.0.0)
- splitting an ip range with a higher subnet mask (10.3.0.0/16 -->> 10.3.0.0/17, 10.3.128.0/17)
It's very difficult to find any information about this on google so if you know or had written such a package or function....

As using BITAND function
with two arguments IP_ADDRESS (transfer 32bits-integer) and
POWER(2,32)-POWER(2,32-MASKS),
you must be able to get ip range (32-bits-integer)
and a higher subnet mask by IP_RANGE+TRUNC(POWER(2,31-MASKS)).
And then you can transfer it to dot format (decimal,octal etc.) easily.

Similar Messages

  • How to change IP address and subnet mask without using the sys-unconfig ?

    I have Solaris 10 x86. I've ran into problems using the sys-unconfig command
    to change hostname and IP address.
    How to I manually change the IP address and subnet mask values on Solaris 10 manually?
    Thanks.

    We just switched over a DNS server by using ifconfig, (same subnet), and killing named. seems to be working fine, anything I should look out for ?
    steps:
    Prep -
    - change name in /etc/hostname.e1000g0
    - change name and IP in /etc/hosts and /etc/nodename
    - # uname -S dnsint02
    Activate
    - unplug old dnsint02
    # ifconfig e1000g0 192.168.2.80
    # kill -9 [PID of named]
    Cleanup
    - Remove old key on clients I SSH from.
    - reconfigure backup software for new name/server combo.
    Edited by: HarryC on Jun 25, 2009 9:29 AM

  • How to configure the eth1 port of NIcRIO 9024 to another IP address and subnet mask

    Hi ,
    I am using cRIO 9024 and am planning to configure it to be an MMS server that interacts with a client which is in another network with different IP and subnetmask. I want to run the server VIs from the host computer via the eth0 port and want to communicate the MMS messages through the eth1 port. the eth0 port is configured as a static IP as shown in the screenshot attached and would like to assign a separate IP and subnet mask to the other port . But when I try to save the configuration I get the error "Could not save your changes tot he target.The subnet mask for eth1 is invalid" .
    I have already directly cross connected the Crio and have disabled the firewalls and still am not able to configure it.
    1) is it possible to configure the ethernet ports to have separate IPs corresponding to different networks and thus the subnet masks?
    2) If its possible then what is the mistake i am doing while configuring it ?
    I would be extremaly grateful to have a reply on this as its pretty desperate to spend a lot of time just to set up the IP configurations..!!!!!
    Regards
    Abhinav

    Dear Abhinav,
    I'm sorry but what you are tryining to do is not suported by the Second Ethrnet Port on any cRIO and so you getting this error meeage.
    Here a abstract out ouf the KnowledgeBase How do I Configure the Dual Ethernet Ports on Real-Time Controllers?:
    Ethernet port 2 is currently not supported to communicate outside its own subnet. There is no capability of configuring the Default Gateway for Ethernet port 2 and therefore cannot connect to a large isolated intranet.  However, there appears to be a common misconception that this port can only be used for communication between NI products: this is not the case, though any communication through the secondary port must be within the same subnet.
    Kind Regards,
    SG3 | Applications Engineering | National Instruments | NIG |

  • Change IP-number and Subnet-mask with LabView?

    To upgrade the software on a CRio-System, the user needs to change some settings in the TCP/IP-configuration.
    To simplify this task I think on a possiblity to do (and at the end redo) the changes in the TCP/IP-Configuration of the Windows PC.
    What I need is:
    - Change the IP-Adress (from "Obtain IP adress automatic" to IP xyz...)
    - Change subnet-mask
    - Redo this settings by saving an existing config or set to "Obtain IP adress automatic"
    Who knows if and how it's possible to do that in LabVIEW?
    Perhaps I have to call a script  /.bat-file?
    LabVIEW 6,7 and 8 available :-)

    Sreedhar T wrote:
    Hi, its a really interesting stuff to read. Did anyone try doing it ?
    One thing that I wanted to know was: How long does it take to do this ? Since Im using a time critical application, can this entire operation happen in 100 milli seconds ?
    Will be glad to hear from you.
    Regards
    Sreedhar
    I have used this for a program that needs to have a host IP address for High sped cameras. I have it change the IP address to the required address and change it back when I am done. Here is a very simple Labview version of this code with out the switch back.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    TCPIP Config Programically.vi ‏10 KB

  • Ipad is showing connected to wifi but it is saying its not connected to internet.  I have reset all settings, tried to change IP address and subnet mask and nothing is working.

    My ipad mini 3 is not showing that it is connected to the wifi, but it is saying it is not connected to the internet.  I have reset network settings and then reset all settings and it has not worked.  I have tried to change it to static and change the IP address and the subnet mask and that is not working either.  I have also tried to use the wifi in different places and that doesn't work either.  Please help!!!!  iPad is useless without the internet.

    1. Set router back to Auto DHCP.
    2. Turn off router for 30 seconds and on again.
    3. Re-boot iPad.

  • I need the IP values and Subnet Mask which is given by the ISP for my jetpack so i can configure my smart tv

    i need the IP values and Subnet Mask which is given by the ISP for my jetpack so i can configure my smart tv

    Your public IP Address is provided by the ISP.  Your smart TV does not need to know this information unless you plan to host some kind of an application or service for folks on the internet through your TV.  It wouldn't work anyways since all Jetpacks sit behind a VZW NAT firewall and blocks hosting capabilities by default.
    What you more than likely are referring to is the Default Gateway and Subnet mask of the Local Area Network being hosted by your Jetpack.  By default these values should be something like 192.168.1.1 and 255.255.255.0.  You can confirm the DG and SM by connecting a computer to the Jetpack.  Every computer has a way to look up the networking information.  On a Windows OS you would open up a CMD window and type in "IPCONFIG".
    If you shoot us the model number of your Smart TV we may be able to look up a User Guide to confirm what kind of info is needed to connect to a wireless network.  Most of the time exchanging the IP information is done automatically during the connection process.  It would also be nice to know which Jetpack model you have so we can compare the User Guide for that device with your TV.

  • HT5621 how can I delete a primary e-mail addresse and replace it with a excisting Apple ID?

    How can I delete a primary e-mail address and replace it with a excisting Apple ID?

    An email address can only be used one account at a time, so if you want to replace it with an email address that is currently being used on another account then you will need to remove it from that account first before trying to put it on that account. You should be able to change the email address either by logging into your account on your computer's iTunes via the Store > View Account menu option, or via http://appleid.apple.com

  • Ip addressing and subnets

    I was wondering if anyone knew if I could use a subnet mask of 255.255.255.128 with a network number of 10.107.128.xxx I believe I cannot use this mask with a Class C address but since this is a class A address I though I might be able to. I want to have two subnets each with 126 addresses. These address will be split between two office each with a Cisco 3620 router.
    Thanks,
    Scott Graham

    The topic of this forum is IP + Optical however there are a number of professionals online who may be able to assist you. We are always considering additional forums for such topics and I will make a note of your post.
    If you don't get a suitable response to your post, you may wish to review our resources at the online Technical Assistance Center http://www.cisco.com/tac or speak with a TAC engineer. You can open a TAC case online at www.cisco.com/tac/caseopen
    If anyone else in the forum has some advice, please reply to this thread.
    Thank you for posting.

  • Ip addressing and subneting

    can any one provide a good method on how to subnet, find a range, identify to witch ip belong to witch range, basically anything that can help...
    pst: None of those long explanation. Thanks

    Hi,
    Jon gave most fastest way calculation done in your head to come up with answer of network ID , 1st host, last host-, hosts range , and broadcast address of specific host.
    Would like to throw additional info that will definately help you understand the sequence involved in the process. First you have to understand few simple things things that may look hard at first glance in order to make this process seemless as well as done in your head, understanding it makes things easier than memorizing things I guess.
    First thing is to understand the binary system involved in IPv4, which Im sure you already know that it is composed of 4 octets, each of 8 bit equaling a total of 32 bits.
    so three basic components you need to know by heart and comprehend are these.
    When you understand the esence of this you will be a pro in subneting any class network in your head.
    The Rule number 1 is = State away from calculators, you may use it only to confirm your answer , but do the process in your head.
    Second- = Understand IPv4 Class networks and their default classful mask - This will help you in indentifying what class network you are face with when presented with a host regardless of its mask, in the case of (supperneting).
    1-126 Class A Default mask /8
    128-191 Class B Default mask /16
    192-223 Class C default mask /24
    224-239 Class D Multicast reserved
    240-255 Class E experimental
    Third = Understand and know the binary value of a 32 bit address in IPv4.
    You must understand and know the binary value of an octect which is:
    128 64 32 16 8 4 2 1
    so in your example of 172.27.205.91/21 you know that 172 falls under Class B network and a class B network uses default mask of /16 bit which is 255.255.0.0 but 172,27.205.91 uses a /21 bit mask, so knowing the binary value of an octet seen in 128 64 32 16 8 4 2 1, you count from left to right 5 positions from the 3rd octect of the mask, that is 255.255.0.0 is 16 bits which is default of class B then the 3rd octect binary value count 5 (128 64 32 16 8) 4 2 1, in the parenthesis you have 5 bits which will make a total of 21 bits mask, up to here the 5th position ends in 8, remembering that 8 will be the key number because that will be your increment figure of networks within 172.27.0.0. So far so good right?
    Now, say that 172.27.205.91 had a /19 bit mask instead of /21, then you do the same principle as before , this is still a class B network, which you now know its default classful mask is 255.255.0.0,then on the 3rd octet of the mask you count from left to right in this case of /19 will be 3 bit positions from 3rd octect, 255.255.0.0 is 16 bit mask, 3rd octet binary value again is (128 64 32) 16 8 4 2 1, again, in
    parenthesis you have counted 3 bit position from left to right which will come to a total of 19 bits including the (255.255 -16-bits), that will bring you to 255.255.224.0 , now a key to calculate the mask is easy, simply add 128 + 64 + 32 = 224
    here you have /19 - in example above with binary value bit counting 3 positions it ends in (32), here the 32 will be the figure to increment to come up with networks incrementing by 32
    172.27.0.0
    172.27.32.0
    172.27.64.0
    172.27.96.0
    172.27.128.0
    172.27.160.0
    172.27.192.0 -----> here you stop because 172.27.205.91 host falls here
    172.27.224.0
    etc..
    so you have 172.27.192.0 as the network ID, 172.27.192.1 as the first host, for broadcast address simply substract one from the 3rd octect of the next network of 172.27.224.0 which is 172.27.223.255. So the broadcast address of 172.27.205.91/19 is 172.27.223.255, then substract one from the 255 broadcast address to come up with the last host address which is 172.27.223.254.
    Hope this helps, again, Jon provided the most fastest way calculation.
    Regards

  • Ip addressing and subnetting

    Hello everyone i am writing a program that will test to see if to ip addresses are on the same network thet only thing is i have no idea what would the best route to take has anyone done anything similar or has anyone any advice i could use

    Well I solved my own problem and it was working fine for months until Yosemite came along....
    To tether my iPhone USB connection to an Airport Express Base Station (AEBS)- i did the following
    1. Connect iPhone and turn on Personal Hotspot using USB
    2. Going to System Preferences on the Mac click on Network
    3. Set up the Ethernet setting with a static IP - (manual)
    Configure IPv4 Manually -
    IP Address: 192.168.2.2
    Subnet Mask: 255.255.0.0
    Router: 192.168.2.1
    Next step is to configure the AEBS
    Start from fresh -
    Create a New Network
    Internet Settings set to :
    Connect Using: Static
    IPv4 Address: 192.168.2.3
    Subnet Mask: 255.255.255.0
    Router Address: 192.168.2.1
    DNS Servers: 192.168.2.1
    Then under the Network tab the router mode is set to DHCP and NAT
    It worked beautifully until recently , after the upgrade to Yosemite it was working for about 1 month and then as of yesterday it stopped working.
    I am not a networking guru and I am open to suggestions on a better setup. Has anyone got this setup working too?

  • Help!  -  IP addresies and subnet mask

    Who can help me to write JAVA programm , which can handle CASE 1 one and CASE 2 simultaneously ?
    Any ideas ?
    Thank you in advance !
    CASE 1
    Input: only one IP address with subnet mask
    Output :
    1. The IP address : binary and decimal
    2. the web mask : binary and decimal and the number of the Bits
    3. Network address: binary and decimal
    4. Broadcast address : binary and decimal
    5. The smallest host address: binary and decimal
    6. The biggest host address: binary and decimal
    Examples to test the programm: 140.78.100.83./25 and 192.168.2.13/25
    CASE 2 :
    Input : one IP address with subnet mask and a second IP address
    Output :
    1. The IP address : binary and decimal ( only for the first IP )
    2. the web mask : binary and decimal and the number of the Bits( only fot the first IP )
    3. Network address: binary and decimal ( only fot the first IP )
    4. Broadcast address : binary and decimal ( only fot the first IP )
    5. The smallest host address: binary and decimal ( only fot the first IP )
    6. The biggest host address: binary and decimal ( only fot the first IP )
    7. Is the second IP in the subnet of the first IP
    Examples to test the programm : 192.168.1.10/23 192.168.0.255 and
    192.168.1.10/23 192.168.2.255 )
    All of the above ( IP , Subnet mask etc. ) have to be modeled like integer (=32 Bit) or long ( =64 Bit ) variables and after to calculalte with this variables.
    To check , if the " Syntax" is correct a function " checkParameters " will be called .
    This function have to be also implemented .

    Many of us can help you when you have questions about code you wrote.
    None of us will write the code for you.
    So when you have some code written, and you have a question about it, don't hesitate to ask. That's how we help you to write programs here.

  • E911 CsLisSubnet and subnet mask

    When adding a CsLisSubnet how do you specify the subnet mask?  It appears only an IP is given, how does it know how much of the network provided to use?  For example in the case of 10.0.1.0/23 would I add both 10.0.1.0 and 10.0.2.0?  What
    about something smaller than a /24?

    You don't specify the subnet mask, it's just a subnet match.  This is straightforward when you have 8/16/24 bit subnets, but isn't obvious when you've got larger or smaller ranges.
    Basically, the client will do a calculation, in this case let's say you have 10.0.2.97 as your client's IP.  It will determine based upon the subnet mask given by DHCP or manually assigned that it's on the 10.0.1.0 subnet.  It will then talk
    to LIS to see if there's a match against 10.0.1.0  That's it.
    I personally wish we could use subnets, for example, let's say you share a subnet over multiple E911 locations, and you want to just take that one 10.0.2.97 IP and give it a different location (perhaps this phone is bolted to the wall), you can't just
    stick 10.0.2.97 into your LIS database and have it match, the calculation on the phone or client will come up with 10.0.1.0 and match that, the 10.0.2.97 entry in your LIS database will be ignored because nothing will ever match it.
    I hope that's clear.  If not I can explain it differently.
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
    SWC Unified Communications

  • I have a new email address and updated it with my apple id/icloud and updated on my iPhone, but i'm getting a pop up to enter my password with my old email address listed for iCloud/Apple id.

    I have a new email address and updated my apple id/icloud  with the new address. I updated on my iPhone, but i'm keep getting a pop up to enter my password with my old email address listed for iCloud/Apple id.  How do I get it to go away?

    Did you create a NEW Apple ID or did you change the email address for your OLD Apple ID? This will affect how you update apps in the future.
    Anyway, go to Settings/iTunes&App Stores, log out, then log in with the new ID.

  • Can not login with email address and password registered with HP

    I set up an eprint D110 at another location.  I am trying to send to that printer.  I can not login to eprint with the email address and password that I set up.  What do I do now?

    Hi there, are you having trouble logging into the ePrint Center at this point (see the image below)?
    If so, you can click on the Forgotten your password link where you will be prompted to enter the e-mail address you used to setup your ePrint Center account. If you can't remember the e-mail you used to setup the account you can do the following:
    From the display on your printers front panel remove web services by clicking Setup>Wireless>Web Services
    Once this is done, re-enable web services by following the same path. The printer should print an information sheet once you've re-enabled web services. This sheet will contain a new printer code. 
    In ePrint Center click the Sign-In button and then select the Sign Up option at the top of the box
    Go ahead and setup a new ePC account and when prompted enter the new printer code from the information sheet
    Your printer is now no longer attached to your old ePC account and will show up in the Printers section of your new account.
    Just be aware that the printer now has a new e-mail address so if you've shared the previous address with family or friends you'll need to let them now the new one.  
    If you found this reply helpful please click the kudos button and if it solves your problem please click the Accept as Solution button so that other forum users may use the solution to help solve their problem.  
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

  • Dropdown box and insert mask with list page

    Hi,
    I m trying to make a CRUD example with JSF. I have the list and the insert mask in the same page. Everything was working fine when i had "NO" select box in my insert mask. But, when i add a select box to the insert mask. I am getting the following error.
    java.util.NoSuchElementException
         javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:98)
         javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:124)
         javax.faces.component.UISelectOne.matchValue(UISelectOne.java:141)
         javax.faces.component.UISelectOne.validateValue(UISelectOne.java:114)
         javax.faces.component.UIInput.validate(UIInput.java:645)
         javax.faces.component.UIInput.executeValidate(UIInput.java:849)
         javax.faces.component.UIInput.processValidators(UIInput.java:412)
         javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:912)
         javax.faces.component.UIForm.processValidators(UIForm.java:170)
         javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:912)
         javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
         com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:78)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    Do i need to set the selected item value in the bean programmatically? OR am i missing something.
    Please advice.
    regards
    fargo

    hIi,
    I solved the problem by keeping the managed bean in session scope. But, this is not neat.
    Can someone help??
    Regards
    fargo

Maybe you are looking for

  • Should I buy a Macbook Pro or the New iMac 21'. I have the new iPad and an iPhone 4.

    I need to buy a new computer soon and obviously im buying a mac. im not sure which mac I should buy. Im undecided between the new iMac or the Macbook Pro 13. Please help.

  • TM Disk not showing up in Migration Assistant

    Hey guys, So I have a 1 Tb Lacie harddrive that has 3 partitions. 1 small one for windows transfers, 1 mac formatted disk and 1 dedicated to Time Machine. I back up everything except the Movies and Downloads folders. I have a new imac at my disposal

  • Backup from 9i and restore this backup to 10g using RMAN

    Hi all; I have a database 9i on SuSE9. And I want to restore another server this database's backupsets to 10g on SuSE10 using RMAN. Then I have run following scripts. On 9i Database: (SID=discoden)_ RMAN > backup database plus archivelog; and I have

  • How do i track down my ipad using the serial number_

    o0kay i lost my ipad 2 and i really want it back or atleast i want all my data erased. i have bank statements and my email,. so in other words anyone that gets a hold of my ipad can logg into my account and get all my informaion and money ... i have

  • Calculating Large Pool value

    Hi, I need to determine the 'large pool' size to be implemented for using RMAN. (We already have RMAN running). I need to know what parameters I need to set in init.ora for large_pool to work efficiently in conjunction with RMAN. How do I calculate t