 We we introduced the concept very quickly last week at the end of the lecture. Let's go back and just the motivation for what leads to the to the internet protocol IP and what is internet working? Although we didn't go through the the many example technologies. We know that we can distinguish between lands and wide-area networks covering different geographical areas having different technologies So you can think if you think of any home and organizations some company government organization They have their own internal network to connect their computers inside their buildings inside their Offices and so on so usually lands local area networks, but also they want to connect together usually using either larger lands or wide-area networks and we'd like to allow Well, not like to allow people the different organizations will choose the best technology to support their requirements so for example in SIT we have Inside our land we have wired ethernet especially to the the PCs in the lecture rooms in the labs in the offices and we also have wireless land For students and also for staff and faculty. So we have two different land technologies Some other organization may use a different technology. We go across the road to one of the factories Maybe that factory's been there for a long time and they have an old land technology a token ring network Or maybe they have some new upgraded Fiber based Land technology okay, depending upon their requirements. They'll choose the technology that the best suits them Similarly when we connect the lands across a wide network many different technologies to choose from Telephone network based optical fiber satellite different wireless systems for wide-area networks What we would like is to allow to connect multiple lands and wide-area networks together and Allow any computer on Any of those networks to communicate with any other computer Irrespective of what technology the individual networks are using So this is the concept of internet working Connecting those different networks together and we achieve that using datagram packet switching in the internet or packet switching generally Where we have for example this case multiple lands and wide-area networks and we connect them together using packet switches so These are packet switches here But more specifically when we talk about the internet we refer to them as routers It's just a different name Routers and packet switches that operate at the network layer. So we're in the middle layer of our five layer stack the network So they play a major part in connecting these Component of these smaller networks together to form one large network So we have these smaller networks using different technologies potentially we connect them together using routers and When we connect them together if we're using the Some internet working protocol, which we'll see shortly then We'll allow anyone on any of these networks to communicate with anyone else and we'll get as a result this one large network called an internet work or an internet so The terminal terminology is listed here We'll talk about routers that connect these smaller networks together and Because when we take the smaller networks and connect them together to get one large network Often will say that the smaller networks are subnetworks. They are subnetworks of the larger network Subnetworks or subnets so in this example, there are nine subnets and We join those nine subnets together using the set of routers and the result is one large network called an internet work or an internet So this is an example internet So an internet is a network we get when we join these subnets together using routing or routers In a simple just definition and the process of doing that is called internet working So a general internet that is any network that we connect together in this way. We can call an internet But we know that in across the world many networks all connected to the one large network And that one large network we refer to as the internet Usually the where the uppercase i for internet That's the the network that we use on a on a daily basis to form the internet and the internet use Users as we'll see in this topic the internet protocol a specific protocol That will allow any computer on any of the subnets to communicate with any other With computers on any other subnet So it's just some terminology that we talk about routers connect subnets subnets join together to form an internet We distinguish between routing and forwarding and I've said this before in previous topics We say that routing is the process of discovering the best path through the network Forwarding is the process of once we have a path Sending the data across that path we forward the data by switch through the network and Some some other terminology to make things a bit clearer as we go forward We've already talked about packet switching and circuit switching so these devices That connect networks together. We can talk about a switches now. We're talking about using packet switching We'll see specifically the internet uses datagram packet switching. So these Datagram packet switches But we'll generally just call them a router. It's the more common name in the internet What's inside one of these clouds? Okay, so I've drawn a cloud to represent a small net or some network a land for example, what's inside it? I'll not try and draw it but Okay, you can think this cloud has different end end user devices attached PCs laptops Whatever the user is using servers even Inside the cloud is depends upon the the technology used in that subnet for example if it's a wired LAN We may have some PCs connected via cables into some central ethernet switch and That ethernet switch connected into this router So we introduce very briefly last week a common topology in a wired LAN as we take our PCs They have a cable that and they all go into one central switch called an ethernet switch and Then that one central switch can then go to the router What about a wireless LAN if this LAN 4 was a wired LAN LAN 1 was a wireless LAN Well in addition to a switch we may also have things like access points where we have laptops Mobile phones connect wirelessly to some one or more access points, and then the access points have wired Network into some switch and then possibly into a router So depending upon the technology used in here What's inside the cloud? May differ The idea of drawing a cloud is we don't care from this perspective. We don't care what is in here. We just say some network technology It could be a satellite link across the globe So across the wide area network 3 it may be connecting up to a Satellite up in space and then down to one of these other routes So we hide that detail of it So Coming back to switches it gets confusing because now we have different types of switches. We will talk about packet switches Specifically at the network layer now that we're in the network layer a packet switch will refer to as a router If we're in another network, we may use circuit switches Inside wired LANs we often refer to ethernet switches LAN switches Different types of devices So if we connect these subnets together via routers, how do we get data from one computer to some other computer? Well, we use an internet working protocol Because the different subnets use different technologies we need some other protocol to overcome those differences Differences in addressing Differences in the way to recover from errors differences in how to transfer the data efficiently across the network So we introduced a new protocol an internet working protocol which has the aim of getting the data from one Computer across this internet to the destination What would such an internet working protocol? Do what's some requirements? Some are listed here Provide links between subnetworks between subnets Don't be able to join different subnets together and we use routers for that to be able to provide some form of routing to find the path and Forwarding or delivering the data across the different subnets So to make sure we can get data from source to destination So we we know one way to do that Data-gram packet switching and we know concepts for how to do routing in the network So we can use the concepts of data-gram packet switching and The concepts of routing that we saw in the previous topic to to solve this this problem Usually when we build a network We use it to transfer data But we'd like to make sure that that network is operating correctly We don't just build it and leave it run for 10 years. We may need to Get updates on how it's running if there are any problems in the network and to perform maintenance on that network so It may be useful if we have a protocol that allows us to send data through the an internet to also To be able to collect data about the current status to monitor to report if there are errors Some some form of monitoring Importantly an internet working protocol needs to deal with the many differences between the subnets on this subnet. We may have One particular addressing scheme for the hardware addresses like the ethernet 48 bit hardware addresses here on This wide area network number three. We may have a different addressing scheme So when we want to communicate between two computers on different networks, which use a different addressing schemes Well, it's very hard to communicate because my computer on land for Doesn't know about the addresses used on other networks, which may be on the other side of the world so an Internet working protocol has to deal with that somehow and the normal way is to introduce a a new addressing scheme a New addressing scheme that all devices on the network use We'll see in the internet protocol. That's IP address Another difference or a problem that That occurs when we have multiple subnets is the concept of error recovery Let's say so error recovery is how to cope with errors across our links across our subnets. For example, we know of using Retransmissions ARQ scheme stop and wait go back and selective reject to send our data Wait for an act send it again That's a way to recover for errors But different technologies may use different error recovery mechanisms, so this land for may be using some stop and wait ARQ This wide-area network using some selective reject. Maybe this wide-area network doesn't have any error recovery It's a very simple Protocol inside here. We don't know we cannot predict in all the networks in the world what technology they'll use for error recovery So now if I want to send data via these subnets I Want to make sure when I send it it gets delivered to the destination Well, I'm Confident that it'll get delivered across the first subnet because that has a means for recovering from errors So is the second subnet But the third one does not because it has no inbuilt Error recovery mechanism as an example So if I send data across this path I know I have no guarantees that it's going to get delivered to the destination So one thing that we may want an internet working protocol to do is to provide error recovery across the entire network across the path As opposed to just across a single subnet or across a link So there are many differences between the technologies we may use in the subnets And we must deal with those differences and that's what an internet working protocol Should try to overcome for example differences in security Ways to report errors inside the subnets Different protocol parameters like what is the maximum packet size one subnet may have a maximum size of 1500 bytes The next technology has a maximum size of 10,000 bytes So when we send data across the network, what size data should we send? 1500 or 10,000? Well, we need to consider The maximum sizes supported by all the subnets along the path So an internet working protocol will try and deal with these issues So that's some general requirements for an internet working protocol And people over the years have developed set or different internet working protocols different protocols to try and meet these requirements One of them is called the internet protocol IP And there are others The internet protocol has become the most widely used one the others Old ones which were really replaced by IP Only used in very old networks Or some which are used in very specific domains very small or Very specialized networks, but the main internet working protocol available Is the internet protocol It turns out that the internet protocol is does not meet all of these requirements that we want The idea of the designers of IP were to in fact keep IP very simple So it does some of these things but For those that it doesn't do it leaves to other protocols So it's an idea of keep this internet protocol simple by just providing a few features Those other extra features that we may want to provide use other protocols like ICMP TZP and others we may see over this course Let's look at IP and see what what features it does provide So this topic we're going to look at What is the internet protocol? How does it work? And then we'll look at parts of Look what are IP addresses? How are they structured? What do they mean? And we'll get a bit of an example of an IP address today as well So IP as Is the internet working protocol used in the internet and the main one used in the world today There in fact two main versions of IP IP version 4 and IP version 6 IP version 5 they skip that because there was some other obscure protocol used that referred to IP version 5 So really today we have IPv4 and IPv6 it turns out IP version 4 has been around for many years, so I think In the 1970s it was first specified. So what's 30 or 40 years? IP version 6 has been around for more than 10 years Maybe designed 20 years ago almost It turns out today Although both exist IP version 4 is still the main one used in the internet IPv6 is available And most devices many devices support IPv6, but not many networks use it So my my laptop or most standard operating systems support both version 4 and version 6 But for example the sit network the routers Inside sit and inside tamasart do not support or do not use IPv6 So we're going to focus this course on IP version 4 In maybe next semester in if you take computer networks and network architectures I think it's called ITS 327 IPv6 will be covered And there are others Mainly old ones IPx x25 and others, but we're focusing just on IPv4 that the main one Developed by the US Department of Defense, but now it's maintained The standard is maintained by the internet engineering task force the ITS They look after it and they develop IPv6 and any enhancements What does it do? It operates at the network layer So in our five layer stack the network layer is the one in the middle It's an internet working protocol It uses datagram packet switching So of those three switching techniques we're using datagram packet switching the simplest of them all The ones where we just take our data Break it into packets and send them And it's connectionless Which means there's no concept of establishing a connection before you send data Which is what we know with datagram packet switching We'll see in some protocols What we do is if I want to send data from source to destination the source first contacts the destination saying I want to send data to you And the source and destination may negotiate some parameters for this upcoming data transfer The destination may get prepared to receive the data for example allocate buffer space So they may choose parameters for the protocols to use So they set up a connection That's a connection oriented protocol that does that they establish a connection IP does not do that. We say IP is connectionless. There is no concept of a connection It's very simple There's no overhead of establishing a connection But it means that we cannot inform the destination that we're about to send data We'll see the a main example of a connection Oriented protocol one that does create a connection. We'll see that in the next topic is TCP So what features of IP? It provides data delivery. Okay, that's our main main goal to get data from source to destination It provides addressing So we're going to see that Because the different subnets use their own addressing scheme the internet protocol you introduces a new addressing scheme IP addresses such that the Devices on the internet all use this same common addressing scheme So it defines the format of those addresses and the meaning And another feature of fragmentation and reassembly which means it's got the ability if we have a big packet To fragment it into smaller packets smaller chunks and send them as smaller chunks And then reassemble them at some destination So that's sometimes needed When we send data, which is too large to support To be supported by a subnet We're going to spend a lot of time in this topic on addressing. We'll see the basic mechanism for data delivery There's a few slides on fragmentation and reassembly. We may just mention that quickly one thing Sorry What does it not do so one way to understand what IP is is to look at well some of those features on the previous slide that we'd like That are not provided by IP It doesn't establish a connection. We said it's connection less Which means Before we send data. There's no negotiation of how to send the data. We just send it So the destination doesn't know data's coming. It just starts receiving the data There's no error control in IP My source computer sends the IP packets We'll actually call them IP datagrams And if they don't get to the destination too bad The source will not retransmit There are no acts coming back So I just send the packets and if they get there good data is delivered if they don't get there Because of some errors in the network from IP's perspective It doesn't care And I think you know that that's not so good for some applications It doesn't do any flow control. So it doesn't provide flow control So if my computer at one endpoint is sending very fast and the receiver destination is very slow We may overflow that receiver IP doesn't care But we know that in some cases we'll need to deal with those issues What if there are errors? IP doesn't fix them In the internet we genuinely leave those features To another protocol called TCP That's at the next layer up to transport that IP does not report the status of any links of any devices in the network That's a nice feature. We'd like to have to know whether the network is working IP doesn't do that. There's another protocol called ICMP that will do it for us in In most cases IP doesn't provide any priority for data Or any quality of service. What that means is When we send an IP packet Send it through the internet I send my IP packet, which is for my web browsing You send yours through the internet you which is for some voice call IP doesn't Treat them any differently. It treats them the same It doesn't give one priority over another That's a nice feature to have in some cases. Sometimes it would be good for My voice packets That the packets that belong to my voice over the internet call To get a higher priority than someone's web browsing packets Because often with voice we want a small delay so we can talk And communicate efficiently IP does not have such features to provide any priority priority or quality of service It's left to some add-on features called a diff serve and insert, which we will not cover It doesn't have any inbuilt security I send an IP packet From some source computer. It goes through these subnets and gets to the destination Anyone with access to these intermediate devices these routers Or these subnets Can potentially see the contents of the data that i'm sending across the internet There's no encryption of that data So that the data we say is sent into clear Again, there are applications that we would like to make that data secure so that Someone with access to these intermediate subnets Still cannot see what i'm sending IP doesn't do that. There's another feature or another add-on really called ipsec that adds that security We will see tcp in a bit more depth in the next topic You'll see icmp in some practical tasks The others we were not In terms of our five layer stack It's in the middle the network layer The simple view is that All the subnet technologies the lands the wide area networks like Wireless LAN ethernet Some of the wide area technologies frame relay atm optical fiber technologies Satellite microwave wireless think of them at the physical and data link layer They are used within the individual subnets The internet protocol in the middle of our stack We think joins them all together. It's the common thing Amongst all the computers in the internet And above that we have transport and application layer So what we're going to see is that all of the computers Which generally want internet access Need to support the internet protocol Your mobile phone laptop pc And also the routers that connect the subnets together All must support ip It's the one common thing for the devices that connect to the internet If they don't implement ip Then generally they cannot get access to the internet Unless they go via some intermediate device some special device so You may use different physical and data link layers You may use different transport protocols There are some common very common ones, but there are many others as well Many different application protocols, but for internet access You need to use ip Some people say the core of the internet is built around ip We will see that ip doesn't provide Or it doesn't specify which routing protocols to use You can choose the routing protocol A routing protocol is a protocol that automatically finds the routes through the network the best paths And creates our routing tables ip doesn't do that it leaves it to some other routing protocols We'll we'll see a little bit about icmp and arp later Who has done the practice lesson on packets? Hands up Practice lesson on packets Is that a hand To anymore try and do the practice lesson on packets, okay? It's not related to any specific topic It's about what do we mean by what's a packet? What's the structure of a packet common examples? In fact, one of the examples is That I use in that lesson is ip datagram. So Some people have already seen this and they'll understand this straight away others Uh, a little bit more time But still try and do that lesson because it's useful understanding how most protocols Structure their packets in the internet today So the internet protocol like most protocols has some packet structure It contains data and a header. There's no trailer at the end just the header at the front and then data What's that structure specifically? What does the header look like? What information does it contain? Here's a picture of an ip packet In fact, we often call it an ip datagram Okay, so sometimes you'll hear me say ip packet other times ip datagram Are the same thing The typical ip datagram contains a 20 byte header Followed by data The way this diagram is drawn is that our 20 byte header The packet is just a sequence of bits and the header is a sequence of bits where Sets of bits have some specific meaning We'll see that the first four bits in the header mean or indicate the version of ip we're using Either four or six So the first four bits indicate the version of the protocol So in a packet it's just a long sequence of bits but To draw on a piece of paper on the screen instead of drawing the the large continuous sequence of bits We commonly structure it in some way in this case We've structured it so that this each row indicates a sequence of 32 bits And we read row by row So this is the first bit or on this diagram the zero bit we start counting at zero the 31st bit And then we come back to here the 32nd bit And and so on so we read row by row It's just a way to present the structure of that packet in some convenient small picture So let's look at the fields of the header What information is contained in every ip datagram in the header of each datagram? The version a value that indicates either version four or version six We're dealing just with version four the header length is normally or by default 20 bytes But it turns out you can add some optional fields And so if you there are some optional extra features of ip that allow you to add extra fields That's this options part And that may vary in size Therefore, there's a field h length which indicates the length of the header It counts in I think four groups of four bytes So in fact by default the value is five Because there are one two three four five rows or five groups of four bytes 20 bytes in total But if you add some options, this will increase So it just is a way so that when we receive this datagram, we know How big is the header? So that we know well, where does the header finish and where does the data start? Because if I receive a sequence of bits, I need to know Which parts of the header and which parts of the data so the header length indicates that diff serve and ecn They are fields in the packet that I use to provide priority and some Performance enhancements in the internet I said that ip doesn't provide any priority Well, it doesn't the protocol doesn't although the header field the header has fields available to Indicating the priority of the packet By default ip doesn't treat them any different We're not going to touch upon these two fields You need to go into advanced parts of internet working to see them in use Total length is a 16 bit value that indicates the total size of our datagram header plus data maximum size 65656 bytes with a 16 bit value That's the maximum size of our datagram In practice, it's usually much smaller But that's what we can go up to So if we know the header length And we know the total length Then we can calculate the data length ID identification is like a sequence number. I send the first Datagram value one next one value two so we can include a some sequence number in the datagrams But we don't have any retransmission schemes So we don't use it for any error recovery, but we can use it to keep track of packets as we're sending the Ordering of them The next two parts flags and fragment offset What we may do is send a large datagram and say 10,000 bytes send it It gets to a subnet which has a maximum size of a thousand bytes So we've got a 10,000 byte datagram, but the network technology only supports sending frames of a thousand bytes So we'll need to fragment that 10,000 byte datagram into smaller chunks So that's the process of fragmentation where we break The data into smaller chunks and send them as say 10 different ip datagrams 10 fragments If we do that We use the flags and the fragment offset to keep track of that we've performed the fragmentation and that we The ordering of those fragments So if we break our original datagram into 10 fragments Then we keep track of fragment one fragment two and so on Because at the receiver When we receive those 10 fragments we need to reassemble them and get the original Large 10,000 byte datagram back I think in this course, we're not going to go into much detail of how fragmentation and reassembly works But we use these fields to support it What's time to live? Where do we use time to live or where have we seen a concept similar to time to live? It's the number of so you you may have seen it when you Send some data across the internet or test the network You can see some information about the number of hops That we traverse or the number of routers that we traverse from source to destination Remember flooding In flooding one of the extensions was a hop limit The idea was that the source sets the hop limit to say three We send it to the first across the first link the first hop is reduced to two The next one it's down to one the next one. It's down to zero and then it's no longer sent We use the hop limit to limit how many hops that packet would traverse when we did flooding The same concept of time to live The source sets some time to live value Although it says time to live it doesn't measure real time. It usually measures hops So if I set the time to live in my ip datagram at the source to be three When it's sent across the first hop to the first router is reduced to two Then sent across the next hop reduced to one Then the next hop down to zero once it reaches zero That router will not send it again It's reached or it it's expired that packet has died So it's used in the similar way to a hop limit and it's used in to diagnose parts of the network operation You may see to see how many hops your packet traverses One thing that's it's useful for is Is if you send a packet in the network and there's some misconfiguration in the network Maybe there's a route such that one router sends the packet to the next router And then that one sends it back to the first router because of some error in the network And they keep sending to each other Okay, and it becomes a loop that the the packets go back and forth or enter some loop in the network Or they go forever that packet would be sent forever in in that network in that loop Setting a time to live means that eventually the time to live will get down to zero and the packet will be destroyed It will not be kept being sent. So it's a way to stop such errors for Causing packets to be sent forever and we use it for diagnosed diagnostic purposes So the source sets the value And it's reduced For every hop we transmit this datagram across similar to hop protocol The protocol field indicates what protocol was used For the data put inside of this datagram It really means the next higher layer in the stack In this this diagram when we create the datagram The data comes from the the application Maybe we're using TCP as the transport protocol That data from TCP is sent to ip and ip creates a datagram The data inside the datagram came from TCP So the protocol field in the ip header says that this data came from TCP There's a specific number that indicates TCP. I think the number six If it came from another protocol like UDP it gets a different number in the protocol field So really the protocol field tells us where which Higher layer did this data come from TCP UDP? There are others In fact ICMP is also a case here. I think has a protocol number one So it tells us the data inside our datagram. Where did it come from? header checksum Is used when we receive a datagram to check if there are any errors in the header A checksum is some error detection code We haven't covered the algorithms, but the concept is that using this value When we receive the header we can check if the values in the header Have any errors from what was transmitted So we transmit some value of the protocol field six The receiver receives the datagram and there was some error in transmission such that comes out as 23 Using the checksum we can detect that that was different from what was transmitted So we can detect errors in the header It doesn't cover the data. We don't know if there's any errors in the data just the header But ip has no retransmission scheme. So if I detect an error All I can do is discard that packet. I cannot get the source to send it again the last two fields the address of the computer that generated the ip datagram And the address of the computer that Is the final destination the intended destination of that datagram. They are ip addresses How long is an ip version 4 address? An ipv4 an ip address How long is it? And the answer is on the screen How long is an ip address? For example, how long is the source address? What's the the picture tell you how many bytes or how many bits? 32 This diagram shows us the structure that Okay, this is the header. These are the first 32 bits The next 32 bits and so on and okay We see that the source address the source ip address takes up 32 bits in the header So it tells us an ip address is 32 bits in length So a source ip address is a 32 bit value that Identifies the computer that sends this datagram And the destination is a 32 bit value that identifies who we want to get it to the destination ip version 4 uses 32 bit addresses ip version 6 Uses longer addresses anyone know the value I'm not sure if this slide say it anywhere ip version 6 With ip version 4 with 32 bits There are about 4 billion possible values 2 to the power of 32 is around is around 4 billion So with a 32 bit address space in theory we can have have up to about 4 billion different ip addresses How many people in the world anyone roughly How many people in the world? About 7 billion How many people use the internet? Definitely not all of them I don't know one or two billion maybe one billion But now think about all the other devices We don't necessarily we need often ip addresses not just for your laptop your mobile phone your home pc But many devices which connect to the internet servers Monitoring stations so inside factories they use ip addresses so If we think of the world and all the devices that want to connect to the internet With a 32 bit address We don't have enough addresses available to give a unique one to everyone And there are ways around that And one of the main reasons that led to the development of ip version 6 was to give it a larger address And ip version 6 uses 128 bits With 128 bits we have 2 to the power of 128 possible addresses And I can't never remember the value it's something like Billions and billions and billions of addresses for every person in the world. Okay, so More than enough addresses if we use 128 bits ip version 4 32 bit addresses are used today, but We need special ways to overcome the the Limited number of addresses Before we look at how ip works. Let's give an example of an ip address Let's look at the configuration of my Wireless LAN interface on my laptop How many interfaces on my laptop anyone remember? How many network interfaces 2 3 3 maybe If I turn them on wireless LAN Wide LAN or ethernet And bluetooth can be thought of as an interface as well This is the configuration of my wireless LAN interface My wireless LAN card it has a hardware address That's used just on the wireless LAN Just on that one subnet I use this hardware address to communicate with anyone else on the wireless LAN Like the access point up there Has a hardware address And it has an an internet address Which is our ip version 4 address 10 dot 10 dot 100 dot 184 There are some other addresses, which are also special case ip addresses It also has an ip version 6 address an inet 6 address This long string of hexadecimal values Those three addresses the hardware address The ip version 4 and the ip version 6 addresses Are presented by my computer or by this software in some human friendly form Those three addresses are all just binary values The hardware address is a 48 bit value IP version 4 32 bit IPv6 is a 128 bit value And my computer always deals with the the binary value when I send the the packets It's just that so Us humans don't have to write down these long binary values and we don't have to deal with them There's some common way to convert them into some a little bit more human friendly values Let's look at how to convert IPv version 4 addresses 10 dot 10 dot 100 dot 184 So we convert that into a The actual 32 bit binary address And it's quite simple And just just not this is a bad example from the perspective that this is these are four decimal values It's 10 10 100 Although it's ones and zeros. This is not binary And this is 184 The way to convert it to that the real ip address is that this is called dotted decimal notation where we have four decimal values separated by dots And each of those Decimal values represents eight bits of the 32 bit address So our ip address is 32 bits long We break it into four chunks Each of eight bits in length And each of those eight bit values are converted to a decimal value And with an eight bit value the decimal values can range from zero up to 255 So to convert to the binary we just convert each of those four decimal numbers into an eight bit value And you can do that We'll do it quickly So 10 Here we go That's 10 as an eight bit value And in fact the next one is convenient because it's the same value 10 10 100 And you're checking that my conversion to binary are correct 184 it should go on the same line, but I'm out of space but 184 is So just convert the decimal values into eight bit values Remove the dots and we now have a 32 bit ip address So that's the simple way to or that is the way to convert from what's called dotted decimal notation To the actual binary value And to go the other way you take the binary value break it into four eight bit values convert to decimal Insert dots between those four values and we get what's called the dotted decimal address so Everyone can convert ip addresses now Whenever you see an ip address for your computer you can easily convert it to the binary form So when my computer sends an ip datagram the source address Would have these 32 bit 32 bits in the header Destination address would be another 32 bits for the destination computer Any questions on the conversion easy Remember it because we'll use it. We'll need it to when we look at other parts of ip addressing There are some slides later on ip addresses. This is just one example So always remember ip addresses in fact most addresses are stored in binary It's just the human friendly forms are used by computers by when we describe them To make them a bit easier to communicate That lists those packet header. Yeah the header fields Let's look at what have we got remaining a few slides On some of the features of of ip and this one I think we've said Enough of what I need to say is that ip is connection less We don't set up a connection An alternative is what's called connection oriented Where we do set up a connection Now ip doesn't do that Not setting up a connection makes things simple It's very simple It can be flexible. It can work with many different types of connections and there's no overhead Of setting up a connection But setting up a connection can be of a benefit In that we inform the destination. We're about to send data And they can negotiate parameters for that data transfer to to optimize the data transfer based upon What they agree ip is connection less in the internet the devices that Let's say are attached to the internet. We distinguish between hosts and routers I don't have it on the picture here, but going back to our example We have subnets these clouds connected together by routers And not drawn here, but imagine around attached to the subnets are hosts. Think of your end user computers servers and so on they are the hosts and Both hosts and routers need to implement the internet protocol So they all take part in ip What's the difference between a host and a router? What do we mean by them? Hosts are the end user devices They create the data that needs to be sent across the internet And they receive the data. So they are the sources and destinations of the data A router In most cases just forwards the data through the network. So in the typical scenario A source host creates the data Sends to a router which forwards to another router to another router Which eventually sends to the destination host. So that's the typical role of those devices hosts or sources and destination routers forward the data Some characteristics So think of a host as a laptop a mobile phone a server some sensor in a network Hosts normally use only one interface at a time We said my laptop has three interfaces wireless LAN wired LAN and bluetooth So I have three interfaces And I may have three IP addresses one for each interface bluetooth is an exception But I normally just use one at a time If I'm using the wireless LAN And then I plug a wired LAN cable into my laptop Most likely my operating system will switch to use the wired LAN You can test it at home Test and see okay you're using the wireless LAN then plug in a LAN cable See whether the the operating system switches Normally they'll automatically switch to use the LAN cable because in most cases that's better So in most cases hosts use just one network interface at a time even though we have many Now it doesn't have to be the case. You can set up your host So that it can use two two interfaces at the same time It's possible So sometimes the operating system will support that so I could be Downloading data via the wireless LAN and the wired LAN At the same time It's not common, but it's possible Routers almost always have two or more interfaces and use at the same time Because a router connects two or more subnets together a router connects subnets together So normally with a router we have Say a cable connecting to one subnet And another cable connecting to another subnet And we can be sending and receiving data on both of those interfaces at the same time So that's typical operation for a router And we may have more than two A key and and the primary difference if we want to define hosts and routers A host does not forward datagrams A router does forward datagrams If we need one thing to just to differentiate between the two is the forwarding of datagrams A host never forwards datagrams so What that means if if my laptop is a host If it receives an ip datagram it looks at the destination address If the destination address in the header matches my computer's address 10 10 10 10 10 10 100 184 Then that datagram is destined to me and it's reached the destination But if I receive a datagram where the destination address does not match my ip address Then that's an error. I would discard that datagram I will not send it on to someone else. I will not forward it to someone else because this is a host A router of course does forward datagrams. That's its main role What is my laptop host or router? Hands up for host Think carefully. Okay easy one my laptop host or router It's a host But in fact I can easily turn it into a router Okay, it's normally a configuration of the software of the operating system as to whether it forwards datagrams or not And it takes me one line To turn this host into a router Even with a single interface I can act as a router It may not perform well, but I can receive and send as a router So I have have a wired interface. I could plug a wired LAN in And use my wireless LAN interface and I could have this laptop act as a router But I'd have to configure it to do so and the way to do that is to tell it to forward datagrams most consumer operating systems don't Forward datagrams by default that hosts by default A host because it doesn't forward datagrams is either a source or a destination A router mainly Forwards datagrams, but in special cases it can act as a source or a destination That's that's in cases where we want to Set up the router. We want to manage the router Some of you would have done it. We've got a home adsl router normally that home adsl router Forwards datagrams it receives from your computer and sends them on to the isp So it's acting as a router But sometimes you can the router will support you configuring it changing some parameters So you open up your web browser on your pc you type in a special IP address for that router and Change some configuration of the router In that case the router is actually acting as a destination and source of datagrams So in the main cases a router forwards, but it can be a source or destination And again, we've said this before we distinguish between routing and forwarding. How are we going with time? Let me just see what we need to cover We'll not cover that forwarding See if we can cover this today This shows the protocol stacks for an example network or a path through a network. So we have some source hosts now So think of hosts as the end user devices And routers connecting subnets together So I want to send data from the source to the destination host via some set of routers I don't care what's inside the subnets, whether it's a wireless or wired technology Whether it's a wide wide area network or local area network to some subnet And underneath those devices Is the protocol stacks So this is implemented inside the source host And this is inside router one router two and so on And this link think of this as the cable connecting source host to router one Maybe wide or wireless connection some link At the bottom two layers Source host and router one are on the same subnet So they must use the same technology to communicate across that subnet across that link And that's related to the data link layer and the physical layer Recall that these two bottom layers are about getting data across a link Not across a network, but it just across an individual link or in this case A well not across an internet But across a link or in this case our subnet So for example a wired LAN Where the data link layer would be the IEEE 802.3 ethernet standard and similar for the physical layer So both source host and router Must have interfaces that support the same technology then Let's say technology a I haven't given it the name technology a they need to be the same so they can talk Router one and router two are on the same subnet And maybe we use a different technology technology be They need to support the data link layer and physical layer so they can communicate to each other across the subnet And similar across the other subnets The technology Amongst the subnets may be different So For router one to talk to router two it may use a different technology for the source host to router one So that's why label. This is Data link layer a and physical layer a and this is b. So they may be different What's one thing we notice? The routers generally need to support or need to implement The data link layer and physical layer for each subnet they connect to Maybe technology a is our wired LAN technology b is a using adsl and some atm wide area network So different technology here So they may be different across the subnets The internet working protocol in this case ip is what joins them together and we see the hosts And all of the routers implement ip And that's what allows us to send data across these different subnet technologies They all use ip the internet protocol So hosts and routers in the internet must implement ip And We will not cover it today. We'll get on to it tomorrow But there's a way then which we forward the datagrams to the router Which then forwards it on to the next router and then to the destination The the highest two layers the transport and application layer Only needed on the hosts on the source host and destination host We see the routers don't care what applications are being used If we go back to our packet switching or our switching The switches in the network just have the role of getting data from source to destination They don't care what the data is They don't care whether we're using tcp as a transport protocol HTTP for web browsing Or we're using some voice over ip some voice Application which uses udp as a transport protocol From the routers perspective, it's all just ip datagrams. The data inside is doesn't care so The transport layer and application layers we say The protocols in those layers are end end to end protocols. They operate between the end points only The routers don't need to implement those protocols So in summary data link layer and physical layer are common across each subnet So here's one technology. Here's a potentially different one ip is common across hosts and routers Transport and application layers are common across the hosts that want to communicate So what does ip do? It's very simple in the because there's no error recovery No retransmissions. There's only one type of packet an ip datagram. There's no acknowledgments There's no setting up of a connection We just create an ip datagram Send it to the router which sends to the next router and so on until it gets to the destination If it doesn't get there because of an error somewhere along the way Then too bad There's no concept of retransmitting The details of how we forward it through those routers will cover tomorrow morning so we'll cover ip routing And ip forwarding not with a w tomorrow morning