TCP – get you’re their correctly provide realibility, the network can move your data through the network which is highly error prone, Routers only know IP,
Tcp is only run in client, passes data in ip and pumps it into the internet and goes through the network at high speed, at the other end there is another server.
You can write software that only uses IP, TCP cannot exist on its own, their no purpose for this.
Some are connection-oriented, and some are connectionless, IP is connection less, TCP is connection oriented, that means TCP establishes a session, to establish a session with another computer probably with a server somewhere in the world, to do this, the Cisco course calls it the three way hand shake, This is the tcp header when you log into the internet and try to create a session, your client machine will send 20 bytes of control information,
Source Port, Destination Port, a port is a number a special number,
Few internet applications HTTP, ftp, IEEE got a lot of application so they gave them a number HTTP:80, Telnet:22, FTP:20:21, these numbers are well known ports.
FTP work with TCP to give you a nice picture, TCP will provide the reliability, the
Destination Port will be 20
Source Port – Random number greater then 1000,m less than 65,000, the server knows theirs a session random 6666 SD, because other people want to log in and it will pick another random number for the other client machine.
Something can happen where they pick the same random number, what will happen in this case it will not work cause the session will be already established
This leads us to the three way handshake, when the client request, the server will send 20 bytes of information, SP DP,
Why this three way thing the client and the serer, are establishing certain factors, they are negotiating the parameters that are going to be used in the session.
Clients initiate session, servers never initiate session
the first 1000 numbers are reserved
For test one, only worry about a couple of things that are being negotiated during the three way handshake.
TCP is viewed as a streaming protocol, it streams data from one computer to the next 1 bytes of a time.
Ftp all it does rid stuff of ur data and pumps it into tcp, and tcp starts to carry the bytes 1 2 3 4 5 bytes, its carrying the bytes cause it doesn’t want to loose any, it wants reliability so it counts the bytes.
The Sequence Number ( 4 bytes long )and the Acknowledgement number (4 bytes) keep tracks of the bytes that are transmitted.
Old days the sequence number would be 1000 bytes and so on, so one of the things that is negotiated when you connect to a server, 1st version started at 1, great for the first years, when the internet what new, when you wanted to hack into someones session, you just had to predict someone was establishing a session, you can muscle in the three way handshake and interfere with the process,
What sequence number are we going to start at?
Now it is a random number something between 0 and 4b, one of the three things a three way hand shake does when you send the tcp header it will pick a random number 0 and 4billion.
So SP 6666 | DP 20| SN 2|
Also another bit called the sync bit, the server will flip SP DP, the client machine will pick an initial sequence number, the sequence number is a count of a number of bytes by the tcp program, tcp counts the number of byes, it don’t matter what internet application it is, every byes it precious, the initial sequence number where it will start counting from, lets say its at 100, and tcp receives 100 bytes from ftp, it going to send 100 bytes, because it started at 100 and sent 100 it will then be 200, the server will do error checking, Checksum, it will send back to you in the Acknowledgement, and it will say it got 200 and the next byte it wants is 201, send another 100 then the SN will be 300 and the ack will be 301.
The first thing tcp doing is both machines establish an initial sequence number, they do this by sending one header, the second thing that happens when sending the three way handshake,both macnhines must have a good approximation on how long it takes to send a packet to eachother, tcp relies on time, a great deal, tcp operation relies on understanding how long it takes to send and to get the reply back, don’t forget the internet data can get lost in here, tcp is more accurate than 4 seconds, when the tcp tries to establish a session it will record time on the systems clock, then it will send the packet and send it back,and it will know when it sent and receives stuff, but eh server must also know that’s why we have the third hand shake, the first and second establish the throughput time rate and the third packet is send, then the server machine knows how long it takes from the client to the server and server to the client, vital for tcp, tcp is a weird protocol, TCP all it wants to know how long does it take to send and receive a response.
(IP puts the data in correct order) tcp counts the bytes, makes sure the sequence and ack are consistent,
Two tings negotiated, is identifying the initial sequence number, making sure both machines know the round trip delay time, establish a session number and a time related to sending a receiving data.
Acknowledgement number, - when you send 1000 bytes the client machine will do error checking it will send 20 bytes and it will say ive received 1000 bytes the ack should be 1001, the next time 2001, the next time it will be 3001
ACK 1 bit – a positive acknowledgement, the ack means a positive ack that means your tcp has done error checking on the data you have received. No such thing as a negative ack. Tcp is the only one that does not have an negative ack. If the server does not get a positive ack it will resend the data to the client.
Window – size – is influences by the operating software that tcp it running in, first big surprised TCP works will the OS you are working with, it influences tcp, How big is the windows size, tcp receives data and it counts the bytes, it has a max bytes it automatically sends it. The max amount of bytes is the window size, its 2 bytes long, what the max value, 64k, fact the bigger the window the window size the easier to hack, Microsoft has 64k, Linux it depends like 1k,
2nd things you have to know, its not fixed its a dynamic number, during the actual transmission of data the window size will change, window can start at 1k increments, tcp is changing the window size dynamically, both tcps will send the 20 bytes with or without data increase or decrease the window says, the number or lack of errors,
CHECK SUM – CRC standard error.
Nothing about the urgent pointer, nothing about the last thing,
Fin 1 bit - the server is sending thing to you , the very last byes by the server the final bit will be turned on
First initial sequence number
2 establishment of round trip time
3rd windows size
Ethernet
What does Ethernet do and How does it work?
Its still evlolving, the IEEE and other groups, its still growing protocol, things Power Over Ethernet…..so many….back to beginning.
Created in Xerox corporations, they invents a NIC using a very simple protocol, they called it Ethernet. The reason this survived, far more technical things like Token Ring, why this dispeared it was so simple and basic it literally cant go wrong, its easy to install, a NIC has this,
Tell him next week
Ethernet also known as 802.3 operates on three basic principles, the first principal is called
Carrier Sensing – listen to the wire,
Ethernet is braod band tech, it means it takes the entire bandwidth of the cable which means only one machine can be sending data at a time, here we got four machines on the network, with one server how does it know its not being used by the network, the NIC has a volt metre, send data to nic it compares to data to be tranmitted the volt metre will test the cable to see electrical activity, if theirs zero volts then the network is free, so the nic takes the data sends it, data is not sent until until the network is free, CS,
The second attribute is something calle Multiple Access, fancy way of saying at any point in the network you can install work stations, and it will work admidately, every NIC has a unique MAC address, IEEE will give you a manufactures code number, each NIC has hardwired address the the first three bytes the company, the last three is a sequence number, all nics have different addresses, you can simply attach workstations and they are operational
The third attribute of Ethernet is Collision Detection, it’s a very simple thing, bad form of connection control,
One machine access 1 some 9, both test the line at the same time and both realize the network is idle, they do it at the same time, this results in the two machines building the thernet frame and sending it out, what happens the pulses will destroy eachother, the more machines the more collisions, Ethernet knows it happens Ethernet has a strategy, any machine, the server detects nasty pulses any machine, the NICS are constantly doing this, any machine on the network that discovers a collision sends a very special frequency like a squeal, a jamming signal, to every machine on the network. Both machines retransmit but not at the same time, this is the smart trick, when collisions happen they wait a random amount of time,
The Nic builds the Ethernet frame, the os sends data to the NIC the NIC builds the fram out of your data what does the frame look like, NIC a little bit of memory, what does the frame look like, it will take yuour data and break it up into segments, packets, how big is an Ethernet frame
All protocols segment and reassemble ur data, takes your data and breaks it into frames, the max size of the frame is 1500bytes, breaks data into units called bytes infront of the 1500 bytes its puts header information the
Source Address is the Mac Address 6 bytes long, three bytes man three ,
DA also six bytes, in theirs
2 bytes that can be confusing, is the length of the data.
The IEEE stepped in and all LAN to work together and standardized things and made a change to Ethernet its going to be Type Field.
NOVEL oracle data is a type, apple talk a type, all modern NICs have a type field.
IEEE first couple of bytes indicate length
The front 64 bit preamble 10101010101010101010101010,, used the sync transmission of the frame every frame establishes sync through preamble.
Last piece of into 4 bytes, very effiecent error checking CRC or FCS,
Some equipment such as switches actually do error checking, but there is no provision in Ethernet for handeling erros, NICS and switches do error checking but if there is an error dump the frame, there is nothing in the header for re-transmit the packet.
Ethernet is a delivery boy it relies on high layer protocols to handel any errors, designed for speed.
After reading week CS changes to CA, when u get to gig connection.
Theirs a min for data which is 46 bytes, it will pad the rest of the bytes if its smaller then 46 bytes.
No comments:
Post a Comment