Lesson 7: TCP/IP Basics
I. Standardizing Networking Technology
Published in
4 min readApr 7, 2015
- diff companies have diff protocols
- novel netware uses IPX/SPX
- microsoft uses NetBIOS/NETBEUI
- apple uses AppleTalk
- UNIX uses TCP/IP
- UNIX’s protocol won
- microsoft’s software is called the IPX/SPX on NWLINK for Netware server, on the Network+ exam, this is usually the wrong answer
II. TCP/IP Protocol Suite
- powerful bc packet is compatible with any type of network technology
- the physical layer (LINK LAYER) is not part of the TCP/IP suite
- ie, the Ethernet, cable modern, DSL
- only account for the software layers
- the higher you go up the model the more headers are stripped away until all that is left is data
III. Internet Layer
- the IP works at the Internet Layer
- it takes date chunks from the Transport layer and add addressing to create the final IP packet
- a full IP packet header has 14 diff fields but some of the important ones are here:
- version = IPv4 or IPv6
- header length = total size of the IP portion of the packet in words (32-bit) is displayed in hl field
- DSCP = differentiated services code point contains data used by the bandwidth sensitive applications, for ex: voice over IP
- time to live = routers on the internet are not perfect and sometimes create loops
- TTL counter cannot start higher than 255, usu. starts at 128
- protocol — usually TCP or UDP
IV. Transport Layer Protocols
- transport layer determin if data moving btw two systems is connection-oriented or not
- transmission control protocol — reliable
- user datagram protocol — fast, not reliable
- you cannot choose TCP or UDP, the web browerser uses tcp bc the app layer protocol HTTP is built upon TCP
- ACK/NACK process or just ACK = rule for receiving and sending machines to acknowledge e/o’s presense
- data is called “segments” at TCP, each has sequencing number
TCP HEADER
- sequence number = used to assemble/disassemble data
- ACK number = tracks the readiness of two communicating systems to send receive data
- flags = give both sides detailed info about the state of conneciton
- checksum = checks TCP header for errors
UDP HEADER
V. IP Address in Depth
- 32 bit value (32 binary digits), broken up into 4 group of 8
- use ipconfig /all for window and ipconfig for unix-based system
A. IP Addresses in Action
- IP must do 3 things to communicate data to both computers in its LAN and WAN:
- Create some way to use IP addresses that each LAN has its own uniq id
- Interconnect al the LANs using routers and give those routers some way to use the network id to send packets to the right network
- give each comp on the network some way to recognize if a packet is for the LAN or for a computer on the WAN
B. Interconnecting
- router connects individual LANs into a larger network
- default gateway = needs an IP address on the LANs that it serves, so it can correctly route packets
- most net admin config the LAN-side NIC on the default gateway the lowest host addr in net, usu the host ID of 1
C. Subnet Mask
- every TCP/IP has a tool to tell the sending computer whether the dest. IP addr is local or long distance
- subnet mask — string of binary number, 32 bits
- ex: 11111111.11111111.11111111.00000000
- octet to decimal is: 255.255.255.0
- portion of the ip addr that aligns with ones is the subnet mask ID
- portion of the ip addr that aligns with zeros is the host ID
- the PC compares the dest. IP addr to its own IP addr using the subnet mask,
- if the dest. ip addr matches the computer’s IP wherever there’s a 1 in the subnet mask, then the sending PC knows the dest. is local
- if it is a local call, the sending computer sends a broadcast to grab the receiving computer’s MAC address susing the Address Resolution Protocol (ARP)
- if the receiving computer is not a local machine, the sending computer sends an ARP request to the default gateway
- by definition, all computers on the same network have the same subnet mask and network ID
CLASS ID
- IANA ( Internet Assigned Numbers Authority) was formed to track and disperese IP addr to those who needs them.
VI. CIDR and Subnetting
- Classless Inter-Domain Routing (CIDR) — new way to gen. new blocks of IP addr
- subnetting enables more efficient use of IP addr compared to class licences
- separate a netowrk for security and for bandwidth control
HOW TO SUBNET
- take existing /8 /16/ or /24 subnet and extend the subnet mask by adding more ones and taking away the corresponding number of zeros