Thursday, October 25, 2007

DCN 286 - Information on TCP....B/C You will be writing Essays On This ALL THE TIME!

What is ip and what does it do, what is ip’s job, Ip’s job is simple is to get our data through the internet as quickly as possible and that all its job is its job is not to make sure your sure data is safe Ip does not care about that and if it looses you’re data oh well, and not their for reliability all it cares about is trying its little best to send your data through the net as quickly as possible, ip runs not only in your computer, but in all the routers in the internet, client and server, all have ip, gets stuff done fast, you’re going to tell in week 14 about the total length (16 bits) it can theoretically take you’re data and put it into pieces 65,535 K the routers hate big packets, so if you accidently sent a big packet it would break it into fragements, if you approach a cisco router CISCOs default is 1500 bytes, you can change the router MTU bigger or smaller (maximum transmission unit) it uses the identification field so all the fragments have unique numbers, the router then takes a fragment offset value and see which position its on, middle first or last fragments so when all the fragments get to destination computer IP will reassemble the fragments in the original , TIME to live is how many hops a packet can go through the network, you can overwrite it depends on you’re OS, if the router can’t go to the destination it will get destroyed , last thing were going to tell him is the IP address, IP addressing 32 bits of total confusion, todays not ip but TCP, Tranfer Control Protocol, essays on TCP for the rest of you’re Seneca carrier, at first glance it looks very simple but very deceptive very complex, TCP provides reliability TCP/IP running on your computer, in the Internet cloud theirs huundred of thousands of routers, and all the routers are interconnected, the routers are also running IP when you pass the IP packet to the router and examines the destionation address. TCP is running in any server you connect to, what are you doing at home maybe you wanna download a picture of Pluto, www.nasa.org, scattered around the would there are DNS they have two database with NAMES AND ADDRESS, when you contact the DNS server send it a name and will return an IP address, TCP is going to provide realiability while you download the picture to do this it is going to use something called a port, a port when talking about TCP is a number a 16 bit number so 65, 535K, IEEE standards organization which came up with a list with internet application, DNS internet application, TELNET, FTP HTTP, anyone who, HTTP port 80, FTP port 21/22, TELNET 23 we are going to use FTP to download the picture of Pluto, the port numbers 0-1000, are reserved port numbers for legitimate internet application called Well known ports, over 1000 free to be used by any computer, Here you go you got the ip from dns and you know nasa, org TCP doesn’t know the address but attached to IP and its going to build a header information, default header size is 20 bytes and its going to start ot build port numbers destination port Destination port is 21, you can send lots of things to nasa.org you can try to telnet to nasa.org but you want to download something so you are using FTP, TCP will generate a random number will be between 1000, 65000, essentially its going to say this to the client machine to the server what your doing is TCP is opening a session between your client and nasa.org, there is now a session being established, to work correctly, when the seassion has been established the two machines can send data with eachother first open a session then send data then end the session, the session to be established though is a little bit complicated, a client machines sends segment to the server and will flip the two numbers around and send them back to you, here is the complicated part, TCP receives confirmation sends a third header switching it again, the two machines, when they are forming a session are negotiating with each other, before they need to send data, two or three things they must know, most important thing is how long does it takes TCP segment to go from here to the network and back again, the client initiates the second sending TCP record number 1 this machines looks at the system clock on the computer and record the time for the request of the session the little fragment goes flying through the network and sends it back and looks at the system clock again and now they know how long the round trip is going to know how long its going to take, lets just say it takes 1 second, but this machine does not know what it is and is the purpose of the third segment, is looks at the system clock, three headers, now both machines understands how long it takes to you’re computer and the server now it know it takes from it to you, other important things are being negotiated when tcp first came out, back when their was 50 computers and the internet tcp used sequence number and acknowledgement number for error checking, if there is no errors its going to send an acknowledgement number for error handling the sequence number in early days, use to start at sequence number 1 then 2,3(Frames) does not happened any , more, early days no hacking, sequence number was a hackers prayer, todays version of tcp, between the negotiation will pick another random number, you got 32 bits, what’s the maximum number 4 bil and change, so ip when its sending the initial request will pick a random number 0 -4bil and will stick it in the sequence number field (init sequence number) it will start counting at five when it gets it and when gets to the server another random number is chosen, to set this session we look at the little 1 bit of information when the client sends the first header its going to turn on the SYN (flag 1) when it sends the reply its going to turn on the ack bit (1) when it sends the third reply its going to turn of the syn(0) and send a reply, you notice tcp full duplex protocol, theirs multiple downloads, so lets see how it transits data, how weird is it? Where going to ftp to send data FTP, is a simple protocol, once the session is established it starts reading in data one byte at a time, when ftp thinks its got enough for one segment it will screen the data 1 byte of a time, and codes the bytes 1, 2, 3(bytes) if you left tcp alone it will leave it in your computer it would literally blow your memory of your computer, TCP says I think its enough data (100) bytes and knows the intial sequence number was 5 now its 105 and its going to do error checking on that 100 bytes, using Checksum an algorithm that makes sure theirs no bit errors and if there is no error bit its going to build the acknowledgement number 106, and turn on the acknowledgement number, then the server goes onto the next 100 bits and acknowledge number is going to go to 205, the data gets send tcp does error checking, the machine will build a twenty byte header and positive acknowledge number 300, if you peer closely of the little 1 bits their was a error, what would the server do? What tcp does is unique, TCP does nothing, TCP was written in such a way, TCP looks at the system clock and record the time, if theirs not a positive ack in 1 sec, tcp will automatically retransmit the packet, TCP will notice that the two packets with the same sequence number and discarded one of them, at the end of the session and all the data is sent it goes through a complex procedure to close down the session and we don’t have to worry about till next semester, Window the third thing the initial size, depending on the OS, link between tcp and the operating software, if your using Windows, windows will direct tcp will have an initial window size of 64K, Linux has much smaller window sizes 2k, the bigger the window size the easier you make the hackers job, when the session is nogiated it’s a initial window size, two tcp start sending data, lets say they start small window size of 2k, tcp will actually monitor the number of errors are their, if tcp ‘thinks’ the network is good today because of no errors either machines can increase the window size, and if even more it will increase, tcp increase and decrease the windows until errors start happening, window size is really how much memory is going to be reserved on each computer, the application determines how much or when to send data, it tells tcp heres enough data, and will turn on the push flag and could receive the blocks of bytes and save it in number, when a tcp receives a packet when its turn on it will saveit and push it into the application, its how much memory in each machine is going to be used, ultimately IP is going to see the packet size, Window size is the amount of memory to save multiple tcp pieces, Urgent Pointer and Urgent bit till next semester, for now all we have to know is TCP header and a big pile of data following the header, lets say for some reason the application wanted you to read a specific data that not right on the front it will turn on the urgent data and will read the password which was 100 bytes in, save till next semester. TCP and IP are mentioned numerous chapters into your computer, write essays in week 14 and put these two topics in test TWO to get some practice.

