12-TCP/IP Layer 2 - Theory Shall continue… - Talking today about Layer 2 - Internet Protocol - IP - Focused on getting information from one Computer to another anywhere else over the internet - Today, going to focus on Defining 3 very important terms: - IP address - Netmask - Router/default router/default gateway - The internet started off using IPv4, or the Internet Protocol version 4 - running out of addresses, since the internet is bigger than anyone thought it would ever get - eventually moving to IPv6 - going to ignore this for now - Also going to ignore a new invention to circumvent this shortness of IP addresses, called NAT - Network Address Translation - going to cover this in a later show, but will ignore it for now for simplicity's sake - IP Address - unique address for each machine on the internet - Whole point of the internet is to get information between IP addresses - What do they look like? - To us, four, 3 digit, numbers, between 0-255, separated by dots - xxx.xxx.xxx.xxx - anywhere from 0.0.0.0 to 255.255.255.255 - To a computer, 4 binary numbers, without the dots - IP addresses cannot have values higher than 255 - *GEEK TIP* - Why? Because 255 is the greatest value one byte can hold. - Routers don't and can't remember where each Individual IP address is - they break the internet up into chunks - e.g. - All the IP addresses with Bart's Irish ISP are over there >>> - All the IP addresses with Verizon are over there ^^^^ - etc. - They do this with Two Important Numbers - Net address - Net mask - Net addresses are related, i.e., in the same chunk, if they start with the same numbers - Netmasks tell us how much of the IP address is related - looks like an IP address, but with only 255 and 0 - a 255 says what is the same - a 0 says what can be different - e.g. 255.255.0.0 - Common Subnets - Class C - all but the last numbers are the same - xxx.xxx.xxx.5 and xxx.xxx.xxx.6 - subnet = 255.255.255.0 - Class B - first two numbers have to be the same - xxx.xxx.5.7 and xxx.xxx.8.4 - subnet = 255.255.0.0 - Can be more than that, but those are the only ones you are likely to see - Router will assign each machine in your house a related IP address - the part of your subnet mask that is a 0 is the part that will be different - Computers distinguish between IP addresses that are on the local network, and those that are elsewhere on the internet - those packets for the internet are sent to your router/default router/default gateway - Bart Busschots - bartb.ie - impodcast.tv - podfeet.com