 So host mobility, we're going to look at mobile IPs. So in this set of lecture notes, there are in fact three topics. There's one on mobile IP, one on NEMO, network mobility, and one on ad hoc networks. This year, this course, we're just going to look at the first one. The second two, we will not go into details of how they work. So we'll focus and go straight into the topic on, how do we support mobile computers in the internet? So the situation is that you have a phone, a laptop, some mobile device. Let's say you have wireless LAN access. So you can associate with an access point. You can transfer data with that access point. That's fine. That provides us wireless access. But then you move. So you move. You're either walking, or maybe you're in a car and your car is driving. And you want to have continual internet access. You don't want a disruption if you're streaming a YouTube video, or you're in a voice chat with someone, or you're just browsing websites. You want, ideally, the user wants to be able to continually access the internet no matter where they are. So that's desirable. You don't want to have disruptions when you move. So this is about mobility of hosts. Hosts here, we refer to the end user device, a laptop, a mobile phone, a tablet, a computing device. And as they move in the internet, how do we handle that? Well, what happens if you move inside SIT? Does your wireless access still work? I think so. I think if you have your phone and you're using the wireless LAN, you're associated with an access point in the corridor. If things are set up well, you walk out here. You still have your internet access. Maybe you're downloading a file. It will continue downloading as you walk, and maybe through the corridor. And as the signal to this access point gets weaker, if the network is set up well, then your phone will start to try and find another nearby access point and associate with that. Perform a handover from one access point to another, and then you associate with the second access point, and you keep downloading that data but via the second access point. So if we have access points providing coverage across the campus, across the buildings, as we move around, we have continued wireless coverage, and we can continue to download our file. You get in your car, and you start driving. You're still downloading your file or in your voice chat. You put your phone in some hands-free setup. You're in your car, and you start driving into the center of Bangkok. You would like to still have internet access, no disruption. Does it work? What would be a problem there? Interference, well, the first, in fact, out of range. That'll be the first thing. Here, you're using the WSIT, the SIT wireless LAN. You're associated with an access point, so you're part of the SIT wireless LAN. You get into your car, you've got some coverage out in the car park, but you start driving, and you're out of coverage of the SIT wireless LAN. So what happens next? What could your mobile device do then? If you don't have coverage from SIT access points, what's a potential option for your mobile device? OK, it could switch to a different network technology. Because your mobile phone also has a 3G capabilities. So ideally, you're in your car, you start driving, you lose access to the SIT wireless LAN. You'd like to keep downloading your data or continue your voice conversation via the 3G connection without any disruption. That's what the user would like. So as you start driving, your data transfer is now via the 3G connection. Has anyone tried that? Does it work? Most people may not have tried it. It's not so seamless at the moment. Seamless means that from the user's perspective, you don't notice the change. In most cases in such a situation, you would notice the change that you disconnect or effectively disconnect from the wireless LAN. You do not have internet access. And then you connect to the 3G network. And then you get internet access again. So there may be some disruption in a nice situation for hundreds of milliseconds in maybe the normal situation, maybe multiple seconds or even worse, that you don't have internet access. We'd like to provide seamless mobility where from the user's perspective, the disruption is unnoticeable in the order of tens of milliseconds maybe so that it automatically switches to the other network interface and continue using the internet. We'd like to support mobility of hosts in the internet. There's a problem. Even if my mobile phone has Wi-Fi and 3G and the device can automatically switch from one to another when the Wi-Fi is disabled, there's a problem with how we deal with internet addresses. And that's what we're going to go through in this topic and see that the solution to this problem is a protocol called Mobile IP. And we'll explain how the solution works. The lecture notes we're going to go through covers Mobile IP. Well, first the problem in Mobile IP, but I've also got a handout. Does everyone have it? It's hopefully after this topic. Have a look in your lecture notes and see if you've got this handout called Mobile IP Example. Did I include it? I hope so, yeah. So at the end of this topic, there's this handout on Mobile IP Example. In fact, during the lecture, I'll switch between them. So we'll use this as an example to illustrate some of the issues and then how Mobile IP works. So when I show you some pictures on the screen, some of them will be taken from this example. We need to make some assumptions to discuss how we support mobility in the internet. The first thing to simplify things, we're going to say, we're going to ignore the details of the access networks. So in this picture, here's say the SIT wireless LAN. There's a router inside SIT that connects to the rest of the internet. There's some switches. All right, here's just one switch. But there are multiple switches in SIT and there are multiple access points. Okay, so there's one in almost every floor in this building. And here are our hosts. We'd like them to be mobile. Within SIT, we can think of this as one access network. And that when we're, if this host x.a is associated with this access point, it has wireless access here and then via the wired LAN out to the router and then out to the internet. As the host moves, it may move outside the coverage of the first access point and hopefully inside the coverage of another access point, re-associate with that other access point and continue receiving data via the router by the second access point. So that's what we'd say mobility of a host inside one subnet. So for our example, inside SIT, we can be mobile, switching between wireless LAN access points. Most of the examples I'm gonna talk about, I'll talk about Wi-Fi, wireless LAN. But it doesn't have to be. This doesn't have to be a wireless LAN access point. It could be via 3G. It could be via any wireless technology. We know best about wireless LAN, but it could be other technologies. What we're going to assume is that inside one IP subnet, that's this entire network here, hosts can be mobile. If there's multiple access points, they can switch between them seamlessly. And that's not too difficult to do. And I think you could test that inside SIT. You could continue downloading a file while you're moving across the building or across the campus. So first, the wireless technologies, or what we call the layer two technologies, the physical layer and specifically the data link layer, layer two in our stack, they provide the wireless access to our hosts. They may be wireless LAN, GSM, 3G, in general, satellite, any wireless technology in general. So that provides us our wireless access. We're going to assume that the technology, that wireless technology, supports us moving between access points. It's not a problem to do so. In 802.11 wireless LANs, you can do that in that there are specific ways that you can move between access points and the access point and you can do a re-association at the new access point. We're not going to explain how that works in detail, not yet, but we'll assume no matter what wireless technology we can move inside this one subnet. What we're going to look at is the situation if we have wireless LAN here and another subnet using 3G, often run by a different organization, wireless LAN by SIT, your 3G by AIS for example, different organizations. They have different IP address ranges. What we would like is to move from the SIT wireless LAN into the AIS 3G network seamlessly. And that's a different challenge and that's what this entire topic's about. It's difficult because we're moving between different technologies. Moving from Wi-Fi to 3G requires different techniques than moving from a Wi-Fi access point to another Wi-Fi access point. Different owners of the network. Moving inside SIT's wireless LAN is okay. SIT built the wireless LAN to allow you to do that. But to switch your device from SIT's network to AIS's network requires some different techniques or maybe some even agreement between the operators so that you can do that and things like payments become an issue. In these slides, we're going to start to look at IP addresses of devices. But to keep things a little bit simpler in these slides, instead of writing the full IP address, say here are four different IP hosts, instead of writing the full IP address, sometimes I'll just use this shorthand notation, two letters, where the uppercase letter means the subnet address, the network portion of the IP address and the lowercase letter, so followed by a dot and a lowercase letter means the host portion of the address. Recall, I hope you can recall, an IP address is a 32-bit value. We often represent it in dot a decimal notation like, let's see, on my laptop. We don't need that. What's my IP address? In my laptop, my IP address for my wireless LAN interface is 10, 10, 97, 1, 5, 0. It's actually a 32-bit address. That is, we convert each of those four decimal numbers into an 8-bit value, becomes 32 bits. Importantly, this address identifies two things. It identifies my laptop inside SIT's network and it also identifies SIT's network inside the internet. How do we tell which part of this identifies my host and which part identifies the subnet or the network? What do I need? The subnet mask, this mask here. 255, 255, 248.0. The subnet mask, this other address, tells us that some parts of my IP address identify the network. I call it the network portion of the address. And the remaining part identifies the host on that network. And the way that we read it is that when we convert this to binary, the corresponding ones, when there's a one in the subnet mask corresponding to the network and when we have a zero, it's the host. This one's a harder one to deal with. Let's simplify it so I can quickly calculate. Let's say instead of 248, let's say it was 255. Makes my life easier. What that would mean is that 10.10.97 identifies our network and the 150 identifies the host. So a subnet mask tells us which parts of the IP address identify the network and which parts identify the host. Your tablet or your mobile phone, which is also on SIT's wireless LAN, will have the same 10.10.97 because you're in the same network, okay? But you'll have a different number here. You will not be 150 because my host is 150. You'll have a unique host part of the address. Everyone inside SIT's wireless LAN is going to start with 10.10.97 and the other part will be unique. And then in a different network, not SIT's wireless LAN, in the network from AIS, from DTAC, or for someone else, they would have a different network portion. So in a different IP network, we have unique network portions. Inside the one IP network, we have the same network portion and unique host portions of the address. A lot of you, I think most of you have seen this in previous topics. The point of this, at this point, is not to explain how this works. Hopefully you'll remember it. The point is, in some of my slides, instead of writing a full IP address, I'll say instead of 10.10.97, just use a letter, an uppercase letter, and instead of 150, let's say a lowercase letter. That's just the notation to simplify things in the example. If you look on the other example, the other handout, I actually use full IP addresses, just in these slides. So I'd say x.a is a host, host a on network x. x.b is a host b, also on network x. So these four hosts are all on the same subnet, the same IP network. Any questions before we move on? Some more assumptions? So let's simplify our view of the internet. Let's go back a slide. So here's my simple wireless LAN, two access points, a switch, and a router. This is all one subnet. Let's call it subnet x. And it's attached to a router that also has an IP address. Our internet is made up of multiple subnets joined together via routers. So instead of me drawing these access points and switches, let's just represent it as just one cloud. Call it access network x. And somehow these hosts are attached to the router. From our perspective, we don't care whether it's Wi-Fi, whether it's 3G, but some technology allows us to connect x.a, b, c, and d to the router. That's one access network or subnet. And then our internet is made up of multiple access networks joined via one or more core networks. In this small diagram, I've got one core network here. So here's our access network x, which would have some hosts inside it. And two other access networks. See if we can not freak people out with a change of colors. Three different access networks in this small internet and connected via some larger network, which is made up of different routers. So think of this as our backbone or multiple core networks. What we want to allow is a host in one access network to move to another access network without any disruption to the user. It's not too hard to allow hosts within an access network to move. That's like moving within SIT. But to move from SIT's network seamlessly to AIS's network without the user noticing is much harder. So moving from one access network to another is what we want to deal with. But why is it difficult? Let's see why it's difficult. Here's our example, internet. So focusing on the diagram. We have in network x some hosts and we have some other networks. And let's say our host xB wants to move into this other access network. This is SIT's wireless LAN. This other access network, network y, is the AIS 3G network. These hosts have IP addresses. Here it's x.b, or for example, 10.10.97.something, 151. As it moves into another network, what IP address should it have? It should be y.something. Why? Why? Because this is access network y, okay? If we move from one to another, the way the internet and IP addresses are used is that inside one IP subnet, we have the same network portion in the address. Here they're all x.something. Here they're all y.something. That's how IP addresses are assigned. So if we move here, we'd expect this to be y.something. y.g, for example. As long as there's something that g is unique inside here, it should be okay. Why do we need that? What happens if, all right, let's say what if we didn't do that? What if, as it moved, it maintained the address x.b? What would happen? It's not, we know it's not valid if it's x.b, but why is it not? What's the problem if this is x.b? No service, why? What if someone sends data to it? Let's say this host z.a is sending data to us. So we're dealing with a case where, let's say some host is sending data to us. Maybe this is the YouTube web server. It's streaming a video to my phone. As I move, I wanna keep watching the video, continue streaming. So this one is sending data. The destination address is x.b. When I connect to the YouTube web server, it starts sending to x.b. If I move to this access network and I'm still x.b, what happens? The data will keep going to here. The reason being is that the way internet routing and forwarding works in that this one doesn't send to x.b. In fact, it sends to the router and the router sends to the next router such that it will be delivered eventually to network x. The way that routing works in the internet is they route not to individual hosts, but we route to networks or subnets. So what normally would happen, z.a sends to its router, this router would send to another router and the routing tables in those routers would be configured such that that data will be delivered to subnet x. So for example, this is created at the source, z.a. It's an IP datagram, IP header, some data. Inside the IP header is a source address. What is the value? This is created by our YouTube web server, z.a. Creates an IP datagram containing some video, sends it. x.b is still here at the start. What's the source address? Okay. What's the destination address? x.b, that's normal. This IP datagram is sent to the first router. The router looks in its routing table and realizes, okay, the destination is some host on network x. It doesn't care that it's x.b or x.a or c, it just cares that it's on network x. Uses its routing table to determine to send to the next router, looks, sees, ah, I need to get this to x. Keeps going. Eventually it gets to the router for network x. So this arrives at the router for network x. The router sees, ah, the destination is x.b, x.b is on my network. I manage network x, so sends it to x.b. That's the normal situation. Now, if x.b is moved to this new access network and the same thing happens, we'd send it, that datagram will be delivered to router x and now what does that do? Well, we have a problem because if the data gets here and the host is no longer on the subnet, then how we cannot deliver the data to that host. We cannot route that data to the host because it's somewhere else. Unless somehow this router knows it's somewhere else, we'd not be able to receive the data. So that's why, and as people correctly identified, if we move here, we need to change our address to y.something. What's the problem with changing your address? The problem with changing your address, so my phone was x.b, I move into AIS network and now I get a new address, y.g. My, the YouTube web server doesn't know that, okay? It doesn't know that I've changed my address. Why would the YouTube web server know that my device has just moved from one network to another? If it had to keep track of that, it would be very difficult. So to be seamless from the sender's perspective, it shouldn't care whether someone has moved or not. You shouldn't even know that someone has moved. So if I change my address here, for most applications, the application will end, at least the session will end. You'll have to stop receiving the data and have to, so if I change my address to y.g, I would not receive any data from this source. I'd have to then establish a new connection to this source and tell them my new address is y.g and then I'd start receiving the data, okay? That's a problem because again, it's not seamless. What we'd like is as we move, there's no disruption of the service. This disruption of stopping, let's say stopping the video stream, contacting the server again and starting the video stream, is too much of a disruption for some applications and we want to avoid that. So we've got two problems. If we move the source, we'll keep sending it to here and we will not receive the data because we're no longer here in network X. If we move and change our address to y.g, then we must somehow inform the source and that's also a problem because that takes some time and it disrupts our data transfer. So what's the solution? What do you do to fix this? If we move and z.a keeps sending to x.b, they're gonna send to here. We cannot change our IP address and tell them because that's too much of a disruption. So what do we do? How can we solve this? What's the solution? Tell who? Okay, first solution. If I move here and I get y.g, tell z.a I've changed. Possible, but too slow because what that means is effectively my, because almost all applications use the source and destination address to maintain some state. And if you change those addresses, effectively you've got to stop that application or stop the TCP connection, for example, and then start again. That disrupts the service and it can be a disruption of hundreds of milliseconds, seconds in some case. It's possible, but often too slow for what we need. So if we cannot tell z.a that I've changed my address, what can I do? Redirect. Tell router x to redirect. Okay, that's the solution. x.b has moved to this network. z.a is still sending over here. Okay, it just keeps thinking it's sending to x.b. It's arriving here, the data. So what we should do is as we move into a new network, tell our old router that I've moved and tell them to redirect it to my new network. So z.a will send the data. It would arrive at the router x.z which will then forward or redirect the data into subnet y and then we'd receive the data. And that's it, that's mobile IP. Mobile IP does that. We just need to study the mechanisms for how it does that and look at some of the issues. It's this concept of redirecting. And if you change the network again, let's say to another subnet here, then you tell your router I've now moved from y to w. And if you change again, you tell them again. And we'll see that there is a performance issues here that what happens is that the source here is always sending to our home network, our original network, and then that forwards onto our new network, also called a foreign network as opposed to going direct and that can lead to some performance problems which we'll cover. Yep. So that's the simple concept of what mobile IP will do. If we move, tell our home network, especially the router at the home network that we've moved and tell them to redirect or forward the data to our new network. Yep. What if x.b moves into subnet z? Well, let's say we use the same approach. We tell our home network z.a sends to here and then this one sends all the way back to us here. Would work but very inefficient. So there's also a way that when we move into here, this router would know that we're in here. So when this one sends, it could redirect immediately back here, a special case condition. The routers have to have some special functionality to recognize that. Yep. So that's a special case and there are a few other special cases too. But in general, when you move into a new subnet, tell your home router that you've moved and tell them where you've moved to and they will redirect the traffic. It's the same as you can do with your postal mail, your snail mail. You've got an address at home. You tell the post office for the next six months of temporarily changed addresses. And that post office will, when it receives mail, will forward it to your next, your new address. So we need to go through the details of how it works. Just to make sure we're clear. This slide is just about discussing the fact that if we change our address, it disrupts the application. And normally that's bad if we want seamless mobility. So just some discussion saying, if we do change the address and we have to tell the source, that usually incurs too much of a delay such that we disrupt the streaming or the data transfer. We're talking about mobility that should be, we say seamless. We're talking about delays in order of tens of milliseconds. So as I move from one network to another, there may be some small delay of setting up the new connection. Tens of milliseconds, hundreds of milliseconds in some cases, what's desirable. Much more and the user starts to notice and that can be a problem. We've looked just at going from Z to our device. Of course, we're also transferring data in the opposite direction. What happens? We'll see that this device, as we move into the new network, it maintains its old address, X.B and gets a second IP address, a care of address. And it can use that care of address and the old one. And we'll see, we'll not explain how yet, but we'll see that it can send back in this direction. When it's uploading or sending back to this fixed node, it doesn't have to go via our router here. We'll see why those two cases are different in a moment or shortly. So again, we must support the transfer in both directions. We'll see that the download normally needs to go via our home router, but with upload, we can bypass that and go direct. Let's make sure people understand why the data goes from here to the home network, to this router and how the basic routing in the internet works. I think most of you do, but some may not recall from previous subjects. So we'll look at our example. This is the first picture you have in your example. So if you flick through some slides, this is the example network that we're gonna deal with to show some aspects of mobile IP. I have real addresses. Well, the full IP address, they may not be realistic, but just to demonstrate what happens, not just using letters. How many subnets in this example, internet? All right, to answer that, let's explain the notation use. The circles are routers. Remember, routers connect subnets together. We have an access point. We're gonna use in this example, wireless LAN. We have our mobile node. It's initially associated with access point one. We have some routers, A through to F. This is just a LAN switch, and this is our other node that we're gonna communicate with. We're corresponding, in our example, we're gonna correspond between our mobile node, so your mobile phone, and some fixed node on the internet, let's say the YouTube server, called the correspondent node in general. The node we're corresponding with. How many subnets in this internet? Eight. And the numbers of the IP addresses give you a hint. The subnets are, and let's try and draw it in a slightly different picture. All right, actually, to be quick, we can see, here's one subnet that contains the access point in our initial mobile node. Let's call that subnet 1.1.1.0. In all of these IP addresses, the subnet mask is a slash 24 or a 255, 255, 255.0. Just for simplicity, that means the first three numbers identify the network or the subnet. The last number identifies the host on that subnet. If the last number is a zero, we use that as a special case to identify that subnet. So I could say the subnet 1.1.1.0 is here. This is a second subnet between A and B. Subnet 2.2.2.0. 3.36, sorry, six between C and F. F has a subnet seven there, four, five and eight. So we have our eight different subnets in this example internet. Okay, so what else do we see here? We see these single digits here. These are just interfaces. So I'll use them to refer to the specific IP address of that router interface. So remember a router connects two subnets. Look at router B, for example. Router B connects this subnet with this subnet. A router has an IP address on each subnet. So let's say that this IP address would be 2.2.2.1. And this IP address on the other side of router B would be 3.3.3.2. And similar this router A has 2.2.2.2 as an IP address and 1.1.1.1 as an IP address. So these are the interfaces and we'll use them as the specific IP address just to save some space. What else are we missing on this diagram? So we're gonna look first, how do we get data from correspondent node to mobile node? And initially the mobile node is on this subnet. And each mobile node has a home, a home network, a home subnet. So it's where they're initially connected to the internet. So we're assuming the home subnet for MN is here, 1.1.1.0. And its IP address is 1.1.1.100. And that's its home. And we'll see later it was going to move and we'll see what happens when it moves. First thing is when it's home, how do we get data from correspondent node to mobile node? Well, we create an IP datagram at the source and follow the routing tables. Towards the end of your handout, I've created some routing tables on page seven. So you, sorry, this picture, all right? They're the routing tables for each of those nodes. So the routing table for mobile node, MN, the routing table for the correspondent node and for those routers, A through to F. A simple view of the routing table where it says if the destination of a datagram matches what's given in the first column, then send it to the next node as specified by the second column. Now, correspondent node wants to send to, you look at the routing tables. I'll show this one. Correspondent node wants to send to mobile node. Assume it knows its IP address, okay? Correspondent node creates an IP datagram. So this is at CN, creates an IP datagram, has some data, source address, source address. The correspondent node is sending to MN. So the source address is anyone? Louder? Okay, all right, easy. And destination, where does CN's now? Follow your routing tables. Now, this is a very simple network. So there's not many paths to take, but just so you understand how the routing works, follow the routing tables to see where it goes, where the CN send it. So CN, here's the routing table for CN. It has an IP datagram. All it does is checks the destination address, one, one, one, 100, and looks up its routing table. Doesn't match one of the values, one of the rows in the left column, in the destination column. All right, it doesn't match 8, 8, 8, 0. It doesn't start with 8, 8, 8. So it doesn't match the first row. The second row, the star means any other value. Okay, star's a wild card. So yes, it does match that. So CN looks and sees the destination is one, one, one, dot something, all right? Not the first row, therefore must be the second row. Therefore, I need to send this datagram to 8, 8, 8, 1, okay? And then sends on to 8, 8, 8, 1, and that follows its routing table. Check where it sends. We're not at MN yet. So first, these are the routing table. So if MN is your mobile phone, it stores this information in the mobile phone. Let's first focus on, we're sending data from CN to MN, okay? We'll get to MN in a moment. Start at CN for this example. So CN sends it to 8, 8, 8, 1, which is here, 8, 8, 8, interface 1, okay? So it sends it to its router E. And then where does E send it to? So look in the routing table. We send it to 8, 8, 8, 1 in the first case, and what does E do when it receives it? Here's the routing table for E down the bottom. Which row matches? Let's quickly go through. Which row? Third row in this case, it's not. Remember, this is the destination. It's always the same in this IP datagram. We send the datagram to the first router. The router looks at the destination, which doesn't change. 1, 1, 1.something. Not the first, not the second. Third row we send to 5, 5, 5, 1. And then, so E sends to D. I've created the routing tables as you may expect that it's gonna go in the right direction. And you look up the routing table for D, and D should send to C. And then look in the routing table for C. D will send a 4, 4, 4, 4. That's this entry. C will receive it. Where does C send to? Which row matches? The fourth row here. You see that destination, now the way that we, and I've simplified the routing tables just to keep them small, the way we read this, we're assuming everything says subnet, the same subnet mask as here, that the first three identify the subnet, if it's a zero at the end, it means it matches any value at the end. Our destination is 1, 1, 1, 100. Which is on the subnet, 1, 1, 1, 0. Therefore this one matches. And we send a 3, 3, 3, 2. Now in real routing, the routing tables are more complex than what we see here. There's some information about the subnet mask that's important. So 3, 3, 3, 2, which is B. And then of course B will send to A. And as you expect A, B sends to A, 2, 2, 2, 2. What does A do? Router A receives, direct. I use that to mean, you don't send to another router, you send to the host which is on your subnet. That's what I mean by direct here. So use the layer two technology, Wi-Fi and send direct to that host. So because the destination is 1, 1, 1, matches. So each router knows about the hosts in its subnet. It can send direct to there. And then we've delivered the data. How does it send direct? Well in our case if we're using wireless LAN it would send via the access point which would then send to the mobile node. That's easy, that's the normal case, no mobility. If mobile node moved to this subnet for F7770 subnet, you can I think easily see that we would not deliver the data to the destination if we didn't have anything special. If we moved here and we maintain the address 1, 1, 1, 100, then according to our routing tables, CN keeps sending to 1, 1, 1, 100. It will send to E to D to C to B, B will send to A and unless we tell A that we've moved, A cannot send to the mobile node. So that's our problem here that we need to somehow tell A, router A that we've moved. We cannot expect the routing tables to be updated every time someone moves. So another option would be to somehow say that mobile node moves here and somehow inform C that 1, 1, 1, 1, 100 is in this direction. Would work in theory but in practice it's not manageable because when you have millions of mobile nodes, you cannot efficiently update the routing tables of routers in the internet because your internet is much more complex than five or six routers. There are hundreds of thousands of routers. So we need mobile IP in this case. Let's go through how mobile IP works. So the internet protocol version four is in widespread use, has been around for a long time and the organization that maintains IP started working on a way to handle mobility in the early 90s. So what's that, more than 20 years ago. And they come up originally as a request for comments as standards number 3344 and it's generally referred to as mobile IP. So there's IP and mobile IP. There's been a lot of research over those years to improve it and to provide some new features about security, improving the performance, improving the speed for dealing with some of the things we cover in mobile IP. Mobile IP was first developed with IP version four. There's also IP version six and a mobile IP version six. Okay, because in this course I'm assuming you know about IP version four mainly, we focus on mobile IP version four but there's also a mobile IP version six. The concepts are similar. Some of the terminology is different. And there's some specialized cases and we will not cover them, network and mobility and ad hoc networks. Mobile IP is optional. We'll see that for mobile IP to work, you need some extra functionality in your mobile device, your phone, your laptop and in the routers, normally the routers. So that extra functionality is not required, it's optional. In mobile IP version six, the functionality is required. Why? Well, one reason is to make sure it's more widespread in use. In practice, and we'll summarize at the end of this topic in practice, mobile IP version four is not so common. But mobile IP version six is now required in future mobile phone networks. 4G mobile networks make use of mobile IP version six. So that's where it's quite important. It's not so much for you and I with our laptops. It didn't become widespread but in terms of mobile phones and future mobile phone networks, mobile IP is quite important. Let's look at mobile IP version four, the basics. And we've sort of said some of this already. As you move to a new network, you need to inform your old router that you've moved. Oh, what's this second? All right, this is another moving. Ignore this one. Let's focus on just the first move from X to Y. As we move, what we're going to do is inform the old router that we've moved. So some terminology that we use in this case, we refer to our home network. Every mobile device has a home network. For example, my SIT laptop, it's home network where it gets its original IP addresses SIT's network. If I move into another network, the other network is a foreign network. Okay? So from the perspective of X.B, this is its home network. This is a foreign network. Every other network, in fact, is a foreign network to X. So we have home and foreign networks. The routers normally play some special role in, for example, the home router keeps track of who has moved out of its network. And the formal name is a home agent, HA. It's a piece of software that runs normally on this router that is used in mobile IP. We refer to it as a home agent. And on foreign networks, there's a similar extra piece of software, a foreign agent, home agent and foreign agent. These, this terminology on the next slides, so I listed here, home agent, foreign agent. So some of the terminology is on these slides. Let's explain it via this example. So here's our mobile node. The one that we're communicating with, we had Z.A. We call the correspondent node. We're corresponding with that. It's usually fixed. As we move into a foreign network, we maintain our IP address, we can call that our home IP address, our original IP address, X dot B, but we get a secondary IP address, a temporary IP address. It's called our care of address. And that is allocated according to the foreign network we're on. So in this foreign network Y, we would get a care of address Y dot something. In this example, Y dot M. So in fact, our mobile device will have two IP addresses. Home IP and every foreign network it's in a care of address. If this blue one moves into another foreign network, it would still have X dot B and get a new care of address, for example, Z dot T. So now we have a care of address, a visiting address. Our data delivery works is that our applications, for example, my web browser, and the YouTube web server when we're communicating, we keep using the home IP address. So we don't change that from the application perspective because if we do change the address, it usually means we have to disrupt that application. So we keep using the home address even as we move into a different network. And what happens is that Z dot A keeps sending to X dot B, so it sends across here and somehow we tell our home agent when we've moved into a new foreign network, what foreign network we're in. So as X dot B moves into foreign network Y, it will tell its home agent, I am in network Y. So now when Z dot A sends data, it would arrive at this router, the home agent recognizes, this data is destined to X dot B, but I know X dot B has moved. Its current care of address is Y dot M. So it will start to forward the data to network Y and eventually to the host here. So two important things there. As we move, tell the home agent we've moved and as data arrives, the home agent forwards that data to the foreign network where we're currently located. Any questions on how the basics of mobile IP work? And again, the terminology is on the next two slides. What did I miss? That's all right, it's old election notes. So this is some of the terminology or the components. So we talk about nodes or hosts, so mobile node, which is a node that uses mobile IP. So mobile IP is a piece of software. If my laptop wants to be mobile, it has to have in the operating system some mobile IP functionality, some software. Correspondent node is some, any node on the internet, it may not, it doesn't have to have mobile IP. So most computers on the internet do not support mobile IP. It's only those computers that we want to allow them to be mobile. For example, laptops, mobile phones. Every node has a home network, one home network. From the perspective of that node, all other networks are foreign networks. I have one home, everyone else is foreign. Every, the networks that support mobile IP have home agents. Usually they're on routers. So usually the router is a home agent. Doesn't have to be, but in most cases. So some software, some server software that keeps track of where the mobile nodes are. We'll see that there's some data structure or some table that lists which of my mobile nodes are visiting which foreign networks. It's a mobility binding table. We'll see that later. And there are foreign agents, usually again on routers. They keep track of the mobile nodes that are visiting their network. And they provide addresses to those visiting nodes and forward the data to those visiting nodes. So home networks, foreign networks, home agents, foreign agents. Two types of addresses. Every node has a home IP address, that's normal. But as a node moves into a foreign network, it also gets a foreign address, a care of address. And the care of address is within the appropriate address range for that foreign network. So if the foreign network, for example, is 172, 16, 37.0, the care of address may be 172, 16, 37.0, something. 65 in this case. And in some cases, we'll maybe try to avoid this detail, but it's possible that the care of address of a mobile node is in fact the same as the IP address of the foreign agent. That's a special case, which is a bit different from what we know, but it's possible that the care of address of this x.b is in fact y.z, which is the same as this router address. That's allowed. But the other one is that it gets its own care of address, y.m. As long as it's y.something. So let's look at how, so there are many steps involved in mobile IP. The most important ones are telling the home agent that you've moved and forwarding data. What have we got? Let's just finish today with this slide. How do we forward data in mobile IP? So this assumes our mobile node has moved into a foreign network and is somehow told its home agent that it's moved. So the home agent keeps a database of which nodes have moved and where are they? So what happens when we look at both directions? The blue direction is when our correspondent node is sending data to the mobile node. Normally it sends to here. But in this case, it's sending, it doesn't, the correspondent node doesn't know the mobile node has moved. The YouTube web server doesn't know your mobile phone has changed from one network to another, nor should it need to know. It sends the data is routed across the internet to network x. The home agent at network x realizes this data is destined to x.b, but currently x.b is visiting a foreign network and its care of address is y.m. So there must be some data here so that this can record that. Therefore, I will start sending the data to y.m. It will go to the foreign agent on router y.z and which then delivers it to y.m, our original mobile node. In the other direction, uploading data to the server, for example, we send our data, what's the, our mobile node sends data? What's the source address? Oh, simpler, what's the destination address in the red direction? Our laptop is sending data to the correspondent node. What's the destination address? What's the destination address? We're sending to the CN, so ZA. What's the source address? Two to choose from, you chose the wrong one. x.b, and just to remind us, in the other direction, sending from CN to the mobile node, from the CN to the mobile node, the source address will be Z.A and the destination will be what? From CN to mobile node, the blue direction. From here, source is Z.A, of course, is one sending it, where's it sending to? x.b, and when we reply, same pair of addresses just reversed. That's what we'd expect. Our application, it would be strange if it was something different. My web browser receives, and it's coming from Z.A to x.b, and when I send back, I send it back to Z.A from x.b. So, by using the same addresses, we say it's the change of addresses and the mobility of the node is hidden from the application. The applications that are sending this data still see it as x.b, communicating with Z.A. Even though this has a care of address, when we create the data, we set the, when we're sending the red one up, we set the source as x.b, and we send it to this foreign agent. This one knows it's a special case. It's coming from this mobile node, and we simply send across the internet, destination Z.A. It doesn't have to go through the home agent. It's only in the download direction that it has to go through the home agent. Because at this router, destination is Z.something, it will go through the internet to router Z and to the correspondent node. We can avoid the home agent. So in the blue direction, we go via the home agent, so in the download, from correspondent node to mobile node, but upload from mobile node to correspondent node, the red direction we go direct, we don't have to go via the home agent. Going via the home agent is potentially bad for performance. It is needed for mobile IP, but as you may imagine, normally the shortest path would be go to direct, but to send to some router and then have that forward to some other network can be bad for performance, like introduce extra delay. So we'll see later that this blue path is what we may say is suboptimal. Between source and destination, it's not the best path and can lead to bad performance in some cases. Any questions on mobile IP so far? What we'll do tomorrow is go through the details of how this forwarding works and the steps before that. How do we tell the home agent that we've moved and a few other features? Any questions in the last couple of minutes? That's not a question. It's complex, but the concepts, the ideas are rather simple. Move, tell someone we've moved and they will forward the data to us. The details of how it works is a bit more complex.