Skip to main content
 what is  internetworking and internet?
we have heard about the internet everyone knows about internet nowadays  internet come from internet working  this a collection of packet switching and broadcast networks  That are connected together so this picture is from a text so it's kind of older text so is they have the US backbone and the European backbone they're supposed to be like Thailand somewhere there and also there is leased line to Asia this Trans-Atlantic line something Like that so then they’re connected to the regional network and the regional network also connected to the LAN  inside of also connected to the LAN.  so it's becoming like smaller and smaller so that time we still have the Token bus and Token Ring in use a lot and then we have also the Ethernet  LAN so you can see that there is a national network from the backbone go to national network and then go to the smaller network like LAN . so basically internetworking means that you connect different networks that have different protocol different structure together and then make the data can be transmitted from the user that connects to different network to another user in anywhere  in the world  that is connected with the internet so that is a very interesting concept .


what is the glue?
glue holds the internet together. This is possible made possible by using the internet layer protocol or IP. IP come from Internet Protocol and IP was designed with the internetworking concept in mind from the beginning so this one is definitely designed for the Internet.

now let's look at the  internetworking term

the first one is communication network:-  communication network is just a facility that you can have you can transfer the data  among the devices attached to the network so it can be a communication network. if you can transfer the data between the users that are connected to the network  and Internet is the collections of networks connected by bridge or routers.

Example:-An Intranet if you are at  Kasetsart you may have you know ku.ac.th if you want to search inside of the KU you don't have to log on because if you have to log on to go out to the Internet outside of the university but for the network inside of the University you can you can search it  without going out outside of the network. So internet it's just the internet use by a single organization like Kasetsart university that provide the key internet applications. so we have the World Wide Web and it can also be isolated may be self-contained or can link to the internet so if you can experience after experience that you can get into some of the website that is like Kasetsart related website but cannot get in the outside world that is the intranet the sub network is just this look at like you know like the big thing as a internet and people think of this as like a single network and internet is like a network so it's like just sub-networks just some part of the internet end system or end user.


