120 likes | 321 Views
Internet Protocol. How does information get sent from one device to another across a WAN?. The network layer. The purpose of the physical layer is to provide a physical mechanism for transmitting data as signals.
E N D
Internet Protocol How does information get sent from one device to another across a WAN?
The network layer • The purpose of the physical layer is to provide a physical mechanism for transmitting data as signals. • The purpose of the data link layer is to ensure the integrity of the data sent over a given physical link. • The purpose of the network layer is to provide a mechanism for data to be sent from one device to another over a route that might span many different physical links. • Routing is the process by which data is directed across multiple links from one host to another.
Logical Addressing • The data link layer uses physical addressing, such as MAC or NIC addresses, where the address is tied to a specific physical device. • Network layer protocols use logical addressing, where a given device can have multiple possible addresses.
IP Addresses • Each connection to the Internet is given an IP address of some for or another. • No two connections on the Internet can have the same IP address at the same time. • However, these are still logical addresses because a given connection’s IP address can change, or it can be reassigned to a new device if the first one is disconnected from the Internet. • If a given device has multiple connections to the internet (such as a router), each connection needs its own IP address.
Old school addressing: • All current IP addresses are 4 bytes. • Once upon a time, IP address were arranged somewhat hierarchically: • The first byte would indicate the class of the site, usually reflective of its size. • The second byte would further uniquely identify the site. • The third byte would be the subnet within the site. • The fourth byte would specify the actual machine. • This was wasteful. Small organizations like Carthage did not need 65,546 IP addresses. Lots of potential addresses were being wasted. • This was fine when the number of machines connected to the internet could be measured in the hundred-thousands. • Now that it’s creeping up on the billions, not so fine.
Modern addressing • Modern addressing largely does away with the hierarchy. • Instead, organizations are assigned address blocks. • These are groups of contiguous addresses • A block must contain 2n addresses, where n ranges from 0 to 15. • The first address in a block must be evenly divisible by the number of addresses. • The first address in block is the network address, which is the address that identifies the entire organization to the Internet, particularly routers.
Within an address block, the organization is free to divide and allocate those addresses however it sees fit. • The network address must point to the network’s router, which is responsible for forwarding packets out to the appropriate machines on its network. • Some organizations may choose to subnet their network. They divide their address block into smaller blocks. However, the rules for subnetting are the same as the ones for assigning address blocks.
Network Address Translation • For small organizations such as your house or Carthage College, the ideal scenario is to have each one use as few IP addresses as possible. • The NAT protocol achieves this by, in the limiting case, allowing an entire organization to be represented to the Internet by one IP address. • Certain IP address blocks have been set aside as private networks, where anyone can use them. • A NAT system has one device connected to the internet, such as a router or wireless router, which has a single IP address. • Devices behind the NAT router are assigned private network IP addresses by the NAT router. All traffic to these devices goes through the NAT router.
IPv6 addressing • It is almost a certainty that we will run out of IP addresses some day. IPv6 tries to address this by expanding the address space available. • IP addresses were 32 bits. IPv6 addresses are 128 bits.
IP • IP is a packet-switched protocol. • IP is a connectionless protocol - each packet is treated separately. • No flow or error control - best-effort delivery. • Being paired with TCP makes it reliable.