TCP
Source Port(1001) | Destionation Port (21)
Squence Number (00000101)
Acknowledgement Number
Data Offset| Reserved |URG(1)|ACK(0)|PSH|RST|SYN|FIN | window
Checksum | Urgent Pointer(1)
Options + Padding


VERSION IHL TYPE OF SERVICE TOTAL LENGTH

What is a collusion domain, HUB with ports, you got a HUB the simultaneously the collusion will interfere with all the toerh computer, and the chaos is extened to every machines (CD) and the more machines the more chance of collusions happening, Switches are employeed to reduce the effect of collusions of your network, switches break it up to separate collision domains, SWITCH 5 ports and traditional little network hubs to each port and then attached to networks, no the hubs machines are in a collusion domain but if a collusion hapends here and will have no effect on the other domain, Switches reduce the collisions, everything we put on here is its own little collision domain, today happy networking use a process called micro segmentation, what does that mean, networking guys today have virtually eliminated collision through high quality switches and having one machine on each port on a switch their can be no collisions , micro segmentation imply switches and are all into switches Cut THREW switch does what, when a cut threw switch reads the frame it immediately checks the destination address, will immediately set up a channel source and destination port, if you got a nice safe environment, Seneca college, you use cut threw switches, how ever if the environment is a little shakey, in that environment you use STORE and FORWARD switch that has huge amounts of memory and will read the face and its entirety and store the frame where it does error checking, and if the frame takes it and there is no errors it will send it to its destination,


Does not matter which but it can get to one work station through its port, now we want to talk about subnets, switches are datalink layer devices routers are network layer devices, we are one originations and we sell stuff on the net the switch to the computer and the server, we need to sell stuff on the net so we need to buy a router, we need a domain name, our domain name has a associated ip address 200.1.1.0 (ClassC) we hire a networking switch 200.1.1.254, we got a problem cause were in Toronto and going to Vancouver, to they subnet to create it so they can expand and have their own portion, to create subnets its an easy thing don’t matter what class, you create them the same way you play around with binary numbers,windows create subnets a dumb way, and use a short cut and don’t know when there is a lot of subnets, the correct way is to play with binary numbers, which numbers
Network Address 200.1.1.[0] in control of the 4th octet, to create subnets take the host bits and write them out in binary one rule to be applied to subnets by convention we never use all zeros or ones, so we have two left to indicated subnets 00 01 10 11 so 01 becomes Toronto while 10 becomes Vancouver. [00]000000 to indicate if its Toronto or vancouver
SN
00|000000
01|000001 [65]1*
01|111110 [126]2*7th -2
11|111111

We turn on the host bits and the subnet
255.255.255.192 which is the value of [11]000000
1* the address can be added for example 010000010 and moving the 1 up to the numbers
The last number and the range there for becomes 65 – 126

Vancouver
SN
10|000001[129]
10|111110[190]

NOW WE NEED THREE SUBNET IDS with 001 = T. 010 = V 100=LA
001|00001 [33]
001|11110 [62]

No comments: