Tuesday, February 19, 2008

IP Addresses Explained

IP Address (Internet Protocol Address): This number is an exclusive number all information technology devices (printers, routers, modems, et al) use which identifies and allows them the ability to communicate with each other on a computer network. There is a standard of communication which is called an Internet Protocol standard (IP). In laymans terms it is the same as your home address. In order for you to receive snail mail at home the sending party must have your correct mailing address (IP address) in your town (network) or you do not receive bills, pizza coupons or your tax refund. The same is true for all equipment on the internet. Without this specific address, information cannot be received. IP addresses may either be assigned permanently for an Email server/Business server or a permanent home resident or temporarily, from a pool of available addresses (first come first serve) from your Internet Service Provider. A permanent number may not be available in all areas and may cost extra so be sure to ask your ISP.

Domain Name Server (DNS): This allows the IP address to be translated to words. It is much easier for us to remember a word than a series of numbers. The same is true for email addresses.

For example, it is much easier for you to remember a web address name such as whatismyip.com than it is to remember 192.168.1.1 or in the case of email it is much easier to remember anonymous@whatismyip.com than anonymous@192.168.1.1

Dynamic IP Address: An IP address that is not static and could change at any time. This IP address is issued to you from a pool of IP addresses allocated by your ISP or DHCP Server. This is for a large number of customers that do not require the same IP Address all the time for a variety of reasons. Your computer will automatically get this number as it logs on to the network and saves you the trouble of having to know details regarding the specific network configurations. This number can be assigned to anyone using a dial-up connection, Wireless and High Speed Internet connections. If you need to run your own email server or web server, it would be best to have a static IP.

Static IP Address: An IP address that is fixed and never changes. This is in contrast to a dynamic IP address which may change at any time. Most ISP's a single static IP or a block of static IP's for a few extra bucks a month.

IP version 4: Currently used by most network devices. However, with more and more computers accessing the internet, IPv4 addresses are running out quickly. Just like in a city, addresses have to be created for new neighborhoods but, if your neighborhood gets too large, you will have to come up with an entire new pool of addresses. IPv4 is limited to 4,294,967,296 addresses.

IP version 5: This is an experimental protocol for UNIX based systems. In keeping with standard UNIX (a computer Operating System) release conventions, all odd-numbered versions are considered experimental. It was never intended to be used by the general public.

IP version 6: The replacement for the aging IPv4. The estimated number of unique addresses for IPv6 is 340,282,366,920,938,463,463,374,607,431,768,211,456 or 2^128.

The old and current standard of addresses was this: 192.168.100.100 the new way can be written different ways but means the same and are all valid:

* 1080:0000:0000:0000:0000:0034:0000:417A

* 1080:0:0:0:0:34:0:417A

* 1080::34:0:417A


Command Lines
DOS/Windows Command Lines

Display Connection Configuration: ipconfig /all

Display DNS Cache Info Configuration: ipconfig /displaydns

Clear DNS Cache: ipconfig /flushdns

Release All IP Address Connections: ipconfig /release

Renew All IP Address Connections: ipconfig /renew

Re-Register the DNS connections: ipconfig /registerdns

Change/Modify DHCP Class ID: ipconfig /setclassid



Network Connections: control netconnections

Network Setup Wizard: netsetup.cpl

Test Connectivity: ping www.whatismyip.com

Trace IP address Route: tracert

Displays the TCP/IP protocol sessions: netstat

Display Local Route: route

Display Resolved MAC Addresses: arp

Display Name of Computer Currently on: hostname

Display DHCP Class Information: ipconfig /showclassid



UNIX IP Command Lines

UNIX - General Command Lines

Note: You MUST be at the ROOT user to make/save any changes. You will need to save your changes in the /etc/rc.conf file. Network cards are referred to as dc0, dc1, dc2, etc based on their position on the PCI bus.

Display Current Config for all NIC's: ifconfig

Display Current Config for dc0: ifconfig dc0

Assign IP/Subnet: ifconfig dc0 inet 192.168.1.2 netmask 255.255.255.0

Assign Gateway: route delete default && route add default 192.168.1.1

Assign multiple IP's: ifconfig dc0:0 192.168.1.2

Assign second IP: ifconfig dc0:1 192.168.1.3

Disable network card: ifconfig dc0 down

Enable network card: ifconfig dc0 up


*Special thanks to Romanov Sergey Vladimirovich from Moscow for the UNIX commands!



Linux IP Command Lines


Linux - General Command Lines

Note: You MUST be at the ROOT user to make/save any changes. Linux users, your distribution will determine the location of your network config file which will need to be updated and saved in order for the changes to remain in effect after rebooting. Network cards are referred to as eth0, eth1, eth2, etc based on their position on the PCI bus.

Display Current Config for all NIC's: ifconfig

Display Current Config for eth0: ifconfig eth0

Assign IP: ifconfig eth0 192.168.1.2

Assign IP/Subnet: ifconfig eth0 192.168.1.2 netmask 255.255.255.0

Assign Default Gateway: route add default gw 192.168.1.1

Assign multiple IP's: ifconfig eth0:0 192.168.1.2

Assign second IP: ifconfig eth0:1 192.168.1.3

Disable network card: ifconfig eth0 down

Enable network card: ifconfig eth0 up



View current routing table: route "or" route -n

View arp cache: arp "or" arp -n

Ping: ping -c 3 192.168.1.1

Trace Route: traceroute www.whatismyip.com

Trace Path: tracepath www.whatismyip.com

DNS Test: host www.whatismyip.com

Advanced DNS Test: dig www.whatismyip.com

Reverse Lookup: host 66.11.119.69

Advanced Reverse Lookup: dig -x 66.11.119.69


*Special thanks to Gergely for the Linux commands!