ES is a device that attaches to the network  Of the Internet that have user applications so you can have like emails or you can have like your mobile phone that can connect to the internet and have a lot of apps  have the intermediate system so permit the help with the communications between different networks and bridge is an intermediate system connect two LANs together that usually it uses similar LAN protocol there are some like kind of interchangeably between the bridge and router that people use nowadays  because but in the actual term  the bridge is used for same or similar LAN protocols but router is the network may not have the similar protocols so this one is operate at the router is operated like layer 3 of the OSI model but the bridge is operated at the layer 2 or the data link layer of the OSI model so it's kind of connect between different networks  but bridge is like operate at a lower layer you may have heard more of a router nowadays now let's look at the internet protocol the IP operation  suppose I have end systems A and B A is connected to LAN 1 and B is connected to LAN 2 so I want to send data from station A  to station B so what can I do you can see that there is a LAN A connects to a LAN right and there's a router connect LAN to the another kind of network which is wide area work  and this one it uses like frame relay  so frame relay which is kind of an older protocol of the wide area work  was so frame relay at the other end is also connected to router to LAN 2  so in this case you can see that you want to exchange the data between users in different LANs and through also through a wide area work   so you have both the LAN and the WAN together  so let's look at them at different layers.

 so this case we use TCP/IP so at A we have a physical layer MAC layer LLC layer which is kind of the second layer together MAC and LLC is kind of Data link layer together we have the IP Internet Protocol and it which is kind of a network layer and TCP is a transport at the transport layer  so at the end system A it has to the data go to the TCP layer IP layer LLC MAC and physical layer and you can see that at time t1 t2 t3 at time t1 you have at time t1 the data Go through the TCP layer so it has a TCP header and go to the IP layer so it Has an IP header so at time t1 the data look like this IP header TCP header and then data this is time t1 at time t2 you add LLC LLC header at time t3 which is at when you pass a MAC layer you have the MAC1 which is the MAC of the LAN1 header  in the front and also the MAC trailer in the back  then this is then longest then you go to the physical layer and then you send with a waveform or as a signal and then you go to the router what the router do is that it will go out to the internet protocol layer  so it goes to the physical layer and the MAC again as before go to the MAC the same as at time t3 so t3 and t4 it looks the same as this frame and then t5 looks like t2 over here which is the LLC and then t6 is like go back to the t6 go back to the first one which is only IP header TCP header and then data then the router Will just look at the internet protocol and then go to the so you change it will change the header  of the data link layer so that it can go through a different network which in this case is a wide area  network with the standard of the frame relay the frame relay has LAPF protocol L A P F so LAPF protocol so the router X here it will take the header of the LLC in the MAC out and it will put the header of LAPF instead so look at t7 t7 is the first one here only IP TCP and then data and then t8 t8 is here so you take the first one IP header TCP header and then data this one t8 is the fourth one you can see that there is for t8 you have The frame relay header in front and the frame relay trailer in the back and then in the middle is just TCP IP and then data so you transmit this at at the End of the WAN go to the router Y in this case t9 and t8 is the same still with the header and trailer of LAPF protocol  and when it goes to t10 at this point the IP protocol will take the header out t10 it will take the header out t10 is the first one again take the header out go back to this form of the first line and then at t11 the same t12 adds the header of LLC  t12 and t13 so you can see that t12 Has the header of LLC which is the LLC of the LAN 2 which may use different protocol from the first LAN and then at t13 add MAC of LAN 2 and the MAC the header and the trailer of MAC go to the physical layer again of the LAN 2 and then go back to the end system B and you will strip the header out  at t14 15 16 until you get until 16 you get the original IP header TCP header and then data again so this how it connected so they strip out the header and then put on the new header and use the router works up to the layer 3 of the They are considered the layer 3 of the OSI model because MAC and LLC is in the same layer  they are the sub layer of the data link layer now let compare the packet switching network architecture and the internet architecture when you look at the packet switching Network  you have kind of the user is like s1 s2  and then you have the node like P1 P2 P3 the node and T1 T2 T3 these are the links that is connected between the node inside of the network now if you look at the Internet architecture internetwork architecture you still have users s1 And s2 you can see that you have like router right R1 R2 R3 which is kind of the node the router makes the routing decision on which node to go to on which network to go to and in between of the router there is a network so the router connects to network like network one N1 N2 N3 so they are connected like this so if you compare them the router R1 R2 R3 perform or work do the functions similar to the nodes inside of the network the P1 P2 P3 it’s similar to the in the packet switching so what we have studied before like Dijkstra Bellman-ford flooding whatever routing operation that we’ve done in the packet switching Network it's kind of like we should be able to do in the internetwork also and the network N1 N2 N3 in the internetwork this’s just like the link T1 T2 T3 inside of the packet switching Network so if you consider it like that you can apply the routing algorithm to do the routing for the internetwork too again T1 T2 T3 the link is just like network 1 2 3  now the design issues let look at the design issues for the Internet the first one is routing the second one is Datagram lifetime segmentation and reassembly error control and flow control now for the routing as we have just looked just seen the picture before as I say you can do many kind of routing we can have a look up table in this case if you have like use the least cost algorithm for example and you have the routing table already so the end users of the routers  have the routing tables that you put  the best way to go from this LAN to another network is this way go to this router and that router something like that this can also be static or dynamic  if it's like the virtual circuit switching similar to that it's kind of static but this dynamic is kind of like the Datagram in the packet switching but in this case it’s in the upper scale increase the scale  to be like router of different network whether they keep updating the condition to make a new decision of which way to go if there is Any congestion in some of the paths or some of the paths is not working something that and you should go another way something like that but it is static it's like you always fix to go from if you want to go from this LAN to another LAN you always go past this router and then that router so that is static the second one is source routing this is an option this is the case that I will talk about that source is the one who sets the whole route  for a Datagram to send to in this case we may set it for security purpose or priority purpose for security is like when you want to use the infrastructure of the company that Or the military that you trust  if you have like sending a secret you don't want it to go to like fastest way or cheapest way what you want it to pass only on the military networks Or priority purpose like this one have to go like first  have to arrive it's urgent message something like that now the datagram lifetime what is the datagram lifetime it's about how long it will stay inside of the network because if you don't set the lifetime it will just stay inside of network indefinitely so it just will go from this one go to that one go to this one it will never die  so if you have a lot of people  input the data in and the data will not you know will live forever it will get congested and no one can send anything so in the IP field in the IP protocol in the header there will be a Field call time to live field and if the time to live is used up then you discard that Datagram and you can also set another way to set the time for the packet to still have stay inside of the network is you can use hop count or time count so hop count is like if you go 4 hops or if you go 10 hops you minus one for every hop when the hop count is equal to zero you discard the packet this is similar to what we've done in the flooding in the example in the flooding techniques another one is a time count like you stay for like five minutes first example or 10 minutes if not just discarded the third issue is the fragmentation and reassembly for this one because the message can be big the Datagram can be big it's Can be too big to transmit through some of the networks like the ATM network  asynchronous transfer mode that you have the cell that's very small only 53 bytes  and the data is only 48 bytes for per cell so if you send from another network usually it’s bigger than ATM so you have to kind of fragment it when you go from different network they have different constraint because you cannot there are many protocols that is already existed  but the internet have to be able to go through all of the networks with different protocols to arrive at the destination so you can have different packet sizes and so you can fragment it into a smaller smaller box  to get in through the network  with a limited length of network in the protocol and so you also need reassembly at the end system because if you have like small portion and you have to put it into the whole box or the whole packet original packet so you can do it at the destination now if you look at this you can see that you have the original IP datagram you have TCP header and then the IP header IP header for 20 octets or 20 bytes TCP header for 20 bytes and then TCP payload this is 384 octets or 384 bytes  so for the original IP Datagram IP Datagram is the whole thing here the blue and gray box  IP Datagram have the data length of 404 octets because the TCP header and the TCP payload become the data or the information field the payload of the IP Datagram so the gray is the like the data field of the IP Datagram consists of the data of 404 octets  this is at first there is no segmentation so a segment offset is 0 more is 0 because only one packet  then you fragment it because like for examples too big when you fragmented into to smaller datagram both of them has to have the IP header and you see the blue color here you have both of the segments have to have the IP header of 20 bytes then you have so for what I was talking about the ATM they will use the ATM adaptation layer instead of these because this one has too long of the header anyway you have in the first segment the data length is 208 octets because you divide the data into the first part into the second part  the segmentation offset  segment offset is zero because this is the first segment so there is no offset More is 1 which means that there is more packet coming the More can only be zero and one cannot be like oh 10 more packets or 20 more persons coming More is 20 it's not like that More is 1 means that this is not the last segment and this is the second segment you have the again the IP header and then the last of the payload  in this here the data length is 196 octets  segment offset is 26 of the 64-bit units so instead of saying offset by 10 bits or 2,000 bits or something they will look at it in terms of the 64-bit units which is 8-byte because one byte is eight bits right 64-bit is 8-byte by so is 26 times of 8-byte unit More is equal to 0 the 26 of the 8-byte units is 208 Bytes or 208 octets which is just this the first one has a data length 208 right because so it's offset by 208 so this one has the segmentation offset is basically 208 bytes but it will show it as 26 of the 64-bit units this is  fragmentation example the next one is the error control for the error control in the IP we don't guarantee any delivery of the message  so the router will try to to tell the source if the packet is discarded but no guarantee it may or may not tell the source and the source if the source knows that a packet is discarded it may change the transmission strategy maybe if it will wait for a little bit before transmitting the next or the packet That has been discarded retransmit it  because if the packet is discarded it may be because there's congestion inside of the network so maybe you should wait and in this case you will need a Datagram identification or the ID of the Datagram or the packet so that you know which packet is discarded and that you will need to retransmit if the feedback  to the source is needed IP will use the internet control message protocol or ICMP this one is a protocol that provides the feedback about the problems in the internet so this is kind of a special protocol to do the feedback the next topic that we should concern about is the flow control for Internet it’s connectionless system connectionless system means that you don’t make a connection like from the source to the destination first before you transmit  like the connection-oriented is kind of like the circuit switching that you make a switching of like every path  in between until you have a link  a direct path at the end from the from the sender to the destination but in the internet case you cannot do that they pass through too many networks you cannot control how many networks it has to go through and also the protocol so it is a connectionless system so we cannot do much of the control flow control but we can do a little bit for example if it’s like congested inside of network may be some uses ICMP to tell the source to slow down the data rate of the transmitted data rate or of the flow that the source send out so that there will be no more like it will ease the congestion inside of the network so the next one the next


Topic we’ll talk about either TCP/IP this is a protocol suite that we use together so this is transmission control protocol /internet protocol as I told you before the IP is connectionless so it's a connectionless datagram protocol and it's also unreliable unreliable means that is it has no guarantee  It will do it best to get the data or your Datagram passed through the network to reach the destination but it will it have no guarantee that if it will have to arrive 100% so this is kind of a best effort delivery service do it as best as it can but no guarantee so this is kind of an unregistered mail  Post office does it best and  normally the Mail's not lost  but anyway there's no guarantee if it is lost you don't know what happened  so if since IP is an unreliable  protocol no guarantee and if you want to have more reliable transmission you have to use it with a reliable protocol  another protocol to provide reliability which is the TCP that's why the TCP and IP are almost always used together they're commonly used together now the communication step in the Internet is that the transport layer TCP is in the transport layer and it's higher layer than the IP transport layer takes the data stream breaks it into Datagram  and then each of the Datagram is transmitted through the Internet  and as I told you before if it's too long and too long to get into some of the network it will be fragmented into smaller units and when all of the units arrive at the destination they will reassemble based on the fragment offset and the identification and then the Datagram  we will go to the transport layer of the destination because again I told you the transport layer is in the higher layer than the IP the network layer right so you just go back to the transport layer and the transport layer reassemble the datagrams into the stream the data stream to send to the user again now TCP/IP is a set of Protocols sometimes we call it protocol suite  define how all transmissions are exchanged across the internet and this is a very popular protocol suite  if we compare actually the chapter one I think we compared a little bit already about the TCP/IP and OSI open system interconnection which you may remember that OSI is kind of a model like conceptual model but no one uses it  it's not used commercially in practice so this TCP/IP are the one that is the kind of a de facto standard which means that like people are using it so it's kind of become sort of a standard because everyone is using it  so this is a dominant commercial architecture and developed before OSI so when OSI come out but people have used TCP/IP already no one want to change so it consists of five players the application layers TCP TCP IP network layer and the physical physical we don’t see here and the application layers of the TCP equal to the three highest layers of the OSI so in the TCP layer we call we call the block of data as a TCP segment but in the IP layer in the internet layer we call this one IP Datagram and a network layer We call it network level packet so it's different name for a block of bits  kind of a packet at different layers have different names  segment TCP segments IP Datagram network level packet now the TCP/IP protocol suite   have two of the transport layer protocols the first one is called TCP and the second one is called UDP so it's not only TCP that is used TCP is a Connection-oriented which means that you know which way to go  you have a connection before you transmit and this is so since most of the applications want reliably delivery so TCP is more widely used than the UDP because it Provides connection-oriented and reliable transmission but if you want it to be fast and you don't care much about reliability and security you can use another protocol that is called UDP UDP is connectionless so it's like you transmit like a Datagram one by one this one UDP is simpler than TCP and it’s used to transmit quickly don’t have like much need for the reliability and security as the speed so there's a need for speed more so TCP as I say that it provides reliable communication between pairs of users we call the users a TCP user process so it provides like a reliable communication between process across reliable and  unreliable network such as in the internet so even though the network is unreliable TCP can provide  delivery that is reliable so it's very popular  the TCP segment oh and also this is needed because in the Internet there are many many networks so some network may be reliable some networks may not be reliable so we rely on the TCP protocol to help us make a delivery that is reliable the TCP segment has a TCP header that consists of 20 to 60 bytes and then the user data the TCP header format which has a 20 bytes minimum consists of source port destination point for each of the line It’s 32 bits 32 bits means that there are 4 bytes because one byte is eight bits right so 4 bytes is 32 bits so you have source port of 16-bit destination port of 16-bit  32-bit sequence number 32-bit acknowledgement number  you have data-offset you have a reserve and some of the urgent Acknowledge push reset finish the special bit flag to tell you that this is reset or push or urgent something like that and you have the window this is kind of sliding window techniques that we will talk about later you have the checksum which is sort of the error correcting code the parity check bits you have the urgent pointer and then you have options and padding that you can put in there the sequence number  indicate the number of the first data byte so this indicates in term of byte so this is the byte of this TCP segment  so first data byte of the TCP segment  not the number of the TCP segment so kind of not the frame number but the byte number  for example this should be header TCP header over here you have TCP segment  and the sequence number is 3,001 in the TCP header because the first segment  because this statement the first data byte is byte number 3,001 to the last one is 6,008  the next one starts at 6,009 so the sequence number is 6,009 so you can think of the sequence number and acknowledgement number as the send sequence number and receive sequence number as we Has done in the data link layer protocol HDLC  however in the TCP the number will refer to the number of bytes not the number of segments or frames as we have done before the window size in the header Will use for flow control and you can reduce the window size but prior permission cannot be taking back which means that if you allow to send up to what byte you cannot for example I allow to send up to byte number 10,000 and then another minute I say oh I allow up to only by number 8,000 this not possible  how to set the window size how to use the window size and how to understand why the prior permission cannot be taken back  we will talk about this in the next video so this is the end of this video thank you 

