Thursday, October 25, 2007

DCN286 - Information on IP...GOOD INFO

Browsers are not internet applications,
HTTP, TELNET, FTP, DNS --- APS
All internet applications were written so they can link with the transport protocol, all these applications work with TranferControlProtocol and UserDatagramProtocol , you can do a lot of things with this write C++, Two guys wrote YouTube.com they used an idea that anyone in the room can do, they wrote an internet application that was very successful, the science behind it is common, DCN386 writing an internet application program…they use a ApplicationProgramInterface…this tool will hook this application right into TCP or UDP, TCP what does it do? Tcp does very little actually it provides reliability into your internet transmission, here is beautiful drawing of the internet CLOUD with a bunch of router drawings along with you on the side at home on the net…and on the left the ISP….The first thing you have to know about the internet and how ti works when you send packets of data in to the internet you sending it into a hostile environment…it is dangerous inside the cloud…ROUTERS which we think is a our best friend…it turns Routers hate packets they detest them they only get rid of them, but the easiest way is to move it to the next router…because its such a hostile environment TCP running in your computer and the SERVER in which your contacting TCP tries its best when Routers destroy you packet TCP will contact the server and ask it to retransmit the packets…TCP will keep trying and keep trying a router does not know anything about retransmitting stuff…so TCP just runs in servers or clients it doesn’t run in the internet its reliability in each end. UDP on the other hand is a stripped down version or TCP…error handling is not in that UDP is unreliable while TCP is reliable…Why would they use the unreliable and a reliable, UDP faster then TCP, depending on what you want to do…the rule says if you sending tiny packets into the network…use UDP because the chances of an error is small so send your tiny packet through the net as fast as you can…ok lets look at a lot of a big picture…going to nasa.com to get a picture of Pluto….nasa.org will create DomainMain(its Name(lol))Service…global system where you type in nasa.org and it will go find NASA’s ip address…so your typing it in and DNS will treat it as data and will look at the data to the closest DNS server….its a tiny amount of data…What do you think DNS uses…obviously UDP…DNS always uses UDP…okay you got the ip addresss… TCP will pass to a program called IP and will send info to nasa.org that has a big file..pluto.jpeg now that’s big files and its going to be downloaded using FTP its going to download a lot of information…big packets are involved…what do you think FTP is going to do? FTP is running on the server nasa.org…it read the file and sends it into the internet FTP always interact with TCP because it doesn’t want any mistakes these two programs only run on the CLIENT or SERVER machine they have to no part into the Internet…it just knows reliability. How does TCP get itself through the network it will read the |data|F(header file)|TCP puts a lot of control information on it 20 byte header to be exact| this then passes down to IP everything uses IP…this get passed down |data|TCP|IP(20bytes of control information|), both have 20 bytes of information its 40 bytes of information must learn all 40 bytes for test two…TCP can deliver anywhere in the world…IP doesn’t know how to get into the cloud its great when its inside the cloud but it has no clue on how to get in their, what does IP do it sends it down to 802.3, NIC you put in it’s a Ethernet NIC…Nic will send it and you ISP is inside the cloud. Ethernet is going to deliver that packet from your computer to your ISP…whats in the Ethernet |data|TCP|IP|Ethernet … when the ISP gets the packet it gets read of the header and strips it off and passes directly to the Router inside the cloud Ethernet delivers the data. Now the IP packets inside the cloud it can be delivered to the destination Address..when it gets close to the router where the information is …its forwards through the routers and before it goes to the ISP and is re-stripped from the Ethernet frame. The internet is a popular their. IP we have to figure out how IP works….first thing we have to know about IP IP like routers does not care about your data…it doesn’t careless if you packet makes it or if it doesn’t. IP makes the best effort through the network as quicklWy as possible…HOSTILE. Where going o look at 20 bytes of infor
0 4 8 16 19 31
| Version | IHL | Type of service | Total Length |
| Identification | Flags | Fragment offset|
| Time to live | Protocol Header | CheckSum |
| Source Address |
| Destination Address |
| Options + padding |

The very first bits look at Version it will look at 0100 the binary level which equals 4 it will all have four bits of information…sooner or later your ISP is going to be version 0110 version 6, a couple of years ago he would say version six will be introduced right away…the IP address is 32 bytes long…the classes made it less effective and proved to be not a great idea and ran out , for a start the IP header has 128 bits, when IP version six comes out, he can go around the world in one square feet increments, in version six each square foot will have million in the square foot…the reason were not panicking anymore came up with something Class List Ip ADDRESSING because of that the full amount of IP address can now be access and now it is being revised…somebody’s brain wave made v4 not needing v6 but Linux. Their will be a compatibility with each other v4 and v6. The next four bits are equally boring Intial Header Length….(20 octets (20 bytes)) if we were creating are own internet application and wanted to test it out we would use something called options…Options is a little bundle of tools that will let us test are application…never do unless you writing your own internet application…..Ever heard of a little application Python…he took look of Python and thought of us…Python already has (application program tool kit to write applications) Python just installed in the Cisco lab…make your own client and make your server…...Type of service.. IP is probably the same age of us it was written quite a while ago..its been around for a couple of decades for 20 years all routers in the internet ignored the 8 bytes…all of a sudden few years ago its become the hottest 8 bits Quality of Service in Networking, we got to worry about the 8 bits…something happened recently another internet ..downloading Movies Voice and Media…Type of Service came important some packets are going to have priority of other packets. Router has serial ports and Ethernet ports…packets come into the router… routers temporarily store IP packets were talking nano seconds it just buffers them in old days they would look at ToS but now routers are starting to examine this Type of Service, this particular packet is in the middle of the buffer but has quality service and will process it first…just understand that some routers can treat some packets as priority packets…Total Length…that means that Total length for Data|TCP|IP the data and the control information ..Ponder how big can an IP packet can be 65536 (64 k) that is a big packet…64 k packet if you were foolish enough to write a program to send out 64 k you would be sorry…. Routers hate big packets they despise… they wont destroy them they will take your big packet and chop it into little fragments of the original packet… all routers do this… hard to comprehend.. when we go to cisco lab on wed and we look at the router and start configuring the router they have a default maximum tramission unit size… if it receives a big packet it will be MTU’s its 1500 bytes… because that’s what Ethernet uses….Lets drop a nice big packet | 4500(chop into three) |(20 byte header)

