 So yesterday, we introduced mobile IP. It's a protocol. It's really an add-on feature to the internet protocol. So some extra functionality that allows a computer to be mobile in the internet. And mobile in the internet means changing IP subnets. That's the important thing. Not just mobile within one subnet. That's not so hard. So mobility within SIT is not so hard. I can walk around with my laptop and still get access. It's when I need to change my IP address, which is an issue. So that is when I move from one subnet to another. If I change my IP address, that means our applications must stop and then start again. That's some disruption. For example, if I'm streaming from YouTube and I change my IP address, that stream will stop. And I have to start that stream again. And that incurs some delay which the users may not tolerate. If I don't change my IP address, then when the correspondent node sends us data, it will not get to me. Because if I move to a new subnet, then the correspondent node sends data to my old subnet. That's a problem. So the solution is mobile IP where our mobile hosts run some extra software, mobile IP. So do some of the routers. They have this functionality called a home agent and or a foreign agent. And what happens is as our mobile host moves into a new subnet, a foreign subnet, it tells its home agent where it is. It tells its home agent I've left my home network and I'm now in this foreign network. And then when someone sends data to that mobile node, the home agent receives that data via normal routing and then forwards the data onto the foreign agent and eventually to the mobile node in the foreign network. So that's the basics of mobile IP. We introduced some terminology and components. Today what we need to do to finish, because there's not much more, we just need to look at the details of how that works. And the two main details are when you move into a foreign network, how do you tell the home agent that you're there? That's one thing. And the other detail is how do we send the data or in particular when the data is sent to the home agent, how does that forward it onto the foreign agent? So we'll look at that as well. And a few other minor features. So we've been through the components. We spoke about forwarding at least the general concept in that from the correspondent node's perspective, it's just sending to the mobile node. It doesn't know that that mobile node is in fact mobile. It just knows its IP address, which is, in our case, it was x.b. And just keep sending to x.b, which eventually goes to the home agent, which then knows that x.b has actually moved. So forwards it onto their new foreign network. In the opposite direction, x.b is sending to z.a, and it sends just in the normal manner. It creates an IP datagram and sends it to the first router, which then sends it through the internet to the router for the correspondent node. So we don't have to go via the home agent in that case, which is a good thing in that going via the home agent increases the delay in many cases. You can see what is the shortest path. Although it's not clear in this side, this cloud. But I think you may be able to see that between correspondent node and the mobile node, the optimal path is the red one, or the shortest path. Whereas if you have to go via some other home agent, you may get a suboptimal path, not the shortest path, which means lower performance in some cases. So we'd like to avoid going via the home agent, but we need to do that, at least in this direction. Otherwise we will not get the data at the mobile node. So some issues that we need to deal with. When we enter a foreign network, so my laptop, my SIT laptop, I move into another network. I visit, walk across to Toshiba into the Toshiba factory next door, and I have access to their network. If I'm using mobile IP, when I enter their network and want to use mobile IP, then I must inform my home agent that I've moved. That's one thing. So there's a registration procedure. As I enter a foreign network, tell my home agent I'm in a foreign network. It's called mobile IP registration. In fact, before I can even register, because I need to register both with my home agent and with a foreign agent. So before I can register, I must actually find out what is the IP address of the foreign agent. I must discover the foreign agent. So there's some agent discovery process. Once I've registered, and I'm OK in a new foreign network, there's this process of forwarding the data. So we're going to look at how that's done, and we'll see the concept of tunneling. We'll cover that. Another issue is that I'm in a foreign network, I'm moving around, and I move to a new foreign network. Then again, I must hand over from one network to another. And it really involves a registration again. I register again to my home agent that I'm in a new foreign network. So there's some procedures to make that fast. Because every time I change networks, I want to quickly tell my home agent that I'm in a new network and cut down the time to do that. So there's a handover procedure. We were not going to do many details of that. We'll see some of these procedures take time. And what happens is, as I'm moving, when I move from one network to another, I have to exchange some packets. Before I can use the new network, the longer that takes, the larger the delay incurred from my application. I want to cut that time down. So there are some extra techniques to try to minimize the delay, some performance enhancements, route optimization, and handover smoothing. We were not touched upon them. We will mainly focus on the registration and the tunneling. Registration. So this is the process. If I go back to this slide, my x.b, mobile node, has entered a foreign network. I need to tell the home agent that I've entered this foreign network. That's the registration procedure. In fact, I also need to tell the foreign agent something about my node. Because the foreign agent has the role of forwarding the data that comes from the home agent. So let's look at the registration procedure. For example, my laptop moves into a foreign network, or I turn on the power of my laptop when I'm in a foreign network, assuming I know the address of a foreign agent, then what happens is that my mobile node sends a special message called a registration request to the foreign agent. So from mobile node to foreign agent, I send a registration request. And it tells the foreign agent what my home IP address is. And I'm sending to the foreign agent. It's a registration request because I want to register, in fact, back to my home agent. The registration request contains the IP address of the home agent. So what I do is I send a message to the foreign agent saying, I want to register to my home agent. The foreign agent makes note of the mobile node's home IP address. So it records in some data structure. And everything's OK, assuming security and so on. There's no problems. That is, the foreign network will allow this mobile node to enter it. Then it allocates a care of address. Remember, our mobile node has two addresses, home and care of address. The home address is always the same. The care of address is specific to the foreign network. So we send a registration request, foreign agent, if everything's OK, allocates a care of address. And then sends the registration request to the home agent. And included inside that registration request is the care of address. So the idea here is that the home agent is, when it receives this request, knows where the mobile node is. The home agent records this information and records information saying mobile node x dot b is currently in foreign network y. And it has care of address y dot m. Records that information. Assuming everything's OK, sends back some reply to the foreign agent saying everything's OK. And the foreign agent maintains a visitor's list, a list of mobile nodes that are visiting its network. And then sends the reply back to the mobile node. And once the mobile node receives that reply, if everything was successful, it can start sending and receiving data, or continue sending and receiving data inside the foreign network. So this is the procedure from when this blue node enters this network. It sends a message to the foreign agent, a registration request, which then sends it to the home agent. This records, the home agent records where that mobile node is, including the foreign agent address and the care of address, sends back a reply and then a reply. So now when that's finished, foreign agent has a visitor in its visitor's list. And the home agent has the knowledge of where that mobile node is. And then later, when data arrives at the home agent, it will know where to forward to. Because it will see in its list of, in its data structure to forward in this direction. So registration is important procedure. It happens when the node enters a foreign network. It takes some time, because you can think from when we enter the network, until we can start receiving and sending data, we must do the registration. So we need to send a request and then receive a reply. And then we can start sending and receiving real data in this foreign network. So the longer this procedure takes, the more disruption it is to the mobile node. We'd like to reduce the time for disruptions. How long does it take? Well, it depends really upon where the home agent is. For example, my home agent is in SIT for my laptop. And I move to, I walk across to Toshiba and enter their network. And I find a foreign agent there in Toshiba's network. And I send a registration request to their foreign agent, their router. They send it to SIT's router via the internet. And then a response comes back. And then my mobile node receives a response. So not a large delay. It's the delay involved of sending a packet from one node to another in the internet. It depends upon where the home agent is with respect to your foreign network. Mobile IP is intended to provide global mobility. So if I turn on my laptop and I'm in some network in the US, then the idea is I say I'm visiting some university in the US. I turn on my laptop. I register to the foreign agent in the US network. And then that foreign agent sends a message, a registration request, to the SIT foreign agent. And then here in Thailand. And then a reply comes back to the US. And my mobile node has access inside that foreign network somewhere in the United States. In that case, there's some significant delay from when I send the request, because it needs to go all the way from the US back here to Thailand and then back. So there's some round trip time there. And during that time, effectively, I don't have access to send and receive data. I must wait. So depending upon where you are, it impacts upon the delay there. Why would you want to do that? Still your address in that case, let's say your address is known, my home address is known and fixed, and say we use it as an identifier for a voice application. So when someone wants to call me, they call me via my IP address. So everyone knows my home IP address. So when someone wants to call me via the internet, there's a name that maps to my home IP address. Of course, when I'm in SIT, they call me and it goes to my home IP address. But when I move to Toshiba, for example, the caller doesn't know I've moved to Toshiba. So we're using mobile IP, the data will be redirected to my laptop when I'm in Toshiba. And similar if I'm in another country. That's one of the ideas there. So the idea is that if you use IP addresses to identify the users, the computers, and you use just a single IP address, then for others to contact you, if they know your IP address, then if you move, you want to use the same IP address. That's one of the ideas. And that's why these concepts are useful in mobile phone networks. Your mobile phone has an IP address. Let's say your mobile phone, you're a subscriber to AIS and you get an IP address from their network. That's your home IP. No matter where you move, people can contact you via that IP address. That's a desirable goal. In mobile phone networks, they use mobile IPv6, version 6, but similar concepts. There are other ways to handle such mobility. What happens? So we're talking about registration, request, and reply. We'll go through another example a bit later. Let's look at the other features, and then we'll go through the example in the handout. In fact, before I register, I must know about the foreign agent. So my mobile node moves into this network. What is the IP address of this foreign agent? Well, when I turn on my device, how do I learn its IP address? Because I need its IP address because I need to send the registration request to it. So there's this process called agent discovery. Discover the foreign agent. Then register. So we went through registration, but in fact, before that, there must be some way from my mobile node to discover this foreign agent. There are different ways to do it. And the techniques or the concepts are similar to how you discover an access point. Completely different protocol, but remember how my laptop discovers the presence of an access point? We had two ways, active and passive. In active, I send a probe request. I broadcast a probe request. If an access point is present, it will respond with a probe response. I actively discover that access point. The other way is that the access point periodically broadcasts beacons. Therefore, if I'm within range, I receive a beacon and I've discovered the access point. That's how in Wi-Fi, we discover access points. In mobile IP, we're not trying to discover access points. We're trying to discover a foreign agent. So I walk into Toshiba's network. I need to know the IP address of their foreign agent. So I need to discover the foreign agent. Two basic approaches. We'll see a third also at the end. First one is that that foreign agent periodically broadcasts special messages called agent advertisements. So back to our diagram here. This foreign agent is always sending, let's say once per second, sending a broadcast message on this subnet saying, I am a foreign agent. That's the idea. It broadcasts an advertisement telling anyone who receives it that it is a foreign agent. Therefore, if my laptop enters this network, within some time it should receive an advertisement and learn about the IP address of this foreign agent. That's similar to the beaconing approach. Access point periodically sends beacons. Here, the router periodically sends agent advertisements saying it's a foreign agent. That's the advertisement approach. The packets that are sent, in fact, ICMP packets, a special type of an ICMP packet called a router advertisement, advertising the presence of a router. For example, they're sent once per second. The other approach is an active approach, where my mobile node, when it enters a new network, broadcasts a solicitation message in search for a router, in search for a foreign agent. This is similar to the probe request. In wireless LAN, one approach is I can broadcast a probe request in search for an access point. If the access point receives it, it responds. This is the same concept. Mobile node broadcasts a solicitation message called a router solicitation. When a foreign agent receives it, it can respond with an advertisement message saying I am a foreign agent. So we have two types of messages, router advertisements sent by the foreign agent and router solicitations sent by the mobile node. And we can combine the approaches. For example, we could send advertisements once per second, but when my mobile node starts, when it boots up, maybe it could send immediately a router solicitation. With the goal is that we discover the IP address of the foreign agent. There are some other ways that is you can use the wireless LAN layer, the Layer 2 technology, Wi-Fi or maybe 3G or a mobile phone network. So make use, for example, of beacons and include some extra information inside them. But that's not so common. I think we will not touch upon the other Layer 2 supporter techniques. I think for simplicity, let's focus on the first two, which are the same concepts of discovery and wireless LAN. Different protocols are just the same concepts. Let's go through, there's a couple more things to cover, but let's go through our example that we have in the handout and see the discovery and the registration work, and then we'll come back to the other features. So you have the handout in front of you. I'll show some pictures on the screen. We'll do some things on the board. This is our example network topology, same as yesterday. We have our mobile node initially attached to access point one. So 111100 is its IP address, and it's going to move into the subnet operated by router F. These are routers, A, B, C, D, E, F, and our correspondent node. So assume my mobile node and correspondent node are exchanging packets. And the idea is my mobile node will move, and we want to keep exchanging packets without disrupting the application, and we'll go through the steps of discovery and registration and eventually forwarding. The first step, and in fact this is not related to mobile IP, let's say we're using wireless LAN access points here. Inside, it's ignore mobile IP for a moment. Inside SIT, there are many access points. Which one does your laptop associate with? The closest one. So your laptop has a tape measure, and it measures the distance to the access point. OK, most likely based upon signal strength, which is usually proportional to distance. So the closest is normally the case, but sometimes obstructions means it may not be the closest. So one way for choosing an access point is your mobile node measures the signal strength from different access points and choose the access point with a stronger signal. That's a common technique. We can see, you can actually scan and see the signal strength from different access points. Let's try. So the wireless LAN card in my laptop, I'm currently in fact associated with one access point. But what the wireless LAN device often does is scans and checks the presence of other access points. And it will associate with the best one. The best one is normally the one with the strongest signal strength, but it may be other ways. Let's scan. Yeah, if you click on the icon, you're correct. If you click on the icon here, it will give a list of different ESS IDs. Usually, it will not give specific access points, because within WSIT, there are multiple access points. So if I click here, I can see in my case, I'm currently associated with WSIT. That's the ESS ID. There may be multiple access points with the same ID. And there are some other networks around. True home Wi-Fi, open WRT, and cyberpoint. Let's see some more details about them. There's a program IW list. I want to list some characteristics of my wireless LAN interface. And I want to scan. So what I'm going to do is get my wireless device to scan and listen across all channels and see which access points are sending beacons on each channel, or available on each channel. OK, now we need to scroll through, because we see there are, in fact, 10 different access points that responded. Scroll up a bit. So what happened is when I ran that command, IWList, WLAN0, my wireless LAN interface, I told it to scan. It quickly switched from channel one to channel two, channel three. And on each channel, it either receives a beacon or sends out a probe request with the hope of getting a response as a result discovering an access point. And when it does receive something from an access point, it can report the information. This information is included in the beacons or the probe response. For example, access point one or cell one has some address using channel 11, ESSIDWSIIT, the characteristics, the bit rates it supports, some measure of signal quality and signal strength, some relative measure 70 out of 70. So that's very good, the best we can get, and some measure of the power level of the signal strength. And then because it scans through multiple channels, it may receive responses from multiple different access points. There's another one, cell two, channel one, a different channel. It's also WSIT, so there's two access points with the same ESSID, in this case, WSIT. And what do we see? The quality is much lower here. So most likely maybe that access point is downstairs. I can receive the signal, but the quality is much lower. The signal strength is much lower for that signal. And others, a third one with WSIT on channel one. And in fact, in this case, there were 10. A fourth for WSIT, a fifth on channel one. Again, low quality. Some other open WRT, cell seven WSIT, channel six. Another nine on SIT's network. So multiple access points are within range of my laptop, in this case. So one way for my laptop to choose which one to associate with, because I only associate with one, would be based upon signal quality. Choose the one with the strongest signal. But note the signal quality may change over time. If I'd run it again, it may be different. It's hard to compare, but if you run it again, in this case, I've only found from nine different access points. So it varies over time. What your laptop may do also is, OK, there were nine or eight or nine access points with WSIT. If I'm moving, let's say I start walking out the door, again, the signal quality will change over time. So my laptop most likely has an algorithm that says, if the signal quality of my current access point drops, gets too low, then let's switch to another one. So it would be nice if I switch to a better one when a better access point becomes available. And signal quality is one way to do that. Another way we could measure the best access point would be based upon packet loss rate. If I start to lose packets using one access point, switch to another one, hopefully a better one. That's just about wireless LAN and switching between them, at least discovery. The same back to our example from mobile IP. So my mobile note is currently in this position. Let's assume it had a good signal quality with AP1 and has the address 111100. But it's moving. Someone's moving, they're walking, or they're in a car, whatever, they're moving. The signal quality is getting lower with access point one. And if the mobile device does a scan, then it can detect, ah, there's a presence of another access point, access point two. And if the signal quality for access point two is measured to be higher, significantly larger than access point one, we find the access point, the signal access point one, the signal quality is getting lower and lower and lower. Whereas AP2 is getting higher, then at some point, my laptop may make the decision, let's hand over. Let's switch from one to another. Now, how does it make that decision depends on the wireless device and also on the operating system and drivers. So it may be different between devices. Let's assume it makes that decision. We're going to start from the signal quality for AP1 got two week, AP2 is strong. So it disassociates with AP1 and associates with AP2. It's received beacons from AP2. It performs an authentication request, authentication reply, association request, association reply, and it's now associated with AP2. What does it do next? Mobile node has now associated with access point two. Again? Yeah? Correct? So agent discovery. This process of associating with the access point is just at the layer two level. It's just within the wireless LAN. Mobile IP, we say, is at layer three, the IP layer. And that's about discovering routers, because normally it's the router that runs the agent, the foreign or home agent. I haven't said or maybe I said yesterday, but the home agent for our mobile node is router A. And a foreign agent will be F. So the procedure that our mobile node must do now is discover the presence of the foreign agent. I've just associated with the access point. I don't know the address of the foreign agent. So the agent discovery is about finding that. Do we have a picture that shows that? So one way, an active approach. This was the process of I was using access point one. I eventually received a beacon from access point two. And it told me the signal quality with access point two is much better. And therefore, at this point, my mobile node made the decision, let's swap from AP one to AP two. So I authenticate, a wireless LAN authenticate, associate, and now I need to discover the presence of the agent, the foreign agent. How do we perform active discovery in mobile IP? What do I do? Solicitation, I solicit an agent in search for. I've got a picture somewhere. I'll draw this one on the board so we don't have to flick back so much. This is a router solicitation packet. Actually, we won't draw it. I think the diagram I'm about to come up with is on the slides here, but we'll draw it as we go. Solicitation. I broadcast my laptop, broadcast a router solicitation message on that IP subnet. And that's the structure of that router solicitation. It's an IP datagram, has an IP header, and inside it's an ICMP packet. The ICMP packet has a number of fields. This is just showing the summary that in the IP header, the two addresses are the source and destination. You don't have to draw this again. So I can refer back to it. So my mobile node has just entered a new network. Well, it has its home IP address, but it cannot use that in the new network because it doesn't make sense in a different subnet. So what it does, in search for a foreign agent, it broadcasts this solicitation message. It sets a source address to this very special case of all zeros, which really means I'm sending this, but I don't have an IP address yet. And the destination is another special address, meaning send to everyone a broadcast, which means everyone in this subnet should receive a copy. There may be multiple nodes in here that's trying to show that my mobile node sends to everyone in the IP subnet. Let's say attached to the access point, there are other nodes, other nodes 7773, 7774, and so on. My mobile node sends this solicitation, and it goes to all of those nodes, including Router F. It's broadcast. So one of the nodes which should receive this solicitation is F. I shall draw it here. Others will receive it as well. When the Router F receives it, because the Router is a foreign agent, it will reply. What does it reply with? So broadcast, F receives the Router solicitation. What does F do? What does Router F, which is a foreign agent, do? It sends an advertisement. We see what I'm about to come up with on the board is this diagram. In fact, we may not even draw it. Mobile node broadcasts a Router solicitation, foreign agent, which is our Router F receives a copy, and therefore replies and broadcasts a Router advertisement. That's the diagram on the screen. That's the structure of the Router advertisement. Source address is that of the Router, or the one that sent it. Destination, it's broadcast. So everyone receives it. In fact, inside the ICMP packet, it contains the actual Router address. You can have a special case where it's a different node. The one that sends it is different from the Router. The normal case, it would be the same. So when the mobile node receives this Router advertisement, it knows the IP address of the foreign agent. It knows it's 7771. And that's what we're trying to do. The mobile node is trying to discover the IP address of the foreign agent. Any questions so far? That was the easy part. Just send a solicitation to everyone, and the foreign agent should reply with an agent advertisement. And hence, the mobile node has learned the IP address of the foreign agent. This is the packet that the mobile node receives, correct. This was sent by the foreign agent, the Router in our network, F in your network diagram. The foreign agent often, almost always, a foreign agent is a Router, or is run on a Router. In theory, it doesn't have to be, but normally it is. And it's broadcast, so everyone receives it. Mobile node doesn't yet have an IP address, so we cannot send to it. Yes, so let's draw it a bit better. It's broadcast, so simply this Router sends to everyone in the subnet. So everyone else also receives it. Which is not a problem. They've just learned about the foreign agent. Because it's only not very often that we send these messages, it doesn't create much of an overhead. It doesn't cause many problems with other devices. Broadcast is not a problem. So now we've done agent discovery. Our mobile node has discovered that the agent has addressed 7771, and now does the registration. And here's the procedure. Mobile node sends the registration request to the foreign agent. We're assuming everything works OK. There may be cases where the presence of the mobile node is rejected. For security reasons, they may not be authenticated. That is, you can't just walk into any network and expect to use their network. There's also some authentication procedures. Either there's some data that's already been configured in the foreign agent and home agent to say that you're allowed to use the network. In practice, there are some other protocols for security for authenticating. But we're not going to go through how that works. We'll assume that the mobile node is allowed to use the network. Send a registration request. Foreign agent will process that. And everything's OK. Send it to the home agent. Home agent will reply. It will record some data. We'll see what in a moment. Reply, and eventually we'll get the reply back. Let's find my packets. Here's the registration request from who? From the mobile node. It's an IP packet. Source address is the mobile node's home IP address. Destination is the foreign agent. How do we know 7771 from the agent advertisement? That's why we know this address. So this is coming from my mobile node, this request packet. And it, in fact, carries a UDP datagram. And a special registration request is the type of data inside. And it contains a number of things. The most important things are the addresses. It indicates the home address of the mobile node. It's original 111100. The mobile node tells the foreign agent its address of its home agent, which is 1111. Why have I done this in this example? I thought I had a different example. In this example, we're using the case that the care of address is going to be the same as the foreign agent's address. You see, the care of address, COA, is set also to 7771. It doesn't have to be the same. Maybe a better example would do a different one. But let's continue because I have the pictures. The care of address will be the same as the foreign agent in this case. So we set the care of address in here. We'll see how that works in a moment. That is sent to the foreign agent. If the foreign agent accepts, it sends it on to the home agent because it knows the home agent's address here. So it will create a new IP datagram and set the destination to be 1111. Source will be 7771. Let's go back. That's this message. Foreign agent receives it and effectively sends the same message but with different source and destination address to the home agent. When the home agent receives that registration request, it has now learned that its mobile node is visiting a foreign network. And it's going to send back a reply saying everything's OK. But before it does that, the home agent records in some database the details about that mobile node. It's called a mobility binding table. Let's look at it. Skip through. That's the registration request. That's going to arrive at the home agent except the addresses here will be different. That's the reply. Here's our mobility binding table. This is stored at the home agent, at the home agent. It's just some database. And the simple view is that the home agent stores the home IP address of the mobile node and the care of address. It's going to use this later when it starts receiving data because if the home agent receives data and the destination is 111100, from this table, the home agent will know that this mobile node is no longer home. It's visiting some foreign network. And I need to forward the traffic to its care of address 7771. So every time our mobile node visits a foreign network, it tells the home agent and the home agent updates its mobility binding table, which simply is a mapping from home IP to care of address. There may be some other details in it as well, but they're the main things. So this database or this data structure is stored at the home agent. Let's record it. Actually, we won't need it today. We'll run out of time. Let's go back. That was at step five. We received the registration request. So we update the mobility binding table and we send back a reply saying everything's OK. When the foreign agent receives the reply and knows that everything's OK from the home agent's perspective, it updates its visitors list. So it has its own data structure. This is the visitors list the database stored at the foreign agent. It keeps track of the nodes visiting its network. The home IP 111100 hits home agent and the MAC address of the mobile node are the main things needed there. In our case, the care of address is the same as the foreign agent address. It's not needed to be stored here. The reason we store the MAC address, whatever it was, in this case, I made up a value. So that's the MAC address of the mobile node. That's fixed. That doesn't change. Because when the foreign agent receives things and receives packets and the destination is 111100, even though that's not an address which is on its current subnet, it knows that from the visitors list to send direct to this MAC address. Remember, the foreign agent is a router. When it receives datagrams, it looks at the destination address and determines where to send it. And using this table, it determines if the destination is 111100, send it to this device, the mobile node. See what we've missed. We've missed the registration reply. Home address is the mobile node's original address. HA is the home agent. Home agent. Yeah, it's the router in the home network. So if we go back to our original diagram, router A is the home agent for our mobile node. 1.1.1.1. That's our home agent. In this example, our foreign agent is F with IP address 7771. And our mobile node has a home address. So don't be confused between a home address and a home agent. A home agent is a router in this case. Home address is the address of the mobile node. So our idea is that the mobile node tells the home agent that it's now visiting network 7. And the registration reply comes back, confirming everything's OK. And the foreign agent F updates its visitors list, keeping track that this node is now officially visiting its foreign network. AP3, let's say, I'm not sure what your question is where you think that AP3 is. Attached to here or attached somewhere else? You say, if it visits AP, if there's another subnet here, for example, with another access point and the mobile node keeps moving and enters this foreign network, effectively, the same procedure must happen. We must register back to our home agent saying, now I've entered a new foreign network, this will update its mobility binding table, send back a reply, this new foreign agent will update its visitors list. And then it's entered the new network. What happens to the old one? Well, what usually happens is over time, they delete information from their visitors list. If no one's communicated in the last one minute or the last five minutes, remove them from the visitors list. So this one maintains a visitors list. If it hasn't seen any packets in the last five minutes, remove them from the visitors list. Did that answer your question? What have we missed? Registration reply. This is the message that comes from the home agent source 1111 goes to the foreign agent 7771, and it's the reply. And there's a mistake here. This should be registration reply, not reg request. This is a typo, should be reply. And it includes the home address and the home agent address. Foreign agent updates its visitors list and forwards the reply onto the mobile node. Once the reply is received by the mobile node, everything's finished in terms of the registration, and we can start sending and receiving data. So we've gone through the two procedures of, first, an active discovery of the agent, the active discovery of the foreign agent, where we sent a router solicitation, we broadcasted a router solicitation, and the foreign agent replied. And then once we knew the foreign agent, we did a registration. And registration is always mobile node to foreign agent to home agent, and then a reply back. And if it's successful, the home agent updates its mobility binding table, and the foreign agent updates its visitors list. They keep track of who's visiting and where the nodes are. Then we can start sending and receiving data. We're not going to attempt to describe that. We need a bit longer to describe that. We'll do it next week. Any questions on the agent discovery and registration procedure? It may look complex, but in fact, the idea is not to remember the structure of the headers and so on, but to understand at least the different ways to discover agents. And, sorry, you should understand that the registration goes via mobile node, foreign agent, home agent, and back. The nodes involved. We still have to go through, well, what happens now when we send data? Because we need some extra techniques to handle the sending and receiving of data. We will not try to explain that this afternoon. Here, so in this case, let's see, let's draw it. The reply, the request went to the foreign agent. We also had a home agent out here. The request went to the foreign agent. The foreign agent sends a new request. So it's a different IP packet. Effectively, the same contents to the home agent. Then a reply, and then the final reply. From the home agent, the reply, the source is, of course, the home agent's address. It's coming from one, one, one, one. And the destination, all it knows is the care of address in this case. The care of address and the foreign agent address are the same. So it's sending to the foreign agent 7771. When the foreign agent receives this reply, it sets the source to be 7771 and sends it to the home IP address, which is one, one, one, one hundred. So if I drew these, the reply, the source here is on the screen, which is, and the destination is the 7771. And here, from foreign agent to mobile node, source is the 7771, destination is a home address. So in fact, they're two different IP datagrams. So the addresses change. Same with the request. The request, if we go back here, from mobile node to foreign agent is this one, but from foreign agent to home agent, source will be 7771, destination will be one, one, one, one. That's from here to here. Any other questions? We will go through how data transfer works next week. That's enough details for today. Again, in the handout, there's some description of those steps. So read through that. We'll get some more details next week. What I want to do in the last 10 minutes is just a quick demo for the assignment. Let's go to that. Okay, quickly on the assignment, you are now experts in using the access point. You should be able to capture packets. You will learn very fast if you can. This assignment or parts of it have been done over the past two or three years. So if we get the same, I get the same questions and provide the same comments. So there are many links here, not all are relevant because things change over the years, but it's worth reading through some of the past emails on the email list. So all these links to links go to the email list. In fact, when you click on them, you'll need to provide your username and password for the email list. Not many people remember that. If you go to the email list homepage, you'll find somewhere you can reset your password. It will send the password to your email address. So if you want to access them, you can automatically get a reset for the password. But there are just some emails from me to the students in the past years explaining different parts of the software. Some will be more relevant than others. Phase two, so deadline is in two weeks for phase two and phase three. And then phase four will happen after. Phase two, capture some packets. Capture the main wireless LAN frames, which is the discovery, association, some data transfer. You don't have to transfer much data, but you need to try and capture all of them. Capture, draw, and send me the capture file. You need to use TCP dump. I think most of you have used it, TCP dump and Wireshark. If not, come and talk to me. I think all of you probably have used Wireshark. You don't, in fact, you don't have to use TCP dump. Wireshark can capture packets as well. So you can directly use Wireshark. I've taught some of you using TCP dump. Now the main thing is that if I capture packets now on my computer, I will not capture the wireless LAN frames. I will just capture the data frames. You need to put your wireless LAN interface into a special mode to capture the details. That's the hardest thing here. The way to test if it works, when you capture and open in Wireshark and you look in the details of the packets, you should see something like the radio tap header. If you see that, then it should be working okay. But if you just see Ethernet 2 header, then it's not capturing the wireless LAN frames. So be careful there. In particular, beacons, authentication, association, data, ACK frames. So you should see those in your Wireshark. Yeah, I don't think so. I don't think Windows can capture in. I'm not sure now. Maybe recent versions, it can. A Mac OS can for sure. It depends on the operating system and the wireless card. Most Mac computers will work fine. There are some links in the previous section. Where? There are some links in the previous section that talk about that. So follow those instructions. There's some instructions from Ubuntu in Mac OS. There's some instructions I've linked to about how to do it. So you can do it. On Windows, I don't think so, okay? Yes, it's on here. My instructions, you'll find a description of how to put it into monitor mode there. Easy. Just follow the instructions and it will work. That's not what I wanna talk about today. Phase three, a quick demo. Use Iperf to test the performance. Iperf is a program that generates traffic. So what happens? We wanna test the throughput from one computer to another. One way to do that is to transfer a file, a 10 megabyte file and time it. And just divide the amount of bytes we received divided by the time and we get the throughput. Iperf does a similar thing but it allows you to control how much we send and how fast we send and it will automatically time for you. So you need to run it on two, on the source and destination, on the client and server. Let's run it and just show quickly how it works. I'm gonna use my laptop as the client. I'm gonna use another computer as the server. I'm gonna test the throughput. The other computer I'm gonna log into, it's my computer in my office. You don't have to log into it remotely because you'll be sitting at it but see if it works. So the bottom screen is, I'm executing on my computer in my office and here's my laptop. So what we do is we start assuming Iperf is installed on say my server or the receiver, I start Iperf and it takes different options. I'll just quickly show some of the options here. I need to start it in server mode. That is the receiver minus S option. We can use either TCP or UDP to transfer data. In this phase of the assignment, you're using just UDP, minus U for UDP. Not needed but I'm gonna do it because it's the way my computer is set up. I can specify the port number of my server. Minus P, choose a port number. Is that it? Server is running. So the Iperf server is running on my computer in the office. It does nothing. It just reports some information and it waits for a client to connect. So now I'll start the client. So say it's listening on this port number 50124. It's gonna receive some UDP packets. Let's start the client. Still we need to specify to use UDP. I'll set the port number. Need to be the same and the client. It's not the server, so minus C client. And I need to tell it the IP address of the server. So connect. Send data using UDP to server 10101184 on port 50124 and press enter. And it starts sending packets. And by default it will run a test for 10 seconds. And at the end report the performance. In fact reports both on the client and the server. Just quickly the main thing in fact at the client we see the report from the server. So we don't have to look at the bottom one because it is sent from the server to the client. Bandwidth here means throughput. The throughput for that 10 seconds of data transfer just random data, 1.05 megabits per second. That's the main thing we're gonna focus on because your task here is to measure the throughput. There's some other statistics as well. What happened is from zero to 10 seconds we transferred 1.25 megabytes of data and simply size divided by time gives us the throughput of 1.05 megabits per second. With UDP we must tell the client how fast to send. We use the minus B option. Let's send it two megabits per second and see what throughput we get. So another test, the server's still running because the server will just keep accepting connections. I only have to start the client again. Connect using IPERF to my server sending it, sorry, two megabits per second. We sent a two megabits per second and I had a throughput of two megabits per second. Let's send that 10 megabits per second. Sorry, that's the previous command. There was no minus B. By default it sends it one megabit per second. So if you don't specify an option it will use a default value. And yeah, the default was one megabit per second. Let's send it 10 megabits per second. So I'm sending data 10 megabits per second from my laptop to the server. And the server's recording how fast it receives the data. 10 megabits per second, fine. 30 megabits per second. Now sending it 30 megabits per second. Throughput 20.8 megabits per second. So now we start to see something useful. I'm sending 30 megabits per second but my network limits how much is delivered to the destination. In this case it limited to 20.8 megabits per second. Why was it limited? Why do we get 20.8? Why not 30? That's what your assignment is about. It's because I'm using the wireless LAN. So it's some measure of the wireless LAN throughput. That's as fast as I could send across my network. Because in fact I'm connected from the wireless LAN and then via a wired LAN. Out of time, that's a very quick demonstration of iPerf and you need to perform similar tests in using your laptop to your access point and then via a wired link to another laptop or another computer where you'd send one laptop to another using different sending rates and see what throughput you can get. Your aim is to discover what's the maximum throughput you can get and what impacts upon that throughput. So maybe you can change things to get a higher throughput. So that's just a quick demo to show you how iPerf works. Start it on a server and then start it on the client and it will do a quick performance test for you. Enough for today. Who's not here? Anyone? One, two. Two, three, four, and... Everyone but one, I think. Okay. Again? Well, this is it. Oh, the other things would depend upon your IP address, your computer. Here, I want to measure what throughput I can get across the wireless LAN, okay? So if I send 100 megabits per second, do you think you're gonna get 100 megabits per second throughput? Well, no, you know your wireless LAN is limited to 54 megabits per second. But in fact, there are other overheads with your router. So find out what's the maximum you can achieve. If I send less than the maximum throughput, then that's not a useful test. When I send it two megabits per second, I should get a throughput of two megabits per second. So one way to test is just to step by step increase the sending rate. And the throughput will keep increasing and then it will flatten out. And that will give you the main results. That's a start anyway. There, I got 22 megabits per second. It will vary a little bit. Okay, let's continue next week, finish on mobile IP and maybe some more questions about the assignment.