Comments

Popular posts from this blog

type casting in C. - computer science fundamentals tutorial

Typecasting in C Typecasting is also known as "forced conversion". It refers to changing variable one data type to another data type.          Typecasting in can be certified into following two types: - 1) Implicit type casting. 2) Explicit type casting. Implicit type casting : - It is also known as "Automatic type conversion". It is done by compiler on its own without any external trigger from user. Generally takes place when in an expression more than one data type is present in such condition. Type conversion take places to avoid data lose. Example : - #include<stdio.h> main() {   char y = 'a';   int b = y; printf("%c",y); printf("%d",b); } Explicit Type casting : - This process also called 'Type casting' and it is user defined . Here the user can type cast the result to make it of particular data type. Example : - #include<stdio.h> main() { int m...

Important MCQ of RDBMS( Relational database management system)-FCST

Important MCQ of RDBMS  1. A RDBMS consists a collection of ? a. Tables b. Fields c. Records d. Keys  ANS/- a. table 2. The term attribute refers to a ___________ of a table a. Record b. Tuple c. Column d. Key   ans/- c. Column 3. In relational model, the row of table is known to be ?  a. Relation b. Entity field c. Tuple d. Attribute  ans/- C. Tuple 4. . Address field of a person should not be part of primary key, since it is likely to ? a. Dependent b. Too long c. Changed d. Not changed  ans/- c. Changed 5. The relational model is concerned with ? a. Data structure and Data integrity b. Data Manipulation c. Both a and b d. None of these  ans/- c. Both a and b 6. Which is the false statement from the following ? a. A veiw is a named derived table b. A name relation is variable c. A veiw is a named reation and is virtual d. None of these  ans/- d. None of these 7. The union of primary key...

Solve-write C program to find grade of student by using nested else-if statement

C program to find grade of student by using nested else-if statement Problem Description This program take input as your number then show your grade. Problem Solution 1. enter your marks as input. 2. then check your marks with 'If' block's condition. if it satisfied then show your grade as output. 3. if it not satisfied then it checks with all else-if block's condition repeatedly. 4. print the grade according to your given marks as input and exit. Program codes:-   #include<stdio.h> main() { int n; printf("\n enter the marks:"); scanf("%d",&n); if(n>89) printf("O"); else if(n>79) printf("E"); else if(n>69) printf("A"); else if(n>59) printf("B"); else if(n>49) printf("C"); else if(n>39) printf("D"); else printf("F"); } Program explanation:- 1. enter your marks. for example we take 70 . ...