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.

Similar Messages

  • 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 |

  • 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.

  • 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.

  • 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

  • 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.

  • 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

  • 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

  • Help config vlan and inter routing vlan on SF-300

    Hello All.
    I have divided the problem in Routing "SF-300 (Layer 3) can be connected to the Gateway." I did not want to put the Gateway. Injury I ever met with Packet Tracer 5. Can I attach a file. Leave all to me.
    Thank you.
    ### config -code
    ip routing
    vlan 10
    vlan 20
    vlan 30
    interface FastEthernet0/1
    switchport access vlan 10
    switchport mode access
    interface FastEthernet0/6
    switchport access vlan 20
    switchport mode access
    interface FastEthernet0/11
    switchport access vlan 30
    switchport mode access
    interface Vlan10
    ip address 192.168.10.1 255.255.255.0
    interface Vlan20
    ip address 192.168.20.1 255.255.255.0
    interface Vlan30
    ip address 192.168.30.1 255.255.255.0

    Hi Suwatchai, I'm not sure what you are asking.
    On my first post, there are 2 different IP subnet. How I understand you, you would like the computer 1 on FA1 to talk to computer 2 on FA6 which are 2 different subnet. Using your example config on the original post, the computers should have an IP configuation such as stated
    Computer on fa1.
    IP 192.168.10.100
    Gateway 255.255.255.0
    Mask 192.168.10.1
    Computer on Fa6
    IP 192.168.20.100
    Gateway 192.168.20.1
    Mask 255.255.255.0
    These IP addresses do not have to be your selection. They only have to be in the proper subnet with the correct gateway address. The gateway and subnet mask are not negotiable, the IP address is. Assuming the NIC on each computer is configured correctly based off that switch config output, this should work without any issue. If it fails to work, it is most likely an external factor as to why.
    -Tom
    Please mark answered for helpful posts

  • Assigning non-standard subnet mask to local IP address on WRT54GX

    I need to configure my WRT54GX V1 as an access point.  I know how to accomplish this, but our corporate network uses a subnet mask of 255.255.252.0  How can I assign this net mask?  The only options are contained in a drop-down menu and what I need is not there.  Is there a different way to assign the subnet mask rather than using the menues?

    It is a known limitation of Linksys wireless routers that they only support LAN subnets up to 255.255.255.0. I guess the assumption was that the router only runs LANs for up to 253 LAN devices. The plain access point setup (i.e. uplink through LAN-LAN connection) was never properly considered an option although it is documented in the Linksys easy answers.
    Anyway, to set up the WRT as access point the LAN IP address of the WRT and the subnet mask is not important for the wireless connectivity into the LAN. The LAN IP address and subnet mask is only relevant to access the web interface of the WRT to make configuration changes. You have to make sure that the DHCP server on the WRT is turned off and that a LAN port of the WRT is wired to your existing LAN.
    For the LAN IP address setup you have three options:
    1. Use an available IP address inside your LAN and use subnet mask 255.255.255.0, e.g. if your LAN uses 10.0.0.0/255.255.252.0, assign the WRT an IP address of 10.0.3.200 with subnet mask 255.255.255.0. Of course, in that case you are only able to access the web interface of the WRT http://10.0.3.200/ from a computer in 10.0.3.* because that's the IP subnet which the WRT thinks is connected to its LAN ports. You cannot use a computer with IP address 10.0.{0,1,2}.* because the WRT does not know how to route these IP addresses. If your computer has an IP address outside the configured WRT LAN subnet you must temporarily change the IP address of the computer.
    2. If you assign a LAN IP address and subnet mask to your WRT which includes a network router you may be able to get full connectivity by setting up static routes in the WRT. For instance, if you assign 10.0.3.200/255.255.255.0 to your WRT and your main LAN router sits at 10.0.3.254/255.255.252.0 you may be able to set up static routes for destinations 10.0.0.0/255.255.254.0 and 10.0.2.0/255.255.255.0 (or if it works even simply destination 10.0.0.0/255.255.252.0) to gateway IP address 10.0.3.254 on the LAN interface. Traffic from the computer to the router should go directly while the responses from the router to the computer go through the main router. I think this should work although I am not 100% sure.
    3. Use any IP address outside your LAN, e.g. the default 192.168.1.1/255.255.255.0. Again, you must temporarily set up a static IP address on your computer to gain access to the web interface. But even with a LAN IP address outside your LAN the WRT will still bridge wireless clients into the LAN as it is supposed to do.

  • To get DNS, Local IP, Subnet Mask are...

    I need to be able to figure out what the local DNS, IP and subnet mask are... I am not running an applet, this is a full blown java program... I know this and similar questions have been asked tons of times but are they any way of doing this across multiple platforms... I know you can do it by calling a runtime(), then doing IPConfig /ALL and pulling the info out of there...
    Any alternatives?
    Thanks
    Jeremy

    You can get the host name and IP address pretty easily using InetAddress.
    InetAddress localHost = InetAddress.getLocalHost();
    String name = localHost.getHostName();
    String ip = localHost.getHostAddress();

  • My Ipod WiFi shows the Ip Adress and Subent Mask but the router will not show when it says I'm connected

    When I try opening Safari it says cannot connect because not connect even though I am connected. When I go into the settings my Ip Adress and Subnet Mask show up but the router or DNS. I have tried resotring,resetting and forgetting the network but nothing has fixed it so far

    What iP address is shown?  If it starts with 169 yo never connect to the router.
    Have you tried powering off and then back on your router?
    Does the iPod successfully connect to other networks?

  • Help with a Subnet mask solution?

    This is probably obvious to many of your network guys/gals - but I'm stumped - I'm looking for an easy solution to this.
    I have a Linksys wireless router WRT54GS - Comcast cable broadband - my MacBook wasn't staying connected to it so I plugged in my Airport Express to one of the Linksys ports via Ethernet and disabled the wireless on the Linksys.
    Bingo - no more connection problem - the Linksys handles the wired users and the Airport Express handles the wireless - except - I have a network drive connected to the Linksys via Ethernet that my wireless users can't "see" - I believe - because it's on a different subnet mask.
    Is there an easy way to "link" the two so my wireless users can see the wired network drive?
    THANKS!

    As both the Linksys and the AE act as normal switches with no routing functionality, you have one single subnet. So all you have to do is to make sure that all devices connected to the Linksys and the AE have an IP-address of that subnet and the same subnet mask.
    Most routers have a class C private network configured by default. Let's assume, you have 192.168.0.0/255.255.255.0. If so, pick an IP-address out of the address range 192.168.0.1 to 192.168.0.254 for each device and use 255.255.255.0 as a subnet mask. For other class C private networks use the according range.
    If you need to mix different class C networks (e.g. 192.168.0.x for your wired deviced and 192.168.1.x for your wireless devices) use a subnet mask of 255.255.0.0 on all devices.
    Just for your understanding: when a machine A connects to a machine B, machine A takes it's own IP-address (e.g. 192.168.1.1) and ANDs it bitwise with it's subnet address (e.g. 255.255.255.0 would result in 192.168.1.0). Next it does the same again, with machines B IP address and it's own subnet mask. If both results are the same, both machines are on the same subnet, so machine A tries to connect machine B directly. If not, the machines are on different subnet, so machine A tries to connect to machine B using it's configured default gateway.
    Hope this information helps at least a bit.

  • I have a WiFi home connection. It works on my laptop but has stopped working on my iPad, which I tried resetting but it didn't help. It recognises the SSID but then asks for IP Address, Subnet Mask, Router etc. Any ideas on what to do?.

    I have a WiFi home connection. It works on my laptop but has stopped working on my iPad, which I tried resetting but it didn't help. It recognises the SSID but then asks for IP Address, Subnet Mask, Router etc. Any ideas on what to do?.

    1. Turn router off for 30 seconds and on again
    2. Settings>General>Reset>Reset Network Settings

  • "IP and router address not consistent with subnet mask"

    Hi all,
    i have one of the old Powermac G5's running os x 10.3.5 "Panther" with a dual 2.5ghz processor, 512mb or ram, 160 gig hd, and no wireless card. I've been trying to hook the computer up to my network via an Ethernet cable (I have a Linksys WRT54G series router).
    the problem is this: When I go through the Network utilities using the "assist me" option, select the LAN option, put in the necessary information (IP address, subnet mask, router address, and the dns host), and select continue, this message pops up:"IP and router address not consistent with subnet mask".
    What I've found is that no matter if the computer is plugged in with a cable to the Ethernet port the message comes up which is very unusual.
    Thanks in advance.

    Have you verified that you indeed have the proper subnet entered?
    Why don't you just let the Mac obtain its ip address from the router via DHCP?

Maybe you are looking for

  • A New Year, a New Challenge! Become the FIRST SSIS Guru of 2015!

    Happy New Year! "Guru 2014" is so 'last year'! The real glory is to be the first Guru of 2015! :D The birth of a new year, and a new hero? Or the stamp of authority from long established Guru leaders? The challenge is on, all eyes are watching, anyon

  • How to implement the File Browser Window in Webdynpro

    Hello, The Scenario is as follows. I need to read a file. If the file does the exists then the user should be prompted with a file browser window to choose the location of the file. Please can you let me know how this can be implemented. Regards, Vai

  • Multiple document use of field.buttonSetIcon(...) is failing

    We're trying to store a set of icons in a pdf document that can be shared by all the attached pdf documents.  The result of this would be then when we are in one of the attached documents (call it the child), we can read the icon from the parent docu

  • Everything seems to be going wrong...

    OK: Here's what's up: I've owned my iPod 5-gen for about a year now, no problem, works just fine. This was until I started to have this pesky problem in which purchased songs wouldn't play, they'd just be skipped through. There's a helpful forum on i

  • Create database not working

    Hi I am on standard edition 9.0.1.0.1 i am trying to create database X11 logfile GROUP 1('D:\oracleSE\oradata\x10\REDO01.LOG') SIZE 100M, GROUP 2('D:\oracleSE\oradata\x10\REDO02.LOG') SIZE 100M, GROUP 3('D:\oracleSE\oradata\x10\REDO03.LOG') SIZE 100M