01-introduction ubuntu xp (1)

37
Faculty of Science Commonwealth of Australia Copyright Act 1968 Notice for paragraph 135ZXA (a) of the Copyright Act 1968 Warning This Material has been reproduced and communicated to you by or on behalf of Federation University Australia under Part VB of the Copyright Act 1968 (the Act). The Material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright protection under the Act. Do not remove this notice. ITECH1002 Network Operating Systems Introduction

Upload: taha-khan

Post on 08-Dec-2015

236 views

Category:

Documents


0 download

TRANSCRIPT

Network Operating Systems ITECH 1002Faculty of Science
Commonwealth of Australia Copyright Act 1968 Notice for paragraph 135ZXA (a) of the Copyright Act 1968 Warning This Material has been reproduced and communicated to you by or on behalf of Federation University Australia under Part VB of the Copyright Act 1968 (the Act). The Material in this communication may be subject to copyright under the Act. Any further reproduction or communication of this material by you may be the subject of copyright protection under the Act. Do not remove this notice.
ITECH1002 Network Operating Systems
Lab tasks (Topics 1-5) 7% (Marked weekly in lab classes)
Lab tasks (Topics 6-10) 8% (Marked weekly in lab classes)
Laboratory test (week 7) 10% [ type B] (lab timeslot)
Theory test (week 7) 10% [type B] (lecture timeslot)
Networking Assignment 15% (Due in weeks 6 & 11)
(Section 1 understanding will help with Theory & lab test preparation)
Exam 50% [ type B]
Assessment
Computers are used through an Operating System
Windows (various), Linux (various), Mac
How does the OS “do” networking
How does the OS interoperate?
Where are we going?
*
We live in an increasingly networked world. The Internet is used now by practically everyone in developed countries and by a surprising number in less developed places. The $100 laptop, seen as a prime education and development tool in the underdeveloped world, is connected to the Internet.
Behind all this is the idea that a computer – the hardware in the case and the software that it runs – is capable of being connected to other computers or devices. There are other courses that will focus on the physical means by which computers can talk, or the languages that they use to communicate. In this course all our attention is on the Operating System that the computer is running.
Without an operating system the very early computers were horrendously difficult to use. The OS hides all the complex differences in hardware behind a standard interface that people can get to know. The brake and accelerator on a car are the well-known interface to enormous variations in car hardware. A modern OS is graphical – the GUI (Graphical User Interface) allows us to point and click our way through many flavours of Windows (popular commercial OS), Linux (open source – free!) OS or Mac.
In this course we will get to know Windows (XP) and Linux (ubuntu) better and understand how networking is done in each OS and finally how they inter-operate togther.
Faculty of Science
Most computers work in Windows
Windows drivers exist for most hardware
Linux drivers far harder to find
Some hardware though is well supported
How to run Linux everywhere?
At home
*
This course needs to run in many locations. In particular the lab work, aside from functioning in many different lab locations, will clearly be more useful if you can go over it at home. If all the work was in Windows this would scarcely be a problem.
All those different computers in all those different locations are all (presumably) able to run Windows. This means that, whatever different hardware is in use, the Windows drivers for that hardware are available, installed and functioning.
This state of affairs (everything working) is quite hard to achieve though in Linux. The manufacturer of a new piece of computer hardware is far more likely to produce drivers for the huge Windows market than the much smaller Linux market. Though this problem is becoming less severe it is still one that limits the use of Linux and makes it harder to teach.
Faculty of Science
Special Windows software creates the illusion of a standard machine
A Virtual Machine (VM)
Install Linux on the Virtual Machine
Drivers always available
A copy of Windows that you can mess about with
Virtualisation
*
Enter some very clever software that will make the many different flavours of hardware appear, from the point of view of installing a new OS, to have very simple, standard hardware. Because of this standardised environment it is easy to install Linux for example and have things work.
An example here may help. A classic problem when installing Linux on a laptop is to get the drivers for the Wireless network. There are so many varieties of hardware that it can often be a complex problem. Running virtualisation software on the machine, in Windows, makes the mis-understood wireless network appear to be a standard, well-known piece of network hardware onto which Linux can easily be installed.
You might even want to install Windows on your VM. This copy of Windows will be one that you can afford to wreck – without affecting your normal installation at all.oo
Faculty of Science
The host OS
We use Oracle’s Virtual Box on Windows
There are others
The guest OS
We provide an Ubuntu image & an XP image
Can install many others!
*
When using virtualisation (as you will in the lab this week – and throughout the course) you will need to get used to some new vocabulary. There are now two operating systems involved – the “real” one and the “virtual” one.
The real OS, the one that the computer boots into before it runs Virtual Box, is termed the host operating system. In this course the host will always be Windows but, for the sake of argument, if you had a Macintosh at home you could use that as the host and run the Mac version of Virtual Box.
The virtual OS, of which there could be several installed, is termed the guest operating system. In this course that will be Ubuntu and Windows. It is strongly recommended that you duplicate this setup at home. Having a home environment that matches the lab environment always leads to better marks because you can study things in more depth. Using a Windows guest to fool around with is safer than trying things out on your host copy.
Faculty of Science
many switches that can be
either on or off
This is a true KB
Nearest to 1,000,000 is 220 (1,048,576)
This is a true MB
What is a true GB? (as a power of 2)
Number systems
210 X 220 = 230
*
In this course we will be discussing the way that computers, in the Internet, communicate with each other and learning some of the basics about configuring this in Windows and Linux. Because computers are built from large numbers of tiny switches, and because switches can only be on or off, computers operate internally with a counting system that is based on these two states. This is the binary number system.
The slide shows the way that we humans, ten fingered creatures, count by tens. A thousand for example is ten to the power of three (ten cubed) and a million is ten to the power of six.
We work closely with computers and often see the sizes of files represented in kilobytes (KB) and megabytes (MB) and we probably realise that these quantities have something to do with thousands and millions. The computer though is counting by twos and the actual size of a KB is not exactly 1000. It is a power of 2 (210) that is close to 1000 as the slide shows. The same applies to the MB.
This is the reason why the actual size of files (the number of bytes in the file expressed as a decimal, human-format number) does not quite match with the size reported in MB or KB.
What about the GB? How big is that as a power of two? Remember that when you multiply a “thousand” by a “million” (expressed as powers of two) you add the indecies.
Faculty of Science
How many “switches” does it take to store a certain sized number?
210 needs ten switches
One byte of memory contains eight switches
Eight bits in a byte
Hence 232 needs four bytes of storage
Storing binary numbers
*
Going back to the idea that computers are built of switches we can now start to think about how many of these switches are involved in storing various sized binary numbers. Each switch will store the value (0 or 1) of one particular power of two. A number like 210 therefore requires 10 switches.
Computer memory is divided up into chunks that are eight switches long. This size of chunk is called a byte – it is made up of eight bits. It should be easy to see that a number like 232 would therefore be stored in four bytes of memory.
Faculty of Science
How do we describe what is stored in those four bytes?
11100101011111110001000110100 would be one way.
(a number in this format is hard to remember)
The decimal equivalent (481288756) is not very useful because it is completely unrelated to bits of storage
The universal shorthand is to group the bits, four at a time and then use a number/letter to describe each 4 bit value
This is the hexadecimal number system
See the next slide
*
Once you have stored a binary number (lets use a 32 bit number for the sake of argument) you might then want to describe it to someone else. At this point we are looking for a usable form of representation for large binary numbers.
One way would be to describe each bit – using a 0 or 1 for each bit. The resulting string of zeros and ones, shown in the slide, is very human-unfriendly.
Perhaps you can just use the decimal value of the number? The problem is that you lose all sight of the storage involved. Can you look at 481288756 and say whether it is stored in three bytes, four bytes or five?
The solution to this is a form of shorthand known as hexadecimal which gathers the bits together 4 at a time (hence keeping in touch with the storage) and then represents each four bits using a number or letter. See the next slide.
Faculty of Science
4 bits (often called a nibble) is a smallish number
How big?
Imagine the column headings above each bit
Each heading is a power of two – increasing to the left
Represent 4 bits as a character?
There are 16 possible values
0,1,2….15
Our problem is to represent each of these 16 values with a single character
23
22
21
20
1
2
4
8
*
The big binary number is going to be broken down into groups of 4 bits. These 4 bit groups are known as nibbles which is a bit of a computing joke – a nibble is a small bite!
How can we represent the value of a nibble with a single character? If we can solve this problem then any, arbitrarily large, binary number can be represented concisely in way that does not loose sight of the underlying storage.
First step is to get an idea of how big the number stored in a nibble can be. To do this we picture, as in the slide, that each bit has a column heading that is a power of two – beginning at the right with zero. You went through this when you learned to count except then the headings were powers of tens (tens, hundreds, thousands etc) In the binary world the equivalent headings are twos, fours, eights as shown below the green boxes in the slide.
The heading for the “ones” column is the hardest to understand. 20 is in the slide. In the decimal world it would be 100. Any number raised to the power zero is one. It is easy to prove if you understand that division is the same as subtracting indices. 2/2 = 1 OK? True for any number. Now do it with the indices: 21-1= 1. In other words 2 (or any other number) raised to the power zero is 1
When we add together the largest possible value of each column – 1+2+4+8 – we get the largest possible number – 15. If we include 0 we have 16 possible values and the task is to represent each of these values as a single character.
Faculty of Science
Some are obvious
1010 : 0xA (ten)
1011: 0xB (eleven)
1100 : 0xC (twelve)
1101 : 0xD (thirteen)
1110 : 0xE (fourteen)
1111 : 0xF (fifteen)
*
Representing nibbles as a single character – which is what hexadecimal sets out to do – is straightforward until you go beyond nine. From 0 to 9 we have perfectly normal number representations which we just need to precede with a 0x to let everyone know that we are “speaking hex”.
However these 10 digits are the only ones in our decimal numbering system and we need 16 different ones to represent a nibble. The answer is to use letters instead of numbers for the six additional digits. We use the first six letters of the alphabet (A-F) to represent the numbers ten to fifteen as shown in the slide.
Faculty of Science
11100101011111110001000110100
The number from a few slides ago
Divide into 4 bit chunks. Start at the right! We’ll see why
Oops! Only one bit left!
Pad it with zeros
4
3
2
E
F
A
C
1
*
So now we go back to the (4 byte) number that we looked at earlier and this time we will represent it in hexadecimal. Remember we are doing this because trying to communicate all those 0’s and 1’s amongst humans is clumsy and using the huge decimal numbers means that we loose track of the bytes of storage.
The first time you go though this process it will seem complex but if you do it a few times you will realise that converting back and forth between binary and hex is straightforward and, above all, does not involve any mathematics!
The first step, as previously mentioned, is to split the binary number into groups of 4 bits (nibbles). You must do this starting at the right hand end – the reason why is shown in the slide. If there are not an exact number of nibbles in the number it is important that the spare bits are at the beginning so that they can be padded with zeros (to make up a nibble) without changing the value. To clarify this think of a number like 42 and consider the effect of padding before (042) and after (420) on the value.
The final conversion then proceeds a nibble at a time (use the table in the previous slide but try to get used to A,B,C,D,E & F and the numbers they represent. The final result is very clearly a 4 byte number because it has eight characters in it. This is the point of hexadecimal representation.
Faculty of Science
Base (10 for Decimal, 2 for Binary, 16 for hexadecimal)
Valid digits (0-9 for Decimal, 0 & 1 for binary)
Each digit has a weighting
(Base) 0 (least significant digit) [ 1’s for decimal ]
(Base) 1 (next digit) [ 10’s for decimal]
(Base) 2 (next digit) [ 100’s for decimal]
(Base) 3 (next digit) [ 1000’s for decimal]
Structure of any Number system
All number systems have a similar structure.
The base of the number system dictates all other aspects.
The number systems of interest are:
Binary Base=2 Valid digits 0,1
Decimal Base=10 Valid digits 0 – 9
Octal Base=8 Valid digits 0 – 7
Hexadecimal Base=16 Valid digits 0 – 9, A,B,B,D,E,F
The base 6 number system would follow a similar pattern.
Base7 Base = 7 Valid digits 0 – 6
Each octal digit represents 3 binary digits and so gives us a way to simplify large binary numbers.
*
Valid digits = 0 & 1. Base = 2.
All other number systems have a similar structure however with different bases, weightings & valid digits.
Structure of binary numbers
128 64 32 16 8 4 2 1
For Binary (base 2) the weighting of digits starting from the least significant are:
1,2,4,8,16,32,64,128 [ ie. 20 , 21 , 22, 23 etc. ]
For Decimal (base 10) the weighting of digits starting from the least significant are:
1,10,100,1000,10000 etc. [ ie. 100 , 101 , 102, 103 etc. ]
For Octal (base 8) the weighting of digits starting from the least significant are:
1,8,64,512,096 etc. [ ie. 80 , 81 , 82, 83 etc. ]
For Hexadecimal (base 16) the weighting of digits starting from the least significant are:
1,16,256,4096,65536 etc. [ ie. 160 , 161 , 162, 163 etc. ]
*
An Internet Protocol address (IP address)
Just as we need unique phone numbers
How are these addresses stored?
IPv6 (the new scheme) uses 16 bytes (128 bits) for each address
IPv4 (the older and most common scheme) uses 4 bytes (32 bits) for each address
Internet addresses
*
It should be self-evident that computers all need their own unique address to communicate successfully in the Internet. Not just computers – every single device that is Internet connected. Obviously this includes mobile phones and PDA’s (Personal Digital Assistants) but soon cars and fridges and many other things will need IP addresses.
There are two schemes for storing these addresses, an old one and a new one. The old scheme is the one that is almost universally in use (over 99% of addresses) is called IPv4. The new scheme, which will undoubtedly be a large part of the future is called IPv6.
The simplest way of stating the difference between IPv4 & IPv6 is to speak of the number of bytes used to store an address. IPv6 uses 16 bytes. IPv4 uses 4 bytes. Expressed in bits (of course) this is 128 & 32 bits. You will begin to see why we just had a long detour to learn about hexadecimal.
The comparison, in terms of unique addresses, with the phone system is worth keeping in mind. We will make quite a few comparisons with phone numbers as we go. For the present just satisfy yourselves that the phone system would not work if more than one person had the same phone number. In both systems the addresses must be unique
Faculty of Science
This is an enormous number
3.402 × 1038
4.5×1015 addresses for every observable star in the known universe
IPv4
A much smaller number
Address starvation is a real issue
How many unique addresses?
*
The difference in storage space (16 bytes versus 4 bytes) does not seem to be that big a change but when you consider the size of the number that can be stored in that space the difference in unbelievably enormous.
When IPv4 was “invented” in the 1970’s they thought they were being quite generous in assigning 4 bytes to the storage of an address. The idea of 4 billion computers, each needing a unique address was after all quite unthinkable in a world of mainframes. Personal computers and all the other devices we can think of have changed all that.
I feel reasonably safe in saying that the number of addresses in IPv6 will not run out. The very large number for each visible star in the universe certainly seems enough.
The term address starvation is being used to describe the imminent exhaustion of IPv4 addresses and this, more than anything else, will cause the current 0.7% takeup to rise. It is interesting to look at where IPv6 is getting the most use. The countries that were not big Internet users in the last century (China, India, Russia….) did not get granted a fair share of IPv4 addresses. They are leading the transition to IPv6.
Faculty of Science
Where in the world?
Australia/Victoria/Ballarat
Network jargon?
Where then = node address
*
Although an address is uniquely identifying one computer (or telephone!) in the world if you examine it you can see that it is really doing two jobs.
To begin with it contains some information that is clearly geographical. In the case of a phone number this the country, the state/province and the city or rural region. In the case of a network this will be identifying a network somewhere in the world. We’ll see more about this later.
In a sense this is the most important thing to grasp about networking – the idea that delivering globally involves solving two quite distinct problems:
Navigating across the world to the distant location (+61 3 53)
Getting to the right point in that location (279279)
In the next slide you will see how these two different aspects of an address are all compressed into a single IP address. In network jargon we will speak of the network address and the node address
Faculty of Science
IPv6 address: the 16 bytes are shown
Splitting an IP address – network & node
Network – where in the world
Node – then where
*
Dividing up an IP address gets us back to those bits and bytes. This slide shows the way that an IPv6 address is divided into the portion that defines the network (“where in the world?”) and portion that defines the node (“then where?”)
Remembering that an IPv6 address is stored in 16 bytes, the first 8 define the network and the second 8 the node. Expressed in terms of bits this is 64 bits and 64 bits. 264 is a huge number so there are plenty of networks to spread around the world and each of these networks can have an impossibly (in the sense of the connecting technologies) large number of computers on it. The picture of the network used in this slide is a gross simplification.
Faculty of Science
IPv4 – network and node
Node – then where
*
When we repeat this process for IPv4 you can see fairly graphically why IPv4 is going to be the cause of address starvation very soon. To cope with this there has been a lot of work put into IPv4 to make sure that large, medium and small organisations are only granted the addresses that they need (actually they pay for them so there is a financial incentive)
The way that the world can be divided up into large, medium and small networks is by changing the number of bytes that are used for network and node as the next slide shows.
Faculty of Science
Class A
Class B
3 bytes network – 1 byte node
Class C
*
The scheme devised for sharing out the limited pool of IPv4 addresses involved three different classes of address. These three classes were designed to target three “typical” sizes of network as shown in the slide. Bear in mind that an IPv4 address is stored in 4 bytes.
Class A addresses were for a small number of very big networks. This is achieved by using one of the four bytes to identify the network whilst the remaining three bytes specify a node on that network. One byte for counting networks means a maximum of 255 – other considerations mean that this is halved. Each network can have about 1.6 million nodes (that’s how high you can count using three bytes.
The previous slide showed the situation when network and node each use half the bytes in the address. This is called a Class B address. A two byte number can be as big as 65535 so, with all kinds of approximations, we are talking about tens of thousands of networks each of which can support tens of thousands of nodes.
Class C addresses define many small networks. One byte counts nodes – 254 on each network (because all zero’s and all one’s are not allowed) Three bytes count networks. The 1.6 million (for other more technical reasons) is reduced here to around 200,000.
Out of all this should come the clear impression that IPv4 addresses are in very short supply. That is why this whole section begins with IPv6.
Faculty of Science
IPv4 – decimal
IPv6 – hexa-decimal
The subnet mask
Where next?
*
At this stage we will take stock of where we have got to and where we are heading in this first topic of Network Operating Systems.
We have described virtualisation, which will be used for all the labs. The lab this week will let you get more familiar with this and allow you to find out how, for example, to transfer files between virtual Ubuntu and virtual XP.
Hexadecimal numbering has been introduced. There is a lot more that can be said in this area but the important point is to feel comfortable representing the values stored in a number of bytes of memory.
The last point was to see how, when that value stored is an IP address, we can split that apart into bytes that are used to count networks (“where in the world?”) and bytes that count nodes (“then where?”)
Where are we going next? There are four more topics on the slide and they relate in various ways to what we’ve covered so far.
In our discussion of networks and nodes we paid no attention to how many nodes ended up being on the network that we were trying to reach. In fact there are practical limits to this number and networks often need to be broken down into smaller subnetworks. We will introduce the concept of subnetting.
We also need to think about how we will write IP addresses down and pass them around amongst human beings.
Then we will discuss how computers break IP addresses apart into their network and node components.
Finally we will explain the concept of the default gateway. This is a vital setting for an Internet connected computer. Without it there will be no Internet access.
Faculty of Science
IPv6 we assumed 264 (8 bytes for node count)
IPv4 we assumed 224 in Class A (3 bytes for node count)
In practice this is really a few hundreds or thousands
This is the limit of current technologies
We need a way to divide our networks up
To divide the address into smaller sub sections
How many nodes on a network?
*
When we divided IP addresses into a network and node component we did not stop to consider the number of nodes that could be counted on the network once we had found it. By this I mean, given the portion of the IP address that we have assigned to counting nodes, how many possible nodes could there be?
Clearly this number depends on whether we are using IPv6 addresses where the node is counted using eight bytes or one of the IPv4 classes. The worst case there would be a class A address where the node is counted in three bytes. As the slide shows these are some huge numbers and there is simply no networking technologies that are capable of connecting such a large number of computers into a network.
The reality is that large numbers of computers need to be plugged into separate networks and the addressing scheme needs to be able to describe this. This is called subnetting.
Faculty of Science
IPv6 subnetting
Node – then where?
*
This is a replay of the previous animation where the IPv6 Internet was split into 264 networks – each with 264 nodes. The change is to take over the first two bytes of the node address and use these 16 bits to select a subnet – a portion of the entire network.
The picture used for the network is of an entire city centre. This could be the case – one IPv6 network is divided up in a particular city between 216 different subnets.
Faculty of Science
Shows a Class A network using one byte to identify the subnet
IPv4 subnetting
Node – then where?
*
The scenario here is that IPv4 is being used so only 4 bytes are available to store the IP address.
Earlier we saw that there were various ways these 4 bytes could be spread amongst network and node numbering. Class A allowed a few very big networks to be defined (one byte network, three bytes node)
If we want to divide one of these large networks into subnets we can choose how many bits to use for this and this slide shows the situation where 8 bits (one byte) is used.
This slide should leave you with a very clear visual impression of address starvation. Really there are probably not enough subnets (254) for an entire city centre.
Faculty of Science
Humans use
IPv6 – hexadecimal
IPv4 – decimal
After all there are only 4 of them
Each byte is sometimes referred to as an octet
Human representation of IP addresses
*
So far we have not tried to represent any actual IP addresses at all. You may have noticed that all the diagrams that represented IP addresses simply showed empty boxes each box corresponding to 1 byte of storage. This if you like to think of it that way is the computer’s view of an IP address – four bytes of storage for an IPv4 address and 16 bytes of storage for an IPv6 address.
Now we will consider how to represent actual addresses in a human readable form and the technique used is completely different for IPv4 and IPv6.
Because IPv6 involves such enormous numbers we use hexadecimal to represent IPv6 addresses. On the other hand IPv4 which are stored in four bytes can quite conveniently be represented using four decimal numbers. Of course these numbers can never be bigger than 255 because that is the biggest number that can be stored in one byte.
Faculty of Science
2001:cdba:0000:0000:0000:0000:3257:9652
Eight groups of four hex digits
Each hex digit is 4 bits: 8 x 4 x 4 = 128
Separated by colons
2001:cdba:0:0:0:0:3257:9652
*
Here we see an example of an IPv6 address being represented using hexadecimal notation. Because an IPv6 address is stored in 16 bytes and because each hexadecimal digit represents half a byte (4 bits) an entire address requires eight groups of four hex digits as shown. There is a lot of writing involved in representing an IPv6 address so there are two important shortcuts that can reduce the amount of writing.
The first shortcut is concerned with groups of four zeros. Rather than write each of these zeros we can simply replace the entire group by a single zero. This quite dramatically shortens the address as can be seen.
We can make it even shorter by simply omitting these groups. We still write the colon before and the one after but the result is even more dramatic.
Faculty of Science
::1/128
No host bits at all! There can only ever be one
Link local
The 10 network bits are in red
Remaining 118 bits can have any value
Special IPv6 addresses
*
There are a variety of “special” addresses in IPv6 and the next two slides mention ones that you will come across in this course.
The writers of the software that makes IP work always include a special “loopback” address. Communicating with this address, in effect, tests all the software without actually sending any traffic out onto the network. This means the hardware is not being tested but the software is. Clearly there will only be one such address on a given system and the universal value is ::1/128. The :: stands for a lot of zeros (127 at the bit level) followed by a single 1. The /128 means that all 128 bits identify a network (not a real one!) on which there can then only be a single host. This is exactly what was needed.
Of course we want to communicate with other computers and in the first instance we will consider communication with other computers on the same network. The technical term for this is “link local” communication. IPv6 defines a special network number for this local communication – 0xfe80. In the slide you see this spelt out using bits. From the IPv6 point of view the first 10 bits are counted as network bits. The 10 bits are shown in red on the slide.
Faculty of Science
The 6to4 tunnel
“Normal” IPv6 addresses
Accessible by 6to4 through a relay router
2001::/16
*
There are pages and pages of special IPv6 addresses which is not surprising given the size of the address space and the complexity of all the issues that are being solved. However in the context of work in this course there are really only two more special addresses that need to be considered.
The first of these is termed a “transition” solution and covers the situation where you want to use IPv6 right now at a time when most of the Internet uses IPv4. How will the IPv6 packets get through the IPv4 Internet? The answer is a technique known as tunnelling which will be spelt out in the next slide. The IPv6 addresses that lead to this 6to4 tunnel being used all begin with 2002 in the first 16 bits.
Real IPv6 addresses that could be accessed directly in an IPv6 Internet mostly begin with 2001. If you want to access one of these addresses from an IPv4 address you need to use the 6to4 tunnel at your end and make use of a relay router at the far end to “open up” your tunnel. Again the next slide should make this clearer.
Faculty of Science
141.132.64.20
*
With IPv4 there is no need for such shortcuts because the numbers are really quite short and manageable. We use decimal numbers separated by periods and there will be four of these because there are four bytes in the internal representation.
The size of these numbers is of course limited to the size that can be represented by a single byte. In an IPv4 address you only ever see numbers between 0 and 255 because that is what can be represented in a single byte.
Faculty of Science
127.0.0.1/32
Special IPv4 addresses
*
Faculty of Science
Given an IP address how can we say what is network and therefore what is node
Classless Inter Domain Routing (CIDR) notation
2001:cdba:0000:0000:0000:0000:3257:9652/80
Means that the first 80 bits (10 bytes) are network
141.132.64.20/24
Means that the first 24 bits (3 bytes) are network
Representing networks
*
Given that we can represent addresses we also need a way to indicate what portion of the address is representing the network and what portion represents the node. A common form of representation is known as Classless Inter Domain Routing (CIDR) notation. CIDR uses a / after the address followed by the number of bits in the address that are being used for the network count. The number of bits used by the node can of course be worked out by a simple subtraction.
The first example given is the IPv6 address that we used before. We have written /64 at the end of this address to indicate that the first 64 bits are being used to identify a network. This is exactly the situation that was shown in the first animation of IPv6 network and node counting.
The second example is using IPv4 addressing. There are many possible choices at this point in terms of the class (A, B or C) of address and whether or not subnetting is in use. We have chosen to use a Class B address in which the first two bytes (16 bits) are used for network and then specify that an extra byte (8 bits) defines a subnet. 16 + 8 =24 so we write /24 after the address.
Faculty of Science
The next few slides test some of the knowledge in this lecture
Puzzle 1
Matching networks – figure out which IP addresses are on the same network
Puzzle 2
Deciding subnet bits – what should the CIDR notation be for each of the networks shown
IP address quiz
Faculty of Science
ffee:032c:0000:87d3:302a:34c7:409f:4a21/80
ffee:032c::87d3:302b:34c6:409f:4a21/80
ffee:032c:0:87d3:302b:34c6:409f:4a22/80
141.132.64.20/24
141.131.64.20/24
141.132.63.20/24
141.132.64.220/24
Faculty of Science
Decide on the /<number> value that will ensure the 3 machines are on the same IP network. - There may be more than one….
CIDR this!
Linux (Ubuntu)
Windows (XP)
Binary (base 2), valid digits 0 & 1
Decimal (base 10), valid digits 0,1,2.......9
Hexadecimal (base 16), valid digits 0,1,2.....9,A,B...F
The current Internet uses IPv4 addressing.
IPv4 addresses are exhausted.
eg 141.132.64.2
Sets of 16 bits are separated by a colon.
eg. ffee:0032:0000:87d4:320a:32c6:409f:125d
where each hex digit represents 4 bits of the IPv6 address.
Summary
Behind the scenes – the subnet mask
How do you set up IP networking?
In Windows
In Linux
Next week?