| (1500)[ID010] | (1500) [ID100]| (1500) [ID001] | - contained in the header info is the destination it chops up and put the header infront of each fragment.

How does the server know that they all belong together because the server gets all the fragments has to put them back together HOW DOES IT KNOW the three fields of identification flags and fragments offsetthis is what indicates the fragments belong together…IP before it sent the packet it picked a random number and put it in the Identification field you’ll notice it will be 16 bits its going going to be 0 – 65535 bytes… when the router breaks the big thing into pieces each fragment will have the same identification number and knows they are fragments and have to be reassembled back into the frame ,….wait theirs a problem went different ways…How does IP manage to reassemble these three fragments…they would look at the fragment offset...
|5000 |3000 |1500 | |byte 0 its going to read them and store them temporarily in memory…it takes the data read the offset and puts it in memory but by the OFFSET of 3000… it takes the 5000 and puts it the 5000 OFFSET…sequence failed, what if the sequence 1 get into the a grumpy router fragments can get fragmented….The Flags are three bits long…only two of the bits are used the first bit is a strange bit.. if the first bit is turned on that means that ip examining this it means DO NOT FRAGMENT its called a do not fragment bit…it was originally designed to send out and see if you get anything back… if a router got that packet with the do not fragment it will destroy it… the second bit means Last Fragment Indicator, this is used so after it knows it has all the fragments because of this bit. It knows it has the last one in the series…8bits Time to LIVE….what does TCP/IP care about to time to live… what if we purposely put a destination address that does not exist, theoretically our packet can go through the world…Time to live when your IP sent the packet out it put a value in TTL it will be some value from windows to LINUX from 1 -255 and the default value is 32bit, it will subtract the value and it will eventually go to zero with the zero packet will destroy it….sending a packet out of Seneca it probably …www.bagpiprepaire.com do a trace route and you’ll see it…. Protocol not a very important field it simply means TCP create the this packet or did UDP create this packet, and will use a different code for each so when the packet delivers the packet it look at it and will be like deliver it to TCP or IP. code maintained by the IEEE, IP can run with a lot of other protocols…Raw sockets, you just use IP on its own… third code….IP does not care about your data….Header Checksum.. Does IP do error checking…yes it does error checking only on the Twenty bits and only looks at the the IP address….WE have to totally understand the IP address because in test 2 we are going do questions called Subnet ting questions and to do Subnet ting we have to understand the IP address really really well. Early start on subnetting. Guys that created the IP standard, origanilly created class addressing… what can you tell to determine the class of the address you simple look at the first byte. IP addresses are four bytes long.. class a determined looking at the first byte they all have a zero of the first bits of the first bytes leaving seven bits , the other three are Host address and class B are 127 (127 is special called LOOPBACK. Used for testing) B 10111111 128-191 C 11011111 192-223, How many class a’s 126, 65535kb, class C 254 hosts. Working in groups of two ooo, we want first stations to the other station through two routers what have to do to achieve this is do something configuration file, basic configurations.. apply IP address to the PORTS we want to apply ip address to those ports.. they will learn how to send stuff through a network… all we do is provide the initial information and press on the routers will figure out what to do, Lets say have an ip network and were going to use a class a address 10.0.0.0 that number means the entire network but to a router they don’t see one big network but THREE subnets, how do we break it into three subnets we are going to use a Subnet Masks, this allows you to create these subnets in the first place… you see if we just had the network number and we plug them in we wouldn’t know which router can get the total packet.. so we use the mask 255.255.0.0 if for some reason we didn’t wanna create subnets we could give an ip address 10.0.0.1 we have to put a 10.0.0.1, 2, 3, 4, 5, 6 in each port, things get broken into subnets…we wouldn’t do it without the subnet and we would still have to have a mask and have a default mask 255.0.0.0 a one byte means this bits parts of the network ID if we wanted to know subnetting we take the second byte and will be used to indicate the bits are subnet bits hence if we wanted to do that we make 255.255.0.0 11111111.11111111.0.0.0, we will change the purpose of the bits and when the router recivies the packets will receive that packets one being the counter and one the subnet….Look up subnetting…

No comments: