198 Lotus blogs updated hourly. Who will post next? Home | Blogs | Search | About 
 
Latest 7 Posts
Zipping and Tarring on macOS - with added funkiness
Thu, Oct 19th 2017 7
IBM BPM and Elasticsearch - with added TLS
Thu, Oct 19th 2017 8
Apple Watch - go, no go, go
Mon, Oct 16th 2017 120
IBM Cloud Private - My first foray
Mon, Oct 16th 2017 90
Ubuntu - Software Updater and the Insufficient Disk Space
Mon, Oct 16th 2017 55
Git and Jenkins - Learning Resources
Fri, Oct 13th 2017 80
Jenkins to Git - SSH says "No"
Fri, Oct 13th 2017 73
Top 10
Apple Watch - go, no go, go
Mon, Oct 16th 2017 120
IBM Cloud Private - My first foray
Mon, Oct 16th 2017 90
Git and Jenkins - Learning Resources
Fri, Oct 13th 2017 80
Learning Times - Or Git being a bit of a Git
Fri, Oct 13th 2017 74
Jenkins to Git - SSH says "No"
Fri, Oct 13th 2017 73
Ubuntu - Software Updater and the Insufficient Disk Space
Mon, Oct 16th 2017 55
IBM HTTP Server - Checking Personal Certificates
Wed, Oct 11th 2017 47
Transport Layer Security (TLS) 1.2 and SoapUI
Fri, Jun 12th 2015 44
Argh, I hate macOS when it comes to the apostrophe character
Tue, Oct 10th 2017 41
IBM HTTP Server - Tinkering with CMS Keystore Passwords
Wed, Oct 11th 2017 39


Some notes on TCP/IP - Addressing, CIDR and Masking
Twitter Google+ Facebook LinkedIn Addthis Email Gmail Flipboard Reddit Tumblr WhatsApp StumbleUpon Yammer Evernote Delicious
   

This came up recently during some discussions about IP addressing, subnet masks, CIDR etc.

IP address classes

With an IPv4 IP address, there are five classes of available IP ranges: Class A, Class B, Class C, Class D and Class E, while only A, B, and C are commonly used. Each class allows for a range of valid IP addresses, shown in the following table.


Ranges 127.x.x.x are reserved for the loopback or localhost, for example, 127.0.0.1 is the loopback address. Range 255.255.255.255 broadcasts to all hosts on the local network.

CIDR Notation

CIDR notation is a compact representation of an IP address and its associated routing prefix. The notation is constructed from an IP address, a slash ('/') character, and a decimal number. The number is the count of leading 1 bits in the routing mask, traditionally called the network mask. The IP address is expressed according to the standards of IPv4 or IPv6.

The address may denote a single, distinct interface address or the beginning address of an entire network. The maximum size of the network is given by the number of addresses that are possible with the remaining, least-significant bits below the prefix. The aggregation of these bits is often called the host identifier.

For example:

• 192.168.100.14/24 represents the IPv4 address 192.168.100.14 and its associated routing prefix 192.168.100.0, or equivalently, its subnet mask 255.255.255.0, which has 24 leading 1-bits.
• the IPv4 block 192.168.100.0/22 represents the 1024 IPv4 addresses from 192.168.100.0 to 192.168.103.255.
• the IPv6 block 2001:db8::/48 represents the block of IPv6 addresses from 2001:db8:0:0:0:0:0:0 to 2001:db8:0:ffff:ffff:ffff:ffff:ffff.
• ::1/128 represents the IPv6 loopback address. Its prefix length is 128 which is the number of bits in the address.
Before the implementation of CIDR, IPv4 networks were represented by the starting address and the subnet mask, both written in dot-decimal notation. Thus, 192.168.100.0/24 was often written as 192.168.100.0/255.255.255.0.

The number of addresses of a subnet may be calculated as 2address length − prefix length, in which the address length is 128 for IPv6 and 32 for IPv4. For example, in IPv4, the prefix length /29 gives: 232 − 29 = 23 = 8 addresses.

Subnet masks

A subnet mask is a bitmask that encodes the prefix length in quad-dotted notation: 32 bits, starting with a number of 1 bits equal to the prefix length, ending with 0 bits, and encoded in four-part dotted-decimal format: 255.255.255.0. A subnet mask encodes the same information as a prefix length, but predates the advent of CIDR. In CIDR notation, the prefix bits are always contiguous. Subnet masks were allowed by RFC 950 to specify non-contiguous bits until RFC 4632[4]:Section 5.1 stated that the mask must be left contiguous. Given this constraint, a subnet mask and CIDR notation serve exactly the same function.


In addition, using this CIDR/VLSM Supernet Calculator I was able to work out the CIDR notation for a common IP address of 192.168.1.10 with a netmask of 255.255.255.0 as 192.168.1.0/24 




---------------------
http://portal2portal.blogspot.com/2017/10/some-notes-on-tcpip-addressing-cidr-and.html
Oct 10, 2017
34 hits



Recent Blog Posts
7
Zipping and Tarring on macOS - with added funkiness
Thu, Oct 19th 2017 5:41p   Dave Hay
So I had a specific requirement yesterday - I wanted to extract three specific files from a ZIP file.This is what I had: -unzip -l certificate-bundle.zipArchive: certificate-bundle.zip Length Date Time Name--------- ---------- ----- ---- 0 10-19-2017 16:58 ca/ 1310 10-19-2017 16:58 ca/ca.crt 1679 10-19-2017 16:58 ca/ca.key 0 10-19-2017 16:58 node1/ 1379 10-19-2017 16:58 node1/node1.crt 1679 10-19-2017 16:58 node1/node1.key---------
8
IBM BPM and Elasticsearch - with added TLS
Thu, Oct 19th 2017 5:29p   Dave Hay
Following this: -Tinkering with Elasticsearch and Kibana - on Docker, of courseFurther stories of a tinkerer - this time it's IBM BPM, Apache Kibana and ElasticsearchI've been tinkering further with Elasticsearch on Docker, establishing a TLS connection between it and IBM BPM.Here's my notes: -Pull Imagedocker pull docker.elastic.co/elasticsearch/elasticsearch:5.6.3Start containeres=`docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elas
120
Apple Watch - go, no go, go
Mon, Oct 16th 2017 3:29p   Dave Hay
So I had a weird experience last evening, and not in a good way.For no apparent reason, this was my Apple Watch: -and this: -I have no earthly idea what happened.So, being a true nerd, and a big fan of The IT Crowd, I decided to ( all together now ) TURN IT OFF AND ON AGAIN ….Obviously I couldn't read the display, what with it being all garbled n' all, so I just hit the big button on the right-hand side, below the digital crown and chose the appropriate gibberish - it was the one in red, so
90
IBM Cloud Private - My first foray
Mon, Oct 16th 2017 10:37a   Dave Hay
So this week, along with many other things, I'm starting to get to grips with the newly announced IBM Cloud Private: - IBM brings the power of cloud behind the enterprise firewall I'm running on Ubuntu Linux: - lsb_release -a No LSB modules are available. Distributor ID:    Ubuntu Description:    Ubuntu 16.04.3 LTS Release:    16.04 Codename:    xenial so started by installing the pre-requisites of VirtualBox and Vagrant: - sudo apt-get install virtualbox su
55
Ubuntu - Software Updater and the Insufficient Disk Space
Mon, Oct 16th 2017 8:13a   Dave Hay
So I'm trying to update Ubuntu 16.0.4.3 LTS using Software Updater, but couldn't get past this: -      Now I have LOADS of disk space: - df -kmh Filesystem                   Size  Used Avail Use% Mounted on udev                          16G     0   16G   0% /dev tmpfs                        3.2G  9.4M  3.2G   1% /run /dev/mapper/ubuntu--vg-root  2.7T  346G  2.2T  14% / tmpfs               
80
Git and Jenkins - Learning Resources
Fri, Oct 13th 2017 10:35a   Dave Hay
This is what I've been reading and using over the past few days: -git-server-dockerHow to Setup Git Repository and Credentials for Jenkins Jobs.ssh/id_rsa failed: permission deniedMy simply Git Cheatsheet4.2 Git on the Server - Getting Git on a Server2.5 Git Basics - Working with Remotes'Your branch is ahead of 'origin/master' by 1 commit' on explicit push [duplicate]Unable to push to repositorycannot push into git repositoryJenkins TutorialIBM WebSphere Liberty ConfigurationDeploying with
73
Jenkins to Git - SSH says "No"
Fri, Oct 13th 2017 10:28a   Dave Hay
As per my earlier post: -Learning Times - Or Git being a bit of a GitI'm on a voyage of discovery with Jenkins and Git.Whilst trying to plumb onto into t'other, I was hitting a blocker.To recap, I have Jenkins installed on my MacBook, running locally, and I have Git running on a Docker container on a remote Mac.Therefore, I'm connecting to the remote Git repository using SSH rather than, say, HTTPS or a local file-system.This works OK for me using Git commands such as: -git clone ssh://git@19
74
Learning Times - Or Git being a bit of a Git
Fri, Oct 13th 2017 9:56a   Dave Hay
I'm on a bit of a voyage of discovery this week, having previously been tinkering with Elasticsearch and Kibana a few days back: -Further stories of a tinkerer - this time it's IBM BPM, Apache Kibana and ElasticsearchNow I'm playing with Jenkins and Git, the latter of which is running on Docker, with the intention of automating the push of Java code to WebSphere Liberty Profile, also running in Docker.I also intend to get to grips with Maven at the same time, what's not to like ?Anyway, back
47
IBM HTTP Server - Checking Personal Certificates
Wed, Oct 11th 2017 3:54p   Dave Hay
Whilst on the subject of IBM HTTP Server (IHS), as per an earlier post: -IBM HTTP Server - Tinkering with CMS Keystore PasswordsI was "auditing" the SSL certificate that I'm using for IHS, specifically the signature algorithm.So I have a single certificate in the key store: -/opt/IBM/HTTPServer/bin/gskcapicmd -cert -list -db /opt/IBM/HTTPServer/APIC/ssl/keystore.kdb -pw passw0rdCertificates found* default, - personal, ! trusted, # secret key*- wlpn.uk.ibm.comwhich I validated as follows: -/op
39
IBM HTTP Server - Tinkering with CMS Keystore Passwords
Wed, Oct 11th 2017 2:56p   Dave Hay
Last week, I was demonstrating to a client how one can change the password on a Certificate Management System (CMS) using the IBM Global Security Toolkit (GSK).Therefore, I'd changed the password from my default ( passw0rd ) to something else ( f00bar ).To make it 100% clear, this is a sacrificial TEST VM, hence the weak password.Alas muscle memory makes me type the old the password each and every time ( yes, I can/do use the stashed password when I remember ).This is how I check what password




Created and Maintained by Yancy Lent - About - Planet Lotus Blog - Advertising - Mobile Edition